From fde27654b1b21a8d2c149d3d12f86c3c7314c091 Mon Sep 17 00:00:00 2001
From: lishenao <3065849776@qq.com>
Date: 星期四, 03 七月 2025 15:00:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 src/views/equipmentManagement/upkeep/index.vue |  143 ++++++++++++++++++++++++++---------------------
 1 files changed, 79 insertions(+), 64 deletions(-)

diff --git a/src/views/equipmentManagement/upkeep/index.vue b/src/views/equipmentManagement/upkeep/index.vue
index 5d3dcd2..35bd51f 100644
--- a/src/views/equipmentManagement/upkeep/index.vue
+++ b/src/views/equipmentManagement/upkeep/index.vue
@@ -19,6 +19,7 @@
             type="danger"
             icon="Delete"
             :disabled="multipleList.length <= 0"
+            @click="delRepairByIds(multipleList.map((item) => item.id))"
           >
             鎵归噺鍒犻櫎
           </el-button>
@@ -35,6 +36,7 @@
           total: pagination.total,
         }"
         @selection-change="handleSelectionChange"
+        @pagination="changePage"
       >
         <template #maintenanceResultRef="{ row }">
           <el-tag v-if="row.maintenanceResult === 1" type="success">
@@ -100,70 +102,78 @@
 };
 
 // 琛ㄦ牸閽╁瓙
-const { filters, columns, dataList, pagination, getTableData, resetFilters } =
-  usePaginationApi(getUpkeepPage, {}, [
-    {
-      label: "璁惧鍚嶇О",
-      align: "center",
-      prop: "deviceName",
-    },
-    {
-      label: "瑙勬牸鍨嬪彿",
-      align: "center",
-      prop: "deviceModel",
-    },
-    {
-      label: "璁″垝淇濆吇鏃ユ湡",
-      align: "center",
-      prop: "maintenancePlanTime",
-      formatData: (cell) => dayjs(cell).format("YYYY-MM-DD"),
-    },
-    {
-      label: "褰曞叆浜�",
-      align: "center",
-      prop: "createUserName",
-    },
-    {
-      label: "褰曞叆鏃ユ湡",
-      align: "center",
-      prop: "createTime",
-      formatData: (cell) => dayjs(cell).format("YYYY-MM-DD HH:mm:ss"),
-      width: 200,
-    },
-    {
-      label: "瀹為檯淇濆吇浜�",
-      align: "center",
-      prop: "maintenanceActuallyName",
-    },
-    {
-      label: "瀹為檯淇濆吇鏃ユ湡",
-      align: "center",
-      prop: "maintenanceActuallyTime",
-      formatData: (cell) => dayjs(cell).format("YYYY-MM-DD HH:mm:ss"),
-    },
-    {
-      label: "淇濆吇缁撴灉",
-      align: "center",
-      prop: "maintenanceResult",
-      dataType: "slot",
-      slot: "maintenanceResultRef",
-    },
-    {
-      label: "鐘舵��",
-      align: "center",
-      prop: "status",
-      dataType: "slot",
-      slot: "statusRef",
-    },
-    {
-      fixed: "right",
-      label: "鎿嶄綔",
-      dataType: "slot",
-      slot: "operation",
-      align: "center",
-      width: "200px",
-    },
-  ]);
+const {
+  filters,
+  columns,
+  dataList,
+  pagination,
+  getTableData,
+  resetFilters,
+  onCurrentChange,
+} = usePaginationApi(getUpkeepPage, {}, [
+  {
+    label: "璁惧鍚嶇О",
+    align: "center",
+    prop: "deviceName",
+  },
+  {
+    label: "瑙勬牸鍨嬪彿",
+    align: "center",
+    prop: "deviceModel",
+  },
+  {
+    label: "璁″垝淇濆吇鏃ユ湡",
+    align: "center",
+    prop: "maintenancePlanTime",
+    formatData: (cell) => dayjs(cell).format("YYYY-MM-DD"),
+  },
+  {
+    label: "褰曞叆浜�",
+    align: "center",
+    prop: "createUserName",
+  },
+  {
+    label: "褰曞叆鏃ユ湡",
+    align: "center",
+    prop: "createTime",
+    formatData: (cell) => dayjs(cell).format("YYYY-MM-DD HH:mm:ss"),
+    width: 200,
+  },
+  {
+    label: "瀹為檯淇濆吇浜�",
+    align: "center",
+    prop: "maintenanceActuallyName",
+  },
+  {
+    label: "瀹為檯淇濆吇鏃ユ湡",
+    align: "center",
+    prop: "maintenanceActuallyTime",
+    formatData: (cell) =>
+      cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-",
+  },
+  {
+    label: "淇濆吇缁撴灉",
+    align: "center",
+    prop: "maintenanceResult",
+    dataType: "slot",
+    slot: "maintenanceResultRef",
+  },
+  {
+    label: "鐘舵��",
+    align: "center",
+    prop: "status",
+    dataType: "slot",
+    slot: "statusRef",
+  },
+  {
+    fixed: "right",
+    label: "鎿嶄綔",
+    dataType: "slot",
+    slot: "operation",
+    align: "center",
+    width: "200px",
+  },
+]);
 
 // 鏂板淇濆吇
 const addMaintain = () => {
@@ -181,6 +191,11 @@
   planModalRef.value.openEdit(id);
 };
 
+const changePage = ({ page }) => {
+  pagination.currentPage = page;
+  onCurrentChange(page);
+};
+
 // 鍗曡鍒犻櫎
 const delRepairByIds = async (ids) => {
   ElMessageBox.confirm("纭鍒犻櫎鎶ヤ慨鏁版嵁, 姝ゆ搷浣滀笉鍙��?", "璀﹀憡", {

--
Gitblit v1.9.3