From 23464f578b015dfced527b0c1a71dc55765fda8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A6=8F=E8=B4=A2?= <1471584931@qq.com> Date: Fri, 5 Dec 2025 11:34:18 +0800 Subject: [PATCH] =?UTF-8?q?--=E4=BF=AE=E6=94=B9=E5=85=A8=E5=B1=80=E9=99=84?= =?UTF-8?q?=E4=BB=B6=E6=98=8E=E6=98=BE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/file/index.ts | 12 ++++++++++++ .../default/header/components/notify/index.vue | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/api/system/file/index.ts b/src/api/system/file/index.ts index 0be3d8c..86ac207 100644 --- a/src/api/system/file/index.ts +++ b/src/api/system/file/index.ts @@ -33,6 +33,18 @@ export function parseDownloadUrl(url:string,th?:boolean,full?:boolean) { return resultUrl; } +export async function getInfoByDownloadUrl(params: {id: string}, mode: ErrorMessageMode = 'modal') { + return defHttp.get( + { + url: Api.Info, + params, + }, + { + errorMessageMode: mode, + }, + ); +} + /** * @description: 查询文件分页 diff --git a/src/layouts/default/header/components/notify/index.vue b/src/layouts/default/header/components/notify/index.vue index 9124cff..47fd531 100644 --- a/src/layouts/default/header/components/notify/index.vue +++ b/src/layouts/default/header/components/notify/index.vue @@ -161,7 +161,7 @@ import { getOaMessage, getOaNews, setOaRead, setSingleRead, setWorkReadAll, getScheduleMsg, setScheduleRead, setScheduleReadAll } from '/@/api/system/login'; import { queryLoginUserNotices, setSystemNoticeRead } from '/@/api/system/systemNotice/index'; - import { getInfoByDownloadUrl } from '/@/api/system/file'; + import { getInfoByDownloadUrl,parseDownloadUrl } from '/@/api/system/file'; import { Empty } from 'ant-design-vue'; import ApprovalProcess from '/@/views/workflow/task/components/ApprovalProcess.vue'; @@ -356,8 +356,8 @@ record.paramsJson = record.paramsJson ? JSON.parse(record.paramsJson) : {}; let fileId = record.paramsJson.id || []; getInfoByDownloadUrl({ id: fileId }).then((res) => { - let fileUrl = res.fileUrlFixed || res.fileUrl; - downloadByUrl({ url: fileUrl, fileName: res.fileName + res.fileType || 'files.zip' }); + let fileUrl = parseDownloadUrl(res.fileUrl); + downloadByUrl({ url: res.fileUrl, fileName: res.fileOrg || 'files.zip' }); }); return; }