mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 11:26:43 +08:00
提交课程考试中的一个bug修改
This commit is contained in:
@@ -347,7 +347,8 @@ export default {
|
||||
//console.log(this.paper.items);
|
||||
let totalScore=0;
|
||||
this.paper.items.forEach(item => {
|
||||
totalScore+=item.score;//加到总分中
|
||||
item.score=parseInt(item.score);
|
||||
totalScore+=item.score;//加到总分中
|
||||
if(item.type != 102){
|
||||
item.userAnswer='';
|
||||
item.options.forEach(opt => {
|
||||
@@ -396,9 +397,11 @@ export default {
|
||||
if(scoreNum === null)scoreNum=0;
|
||||
this.lastScore=scoreNum;
|
||||
//转化成百分制显示
|
||||
//console.log(scoreNum,totalScore,'实际分和总分');
|
||||
if(this.info.percentScore){
|
||||
this.lastScore=parseInt(scoreNum*100/totalScore);
|
||||
}
|
||||
//console.log('本次得分='+this.lastScore);
|
||||
return this.lastScore;
|
||||
},
|
||||
submitTest(){ //提交处理
|
||||
@@ -408,6 +411,7 @@ export default {
|
||||
}
|
||||
let now=new Date();
|
||||
let testScore=this.countTest();
|
||||
|
||||
let postData={
|
||||
studyId:this.studyId,//
|
||||
studyItemId:this.studyItemId,//前面已经给了
|
||||
|
||||
Reference in New Issue
Block a user