From 1d545776591f101c8aa33e1a893db0045bbc24b6 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期六, 08 二月 2025 17:28:10 +0800
Subject: [PATCH] 改bug
---
admin/src/views/operation/record.vue | 35 ++++++++++++++++++++++++++++-------
1 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/admin/src/views/operation/record.vue b/admin/src/views/operation/record.vue
index 37c421a..a7f872b 100644
--- a/admin/src/views/operation/record.vue
+++ b/admin/src/views/operation/record.vue
@@ -4,7 +4,7 @@
<div class="mt20">
<el-button type="primary" @click="handleEdit()" icon="el-icon-plus"
v-permissions="['business:ywpatrolline:create']">鏂板缓</el-button>
- <el-button type="primary" @click="handleEx" v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button>
+ <el-button type="primary" @click="exportExcel" :loading="isWorking.export" v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button>
</div>
<el-table v-loading="loading" :data="list" stripe>
<el-table-column prop="realName" label="杩愮淮浜�" min-width="100" show-overflow-tooltip />
@@ -38,7 +38,8 @@
import QueryForm from '@/components/common/QueryForm'
import Edit from './components/maintain.vue'
import Detail from './components/maintainDetail.vue'
-import { fetchList, deleteById } from '@/api/Inspection/deviceRecord'
+import { fetchList, deleteById, exportExcel } from '@/api/Inspection/deviceRecord'
+import { ywExportExcel } from '@/api/client/staff'
export default {
components: {
Pagination,
@@ -73,6 +74,9 @@
},
],
online: true
+ },
+ isWorking: {
+ export: false
}
}
},
@@ -100,9 +104,6 @@
this.loading = false
})
},
- handleEx() {
-
- },
handleEdit(row) {
this.showEdit = true
this.$nextTick(() => {
@@ -111,7 +112,6 @@
this.$refs.EditRef.getDetail(row.id)
}
})
-
},
handleDetail(row) {
this.$refs.DetailRef.visible = true
@@ -139,7 +139,28 @@
handleSizeChange(capacity) {
this.pagination.pageSize = capacity
this.getList()
- }
+ },
+ exportExcel () {
+ this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
+ .then(() => {
+ this.isWorking.export = true
+ exportExcel({
+ page: this.pagination.page,
+ capacity: 1000000,
+ model: this.filters
+ })
+ .then(response => {
+ this.download(response)
+ })
+ .catch(e => {
+ this.$tip.apiFailed(e)
+ })
+ .finally(() => {
+ this.isWorking.export = false
+ })
+ })
+ .catch(() => {})
+ },
}
}
</script>
--
Gitblit v1.9.3