From 2a97deaa6deb2b5e94b2edba33a3e885cab4892b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 22 十二月 2025 17:11:21 +0800
Subject: [PATCH] 1.海川开心-设备保养添加定时任务 2.海川开心-销售管理、采购管理展示字段修改
---
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