forked from liweijie/education
学员学籍异动申请新增报错
This commit is contained in:
@@ -61,10 +61,10 @@ export function deleteTeachingMaterial(id) {
|
||||
})
|
||||
}
|
||||
|
||||
/** 教材导入模板下载 GET /download/teaching-material */
|
||||
/** 教材导入模板下载 GET /teachingMaterial/template */
|
||||
export function downloadTeachingMaterialTemplate() {
|
||||
return request({
|
||||
url: '/download/teaching-material',
|
||||
url: '/teachingMaterial/template',
|
||||
method: 'get',
|
||||
responseType: 'blob'
|
||||
})
|
||||
|
||||
@@ -590,7 +590,7 @@ export default {
|
||||
const pad = n => String(n).padStart(2, '0')
|
||||
const date = `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())}`
|
||||
const time = `${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`
|
||||
return `${date} ${time}`
|
||||
return `${date}T${time}`
|
||||
},
|
||||
|
||||
handleSubmit(row) {
|
||||
|
||||
@@ -1125,7 +1125,11 @@ export default {
|
||||
// ==================== 模板下载 / 导入 ====================
|
||||
handleDownloadTemplate() {
|
||||
downloadTeachingMaterialTemplate().then(blob => {
|
||||
saveAs(blob, '教材管理导入模板.xls')
|
||||
if (blob && blob.type && blob.type.indexOf('json') !== -1) {
|
||||
this.$message.error('模板下载失败')
|
||||
return
|
||||
}
|
||||
saveAs(blob, '教材管理导入模板.xlsx')
|
||||
this.$message.success('模板下载成功')
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user