| | |
| | | } |
| | | |
| | | if (_this.isForFinish(i)) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg') } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: '', content: _this.$t('finishMsg'), tokenId: _this.memberToken } }) |
| | | } |
| | | } |
| | | // 如果上一题不是本段,则不能返回上一段 |
| | |
| | | let _this = this |
| | | _this.isShowGuide(false) |
| | | if (_this.order > 0) { |
| | | // 清空本题的选择 |
| | | _this.answer.answerItems[_this.order].content = null |
| | | _this.answer.answerItems[_this.order].completed = false |
| | | _this.answer.answerItems[_this.order].questionReport = null |
| | | _this.answer.answerItems[_this.order].readOnly = false |
| | | |
| | | // 设置回到上一题 |
| | | let num = --_this.order |
| | | _this.itemOrder = _this.form.titleItems[0].questionItems[num].itemOrder |
| | | _this.questionItem = _this.form.titleItems[0].questionItems[num] |
| | |
| | | for (let i = 0; i < _this.answer.answerItems.length; i++) { |
| | | if (_this.answer.answerItems[i].content === null) { |
| | | unFinish = true |
| | | _this.answer.finish = 0 |
| | | // 有未完成的答题应该是 2答题中 |
| | | // 之前是0未处理 |
| | | _this.answer.finish = 2 |
| | | } |
| | | } |
| | | if (unFinish) { |
| | |
| | | } else { |
| | | _this.answer.verifyStatus = 1 |
| | | _this.answer.finish = 1 |
| | | _this.submitAnswer(_this.$t('finishSubmit')) |
| | | _this.submitAnswer(_this.$t('finishPersonalityInfo')) |
| | | } |
| | | }, |
| | | startDo: function () { |
| | |
| | | examPaperAnswerApi.answerSubmit(answerSubmit, _this.memberToken).then(re => { |
| | | loading.close() |
| | | if (re.code === 1) { |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess } }) |
| | | _this.$router.push({ path: '/exam/finish', query: { name: _this.form.name, content: mess, tokenId: _this.memberToken } }) |
| | | } else { |
| | | _this.$message.error(re.message + '/exam/finish') |
| | | } |