From 3a0f25f9d38c08e1b78afedb2f67b7bb73f8c84f Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 01 七月 2026 17:15:45 +0800
Subject: [PATCH] 会议审批列表查不出,会议申请参会人列表查不出问题修改
---
src/pages/managementMeetings/meetExamine/index.vue | 53 +++++++++++++++++++++++++++++++++++++----------------
1 files changed, 37 insertions(+), 16 deletions(-)
diff --git a/src/pages/managementMeetings/meetExamine/index.vue b/src/pages/managementMeetings/meetExamine/index.vue
index 0b39095..1f74eab 100644
--- a/src/pages/managementMeetings/meetExamine/index.vue
+++ b/src/pages/managementMeetings/meetExamine/index.vue
@@ -159,25 +159,46 @@
...searchForm.value,
})
.then(res => {
- console.log(res.data.records, "res.data.records");
- ledgerList.value = res.data.records.map(it => {
- console.log(it, "it1");
- 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 records = res?.data?.records || [];
+ console.log(records, "res.data.records");
+
+ const parseStaffIds = value => {
+ if (!value) return [];
+ if (Array.isArray(value)) return value;
+ if (typeof value === "string") {
+ try {
+ const parsed = JSON.parse(value);
+ return Array.isArray(parsed) ? parsed : [];
+ } catch (e) {
+ return [];
+ }
+ }
+ return [];
+ };
+
+ ledgerList.value = records.map(raw => {
+ const it = { ...raw };
+
+ const room = roomEnum.value.find(
+ r => String(r?.id) === String(it.roomId)
+ );
+ it.location = room ? `${room.name}(${room.location})` : "";
+
+ const staffIds = parseStaffIds(it.participants);
+ it.staffCount = staffIds.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 => {
- return {
- id: staff.id,
- name: `${staff.staffName}(${staff.postName})`,
- };
- });
- console.log(it, "it2");
+ .filter(staff => staffIds.some(id => String(id) === String(staff.id)))
+ .map(staff => ({
+ id: staff.id,
+ name: `${staff.staffName}${
+ staff.postName ? `(${staff.postName})` : ""
+ }`,
+ }));
return it;
});
@@ -349,4 +370,4 @@
line-height: 28px;
padding: 0 12px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3