From 0a6a18524ea5c03ea03898ebd1945bc81153db45 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 15:15:25 +0800
Subject: [PATCH] 设备管理-添加导出功能
---
src/views/equipmentManagement/repair/index.vue | 22 +++++++++++++++++++++-
1 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/src/views/equipmentManagement/repair/index.vue b/src/views/equipmentManagement/repair/index.vue
index fb6c8b0..1a2ff1e 100644
--- a/src/views/equipmentManagement/repair/index.vue
+++ b/src/views/equipmentManagement/repair/index.vue
@@ -79,6 +79,9 @@
<el-button type="success" icon="Van" @click="addRepair">
鏂板鎶ヤ慨
</el-button>
+ <el-button @click="handleOut">
+ 瀵煎嚭
+ </el-button>
<el-button
type="danger"
icon="Delete"
@@ -134,7 +137,7 @@
<script setup>
import { usePaginationApi } from "@/hooks/usePaginationApi";
import { getRepairPage, delRepair } from "@/api/equipmentManagement/repair";
-import { onMounted } from "vue";
+import { onMounted, getCurrentInstance } from "vue";
import RepairModal from "./Modal/RepairModal.vue";
import { ElMessageBox, ElMessage } from "element-plus";
import dayjs from "dayjs";
@@ -143,6 +146,8 @@
defineOptions({
name: "璁惧鎶ヤ慨",
});
+
+const { proxy } = getCurrentInstance();
// 妯℃�佹瀹炰緥
const repairModalRef = ref();
@@ -289,6 +294,21 @@
});
};
+// 瀵煎嚭
+const handleOut = () => {
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ proxy.download("/device/repair/export", {}, "璁惧鎶ヤ慨.xlsx");
+ })
+ .catch(() => {
+ ElMessage.info("宸插彇娑�");
+ });
+};
+
onMounted(() => {
getTableData();
});
--
Gitblit v1.9.3