From afed4dfc3b1b79ba1beec26e68a1ba6ac1192c15 Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期四, 17 九月 2026 14:39:59 +0800
Subject: [PATCH] fix(投资): 修复两级表头导致的取列错位 + 新增《弹窗提示》机制(14 条规则)

---
 traffic-audit-web/src/views/DataImport.vue |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/traffic-audit-web/src/views/DataImport.vue b/traffic-audit-web/src/views/DataImport.vue
index b9c83e7..f7f6638 100644
--- a/traffic-audit-web/src/views/DataImport.vue
+++ b/traffic-audit-web/src/views/DataImport.vue
@@ -1,3 +1,4 @@
+<template>
   <el-container direction="vertical">
     <app-header title="浜ら�氱粺璁℃姤琛ㄥ鏍哥郴缁� - 鏁版嵁瀵煎叆"></app-header>
     <el-container>
@@ -333,7 +334,20 @@
     typeLabel(t) { return TYPE_LABELS[t] || t },
     downloadTemplate() {
       if (!this.templateUrl) return
-      window.open('/api/templates/' + this.templateUrl)
+      const name = this.templateUrl.split('/').pop()
+      api.get('/templates/' + this.templateUrl, { responseType: 'blob' })
+        .then(res => {
+          const blob = res instanceof Blob ? res : new Blob([res])
+          const url = window.URL.createObjectURL(blob)
+          const a = document.createElement('a')
+          a.href = url
+          a.download = name
+          document.body.appendChild(a)
+          a.click()
+          window.URL.revokeObjectURL(url)
+          document.body.removeChild(a)
+        })
+        .catch(() => this.$message.error('妯℃澘涓嬭浇澶辫触锛岃绋嶅悗閲嶈瘯'))
     },
     onModuleChange(key) {
       this.importType = this.moduleSel[key] || ''

--
Gitblit v1.9.1