diff --git a/public/workplan-import-template.xls b/public/工作安排导入模板.xls similarity index 100% rename from public/workplan-import-template.xls rename to public/工作安排导入模板.xls diff --git a/src/api/module/workplan.ts b/src/api/module/workplan.ts index 302c86a..56cbd2b 100644 --- a/src/api/module/workplan.ts +++ b/src/api/module/workplan.ts @@ -125,13 +125,12 @@ class WorkPlanApi { } /** - * Excel 导入模板直链(public 静态资源)。 - * 文件名必须 ASCII:window.open/fetch 的导航请求在 vite dev 会被 spa fallback - * 改写到 index.html,中文名还会踩 zip 打包/网关的编码坑;下载时由 - * 指定中文显示名(见 WeekPlan.downloadTemplate)。 + * Excel 导入模板直链(public 静态资源,文件名即下载地址)。 + * 不能用 window.open 直链导航下载(见 WeekPlan.downloadTemplate 注释); + * 下载时由 fetch + 落盘(见 WeekPlan.downloadTemplate)。 */ templateUrl() { - return `${import.meta.env.BASE_URL || "/"}workplan-import-template.xls`; + return `${import.meta.env.BASE_URL || "/"}工作安排导入模板.xls`; } }