From bb5ec20596998a83287706f7be2c91a7d7080b10 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 26 十二月 2025 10:40:33 +0800
Subject: [PATCH] 1.金鹰黄金加上筛选条件
---
src/views/equipmentManagement/upkeep/index.vue | 43 ++++++++++++++++++++++++++++++++-----------
1 files changed, 32 insertions(+), 11 deletions(-)
diff --git a/src/views/equipmentManagement/upkeep/index.vue b/src/views/equipmentManagement/upkeep/index.vue
index f44d817..2659ae0 100644
--- a/src/views/equipmentManagement/upkeep/index.vue
+++ b/src/views/equipmentManagement/upkeep/index.vue
@@ -7,7 +7,6 @@
style="width: 240px"
placeholder="璇疯緭鍏ヨ澶囧悕绉�"
clearable
- :prefix-icon="Search"
@change="getTableData"
/>
</el-form-item>
@@ -35,7 +34,6 @@
style="width: 240px"
placeholder="璇疯緭鍏ュ疄闄呬繚鍏讳汉"
clearable
- :prefix-icon="Search"
@change="getTableData"
/>
</el-form-item>
@@ -48,6 +46,9 @@
<div class="actions">
<el-text class="mx-1" size="large">璁惧淇濆吇</el-text>
<div>
+ <el-button type="success" icon="Van" @click="addPlan">
+ 鏂板璁″垝
+ </el-button>
<el-button
type="primary"
icon="Plus"
@@ -56,8 +57,8 @@
>
鏂板淇濆吇
</el-button>
- <el-button type="success" icon="Van" @click="addPlan">
- 鏂板璁″垝
+ <el-button @click="handleOut">
+ 瀵煎嚭
</el-button>
<el-button
type="danger"
@@ -97,16 +98,14 @@
<template #operation="{ row }">
<el-button
type="primary"
- text
- icon="editPen"
+ link
@click="editPlan(row.id)"
>
缂栬緫
</el-button>
<el-button
type="danger"
- text
- icon="delete"
+ link
@click="delRepairByIds(row.id)"
>
鍒犻櫎
@@ -122,7 +121,7 @@
<script setup>
import { usePaginationApi } from "@/hooks/usePaginationApi";
import { getUpkeepPage, delUpkeep } from "@/api/equipmentManagement/upkeep";
-import { onMounted } from "vue";
+import { onMounted, getCurrentInstance } from "vue";
import PlanModal from "./Modal/PlanModal.vue";
import MaintenanceModal from "./Modal/MaintenanceModal.vue";
import dayjs from "dayjs";
@@ -131,6 +130,8 @@
defineOptions({
name: "璁惧淇濆吇",
});
+
+const { proxy } = getCurrentInstance();
// 璁″垝寮圭獥鎺у埗鍣�
const planModalRef = ref();
@@ -154,7 +155,12 @@
getTableData,
resetFilters,
onCurrentChange,
-} = usePaginationApi(getUpkeepPage, {}, [
+} = usePaginationApi(getUpkeepPage, {
+ deviceName: undefined,
+ maintenancePlanTime: undefined,
+ maintenanceActuallyTime: undefined,
+ maintenanceActuallyName: undefined,
+}, [
{
label: "璁惧鍚嶇О",
align: "center",
@@ -215,7 +221,7 @@
dataType: "slot",
slot: "operation",
align: "center",
- width: "200px",
+ width: "150px",
},
]);
// type == 1瀹為檯淇濆吇鏃堕棿 2璁″垝淇濆吇鏃堕棿
@@ -271,6 +277,21 @@
});
};
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/device/maintenance/export", {}, "璁惧淇濆吇.xlsx");
+ })
+ .catch(() => {
+ ElMessage.info("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getTableData();
});
--
Gitblit v1.9.3