|
@@ -905,7 +905,7 @@ export default {
|
|
|
},
|
|
|
//删除学科
|
|
|
delSubject(id) {
|
|
|
- let index = this.schoolSetting.period[this.curPriodIndex].subjects.findIndex(item=>item.id == id)
|
|
|
+ let index = this.schoolSetting.period[this.curPriodIndex].subjects.findIndex(item => item.id == id)
|
|
|
this.$Modal.confirm({
|
|
|
title: this.$t('schoolBaseInfo.delSubjectTitle'),
|
|
|
content: this.$t('schoolBaseInfo.delete') + this.schoolSetting.period[this.curPriodIndex].subjects[index].name + this.$t('schoolBaseInfo.delContent'),
|
|
@@ -916,7 +916,7 @@ export default {
|
|
|
},
|
|
|
//编辑学科
|
|
|
etSubject(id) {
|
|
|
- let index = this.schoolSetting.period[this.curPriodIndex].subjects.findIndex(item=>item.id == id)
|
|
|
+ let index = this.schoolSetting.period[this.curPriodIndex].subjects.findIndex(item => item.id == id)
|
|
|
this.etSubIndex = index
|
|
|
this.subjectInfo.name = this.schoolSetting.period[this.curPriodIndex].subjects[index].name
|
|
|
this.subjectInfo.type = this.schoolSetting.period[this.curPriodIndex].subjects[index].type
|
|
@@ -1219,6 +1219,15 @@ export default {
|
|
|
this.$store.dispatch('user/setSchoolProfile', schoolJson)
|
|
|
//更新头部学校信息
|
|
|
this.$store.commit('user/setSchoolsInfo', schoolJson)
|
|
|
+
|
|
|
+ //更新当前选中学段信息
|
|
|
+ let curPd = this.schoolSetting.period.find(item => this.$store.state.user.curPeriod && item.id === this.$store.state.user.curPeriod.id)
|
|
|
+ console.log(curPd)
|
|
|
+ if (curPd) {
|
|
|
+ this.$store.commit('user/setCurPeriod', curPd)
|
|
|
+ // 保存Stroage
|
|
|
+ localStorage.setItem('curPeriod', JSON.stringify(curPd))
|
|
|
+ }
|
|
|
} else {
|
|
|
this.$store.dispatch('user/getSchoolProfile')
|
|
|
}
|