From 73c00286e758228343c515fafd2d85e7e9a2410a Mon Sep 17 00:00:00 2001 From: zhaichao Date: Wed, 26 Aug 2026 17:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E5=91=98=E9=98=9F=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/studentRecords/team.js | 9 +++++++++ frontend/src/views/student/shiftTeam/index.vue | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/frontend/src/api/studentRecords/team.js b/frontend/src/api/studentRecords/team.js index 54f389c3a..65e27b143 100644 --- a/frontend/src/api/studentRecords/team.js +++ b/frontend/src/api/studentRecords/team.js @@ -68,3 +68,12 @@ export function exportTeam(query) { responseType: 'blob' }) } + +// 下载学员队导入模板 +export function downloadTeamTemplate() { + return request({ + url: '/download/student-team', + method: 'get', + responseType: 'blob' + }) +} diff --git a/frontend/src/views/student/shiftTeam/index.vue b/frontend/src/views/student/shiftTeam/index.vue index 450f397ab..620b48924 100644 --- a/frontend/src/views/student/shiftTeam/index.vue +++ b/frontend/src/views/student/shiftTeam/index.vue @@ -302,7 +302,8 @@ import { updateTeam, delTeam, importTeam, - exportTeam + exportTeam, + downloadTeamTemplate } from '@/api/studentRecords/team' export default { @@ -588,8 +589,10 @@ export default { // ==================== 模板下载 / 导入 ==================== handleDownloadTemplate() { - // 后端暂未提供模板下载接口,仅作提示 - this.$message.info('后端暂未提供该接口') + downloadTeamTemplate().then(blob => { + saveAs(blob, '学员队导入模板.xlsx') + this.$message.success('模板下载成功') + }).catch(() => {}) }, handleChooseFile() {