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 @@