教学大纲新增导出模板和导入按钮

This commit is contained in:
2026-09-17 10:03:29 +08:00
parent 9af6de6ff3
commit f7299c36e8
7 changed files with 602 additions and 41 deletions
@@ -66,3 +66,25 @@ export function exportSyllabus(query) {
responseType: 'blob'
})
}
// 下载教学大纲导入模板(数据 sheet + 填写说明 sheet
export function downloadSyllabusTemplate() {
return request({
url: '/zyjxjhb/template',
method: 'get',
responseType: 'blob'
})
}
// 导入教学大纲 Excel,返回 { insertCount, skipCount, failCount, skipList, failList, message }
export function importSyllabus(file) {
const formData = new FormData()
formData.append('file', file)
return request({
url: '/zyjxjhb/import',
method: 'post',
data: formData,
headers: { 'Content-Type': 'multipart/form-data' },
timeout: 60000
})
}