mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-23 17:55:37 +08:00
提交
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user