|
|
|
@ -149,6 +149,17 @@ |
|
|
|
return ['select-box-multiple', 'select-multiple','input', 'input-group'].includes(this.currentQuestion?.component) |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
tabs: { |
|
|
|
handler(val) { |
|
|
|
console.log('watch-tabs', val) |
|
|
|
}, |
|
|
|
deep: true |
|
|
|
}, |
|
|
|
current(val) { |
|
|
|
console.log('watch-current', val) |
|
|
|
}, |
|
|
|
}, |
|
|
|
onLoad(arg) { |
|
|
|
this.step = parseInt(arg.step) |
|
|
|
// this.current = parseInt(arg.current || 0) |
|
|
|
@ -223,6 +234,7 @@ |
|
|
|
console.log('answers', this.answers) |
|
|
|
}, |
|
|
|
switchQuestion(current) { |
|
|
|
console.log('current', this.current, 'target', current) |
|
|
|
let { needTag } = this.questionsList[current] |
|
|
|
|
|
|
|
console.log('needTag length', needTag?.length) |
|
|
|
@ -262,10 +274,14 @@ |
|
|
|
this.$utils.redirectTo(`/pages_order/report/test/step?step=${this.step + 1}`) |
|
|
|
}, |
|
|
|
pre() { |
|
|
|
console.log('pre') |
|
|
|
// this.current -= 1 |
|
|
|
this.current = this.preIdx |
|
|
|
const preIdx = this.preIdx |
|
|
|
this.current = this.tabs[this.preIdx] |
|
|
|
this.value = this.answers[this.current] |
|
|
|
this.noneFlag = false |
|
|
|
this.tabs = this.tabs.slice(0, preIdx + 1) |
|
|
|
console.log('tabs', this.tabs) |
|
|
|
}, |
|
|
|
next() { |
|
|
|
if (this.showSubmitBtn) { |
|
|
|
@ -492,7 +508,7 @@ |
|
|
|
|
|
|
|
.main { |
|
|
|
width: 100%; |
|
|
|
padding: 70rpx 104rpx 0 104rpx; |
|
|
|
padding: 70rpx 104rpx; |
|
|
|
box-sizing: border-box; |
|
|
|
} |
|
|
|
|
|
|
|
|