From 7c863257d23fd7f01c84a8996677e682d9d50b07 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 30 十二月 2025 09:38:38 +0800
Subject: [PATCH] 1.海川开心-部分页面添加默认值

---
 src/views/equipmentManagement/repair/index.vue |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/src/views/equipmentManagement/repair/index.vue b/src/views/equipmentManagement/repair/index.vue
index 6cae307..08cbcc2 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"
@@ -103,8 +106,9 @@
         @pagination="changePage"
       >
         <template #statusRef="{ row }">
+          <el-tag v-if="row.status === 2" type="danger">澶辫触</el-tag>
           <el-tag v-if="row.status === 1" type="success">瀹岀粨</el-tag>
-          <el-tag v-if="row.status === 0" type="danger">寰呯淮淇�</el-tag>
+          <el-tag v-if="row.status === 0" type="warning">寰呯淮淇�</el-tag>
         </template>
         <template #operation="{ row }">
           <el-button
@@ -134,7 +138,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 +147,8 @@
 defineOptions({
   name: "璁惧鎶ヤ慨",
 });
+
+const { proxy } = getCurrentInstance();
 
 // 妯℃�佹瀹炰緥
 const repairModalRef = ref();
@@ -163,7 +169,12 @@
 } = usePaginationApi(
   getRepairPage,
   {
-    searchText: undefined,
+    deviceName: undefined,
+    deviceModel: undefined,
+    remark: undefined,
+    maintenanceName: undefined,
+    repairTimeStr: undefined,
+    maintenanceTimeStr: undefined,
   },
   [
     {
@@ -284,6 +295,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