|
@@ -569,7 +569,7 @@ export default {
|
|
},
|
|
},
|
|
selectTab(index) {
|
|
selectTab(index) {
|
|
this.currentTabIndex = index
|
|
this.currentTabIndex = index
|
|
- if(index == 4){
|
|
|
|
|
|
+ if (index == 4) {
|
|
this.findClassCus()
|
|
this.findClassCus()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -815,17 +815,14 @@ export default {
|
|
res => {
|
|
res => {
|
|
if (res) {
|
|
if (res) {
|
|
if (res.error) {
|
|
if (res.error) {
|
|
- this.roomListShow[this.curClassIndex].option = option
|
|
|
|
this.$Message.error(res.v)
|
|
this.$Message.error(res.v)
|
|
} else {
|
|
} else {
|
|
this.$Message.success(this.$t('schoolBaseInfo.csTips3'))
|
|
this.$Message.success(this.$t('schoolBaseInfo.csTips3'))
|
|
this.updated = false
|
|
this.updated = false
|
|
this.updHiteachLink = []
|
|
this.updHiteachLink = []
|
|
- if (option == 'insert') {
|
|
|
|
- this.roomListShow[this.curClassIndex].code = 'Class-' + this.roomListShow[this.curClassIndex].code
|
|
|
|
- this.roomList.unshift(this.roomListShow[this.curClassIndex])
|
|
|
|
- this.$store.dispatch('user/addSchoolClasses', this.roomListShow[this.curClassIndex]);
|
|
|
|
- }
|
|
|
|
|
|
+ this.roomListShow[this.curClassIndex].code = 'Class-' + this.roomListShow[this.curClassIndex].code
|
|
|
|
+ // this.roomList.unshift(this.roomListShow[this.curClassIndex])
|
|
|
|
+ // this.$store.dispatch('user/addSchoolRoom', this.roomListShow[this.curClassIndex])
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
this.$Message.error('API error!')
|
|
this.$Message.error('API error!')
|
|
@@ -937,6 +934,7 @@ export default {
|
|
}
|
|
}
|
|
this.$api.room.DelRoom(requestData).then(
|
|
this.$api.room.DelRoom(requestData).then(
|
|
res => {
|
|
res => {
|
|
|
|
+ this.curClassIndex = 0
|
|
this.$Message.success(this.$t('schoolBaseInfo.csTips7'))
|
|
this.$Message.success(this.$t('schoolBaseInfo.csTips7'))
|
|
let originIndex = -1
|
|
let originIndex = -1
|
|
for (let i in this.roomList) {
|
|
for (let i in this.roomList) {
|
|
@@ -947,6 +945,7 @@ export default {
|
|
}
|
|
}
|
|
this.roomList.splice(originIndex, 1)
|
|
this.roomList.splice(originIndex, 1)
|
|
this.roomListShow.splice(index, 1)
|
|
this.roomListShow.splice(index, 1)
|
|
|
|
+ this.$store.dispatch('user/delSchoolRoom', this.roomListShow[index].id);
|
|
},
|
|
},
|
|
err => {
|
|
err => {
|
|
this.$Message.error('API error!')
|
|
this.$Message.error('API error!')
|
|
@@ -988,7 +987,7 @@ export default {
|
|
this.drawSchoolPlan('')
|
|
this.drawSchoolPlan('')
|
|
this.initIcon()
|
|
this.initIcon()
|
|
}
|
|
}
|
|
- if(this.currentTabIndex == 4){
|
|
|
|
|
|
+ if (this.currentTabIndex == 4) {
|
|
this.findClassCus()
|
|
this.findClassCus()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1028,7 +1027,9 @@ export default {
|
|
if (!res.error) {
|
|
if (!res.error) {
|
|
this.$Message.success(this.$t('schoolBaseInfo.csTips3'))
|
|
this.$Message.success(this.$t('schoolBaseInfo.csTips3'))
|
|
this.roomListShow.unshift(this._.cloneDeep(res.room))
|
|
this.roomListShow.unshift(this._.cloneDeep(res.room))
|
|
- console.log(this.roomListShow)
|
|
|
|
|
|
+ this.roomList.unshift(this.roomListShow[this.curClassIndex])
|
|
|
|
+ this.$store.dispatch('user/addSchoolRoom', res.room)
|
|
|
|
+ this.updated = false
|
|
} else {
|
|
} else {
|
|
this.$Message.error('API error!')
|
|
this.$Message.error('API error!')
|
|
}
|
|
}
|