考试提交优化

This commit is contained in:
daihh
2022-07-14 15:30:15 +08:00
parent bc21218be5
commit 85926a028c

View File

@@ -498,7 +498,7 @@ export default {
data.arrange = this.testPaper.arrange;
data.passLine = this.testPaper.passLine;
data.ucode = this.userInfo.userNo;
data.paperJson = JSON.stringify(this.paperQuestion);
data.paperJson = this.clearPagerJson();
data.answerJson=strAnswer;
data.totalScore=total;
//计算出当前的成绩
@@ -513,6 +513,20 @@ export default {
}
})
},
clearPagerJson(){
let paperJson = [];
this.paperQuestion.forEach((item,index) => {
let option = {
id:item.id,
optionList:[]
};
item.optionList.forEach(it=>{
option.optionList.push({id:it.id})
})
paperJson.push(option);
})
return JSON.stringify(paperJson);
},
countScore(){
let total=0;
if(this.judge.length > 0){