| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {ref, reactive, onMounted} from 'vue' |
| | | import {ref, reactive, onMounted, onActivated} from 'vue' |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | import Pagination from '@/components/Pagination/index.vue' |
| | | import {getRoomEnum, getExamineList,saveMeetingApplication} from '@/api/collaborativeApproval/meeting.js' |
| | | import dayjs from "dayjs"; |
| | | import {staffOnJobListPage} from "@/api/personnelManagement/staffOnJob.js"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | |
| | | // 数据列表加载状态 |
| | | const loading = ref(false) |
| | |
| | | let room = roomEnum.value.find(room => it.roomId === room.id) |
| | | it.location = `${room.name}(${room.location})` |
| | | let staffs = JSON.parse(it.participants) |
| | | it.staffCount = staffs.size |
| | | it.staffCount = staffs.length |
| | | it.meetingTime = `${it.meetingDate} ${dayjs(it.startTime).format('HH:mm:ss')} ~ ${dayjs(it.endTime).format('HH:mm:ss')}` |
| | | it.participants = staffList.value.filter(staff => staffs.some(id=>id === staff.id)).map(staff => { |
| | | it.participants = staffList.value.filter(staff => staffs.some(id => id == staff.userId)).map(staff => { |
| | | return { |
| | | id: staff.id, |
| | | name: `${staff.staffName}${staff.postName ? ` (${staff.postName})` : ''}` |
| | | id: staff.userId, |
| | | name: `${staff.nickName || staff.userName}${staff.dept?.deptName ? ` (${staff.dept.deptName})` : ''}` |
| | | } |
| | | }) |
| | | |
| | |
| | | |
| | | // 页面加载时获取数据 |
| | | onMounted(async () => { |
| | | const [resp1, resp2]= await Promise.all([getRoomEnum(), staffOnJobListPage({current: -1, size: -1, staffState: 1})]) |
| | | const [resp1, resp2]= await Promise.all([getRoomEnum(), userListNoPageByTenantId()]) |
| | | roomEnum.value = resp1.data |
| | | staffList.value = resp2.data.records |
| | | staffList.value = resp2.data || [] |
| | | }) |
| | | |
| | | await getList() |
| | | onActivated(() => { |
| | | getList() |
| | | }) |
| | | </script> |
| | | |