|
@@ -701,32 +701,32 @@ export default {
|
|
|
notice: ''
|
|
|
}
|
|
|
},
|
|
|
- // (废弃)
|
|
|
- seltChange(data) {
|
|
|
- this.addTeachers = data
|
|
|
- },
|
|
|
- //确认添加教师 (废弃)
|
|
|
- confirmAddTea() {
|
|
|
- let teachers = this.addTeachers.map(item => {
|
|
|
- return {
|
|
|
- id: item.value,
|
|
|
- name: item.label
|
|
|
- }
|
|
|
- })
|
|
|
- let ids = this.courseListShow[this.curCusIndex].teachers.map(item => {
|
|
|
- return item.id
|
|
|
- })
|
|
|
- let isUpd = false
|
|
|
- teachers.forEach(item => {
|
|
|
- if (ids.indexOf(item.id) == -1) {
|
|
|
- this.courseListShow[this.curCusIndex].teachers.push(item)
|
|
|
- isUpd = true
|
|
|
- }
|
|
|
- })
|
|
|
- this.addTeachers = []
|
|
|
- this.$refs['addTea'].clearSingleSelect()
|
|
|
- if (isUpd) this.updCusInfo()
|
|
|
- },
|
|
|
+ // // (废弃)
|
|
|
+ // seltChange(data) {
|
|
|
+ // this.addTeachers = data
|
|
|
+ // },
|
|
|
+ // //确认添加教师 (废弃)
|
|
|
+ // confirmAddTea() {
|
|
|
+ // let teachers = this.addTeachers.map(item => {
|
|
|
+ // return {
|
|
|
+ // id: item.value,
|
|
|
+ // name: item.label
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // let ids = this.courseListShow[this.curCusIndex].teachers.map(item => {
|
|
|
+ // return item.id
|
|
|
+ // })
|
|
|
+ // let isUpd = false
|
|
|
+ // teachers.forEach(item => {
|
|
|
+ // if (ids.indexOf(item.id) == -1) {
|
|
|
+ // this.courseListShow[this.curCusIndex].teachers.push(item)
|
|
|
+ // isUpd = true
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // this.addTeachers = []
|
|
|
+ // this.$refs['addTea'].clearSingleSelect()
|
|
|
+ // if (isUpd) this.updCusInfo()
|
|
|
+ // },
|
|
|
// 更新课程数据
|
|
|
updCusInfo() {
|
|
|
this.courseListShow[this.curCusIndex].code = this.courseListShow[this.curCusIndex].code.replace('Course-', '')
|
|
@@ -808,15 +808,15 @@ export default {
|
|
|
})
|
|
|
this.getCusInfo()
|
|
|
},
|
|
|
- getTeahcers(val) {
|
|
|
- this.courseBaseInfo.teachers.length = []
|
|
|
- for (let item of val) {
|
|
|
- this.courseBaseInfo.teachers.push({
|
|
|
- id: item.value,
|
|
|
- name: item.label
|
|
|
- })
|
|
|
- }
|
|
|
- },
|
|
|
+ // getTeahcers(val) {
|
|
|
+ // this.courseBaseInfo.teachers.length = []
|
|
|
+ // for (let item of val) {
|
|
|
+ // this.courseBaseInfo.teachers.push({
|
|
|
+ // id: item.value,
|
|
|
+ // name: item.label
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // },
|
|
|
//id换名字
|
|
|
//获取名字集合
|
|
|
getTeacherName(ids) {
|
|
@@ -861,7 +861,7 @@ export default {
|
|
|
},
|
|
|
//获取课程完整信息
|
|
|
getCusInfo() {
|
|
|
- if (!this.courseListShow[this.curCusIndex].teachers) {
|
|
|
+ if (!this.courseListShow[this.curCusIndex]) {
|
|
|
let requestData = {
|
|
|
'code': this.$store.state.userInfo.schoolCode,
|
|
|
'scope': 'school',
|
|
@@ -1012,9 +1012,9 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
this.courseBaseInfo = this.courseListShow[index]
|
|
|
- this.teacherId = this.courseBaseInfo.teachers.map(item => {
|
|
|
- return item.id
|
|
|
- })
|
|
|
+ // this.teacherId = this.courseBaseInfo.teachers.map(item => {
|
|
|
+ // return item.id
|
|
|
+ // })
|
|
|
this.addCourseStatus = true
|
|
|
}
|
|
|
},
|