From 426c8b34e6c0a6f97de69864c537cf5e0d7dbb08 Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期四, 15 十二月 2022 18:13:34 +0800
Subject: [PATCH] 2022-12-15 趋势分析 地图位置 ,弹窗修改

---
 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