| | |
| | | ++_this.answer.doTime |
| | | }, 1000) |
| | | }, |
| | | questionCompleted(completed) { |
| | | return this.enumFormat(this.doCompletedTag, completed) |
| | | }, |
| | | goAnchor(selector) { |
| | | let _this = this |
| | | let num = parseInt(selector.substr(10)) - 1 |
| | | this.itemOrder = _this.form.titleItems[0].questionItems[num].itemOrder |
| | | this.questionItem = _this.form.titleItems[0].questionItems[num] |
| | | _this.order = num |
| | | setTimeout(function() { |
| | | _this.$el.querySelector(selector).scrollIntoView({ |
| | | behavior: 'instant', |
| | | block: 'center', |
| | | inline: 'nearest' |
| | | }) |
| | | }, 200) |
| | | _this.$refs['popovertag'].doClose() |
| | | }, |
| | | |
| | | initAnswer() { |
| | | this.answer.id = this.form.id |
| | | this.answer.questionOrder = this.form.questionOrder |
| | |
| | | answerItem.startTime = '' |
| | | } |
| | | answerItem.completed = true |
| | | answerItem.content = this.getContentByQuestionId(answerItem |
| | | .questionId) //this.getLikeTypeByScoreRangeItemOrder(answerItem.subjectId) |
| | | answerItem.content = this.getContentByQuestionId(answerItem.questionId) |
| | | //this.getLikeTypeByScoreRangeItemOrder(answerItem.subjectId) |
| | | answerItem.questionReport = { |
| | | questionOrder: answerItem.questionId, |
| | | questionTitle: answerItem.title, |
| | |
| | | answerSubmit.partOrder = nowPartOrder |
| | | answerSubmit.itemOrder = _this.itemOrder |
| | | //add scoreRanges |
| | | if (_this.step2SubStep >= _this.step2ScoreRanges.length) { |
| | | if (_this.step2SubStep >= _this.step2ScoreRanges.length || true) {//传递全部 |
| | | answerSubmit['scoreRanges'] = _this.form.titleItems[0].scoreRanges |
| | | } else { |
| | | let item = _this.getStep2StepItem(_this.step2SubStep) |
| | |
| | | } |
| | | return answerSubmit |
| | | }, |
| | | |
| | | /* |
| | | * 过程中的提交 |
| | | */ |
| | | submitSubAnswer: function() { |
| | | console.log('submitSubAnswer...') |
| | | let _this = this |
| | | this.answer.answerItems[_this.order].endTime = this.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss') |
| | | //this.answer.answerItems[_this.order].endTime = this.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss') |
| | | // 提交部分 |
| | | let answerSubmit = _this.getSubmitAnswerValue(_this.partOrder) |
| | | let loading = _this.$loading({ |
| | |
| | | loading.close() |
| | | }) |
| | | }, |
| | | /** |
| | | * 最后环节的提交 |
| | | * @param {Object} mess |
| | | */ |
| | | submitAnswer: function(mess) { |
| | | let _this = this |
| | | this.answer.answerItems[_this.order].endTime = this.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss') |
| | |
| | | } else { |
| | | mes = JSON.stringify(e) + ',' + 'order:' + _this.order + ',' + e.message |
| | | } |
| | | // 调试用 |
| | | // _this.$router.push({ path: '/exam/exception', query: { name: _this.form.name, content: _this.$t('submitExceptionInfo') + '<br>' + mes } }) |
| | | _this.$router.push({ |
| | | path: '/exam/exception', |
| | | query: { |
| | |
| | | }, |
| | | isForFinish(i) { |
| | | return false |
| | | return i === this.answer.answerItems.length - 1 && (this.answer.answerItems[i].content !== null && this |
| | | .answer.answerItems[i].content !== '') |
| | | //return i === this.answer.answerItems.length - 1 && (this.answer.answerItems[i].content !== null && this.answer.answerItems[i].content !== '') |
| | | }, |
| | | isDiffPartOrder: function() { |
| | | let _this = this |
| | |
| | | ...mapMutations('user', ['setLangFlag']) |
| | | }, |
| | | computed: { |
| | | ...mapGetters('enumItem', ['enumFormat']), |
| | | ...mapState('enumItem', { |
| | | doCompletedTag: state => state.exam.question.answer.doCompletedTag |
| | | }), |