提交 84d5b50f authored 作者: lihuihui's avatar lihuihui

修改bug

上级 ae46a57d
...@@ -46,12 +46,13 @@ export default { ...@@ -46,12 +46,13 @@ export default {
}, },
computed: { computed: {
isClass() { isClass() {
return (id, cId) => { return (ids, cId) => {
const id = parseInt(ids)
const findItems = this.data.answers[id] const findItems = this.data.answers[id]
const scoreItems = this.data.score_item const scoreItems = this.data.score_items
? this.data.score_item[id] ? this.data.score_items[id]
? this.data.score_item[id][cId] ? this.data.score_items[id][cId]
? this.data.score_item[id][cId] ? this.data.score_items[id][cId]
: [] : []
: [] : []
: [] : []
......
...@@ -108,20 +108,35 @@ export default { ...@@ -108,20 +108,35 @@ export default {
}, },
// 自己选择的答案 // 自己选择的答案
myAnswer() { myAnswer() {
const selectAnswer = this.questionParams.answerRecord if (parseInt(this.$route.query.type) === 3) {
const currentData = this.questionData const arr = []
return selectAnswer[currentData.id] this.questionParams.question.user_answer.map(item => {
? selectAnswer[currentData.id] const index = this.questionData.options.findIndex(d => { return item === d.id })
? (() => { arr.push(this.A_Z()[index])
const arr = [] })
selectAnswer[currentData.id].answer.map(i => { return arr.sort().toString().replace(new RegExp(',', 'g'), '')
const findIndex = currentData.options.findIndex(d => { return i === d.id }) // const arr = []
arr.push(this.A_Z()[findIndex]) // this.questionParams.question.user_answer.map(item => {
}) // const findInde = item.findIndex(d => { return item === d.id })
return arr.sort().toString().replace(new RegExp(',', 'g'), '') // arr.push(this.A_Z()[findIndex])
})() // })
// return arr.sort().toString().replace(new RegExp(',', 'g'), '')
} else {
const selectAnswer = this.questionParams.answerRecord
const currentData = this.questionData
return selectAnswer[currentData.id]
? selectAnswer[currentData.id]
? (() => {
const arr = []
selectAnswer[currentData.id].answer.map(i => {
const findIndex = currentData.options.findIndex(d => { return i === d.id })
arr.push(this.A_Z()[findIndex])
})
return arr.sort().toString().replace(new RegExp(',', 'g'), '')
})()
: ''
: '' : ''
: '' }
}, },
// 选项选择 // 选项选择
changeOptions(type, pId, optId) { changeOptions(type, pId, optId) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论