From d1cfd849c6a61800dcd86ffb45f80882ae20b2e7 Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期一, 14 九月 2026 22:32:36 +0800
Subject: [PATCH] security: 接口鉴权 + 跨域收紧 + AI 数据脱敏 + 日志脱敏
---
traffic-audit-web/src/views/DataImport.vue | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/traffic-audit-web/src/views/DataImport.vue b/traffic-audit-web/src/views/DataImport.vue
index d9a6e8c..f7f6638 100644
--- a/traffic-audit-web/src/views/DataImport.vue
+++ b/traffic-audit-web/src/views/DataImport.vue
@@ -334,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