From b80bb7253a87931fea5a1a788fc4c6ffb204d245 Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期日, 20 九月 2026 10:54:05 +0800
Subject: [PATCH] fix(报表): 补齐客运站/物流站场投资明细表的就绪校验与预览类型
---
traffic-audit-web/src/views/ReportExport.vue | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/traffic-audit-web/src/views/ReportExport.vue b/traffic-audit-web/src/views/ReportExport.vue
index 12f42d0..8448ec1 100644
--- a/traffic-audit-web/src/views/ReportExport.vue
+++ b/traffic-audit-web/src/views/ReportExport.vue
@@ -105,7 +105,8 @@
<div v-for="it in previewItems" :key="it.key" class="preview-item">
<div class="preview-head">
<span class="preview-name">{{ it.label }}</span>
- <span class="preview-rows">鍏� {{ it.rowCount || 0 }} 琛�</span>
+ <span class="preview-rows" v-if="it.key === 'summaryWorkbook'">鎸囨爣 {{ (it.summary || []).length }} 椤�</span>
+ <span class="preview-rows" v-else>鍏� {{ it.rowCount || 0 }} 琛屾槑缁�</span>
</div>
<div class="preview-coverage">
<span class="cov-label">鏈堝害瑕嗙洊锛�</span>
@@ -224,7 +225,9 @@
{ key: 'investPlan', label: '鍏ㄧ渷棰勫畨鎺掕鍒掕繘搴︽眹鎬�', fileName: '鐢熸垚_鍏ㄧ渷棰勫畨鎺掕鍒掕繘搴︽儏鍐垫眹鎬�.xls', status: null, statusNote: '' },
{ key: 'investFiveYearLogistics', label: '鍗佷簲浜旇鍒掔墿娴侀」鐩繘灞�', fileName: '鐢熸垚_鍗佷簲浜旇鍒掔墿娴侀」鐩繘灞曟儏鍐�.xls', status: null, statusNote: '' },
{ key: 'investBillion', label: '浜垮厓鎶曡祫椤圭洰', fileName: '鐢熸垚_婀栧寳鐪侊紙瀹㈣揣绔欏満锛変嚎鍏冩姇璧勯」鐩�.xls', status: null, statusNote: '' },
- { key: 'investCounty', label: '缁忔祹寮哄幙椤圭洰鎶曡祫缁熻', fileName: '鐢熸垚_缁忔祹寮哄幙浜ら�氱墿娴佸熀纭�璁炬柦鎶曡祫缁熻鎶ヨ〃.xls', status: null, statusNote: '' }
+ { key: 'investCounty', label: '缁忔祹寮哄幙椤圭洰鎶曡祫缁熻', fileName: '鐢熸垚_缁忔祹寮哄幙浜ら�氱墿娴佸熀纭�璁炬柦鎶曡祫缁熻鎶ヨ〃.xls', status: null, statusNote: '' },
+ { key: 'investPassengerDetail', label: '瀹㈣繍绔欐姇璧勬槑缁嗚〃', fileName: '鐢熸垚_X鏈堝杩愮珯鎶曡祫鏄庣粏琛�.xlsx', status: null, statusNote: '' },
+ { key: 'investLogisticsDetail', label: '鐗╂祦绔欏満鎶曡祫鏄庣粏', fileName: '鐢熸垚_X鏈堢墿娴佺珯鍦烘姇璧勬槑缁�.xls', status: null, statusNote: '' }
], checked: []
},
{
@@ -475,7 +478,7 @@
const doExport = () => {
if (items.length === 1) {
api.get('/report/export/' + items[0].key, { params, responseType: 'blob', timeout: 120000 })
- .then(res => { this.downloadBlob(res, items[0].fileName); this.$message.success('鎶ヨ〃瀵煎嚭鎴愬姛'); this.loading = '' })
+ .then(res => { this.downloadBlob(res, this.fileNameOf(items[0])); this.$message.success('鎶ヨ〃瀵煎嚭鎴愬姛'); this.loading = '' })
.catch(err => this.failWith(err))
return
}
@@ -546,6 +549,13 @@
}
return text.length > 200 ? text.slice(0, 200) + '鈥�' : text
},
+ // 鏂囦欢鍚嶅崰浣嶇 X鏈� -> 褰撳墠鎶ヨ〃鏈熸湀浠斤紙濡傘�岀敓鎴恄X鏈堝杩愮珯鎶曡祫鏄庣粏琛�.xlsx銆�->銆岀敓鎴恄8鏈堝杩愮珯鎶曡祫鏄庣粏琛�.xlsx銆嶏級
+ fileNameOf(item) {
+ const name = (item && item.fileName) || ''
+ const mm = parseInt((this.period || '').split('-')[1], 10)
+ if (!mm) return name
+ return name.replace(/X鏈�/g, mm + '鏈�')
+ },
downloadBlob(res, fileName) {
const isZip = /\.zip$/.test(fileName)
const isXls = /\.xls$/.test(fileName)
--
Gitblit v1.9.1