From 94fc7aa616090838d703e3bc1576bb68f5c230c8 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 12 七月 2025 17:08:43 +0800
Subject: [PATCH] 1.来票台账附件上传接口中未传文件ID
---
src/views/equipmentManagement/upkeep/index.vue | 143 ++++++++++++++++++++++++++---------------------
1 files changed, 80 insertions(+), 63 deletions(-)
diff --git a/src/views/equipmentManagement/upkeep/index.vue b/src/views/equipmentManagement/upkeep/index.vue
index 7f9e7de..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">
@@ -80,6 +82,7 @@
import PlanModal from "./Modal/PlanModal.vue";
import MaintenanceModal from "./Modal/MaintenanceModal.vue";
import dayjs from "dayjs";
+import { ElMessageBox, ElMessage } from "element-plus";
defineOptions({
name: "璁惧淇濆吇",
@@ -99,69 +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",
- },
- {
- 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 = () => {
@@ -179,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