diff --git a/CHANGELOG.md b/CHANGELOG.md index 55b7473e0b74df313bfc128543aef2a582ce5999..e05f83e15fb2bb75a27c93a32d38804789d7914a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ 并且此项目遵循 [Semantic Versioning](https://semver.org/lang/zh-CN/). ## [Unreleased] +### Fixed +- 修复下载数据导入错误文件异常 ## [0.6.13] - 2024-03-26 ### Added diff --git a/src/panel-component/user-message/async-action/async-action-preview/async-action-preview.tsx b/src/panel-component/user-message/async-action/async-action-preview/async-action-preview.tsx index 46501560d7bbeccb4602107844a264f282707636..5bed4b3408ab8c051a11bf97b6896277c57161b4 100644 --- a/src/panel-component/user-message/async-action/async-action-preview/async-action-preview.tsx +++ b/src/panel-component/user-message/async-action/async-action-preview/async-action-preview.tsx @@ -30,7 +30,12 @@ function fileDownload(file: { url: string; name: string }): void { delimiter: ';', }).filename as string; if (filename) { - file.name += `.${filename.split('.')[1]}`; + // 特殊处理返回的文件名带有双引号 + file.name += `.${ + filename.startsWith('"') && filename.endsWith('"') + ? filename.substring(1, filename.length - 1).split('.')[1] + : filename.split('.')[1] + }`; } if (response.status !== 200) { @@ -110,6 +115,7 @@ export const AsyncActionPreview = defineComponent({ // 错误文件 if (actionResult.errorfile) { info.errorFileUrl = `${ibiz.env.baseUrl}/${ibiz.env.appId}${ibiz.env.downloadFileUrl}/${actionResult.errorfile.folder}/${actionResult.errorfile.fileid}`; + info.errorFileUrl = info.errorFileUrl.replace('/{cat}', ''); } }