优化
This commit is contained in:
@@ -64,7 +64,8 @@
|
|||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
id: '',
|
id: '',
|
||||||
assessmentsName: ''
|
assessmentsName: '',
|
||||||
|
sort: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -84,9 +85,15 @@
|
|||||||
this.info = {
|
this.info = {
|
||||||
...res.data,
|
...res.data,
|
||||||
questions: res.data.questions.map(v => {
|
questions: res.data.questions.map(v => {
|
||||||
|
let answer = []
|
||||||
|
v.items.forEach((e, index) => {
|
||||||
|
if (e.checked === '1') {
|
||||||
|
answer.push(this.sort[index])
|
||||||
|
}
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
...v,
|
...v,
|
||||||
answer: v.items.filter(v => v.checked === '1').map(v => v.content).join(',')
|
answer: answer.join(',')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user