From 61ce61386bbb5ac886fb1f577b1acd2d7a4fb0df Mon Sep 17 00:00:00 2001
From: wl <173@qq.com>
Date: 星期三, 21 十二月 2022 11:29:24 +0800
Subject: [PATCH] fix:修改部门bug和对齐违规违建
---
src/views/intelligentPatrol/illegalSearch/index.vue | 37 ++++++++++++++++++++++++++++++++-----
1 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/src/views/intelligentPatrol/illegalSearch/index.vue b/src/views/intelligentPatrol/illegalSearch/index.vue
index 7c90d74..781cf30 100644
--- a/src/views/intelligentPatrol/illegalSearch/index.vue
+++ b/src/views/intelligentPatrol/illegalSearch/index.vue
@@ -24,7 +24,7 @@
<!-- 鎸夐挳鍖哄煙 -->
<div class="main-btns">
<div class="main-btns-left">
- <el-button icon="el-icon-download">涓嬭浇鍥剧墖</el-button>
+<!-- <el-button icon="el-icon-download">涓嬭浇鍥剧墖</el-button>-->
<el-button icon="el-icon-folder" @click="exportTableData">瀵煎嚭</el-button>
</div>
<div class="main-btns-right">
@@ -310,10 +310,37 @@
},
exportTableData() {
basecase.exportViolationData({ current: 1 })
- .then(() => {
- this.$message.success('鎿嶄綔鎴愬姛');
- })
- .catch(err => this.$message.error(err))
+ .then((res) => {
+ console.log(res)
+ this.$message.success('鎿嶄綔鎴愬姛');
+ // let res = basecase.exportUserOperationLogAjax({
+ // startLogTime: transDate(this.searchQuery.date[0], "YYYY-MM-DD"),
+ // endLogTime: transDate(this.searchQuery.date[1], "YYYY-MM-DD"),
+ // systemName: this.searchQuery.systemName,
+ // userName: this.searchQuery.user,
+ // }).then((res)=>{
+ // console.log(res)
+ // });
+
+ let time = new Date()
+ let deathdate =time.toLocaleDateString()
+ const blob = new Blob([res.data], {
+ type: "application/vnd.ms-excel;charset=utf-8",
+ });
+ if (window.navigator.msSaveBlob) {
+ window.navigator.msSaveBlob(blob, deathdate+"杩濊鏁版嵁" + ".xlsx");
+ } else {
+ const url = window.URL.createObjectURL(blob);
+ const link = document.createElement("a");
+ link.style.display = "none";
+ link.href = url;
+ link.download = deathdate+"杩濊鏁版嵁" + ".xlsx";
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ }
+ })
+ .catch(err => this.$message.error(err))
}
}
}
--
Gitblit v1.8.0