Sfoglia il codice sorgente

fix:解决课纲册别设置学期数据异常问题

OnePsycho 3 anni fa
parent
commit
ea7afe1a75

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/en-US/syllabus.js

@@ -1,4 +1,5 @@
 export default {
+	noMatchTerm:'無匹配學期',
 	emptyTip: 'Empty books are not available for sharing!',
 	chooseChapterTip: 'Please select the topic you want to save first!',
 	chooseVolumeTip: 'Please select an existing book or create a new one!',

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-CN/syllabus.js

@@ -1,4 +1,5 @@
 export default{
+	noMatchTerm:'无匹配学期',
 	emptyTip:'空目录册别无法进行分享!',
 	chooseChapterTip:'请先选择需要收藏的章节!',
 	chooseVolumeTip:'请选择已创建的册别或者新建册别!',

+ 1 - 0
TEAMModelOS/ClientApp/src/locale/lang/zh-TW/syllabus.js

@@ -1,4 +1,5 @@
 export default {
+	noMatchTerm:'無匹配學期',
 	emptyTip: '空目錄冊別無法進行分享!',
 	chooseChapterTip: '請先選擇需要收藏的章節!',
 	chooseVolumeTip: '請選擇已創建的冊別或者新建冊別!',

+ 7 - 1
TEAMModelOS/ClientApp/src/view/syllabus/Syllabus.vue

@@ -2247,6 +2247,11 @@
 			/* 提交新增册别 */
 			handleSubmit() {
 				return new Promise((r, j) => {
+					if(!this.addVolumeForm.semester && this.addVolumeForm.semester !== 0){
+						this.$Message.warning(this.$t('schoolBaseInfo.semNameTips'))
+						j(500)
+						return
+					}
 					this.isAddLoading = true
 					let addVolumeParams = {
 						"auth": this.addVolumeForm.auth.map(i => {
@@ -2270,6 +2275,7 @@
 					}
 					if ((this.isEditVolume && this.curVolume)) {
 						addVolumeParams.id = this.curVolume.id
+						addVolumeParams.order = this.curVolume.order
 						addVolumeParams.name = this.addVolumeForm.name
 						addVolumeParams.syllabusIds = this.allChapterIds || []
 						addVolumeParams.creatorId = this.curVolume.creatorId
@@ -2370,7 +2376,7 @@
 				return id => {
 					if (this.periodList.length) {
 						let semesterItem = this.periodList[this.currentPeriodIndex].semesters.find(i => i.id === id)
-						return semesterItem ? semesterItem.name : ''
+						return semesterItem ? semesterItem.name : this.$t('syllabus.noMatchTerm')
 					} else {
 						return ''
 					}