This commit is contained in:
yanran200730
2023-02-20 10:27:19 +08:00
parent be1b24568a
commit 403dfeb725

View File

@@ -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(',')
}
})
}