|
@@ -822,7 +822,8 @@ export default {
|
|
|
let dataList = []
|
|
|
let teacherList = []
|
|
|
courses.forEach((item) => {
|
|
|
- if(tea.courseIds.search(item.courseId) > -1){
|
|
|
+ let courseData = tea.courseList.filter(x => x.courseId == item.courseId)
|
|
|
+ if(courseData && courseData.length > 0){
|
|
|
dataList.push(item)
|
|
|
teacherList = tea.courseList
|
|
|
}
|
|
@@ -852,12 +853,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- this.goodsTeacher.forEach((item) => {
|
|
|
+ }
|
|
|
+ this.goodsTeacher.forEach((item) => {
|
|
|
if(item.courseList && item.courseList.length > 0){
|
|
|
item.courseList[0].show = 1
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
}else{
|
|
|
//没有双师资模板
|
|
|
res.rows.forEach((item) => {
|
|
@@ -891,12 +892,13 @@ export default {
|
|
|
},
|
|
|
//切换老师
|
|
|
switchTeacher(data, index, teacherIndex){
|
|
|
- // console.log(data,'data', index, teacherIndex);
|
|
|
+ console.log(data,'data', index, teacherIndex);
|
|
|
+ console.log(this.subjectList,'this.subjectList');
|
|
|
this.States[teacherIndex] = index
|
|
|
this.teaIndex = index
|
|
|
this.goodsTeacher.forEach((item,index) => {
|
|
|
if(item.teaList && item.teaList.length > 0){
|
|
|
- let list = item.teaList.filter(x => x.aliasName == data.aliasName)
|
|
|
+ let list = item.teaList.filter(x => x.courseId == data.courseId)
|
|
|
if(list && list.length > 0){
|
|
|
item.courseList.forEach((course,courseIndex) => {
|
|
|
if(course.courseId == data.courseId){
|
|
@@ -910,6 +912,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ console.log(this.goodsTeacher,'this.goodsTeacher');
|
|
|
},
|
|
|
getGoodsData(res) {
|
|
|
return new Promise((resolve, reject) => {
|