From 3bccdf9c8bca4cc868d3976e247a162746716bf0 Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期一, 28 九月 2026 15:07:31 +0800
Subject: [PATCH] fix(货运页): 当月无规上记录不再写 0(缺数留空);回补母版《班线包车》WPS 保存丢失的 2019/2020 块 420 格,并清 2021/2022 历史 0 值 78 格
---
traffic-audit-web/src/views/AuditResult.vue | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/traffic-audit-web/src/views/AuditResult.vue b/traffic-audit-web/src/views/AuditResult.vue
index 7db2d4f..f1a2bfd 100644
--- a/traffic-audit-web/src/views/AuditResult.vue
+++ b/traffic-audit-web/src/views/AuditResult.vue
@@ -609,8 +609,26 @@
},
exportExcel() {
if (!this.period) { this.$message.warning('璇烽�夋嫨鎶ヨ〃鏈�'); return }
- const q = 'period=' + this.period + '&reportType=' + this.reportType + '&onlyVerify=' + (this.issueScope !== 'all') + '&status=' + (this.statusScope || 'all')
- window.open('/api/audit/export?' + q)
+ const params = {
+ period: this.period,
+ reportType: this.reportType,
+ onlyVerify: this.issueScope !== 'all',
+ status: this.statusScope || 'all'
+ }
+ api.get('/audit/export', { params, responseType: 'blob' })
+ .then(res => this.downloadBlob(res, '瀹℃牳缁撴灉_' + this.period + '.xlsx'))
+ .catch(() => this.$message.error('瀵煎嚭澶辫触锛氳纭璇ユ姤琛ㄦ湡宸叉湁瀹℃牳缁撴灉'))
+ },
+ downloadBlob(res, fileName) {
+ const blob = res instanceof Blob ? res : new Blob([res], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' })
+ const url = window.URL.createObjectURL(blob)
+ const a = document.createElement('a')
+ a.href = url
+ a.download = fileName
+ document.body.appendChild(a)
+ a.click()
+ window.URL.revokeObjectURL(url)
+ document.body.removeChild(a)
},
review(row, status) {
if (status === 'IGNORED') {
--
Gitblit v1.9.1