From 91dec349aa88c58c587199d9601529d60824e1d0 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 02 七月 2026 13:24:34 +0800
Subject: [PATCH] 生产订单对齐管理端新增两个字段展示

---
 src/pages/managementMeetings/meetExamine/index.vue |   59 ++++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 40 insertions(+), 19 deletions(-)

diff --git a/src/pages/managementMeetings/meetExamine/index.vue b/src/pages/managementMeetings/meetExamine/index.vue
index ec96321..1f74eab 100644
--- a/src/pages/managementMeetings/meetExamine/index.vue
+++ b/src/pages/managementMeetings/meetExamine/index.vue
@@ -102,7 +102,7 @@
     getExamineList,
     getRoomEnum,
   } from "@/api/managementMeetings/meetExamine";
-  import { getStaffOnJob } from "@/api/personnelManagement/onboarding";
+  import { staffOnJobListPage } from "@/api/personnelManagement/onboarding";
   import { onShow } from "@dcloudio/uni-app";
   import useUserStore from "@/store/modules/user";
   import dayjs from "dayjs";
@@ -138,10 +138,10 @@
   const staffList = ref([]);
   // 鍛樺伐鍒楄〃鏌ヨ
   const getStaffOnJobList = () => {
-    return getStaffOnJob()
+    return staffOnJobListPage()
       .then(res => {
         console.log(res.data, "res.data");
-        staffList.value = res.data;
+        staffList.value = res.data.records;
       })
       .catch(() => {
         closeToast();
@@ -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.postJob})`,
-              };
-            });
-          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