| | |
| | | loading.value = true |
| | | let resp = await getMeetingPublish({...searchForm, ...queryParams}) |
| | | approvalList.value = resp.data.records.map(it => { |
| | | 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 |
| | | const room = (roomEnum.value || []).find(r => r.id === it.roomId) |
| | | it.location = room ? `${room.name}(${room.location})` : (it.location || '-') |
| | | let staffs = []; if (Array.isArray(it.participants)) { staffs = it.participants } else if (it.participants) { const ps = String(it.participants).trim(); if (ps.startsWith('[')) { try { staffs = JSON.parse(ps) } catch (e) { staffs = [] } } else { staffs = ps.split(',').map(v => v.trim()).filter(Boolean) } }; if (!Array.isArray(staffs)) staffs = []; staffs = staffs.map(v => String(v)); |
| | | it.staffCount = staffs.length |
| | | it.status = it.publishStatus |
| | | 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 => String(id) === String(staff.id))).map(staff => { |
| | | return { |
| | | id: staff.id, |
| | | name: `${staff.staffName}(${staff.postJob})` |