From 403dfeb725a2fc09729464fa82816e650d5bb0fd Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 20 Feb 2023 10:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/AppExaminationManage/components/Detail.vue | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/project/qujing/app/AppExaminationManage/components/Detail.vue b/project/qujing/app/AppExaminationManage/components/Detail.vue index c207008b..45e44f05 100644 --- a/project/qujing/app/AppExaminationManage/components/Detail.vue +++ b/project/qujing/app/AppExaminationManage/components/Detail.vue @@ -64,7 +64,8 @@ return { info: {}, id: '', - assessmentsName: '' + assessmentsName: '', + sort: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'] } }, @@ -84,9 +85,15 @@ this.info = { ...res.data, questions: res.data.questions.map(v => { + let answer = [] + v.items.forEach((e, index) => { + if (e.checked === '1') { + answer.push(this.sort[index]) + } + }) return { ...v, - answer: v.items.filter(v => v.checked === '1').map(v => v.content).join(',') + answer: answer.join(',') } }) }