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