From 85926a028c6c03f235c3da5225ed3d28779a8c7b Mon Sep 17 00:00:00 2001 From: daihh Date: Thu, 14 Jul 2022 15:30:15 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E6=8F=90=E4=BA=A4=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/exam/Test.vue | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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){