课程考试的调整

This commit is contained in:
daihh
2022-10-27 17:44:36 +08:00
parent 4e36873251
commit 106f50701e

View File

@@ -179,9 +179,14 @@ export default {
this.loadExamInfo();
}
},
destroyed() {
if(this.timer){
window.clearInterval(this.timer);
}
},
methods: {
changeTimer(){
if(this.timerValue==0){
if(this.timerValue<=0){
window.clearInterval(this.timer);
//系统自动提交
this.confirmStop();
@@ -342,6 +347,7 @@ export default {
//console.log(this.paper.items);
let totalScore=0;
this.paper.items.forEach(item => {
item.score=parseInt(item.score);
totalScore+=item.score;//加到总分中
if(item.type != 102){
item.userAnswer='';
@@ -397,6 +403,10 @@ export default {
return this.lastScore;
},
submitTest(){ //提交处理
//清空提示
if(this.timer){
window.clearInterval(this.timer);
}
let now=new Date();
let testScore=this.countTest();
let postData={