From 92acee73cbe8d5a230cf45e1146bd594153dc364 Mon Sep 17 00:00:00 2001
From: guanqb <18720758508@163.com>
Date: Fri, 02 Feb 2024 19:14:29 +0800
Subject: [PATCH] 九小导出
---
src/views/publicSecurity/ninePlaceManage/archivesManage.vue | 41 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 40 insertions(+), 1 deletions(-)
diff --git a/src/views/publicSecurity/ninePlaceManage/archivesManage.vue b/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
index b9a9fb9..7371744 100644
--- a/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
+++ b/src/views/publicSecurity/ninePlaceManage/archivesManage.vue
@@ -14,6 +14,10 @@
<el-button :size="size" type="text" @click="showStringDispose(row, 'principalPhoneflag')"
v-text="textDispose(row, 'principalPhoneflag', 'principalPhone')"></el-button>
</template>
+ <template slot="menuLeft">
+ <el-button type="warning" size="small" plain icon="el-icon-download" @click="handleExport">导出
+ </el-button>
+ </template>
</avue-crud>
</basic-container>
</template>
@@ -25,6 +29,21 @@
import {
getDAGLList
} from "@/api/publicSecurity/ninePlaceManage"
+import NProgress from 'nprogress'
+import 'nprogress/nprogress.css'
+import Qs from "qs"
+import {
+ exportBlob
+} from "@/api/common"
+import {
+ getToken
+} from '@/util/auth'
+import {
+ downloadXls
+} from "@/util/util"
+import {
+ dateNow
+} from "@/util/date"
export default {
data () {
@@ -48,7 +67,6 @@
searchShow: true,
searchMenuSpan: 3,
menu: false,
- header: false,
border: true,
index: true,
editBtn: false,
@@ -169,6 +187,27 @@
}
},
methods: {
+ handleExport () {
+ this.$confirm("是否导出档案管理数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ }).then(() => {
+ NProgress.start()
+ var data = {
+ ...this.query
+ }
+ data = Qs.stringify(data)
+ exportBlob(
+ `/api/blade-place/place/exportNineType?${this.website.tokenHeader}=${getToken()}&` + data
+ ).then(res => {
+ console.log('exportBlob', res)
+ downloadXls(res.data, `档案管理${dateNow()}.xlsx`)
+ NProgress.done()
+ })
+ })
+ },
+
showStringDispose (row, type) {
row[type] = !row[type]
},
--
Gitblit v1.9.3