This commit is contained in:
zhaofang
2022-07-13 15:45:07 +08:00
parent fba7594016
commit a14e034ced
2 changed files with 15 additions and 3 deletions

View File

@@ -97,6 +97,7 @@
filterable
remote
value-key="teacherId"
ref="elSelect"
reserve-keyword
placeholder="请输入授课教师姓名"
@change="changeTeachers"
@@ -240,6 +241,7 @@
filterable
remote
value-key="teacherId"
ref="elSelect"
reserve-keyword
placeholder="请输入授课教师姓名"
@change="changeTeachers"
@@ -799,8 +801,8 @@ export default {
},
changeTeachers(t) {
//用于监听教师列表的选择变化
//console.log(t);
this.requireSaveCourse = true;
this.$refs.elSelect.query = '';
},
formartTeacher() {},
addNewSection() {

View File

@@ -313,7 +313,8 @@ export default {
isAppendTime:false,//是否追加学习时长
appentId:'',//当前追加的学习时长的id
appentInterval:30000,//追加学习时间的间隔 30秒加一次
handleTimeout:null
handleTimeout:null,
completed:[],
};
},
mounted() {
@@ -325,6 +326,7 @@ export default {
...mapGetters(['userInfo']),
catalogTree() {
let treeList = [];
this.completed = [];
let $this = this;
$this.sectionList.forEach(sec => {
let treeNode = { section: sec, children: [] };
@@ -338,6 +340,9 @@ export default {
finishCount++;
}
}
if(c.status == 9) {
$this.completed.push(c.id);
}
treeNode.children.push(c);
}
});
@@ -799,9 +804,14 @@ export default {
}else{
let pre=this.catalogTree[index].children[i-1];
if(pre.status!=9){
this.$message.warning('请按顺序学习');
return;
} else {
if(this.completed.indexOf(pre.id) > 0) {
this.$message.warning('请按顺序学习');
return;
}
}
}
}
}
}