From 083f8e4ea2030a228ae43ad412f72a5954990878 Mon Sep 17 00:00:00 2001 From: Wangxin Date: Tue, 11 Nov 2025 22:02:34 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90web=E3=80=91=20=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alops-ui/src/api/QandA/knowledge.js | 9 +++ .../src/views/QandA/knowledge/index.vue | 62 ++++++++++++++++++- .../inMonitoring/devicesState/detail.vue | 4 +- 3 files changed, 71 insertions(+), 4 deletions(-) diff --git a/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js b/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js index e59bf367..7f83bc1a 100644 --- a/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js +++ b/ALOps_sys_fe/alops-ui/src/api/QandA/knowledge.js @@ -64,6 +64,15 @@ export function del(id) { }) } +// 下载文件 +export function downloadFile(fileId) { + return request({ + url: api + '/file/download/' + fileId, + method: 'get', + responseType: 'blob' // 指定响应类型为二进制数据 + }) +} + diff --git a/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue b/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue index 0c1c9207..1496d19a 100644 --- a/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue +++ b/ALOps_sys_fe/alops-ui/src/views/QandA/knowledge/index.vue @@ -25,8 +25,10 @@ {{ formatISOTime(scope.row.uploadTime) }} - + @@ -80,7 +82,7 @@