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

View File

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