优化
This commit is contained in:
@@ -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(',')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user