[测评系统]--前端(用户答题页面)
yj
2025-11-27 e9d90e9ea68a2ee82869124ff092dc21f329f2b0
src/views/exam/paper/job.vue
@@ -23,13 +23,13 @@
            <el-card class="exampaper-item-box" v-if="titleItem.questionItems.length!==0">
              <el-form-item :key="questionItem.itemOrder" class="exam-question-item" label-width="0%"
                            v-for="questionItem in titleItem.questionItems" :id="'question-'+ questionItem.itemOrder">
                <QuestionJobEdit @callNextSubject="callNext" :qType="questionItem.questionType" :question="questionItem"
                <QuestionJobEdit @callSelected="callSelected" @callNextSubject="callNext" :qType="questionItem.questionType" :question="questionItem"
                              :answer="answer.answerItems[questionItem.itemOrder-1]"  :isReadOnly="autoNext"/>
              </el-form-item>
            </el-card>
          </el-row>
          <el-row class="do-align-center" v-if="order < form.titleItems.length - 1">
            <el-button @click="preSubject" type="warning" v-if ="preDisable" round>{{$t('lastQuestion')}}</el-button>
            <el-button @click="preSubject" type="warning" v-if ="preDisable" :disabled="preDisable2" round>{{$t('lastQuestion')}}</el-button>
            <el-button @click="nextSubject" type="primary" v-if ="nextDisable" round>{{$t('nextQuestion')}}</el-button>
          </el-row>
          <el-row class="do-align-center" v-else>
@@ -92,18 +92,21 @@
      submitDisable: false,
      doTime: 0,
      preDisable: false,
      preDisable2: false,
      nextDisable: false,
      autoNext: true,
      isCallTain: false, // 是否要调用泰国团队接口
      isLangKaiStyle: false,
      totalTitleNum: 0
      totalTitleNum: 0,
      selectedCount: 0,
      hasShownSubmitTip: false // 标志是否已经显示过提交提示
    }
  },
  created () {
    let _this = this
    // 多语言
    _this.setLangFlag(false)
    _this.form = this.$route.query.formDo
    _this.form = undefined
    if (_this.form !== {} && _this.form !== undefined) {
      _this.formLoading = true
      _this.remainTime = _this.form.suggestTime * 60
@@ -228,6 +231,7 @@
    },
    nextSubject: function () {
      let _this = this
      _this.preDisable2 = false
      // 设置上一题结束时间
      _this.form.titleItems[_this.order].endTime = _this.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')
      _this.isShowGuide(false)
@@ -294,16 +298,35 @@
        })
      }
      // JAQ报告最后大题完成 启用提交按钮
      let isCompleted1 = _this.answer.answerItems[_this.answer.answerItems.length - 2].completed;
      let isCompleted2 = _this.answer.answerItems[_this.answer.answerItems.length - 1].completed;
      let isCompleted1 = _this.answer.answerItems[_this.answer.answerItems.length - 2].completed
      let isCompleted2 = _this.answer.answerItems[_this.answer.answerItems.length - 1].completed
      if (isCompleted1 && isCompleted2) {
        this.submitDisable = false
        // 检查是否是最后一题且已答完,弹出提示框(只弹一次)
        if (!_this.hasShownSubmitTip) {
          _this.hasShownSubmitTip = true
          _this.$alert(_this.$t('submit_tip'), _this.$t('prompt'), {
            confirmButtonText: _this.$t('determine'),
            customClass: 'submit-tip-dialog'
          })
        }
      }
      if (jumpNextFlag) {
        _this.nextSubject()
      }
    },
    // 触发选中选项
    callSelected () {
      let _this = this
      if (!_this.preDisable) {
        return
      }
      _this.selectedCount += 1
      if (_this.selectedCount % 2 === 0) {
        _this.preDisable2 = true
      }
    },
    submitForm () {
      let _this = this
      _this.submitDisable = true