This commit is contained in:
2026-08-27 10:31:21 +08:00
parent 25f37a1d9a
commit 90e03e1faf
10 changed files with 126 additions and 16 deletions
@@ -69,3 +69,42 @@ export function listTraining(params) {
params
})
}
/**
* 导出培养方案到 Excel(返回 Blob)
* GET /training/export
*/
export function exportTrainingProgram() {
return request({
url: '/training/export',
method: 'get',
responseType: 'blob'
})
}
/**
* 下载培养方案导入模板(返回 Blob)
* GET /download/training-program
*/
export function downloadTrainingProgramTemplate() {
return request({
url: '/download/training-program',
method: 'get',
responseType: 'blob'
})
}
/**
* 导入培养方案 Excelmultipart,字段名 file
* POST /training/import
*/
export function importTrainingProgram(file) {
const formData = new FormData()
formData.append('file', file)
return request({
url: '/training/import',
method: 'post',
data: formData,
headers: { 'Content-Type': 'multipart/form-data' }
})
}