| | |
| | | computed: { |
| | | // 计算属性:获取所有可见的题目 |
| | | visibleQuestions() { |
| | | if (!Array.isArray(this.questionList)) { |
| | | return []; |
| | | } |
| | | return this.questionList.filter((question) => !question.ishide); |
| | | }, |
| | | }, |
| | |
| | | getCachequestionnaire({ param1: this.taskid, param2: this.patid }).then( |
| | | (res) => { |
| | | if (res.code == 200) { |
| | | this.questionList = res.data; |
| | | this.questionList = res.data.result; |
| | | this.accomplish = res.data.submit; |
| | | if (this.questionList[0]) { |
| | | this.questionList.forEach((item) => { |
| | |
| | | } else { |
| | | // 正常跳转逻辑 |
| | | const nextQuestionIndex = selectedOptionObj.nextQuestion - 1; |
| | | console.log(nextQuestionIndex, 4); |
| | | console.log(selectedOptionObj); |
| | | |
| | | this.questionList = this.questionList.map((item, index) => { |
| | | // 保留当前题目之前的隐藏状态 |