From bdfab89d8afbc60faeb89715a461f77e877d7f5d Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期一, 03 八月 2026 00:02:37 +0800
Subject: [PATCH] feat: 新增徐州什克金属制品有限公司配置文件

---
 src/views/equipmentManagement/upkeep/index.vue |  104 ++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 84 insertions(+), 20 deletions(-)

diff --git a/src/views/equipmentManagement/upkeep/index.vue b/src/views/equipmentManagement/upkeep/index.vue
index 0ee99eb..cd1adff 100644
--- a/src/views/equipmentManagement/upkeep/index.vue
+++ b/src/views/equipmentManagement/upkeep/index.vue
@@ -2,8 +2,8 @@
   <div class="app-container">
     <el-tabs v-model="activeTab"
              @tab-change="handleTabChange">
-      <!-- 瀹氭椂浠诲姟绠$悊tab -->
-      <el-tab-pane label="瀹氭椂浠诲姟绠$悊"
+      <!-- 淇濆吇浠诲姟tab -->
+      <el-tab-pane label="淇濆吇浠诲姟"
                    name="scheduled">
         <div class="search_form">
           <el-form :model="scheduledFilters"
@@ -37,7 +37,7 @@
         <div class="table_list">
           <div class="actions">
             <el-text class="mx-1"
-                     size="large">瀹氭椂浠诲姟绠$悊</el-text>
+                     size="large">淇濆吇浠诲姟</el-text>
             <div>
               <el-button type="primary"
                          icon="Plus"
@@ -63,6 +63,12 @@
             }"
                     @selection-change="handleScheduledSelectionChange"
                     @pagination="changeScheduledPage">
+            <template #isActiveRef="{ row }">
+              <el-tag v-if="row.isActive === 1"
+                      type="success">寮�鍚�</el-tag>
+              <el-tag v-else
+                      type="info">鍏抽棴</el-tag>
+            </template>
             <template #statusRef="{ row }">
               <el-tag v-if="row.status === 1"
                       type="success">鍚敤</el-tag>
@@ -70,6 +76,11 @@
                       type="danger">鍋滅敤</el-tag>
             </template>
             <template #operation="{ row }">
+              <el-button type="primary"
+                         link
+                         @click="handleDetail(row)">
+                璇︽儏
+              </el-button>
               <el-button type="primary"
                          link
                          @click="editScheduledTask(row)">
@@ -84,8 +95,8 @@
           </PIMTable>
         </div>
       </el-tab-pane>
-      <!-- 浠诲姟璁板綍tab锛堝師璁惧淇濆吇椤甸潰锛� -->
-      <el-tab-pane label="浠诲姟璁板綍"
+      <!-- 淇濆吇璁板綍tab锛堝師璁惧淇濆吇椤甸潰锛� -->
+      <el-tab-pane label="淇濆吇璁板綍"
                    name="record">
         <div class="search_form">
           <el-form :model="filters"
@@ -130,7 +141,7 @@
         <div class="table_list">
           <div class="actions">
             <el-text class="mx-1"
-                     size="large">浠诲姟璁板綍</el-text>
+                     size="large">淇濆吇璁板綍</el-text>
             <div>
               <el-button type="success"
                          icon="Van"
@@ -171,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"
@@ -213,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'"
@@ -235,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,
@@ -257,12 +277,16 @@
   const maintainModalRef = ref();
   // 瀹氭椂浠诲姟寮圭獥鎺у埗鍣�
   const formDiaRef = ref();
+  // 瀹氭椂浠诲姟璇︽儏寮圭獥鎺у埗鍣�
+  const detailDiaRef = ref();
+  // 淇濆吇璁板綍璇︽儏寮圭獥鎺у埗鍣�
+  const recordDetailDiaRef = ref();
   // 闄勪欢寮圭獥
   const fileListDialogRef = ref(null);
   const fileDialogVisible = ref(false);
   const currentMaintenanceTaskId = ref(null);
 
-  // 浠诲姟璁板綍tab锛堝師璁惧淇濆吇椤甸潰锛夌浉鍏冲彉閲�
+  // 淇濆吇璁板綍tab锛堝師璁惧淇濆吇椤甸潰锛夌浉鍏冲彉閲�
   const filters = reactive({
     deviceName: "",
     maintenancePlanTime: "",
@@ -278,7 +302,7 @@
   });
   const multipleList = ref([]);
 
-  // 瀹氭椂浠诲姟绠$悊tab鐩稿叧鍙橀噺
+  // 淇濆吇浠诲姟tab鐩稿叧鍙橀噺
   const scheduledFilters = reactive({
     taskName: "",
     status: "",
@@ -292,7 +316,7 @@
   });
   const scheduledMultipleList = ref([]);
 
-  // 瀹氭椂浠诲姟绠$悊琛ㄦ牸鍒楅厤缃�
+  // 淇濆吇浠诲姟琛ㄦ牸鍒楅厤缃�
   const scheduledColumns = ref([
     { prop: "taskName", label: "璁惧鍚嶇О" },
     {
@@ -300,9 +324,15 @@
       prop: "deviceModel",
     },
     {
+      label: "淇濆吇椤圭洰",
+      prop: "machineryCategory",
+      minWidth: 120,
+      formatData: cell => cell || "--",
+    },
+    {
       prop: "frequencyType",
       label: "棰戞",
-      minWidth: 150,
+      minWidth: 80,
       // PIMTable 浣跨敤鐨勬槸 formatData锛岃�屼笉鏄� Element-Plus 鐨� formatter
       formatData: cell =>
         ({
@@ -315,7 +345,7 @@
     {
       prop: "frequencyDetail",
       label: "寮�濮嬫棩鏈熶笌鏃堕棿",
-      minWidth: 150,
+      minWidth: 130,
       // 鍚屾牱鏀圭敤 formatData锛孭IMTable 鍐呴儴浼氭妸鍗曞厓鏍煎�间紶杩涙潵
       formatData: cell => {
         if (typeof cell !== "string") return "";
@@ -336,19 +366,34 @@
         );
       },
     },
+    {
+      prop: "isActive",
+      label: "瀹氭椂浠诲姟",
+      dataType: "slot",
+      slot: "isActiveRef",
+      align: "center",
+      minWidth: 100,
+    },
+    { 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") : "-",
+    },
     {
       fixed: "right",
       label: "鎿嶄綔",
       dataType: "slot",
       slot: "operation",
       align: "center",
-      width: "200px",
+      width: "160px",
     },
   ]);
 
-  // 浠诲姟璁板綍琛ㄦ牸鍒楅厤缃紙鍘熻澶囦繚鍏昏〃鏍煎垪锛�
+  // 淇濆吇璁板綍琛ㄦ牸鍒楅厤缃紙鍘熻澶囦繚鍏昏〃鏍煎垪锛�
   const columns = ref([
     {
       label: "璁惧鍚嶇О",
@@ -364,7 +409,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: "褰曞叆浜�",
@@ -372,9 +419,10 @@
       prop: "createUserName",
     },
     {
-      label: "椤圭洰",
+      label: "淇濆吇椤圭洰",
       align: "center",
       prop: "machineryCategory",
+      formatData: cell => cell || "--",
     },
     // {
     //   label: "褰曞叆鏃ユ湡",
@@ -393,7 +441,7 @@
       align: "center",
       prop: "maintenanceActuallyTime",
       formatData: cell =>
-        cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
+        cell ? dayjs(cell).format("YYYY-MM-DD") : "-",
     },
     {
       label: "淇濆吇缁撴灉",
@@ -415,7 +463,7 @@
       dataType: "slot",
       slot: "operation",
       align: "center",
-      width: "350px",
+      width: "250px",
     },
   ]);
 
@@ -428,7 +476,7 @@
     }
   };
 
-  // 瀹氭椂浠诲姟绠$悊鐩稿叧鏂规硶
+  // 淇濆吇浠诲姟鐩稿叧鏂规硶
   const getScheduledTableData = async () => {
     try {
       const params = {
@@ -477,6 +525,14 @@
     }
   };
 
+  const handleDetail = row => {
+    if (row) {
+      nextTick(() => {
+        detailDiaRef.value?.openDialog(row);
+      });
+    }
+  };
+
   const delScheduledTaskByIds = async ids => {
     try {
       await ElMessageBox.confirm("纭畾鍒犻櫎閫変腑鐨勫畾鏃朵换鍔″悧锛�", "鎻愮ず", {
@@ -495,7 +551,7 @@
     ElMessage.info("瀵煎嚭瀹氭椂浠诲姟鍔熻兘寰呭疄鐜�");
   };
 
-  // 浠诲姟璁板綍鐩稿叧鏂规硶锛堝師璁惧淇濆吇椤甸潰鏂规硶锛�
+  // 淇濆吇璁板綍鐩稿叧鏂规硶锛堝師璁惧淇濆吇椤甸潰鏂规硶锛�
   const getTableData = async () => {
     try {
       const params = {
@@ -548,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