| | |
| | | memberName: '', |
| | | itemSize: '', // 题目长度 |
| | | startDoDisable: true, |
| | | ismobile: false |
| | | ismobile: false, |
| | | hasShownSubmitTip: false // 标志是否已经显示过提交提示 |
| | | } |
| | | }, |
| | | created: function () { |
| | |
| | | // 加载题目 |
| | | examPaperApi.select(_this.memberToken, _this.langType).then(re => { |
| | | _this.form = re.response |
| | | // // 测试模式:只保留前3道题 |
| | | // if (_this.form.titleItems[0].questionItems.length > 3) { |
| | | // _this.form.titleItems[0].questionItems = _this.form.titleItems[0].questionItems.slice(0, 3) |
| | | // } |
| | | _this.remainTime = re.response.suggestTime * 60 |
| | | _this.problemLength = _this.form.titleItems[0].questionItems.length - 1 |
| | | _this.titleItemsLength = _this.form.titleItems.length |
| | |
| | | return |
| | | } |
| | | } |
| | | |
| | | // 检查是否是最后一题且已答完,弹出提示框 |
| | | if (_this.order === _this.answer.answerItems.length - 1 && _this.isContentNotEmpty(_this.order)) { |
| | | if (!_this.hasShownSubmitTip) { |
| | | _this.hasShownSubmitTip = true |
| | | _this.$alert(_this.$t('submit_tip'), _this.$t('prompt'), { |
| | | confirmButtonText: _this.$t('determine'), |
| | | customClass: 'submit-tip-dialog' |
| | | }) |
| | | } |
| | | } |
| | | this.answer.answerItems[_this.order].readOnly = true |
| | | let answerSubmit = _this.getSubmitAnswerValue(nowPartOrder) |
| | | |
| | |
| | | } else { |
| | | _this.answer.verifyStatus = 1 |
| | | _this.answer.finish = 1 |
| | | let text = _this.$t('finishPersonalityInfo') |
| | | if (_this.isMobile()) { |
| | | text = _this.$t('finishPersonalityInfo_mobile') |
| | | } |
| | | if (this.form) { |
| | | let productType = this.form.productType |
| | | if (productType === 'API_Fan') { |
| | | _this.submitAnswer(_this.$t('finishPersonalityInfo_apifan')) |
| | | } else { |
| | | _this.submitAnswer(_this.$t('finishPersonalityInfo')) |
| | | text = _this.$t('finishPersonalityInfo_apifan') |
| | | if (_this.isMobile()) { |
| | | text = _this.$t('finishPersonalityInfo_apifan_mobile') |
| | | } |
| | | } |
| | | } else { |
| | | _this.submitAnswer(_this.$t('finishPersonalityInfo')) |
| | | } |
| | | _this.submitAnswer(text) |
| | | } |
| | | }, |
| | | startDo: function () { |
| | |
| | | if (_this.form.name.indexOf('LAQ') !== -1) { |
| | | examPaperApi.select(_this.memberToken, _this.langType).then(re => { |
| | | _this.form = re.response |
| | | this.setFormDo(_this.form) |
| | | _this.$router.push({ path: '/guide/index', query: { formDo: _this.form } }) |
| | | }).catch(e => { |
| | | _this.$message.error(_this.$t('noquestionMsg')) |
| | |
| | | let _this = this |
| | | return _this.form.titleItems[0].questionItems[_this.order].partOrder !== _this.form.titleItems[0].questionItems[_this.order - 1].partOrder |
| | | }, |
| | | isMobile: function () { |
| | | return window.innerWidth < 1025 |
| | | }, |
| | | ...mapMutations('user', ['setLangType']), |
| | | ...mapMutations('user', ['setLangFlag']), |
| | | ...mapMutations('user', ['getFormDo']) |
| | | ...mapMutations('user', ['getFormDo']), |
| | | ...mapMutations('user', ['setFormDo']) |
| | | }, |
| | | computed: { |
| | | ...mapGetters('enumItem', ['enumFormat']), |
| | |
| | | z-index: 1000; |
| | | bottom: 0px; |
| | | } |
| | | |
| | | </style> |