mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 03:46:44 +08:00
课程考试的调整
This commit is contained in:
@@ -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={
|
||||
|
||||
Reference in New Issue
Block a user