diff --git a/src/views/exam/Test.vue b/src/views/exam/Test.vue index 5f6e408a..d48f3b69 100644 --- a/src/views/exam/Test.vue +++ b/src/views/exam/Test.vue @@ -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){