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