From c17604b019a0bcdd1d50d0f21d7c2a2d3e487a7d Mon Sep 17 00:00:00 2001 From: wanghu Date: Mon, 19 Oct 2026 10:49:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...lan-import-template.xls => 工作安排导入模板.xls} | Bin src/api/module/workplan.ts | 9 ++++----- 2 files changed, 4 insertions(+), 5 deletions(-) rename public/{workplan-import-template.xls => 工作安排导入模板.xls} (100%) 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`; } }