From 3d2a1e5bc593cd137a7923407d593fdeadacea17 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期六, 20 六月 2026 09:32:03 +0800
Subject: [PATCH] feat: 保养任务与记录详情查看

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

diff --git a/src/views/equipmentManagement/upkeep/index.vue b/src/views/equipmentManagement/upkeep/index.vue
index 52ad842..cd1adff 100644
--- a/src/views/equipmentManagement/upkeep/index.vue
+++ b/src/views/equipmentManagement/upkeep/index.vue
@@ -78,6 +78,11 @@
             <template #operation="{ row }">
               <el-button type="primary"
                          link
+                         @click="handleDetail(row)">
+                璇︽儏
+              </el-button>
+              <el-button type="primary"
+                         link
                          @click="editScheduledTask(row)">
                 缂栬緫
               </el-button>
@@ -177,6 +182,11 @@
                       type="warning">寰呬繚鍏�</el-tag>
             </template>
             <template #operation="{ row }">
+              <el-button type="primary"
+                         link
+                         @click="handleRecordDetail(row)">
+                璇︽儏
+              </el-button>
               <!-- 杩欎釜鍔熻兘璺熸柊澧炰繚鍏诲姛鑳戒竴妯′竴鏍凤紝鏈夊暐鎰忎箟锛� -->
               <!-- <el-button
               type="primary"
@@ -219,6 +229,8 @@
                       @ok="getTableData" />
     <FormDia ref="formDiaRef"
              @closeDia="getScheduledTableData" />
+    <DetailDia ref="detailDiaRef" />
+    <RecordDetailDia ref="recordDetailDiaRef" />
     <FileList v-if="fileDialogVisible"
               v-model:visible="fileDialogVisible"
               :record-type="'device_maintenance'"
@@ -241,6 +253,8 @@
   import PlanModal from "./Form/PlanModal.vue";
   import MaintenanceModal from "./Form/MaintenanceModal.vue";
   import FormDia from "./Form/formDia.vue";
+  import DetailDia from "./Form/detailDia.vue";
+  import RecordDetailDia from "./Form/RecordDetailDia.vue";
   import {
     getUpkeepPage,
     delUpkeep,
@@ -263,6 +277,10 @@
   const maintainModalRef = ref();
   // 瀹氭椂浠诲姟寮圭獥鎺у埗鍣�
   const formDiaRef = ref();
+  // 瀹氭椂浠诲姟璇︽儏寮圭獥鎺у埗鍣�
+  const detailDiaRef = ref();
+  // 淇濆吇璁板綍璇︽儏寮圭獥鎺у埗鍣�
+  const recordDetailDiaRef = ref();
   // 闄勪欢寮圭獥
   const fileListDialogRef = ref(null);
   const fileDialogVisible = ref(false);
@@ -314,7 +332,7 @@
     {
       prop: "frequencyType",
       label: "棰戞",
-      minWidth: 50,
+      minWidth: 80,
       // PIMTable 浣跨敤鐨勬槸 formatData锛岃�屼笉鏄� Element-Plus 鐨� formatter
       formatData: cell =>
         ({
@@ -371,7 +389,7 @@
       dataType: "slot",
       slot: "operation",
       align: "center",
-      width: "150px",
+      width: "160px",
     },
   ]);
 
@@ -445,7 +463,7 @@
       dataType: "slot",
       slot: "operation",
       align: "center",
-      width: "350px",
+      width: "250px",
     },
   ]);
 
@@ -503,6 +521,14 @@
     if (row) {
       nextTick(() => {
         formDiaRef.value?.openDialog("edit", row);
+      });
+    }
+  };
+
+  const handleDetail = row => {
+    if (row) {
+      nextTick(() => {
+        detailDiaRef.value?.openDialog(row);
       });
     }
   };
@@ -578,6 +604,14 @@
     maintainModalRef.value.open(row.id, row);
   };
 
+  const handleRecordDetail = row => {
+    if (row) {
+      nextTick(() => {
+        recordDetailDiaRef.value?.openDialog(row);
+      });
+    }
+  };
+
   const addPlan = () => {
     planModalRef.value.openModal();
   };

--
Gitblit v1.9.3