From 2d3530a7c11557a40807ad7c0b9e302ce6ce3a9f Mon Sep 17 00:00:00 2001
From: hsy <1029150275@qq.com>
Date: 星期五, 28 八月 2026 10:16:32 +0800
Subject: [PATCH] feat: 综合业务模块页面重构与交互完善

---
 src/views/equipmentManagement/upkeep/index.vue |   48 +++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/src/views/equipmentManagement/upkeep/index.vue b/src/views/equipmentManagement/upkeep/index.vue
index c22ebcc..4e629a1 100644
--- a/src/views/equipmentManagement/upkeep/index.vue
+++ b/src/views/equipmentManagement/upkeep/index.vue
@@ -241,6 +241,7 @@
     deviceMaintenanceTaskList,
     deviceMaintenanceTaskDel,
   } from "@/api/equipmentManagement/upkeep";
+  import { userListNoPageByTenantId } from "@/api/system/user.js";
   import dayjs from "dayjs";
 
   const { proxy } = getCurrentInstance();
@@ -261,6 +262,13 @@
   const fileListDialogRef = ref(null);
   const fileDialogVisible = ref(false);
   const currentMaintenanceTaskId = ref(null);
+
+  const userList = ref([]);
+  const getUserName = (userId) => {
+    if (!userId) return "--";
+    const user = userList.value.find(u => String(u.userId) === String(userId));
+    return user ? user.nickName : userId;
+  };
 
   // 淇濆吇璁板綍tab锛堝師璁惧淇濆吇椤甸潰锛夌浉鍏冲彉閲�
   const filters = reactive({
@@ -306,6 +314,18 @@
       formatData: cell => cell || "--",
     },
     {
+      label: "淇濆吇绫诲瀷",
+      prop: "maintenanceType",
+      minWidth: 100,
+      formatData: cell => (cell === "1" ? "鏃ュ父浣跨敤" : cell === "2" ? "瀹氭湡淇濆吇" : "--")
+    },
+    { 
+      prop: "executorId", 
+      label: "鎵ц浜�", 
+      minWidth: 100,
+      formatData: cell => getUserName(cell)
+    },
+    {
       prop: "frequencyType",
       label: "棰戞",
       minWidth: 150,
@@ -344,7 +364,13 @@
     },
     { prop: "maintenancePerson", label: "淇濆吇浜�", minWidth: 100 },
     { prop: "registrant", label: "鐧昏浜�", minWidth: 100 },
-    { prop: "registrationDate", label: "鐧昏鏃ユ湡", minWidth: 100 },
+    {
+      prop: "registrationDate",
+      label: "鐧昏鏃ユ湡",
+      minWidth: 100,
+      formatData: cell =>
+        cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
+    },
     {
       fixed: "right",
       label: "鎿嶄綔",
@@ -371,7 +397,9 @@
       label: "璁″垝淇濆吇鏃ユ湡",
       align: "center",
       prop: "maintenancePlanTime",
-      formatData: cell => dayjs(cell).format("YYYY-MM-DD"),
+      formatData: cell => {
+        return cell == null ? "-" : dayjs(cell).format("YYYY-MM-DD");
+      },
     },
     {
       label: "褰曞叆浜�",
@@ -383,6 +411,18 @@
       align: "center",
       prop: "machineryCategory",
       formatData: cell => cell || "--",
+    },
+    {
+      label: "淇濆吇绫诲瀷",
+      align: "center",
+      prop: "maintenanceType",
+      formatData: cell => (cell === "1" ? "鏃ュ父浣跨敤" : cell === "2" ? "瀹氭湡淇濆吇" : "--")
+    },
+    {
+      label: "鎵ц浜�",
+      align: "center",
+      prop: "executorId",
+      formatData: cell => getUserName(cell)
     },
     // {
     //   label: "褰曞叆鏃ユ湡",
@@ -620,7 +660,9 @@
     fileDialogVisible.value = true;
   };
 
-  onMounted(() => {
+  onMounted(async () => {
+    const { data } = await userListNoPageByTenantId();
+    userList.value = data || [];
     // 鏍规嵁榛樿婵�娲荤殑 Tab 璋冪敤瀵瑰簲鐨勬煡璇㈡帴鍙�
     if (activeTab.value === "scheduled") {
       getScheduledTableData();

--
Gitblit v1.9.3