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:
@@ -498,7 +498,7 @@ export default {
|
|||||||
data.arrange = this.testPaper.arrange;
|
data.arrange = this.testPaper.arrange;
|
||||||
data.passLine = this.testPaper.passLine;
|
data.passLine = this.testPaper.passLine;
|
||||||
data.ucode = this.userInfo.userNo;
|
data.ucode = this.userInfo.userNo;
|
||||||
data.paperJson = JSON.stringify(this.paperQuestion);
|
data.paperJson = this.clearPagerJson();
|
||||||
data.answerJson=strAnswer;
|
data.answerJson=strAnswer;
|
||||||
data.totalScore=total;
|
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(){
|
countScore(){
|
||||||
let total=0;
|
let total=0;
|
||||||
if(this.judge.length > 0){
|
if(this.judge.length > 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user