From b289f60aebd90c3d2cccec83d36d06017e04029e Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期五, 24 二月 2023 09:36:14 +0800 Subject: [PATCH] 2023/2/24 肖辉 修改文字颜色 --- src/views/intelligentPatrol/statistics/unlawful/time/index.vue | 30 ++++++++++++++++++++++++++++-- 1 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/views/intelligentPatrol/statistics/unlawful/time/index.vue b/src/views/intelligentPatrol/statistics/unlawful/time/index.vue index a3772b5..28960f5 100644 --- a/src/views/intelligentPatrol/statistics/unlawful/time/index.vue +++ b/src/views/intelligentPatrol/statistics/unlawful/time/index.vue @@ -140,7 +140,33 @@ methods: { ...mapActions(["searchByTime"]), - handleExport(e) {}, + handleExport(e) { + this.$axios({ + method: 'post', + url: `sccg/intelligentPatrol/statistics/export/unlawful`, + responseType: 'arraybuffer' + }) + .then(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); + } + this.$message.success('鎿嶄綔鎴愬姛'); + }) + }, setTableDataHandle(e) {}, resetTableData(e) {}, // 璁剧疆琛ㄦ牸鏂戦┈绾� @@ -331,7 +357,7 @@ // font-size: 10px; .operation { display: flex; - + color: var(--operation-color); .line { padding: 0 5px; } -- Gitblit v1.8.0