diff --git a/src/components/Course/exam.vue b/src/components/Course/exam.vue index 35549d76..6ccff889 100644 --- a/src/components/Course/exam.vue +++ b/src/components/Course/exam.vue @@ -329,6 +329,8 @@ export default { apiExamPaper.newPaperContent(this.info.id).then(res=>{ if(!res.error&&res.result != ''){ if(this.info.paperType==2){ + //TODO1 + console.log("调用开始考试 if paperType == 2") this.examPaper.json=res.result; let qitems=this.convertToItems(this.examPaper.json); this.paper ={items:qitems}; @@ -336,9 +338,11 @@ export default { this.curItem=qitems[this.curIndex]; this.startTime=new Date();//记录开始时间 this.timerValue=this.info.testDuration; + this.content.status=1; this.timer=setInterval(this.changeTimer,60000); this.testStart=true; }else{ + console.log("调用开始考试 else paperType != 2") let paper= {items:res.result}; paper.items.forEach(item=>{ if(item.type==101){ @@ -585,8 +589,10 @@ export default { console.log("获取数据结果 考试 res ==>",res) this.records.push(res.result); //TODO 评分更改 最终完成 - if(res.result.scope > res.result.passLine){ + if(res.result.score > res.result.passLine){ this.content.status=9;//表已学习完,判断上级的章是否已完成 + }else{ + this.content.status=1; } this.studyItemId=res.result.studyItemId;//第一次保存时是没有的,所以这里要赋值