|
|
|
@ -386,11 +386,11 @@ export default { |
|
|
|
|
this.fileUrl = '' |
|
|
|
|
}, |
|
|
|
|
uploadSure () { |
|
|
|
|
this.importVisible = false; |
|
|
|
|
this.pageNo = 1; |
|
|
|
|
this.staffGradeId = ""; |
|
|
|
|
this.keyword = ""; |
|
|
|
|
this.getTeacher(); |
|
|
|
|
this.importVisible = false |
|
|
|
|
this.pageNo = 1 |
|
|
|
|
this.staffGradeId = '' |
|
|
|
|
this.keyword = '' |
|
|
|
|
this.getTeacher() |
|
|
|
|
}, |
|
|
|
|
transferType (ext) { |
|
|
|
|
if ("jpg,jpeg,png,gif,svg,psd".includes(ext)) return "图片"; |
|
|
|
@ -398,9 +398,9 @@ export default { |
|
|
|
|
return ext; |
|
|
|
|
}, |
|
|
|
|
addChapter () { |
|
|
|
|
this.chapterName = ""; |
|
|
|
|
this.chapterId = ""; |
|
|
|
|
this.chapterVisible = true; |
|
|
|
|
this.chapterName = '' |
|
|
|
|
this.chapterId = '' |
|
|
|
|
this.chapterVisible = true |
|
|
|
|
}, |
|
|
|
|
sort () { |
|
|
|
|
this.originChapters = JSON.parse(JSON.stringify(this.chapters)) |
|
|
|
@ -467,7 +467,7 @@ export default { |
|
|
|
|
j.chapterId = n.id |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
await this.$post(this.api.reorder, { |
|
|
|
|
await this.$post(this.api.reorderCurriculm, { |
|
|
|
|
chapterVOList: chapters |
|
|
|
|
}) |
|
|
|
|
this.getData() |
|
|
|
@ -525,7 +525,7 @@ export default { |
|
|
|
|
j.chapterId = n.id |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
await this.$post(this.api.reorder, { |
|
|
|
|
await this.$post(this.api.reorderCurriculm, { |
|
|
|
|
chapterVOList: this.chapters |
|
|
|
|
}) |
|
|
|
|
this.getData() |
|
|
|
@ -546,7 +546,7 @@ export default { |
|
|
|
|
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { |
|
|
|
|
type: "warning" |
|
|
|
|
}).then(() => { |
|
|
|
|
this.$del(`${this.api.deleteChapter}/${id}`).then(res => { |
|
|
|
|
this.$del(`${this.api.deleteChapterCurriculm}/${id}`).then(res => { |
|
|
|
|
this.$message.success("删除成功") |
|
|
|
|
this.getData() |
|
|
|
|
}).catch(res => { }) |
|
|
|
@ -577,7 +577,7 @@ export default { |
|
|
|
|
}; |
|
|
|
|
if (this.chapterId) { |
|
|
|
|
data.id = this.chapterId; |
|
|
|
|
this.$put(this.api.editChapter, data).then(res => { |
|
|
|
|
this.$put(this.api.editChapterCurriculm, data).then(res => { |
|
|
|
|
this.$message.success("修改成功"); |
|
|
|
|
this.chapterVisible = false; |
|
|
|
|
this.getData(); |
|
|
|
@ -585,13 +585,11 @@ export default { |
|
|
|
|
.catch(err => { |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
this.$post(this.api.addChapter, data).then(res => { |
|
|
|
|
this.$post(this.api.addChapterCurriculm, data).then(res => { |
|
|
|
|
this.$message.success("添加成功"); |
|
|
|
|
this.chapterVisible = false; |
|
|
|
|
this.getData(); |
|
|
|
|
}) |
|
|
|
|
.catch(err => { |
|
|
|
|
}); |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
sectionSubmit (e) { |
|
|
|
@ -609,7 +607,7 @@ export default { |
|
|
|
|
fileType: this.fileType, |
|
|
|
|
originalFileName: this.originalFileName |
|
|
|
|
}; |
|
|
|
|
this.$post(this.api.addSubsection, data).then(res => { |
|
|
|
|
this.$post(this.api.addSubsectionCurriculm, data).then(res => { |
|
|
|
|
this.$message.success("添加成功"); |
|
|
|
|
this.sectionVisible = false; |
|
|
|
|
this.getData(); |
|
|
|
@ -737,7 +735,7 @@ export default { |
|
|
|
|
fileUrl: this.fileUrl, |
|
|
|
|
originalFileName: this.originalFileName |
|
|
|
|
}; |
|
|
|
|
this.$put(this.api.editSubsection, data).then(res => { |
|
|
|
|
this.$put(this.api.editSubsectionCurriculm, data).then(res => { |
|
|
|
|
this.$message.success("更换成功"); |
|
|
|
|
this.switchVisible = false; |
|
|
|
|
this.getData(); |
|
|
|
@ -753,12 +751,11 @@ export default { |
|
|
|
|
type: "warning" |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.$del(`${this.api.deleteSubsection}/${row.id}`).then(res => { |
|
|
|
|
this.$del(`${this.api.deleteSubsectionCurriculm}/${row.id}`).then(res => { |
|
|
|
|
row.fileUrl && Oss.del(row.fileUrl) |
|
|
|
|
this.$message.success("删除成功"); |
|
|
|
|
this.getData(); |
|
|
|
|
}).catch(res => { |
|
|
|
|
}); |
|
|
|
|
this.$message.success("删除成功") |
|
|
|
|
this.getData() |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}).catch(() => { }) |
|
|
|
|
}, |
|
|
|
|
sortChapter (row, type, disabled, index) { |
|
|
|
@ -774,7 +771,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
sectionNameSubmit () { |
|
|
|
|
if (!this.sectionForm.sectionName) return this.$message.warning("请填写小节名称") |
|
|
|
|
this.$put(this.api.editSubsection, { |
|
|
|
|
this.$put(this.api.editSubsectionCurriculm, { |
|
|
|
|
id: this.sectionId, |
|
|
|
|
cid: this.id, |
|
|
|
|
chapterId: this.chapterId, |
|
|
|
|