From 0da79cbe4fceea00b819752b5d4ff9bed17e0021 Mon Sep 17 00:00:00 2001 From: baiqi Date: Fri, 27 Oct 2023 11:09:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/project-management/fileManagement.ts | 4 ++-- .../src/api/requrls/project-management/fileManagement.ts | 1 + .../src/components/business/ms-thumbnail-card/index.vue | 8 +++++++- frontend/src/components/pure/ms-upload/fileList.vue | 8 +------- frontend/src/components/pure/ms-upload/index.vue | 7 ++++++- .../fileManagement/components/rightBox.vue | 4 +++- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/frontend/src/api/modules/project-management/fileManagement.ts b/frontend/src/api/modules/project-management/fileManagement.ts index 1f7f845011..e4478af9f9 100644 --- a/frontend/src/api/modules/project-management/fileManagement.ts +++ b/frontend/src/api/modules/project-management/fileManagement.ts @@ -62,12 +62,12 @@ export function deleteFile(data: BatchFileApiParams) { // 下载文件 export function downloadFile(id: string) { - return MSR.get({ url: DownloadFileUrl, params: id }, { isTransformResponse: false }); + return MSR.get({ url: DownloadFileUrl, params: id, responseType: 'blob' }, { isTransformResponse: false }); } // 批量下载文件 export function batchDownloadFile(data: BatchFileApiParams) { - return MSR.post({ url: BatchDownloadFileUrl, data }, { isTransformResponse: false }); + return MSR.post({ url: BatchDownloadFileUrl, data, responseType: 'blob' }, { isTransformResponse: false }); } // 更新模块 diff --git a/frontend/src/api/requrls/project-management/fileManagement.ts b/frontend/src/api/requrls/project-management/fileManagement.ts index a78d87a6d8..cf56b4f21b 100644 --- a/frontend/src/api/requrls/project-management/fileManagement.ts +++ b/frontend/src/api/requrls/project-management/fileManagement.ts @@ -11,3 +11,4 @@ export const AddModuleUrl = '/project/file-module/add'; // 添加模块 export const GetModuleUrl = '/project/file-module/tree'; // 查找模块 export const DeleteModuleUrl = '/project/file-module/delete'; // 删除模块 export const GetModuleCountUrl = '/project/file/module/count'; // 模块统计文件数量 +export const PreviewImgUrl = '/project/file/download/preview-img'; // 预览图片文件接口 diff --git a/frontend/src/components/business/ms-thumbnail-card/index.vue b/frontend/src/components/business/ms-thumbnail-card/index.vue index 90595d8ff9..c460b6fd7e 100644 --- a/frontend/src/components/business/ms-thumbnail-card/index.vue +++ b/frontend/src/components/business/ms-thumbnail-card/index.vue @@ -4,7 +4,13 @@
- +