|
@@ -57,12 +57,9 @@
|
|
<div class="doubles">
|
|
<div class="doubles">
|
|
<span class="iconStyle">课</span>
|
|
<span class="iconStyle">课</span>
|
|
<span class="titles">{{ item.courseName }}</span>
|
|
<span class="titles">{{ item.courseName }}</span>
|
|
- <!-- <span v-if="courseItem.teaList && courseItem.teaList.length > 0" v-for="(tea, index) in courseItem.teaList" :key="index">
|
|
|
|
- <el-button type="info" @click="switchTeacher(tea)" round>{{tea.aliasName}}</el-button>
|
|
|
|
- </span> -->
|
|
|
|
<div v-if="courseItem.teaList && courseItem.teaList.length > 0" class="teacher_names">
|
|
<div v-if="courseItem.teaList && courseItem.teaList.length > 0" class="teacher_names">
|
|
<div v-for="(tea, lindex) in courseItem.teaList" :key="lindex + 'three'" class="names"
|
|
<div v-for="(tea, lindex) in courseItem.teaList" :key="lindex + 'three'" class="names"
|
|
- :class="{nactive: teaIndex == lindex}" @click="switchTeacher(tea, lindex)">
|
|
|
|
|
|
+ :class="{nactive: States[teacherIndex] = lindex}" @click="switchTeacher(tea, lindex, teacherIndex)">
|
|
{{ tea.aliasName }}
|
|
{{ tea.aliasName }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -692,6 +689,7 @@ export default {
|
|
newActiveSubjectId: "", //当前选中ID
|
|
newActiveSubjectId: "", //当前选中ID
|
|
businessData: {},
|
|
businessData: {},
|
|
teaIndex: 0,
|
|
teaIndex: 0,
|
|
|
|
+ States: {0: 0},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -857,8 +855,9 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//切换老师
|
|
//切换老师
|
|
- switchTeacher(data, index){
|
|
|
|
- console.log(data,'data');
|
|
|
|
|
|
+ switchTeacher(data, index, teacherIndex){
|
|
|
|
+ console.log(data,'data', index, teacherIndex);
|
|
|
|
+ this.States[teacherIndex] = index
|
|
this.teaIndex = index
|
|
this.teaIndex = index
|
|
this.goodsTeacher.forEach((item,index) => {
|
|
this.goodsTeacher.forEach((item,index) => {
|
|
if(item.teaList && item.teaList.length > 0){
|
|
if(item.teaList && item.teaList.length > 0){
|