| | |
| | | _this.initAnswer() |
| | | _this.formLoading = false |
| | | _this.memberName = _this.form.memberName |
| | | |
| | | examPaperApi.selectTokenId(_this.memberToken).then(re => { |
| | | _this.answered = re.response.examItemOrderAndContentList |
| | | _this.doTime = re.response.doTime |
| | | _this.timeReduce() |
| | | |
| | | if (_this.answered !== null) { |
| | | _this.answered.forEach(it => { |
| | | _this.answer.answerItems[parseInt(it.itemOrder) - 1].content = it.content |
| | |
| | | ).catch(e => { |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | mounted () { |
| | | }, |
| | | beforeDestroy () { |
| | | window.clearInterval(this.timer) |
| | | }, |
| | | watch: { |
| | | guideDescirption: function (newVal, oldVal) { |
| | | // 处理指导语,更换变量 |
| | | if (newVal) { |
| | | if (this.form) { |
| | | let productType = this.form.productType |
| | | if (productType === 'API_Fan') { |
| | | newVal = newVal.replace('%%company%%', this.form.reportCompany) |
| | | this.guideDescirption = newVal |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | formatSeconds (theTime) { |
| | |
| | | } else { |
| | | _this.answer.verifyStatus = 1 |
| | | _this.answer.finish = 1 |
| | | _this.submitAnswer(_this.$t('finishPersonalityInfo')) |
| | | if (this.form) { |
| | | let productType = this.form.productType |
| | | if (productType === 'API_Fan') { |
| | | _this.submitAnswer(_this.$t('finishPersonalityInfo_apifan')) |
| | | } else { |
| | | _this.submitAnswer(_this.$t('finishPersonalityInfo')) |
| | | } |
| | | } else { |
| | | _this.submitAnswer(_this.$t('finishPersonalityInfo')) |
| | | } |
| | | } |
| | | }, |
| | | startDo: function () { |
| | |
| | | loading.close() |
| | | if (re.code === 1) { |
| | | // 特殊处理 LAQ测试包 MAQ+CAQ |
| | | if (_this.form.name === 'LAQ') { |
| | | if (_this.form.name.indexOf('LAQ') !== -1) { |
| | | console.log('答完题,看看要不要去CAQ1') |
| | | examPaperApi.select(_this.memberToken, _this.langType).then(re => { |
| | | _this.form = re.response |
| | | console.log(_this.form) |
| | | _this.$router.push({ path: '/guide/index', query: { formDo: _this.form } }) |
| | | }).catch(e => { |
| | | _this.$message.error(_this.$t('noquestionMsg')) |