xiangpei
2024-07-11 41aaf3c396081a45908c9a964c43e523cc4a1f4e
Merge remote-tracking branch 'origin/dev' into dev
2个文件已修改
45 ■■■■■ 已修改文件
src/views/answer/detail.vue 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/answer/info.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/answer/detail.vue
@@ -30,10 +30,10 @@
        <el-divider></el-divider>
        <el-row class="do-exam-title">
          <el-col :span="24">
                <span :key="item.itemOrder" v-for="item in form.navbar">
                    <el-tag :type="questionDoRightTag(item.right)" class="do-exam-title-tag"
                            @click="goAnchor('#question-' + item.itemOrder)">{{ item.itemOrder }}</el-tag>
                </span>
            <span :key="item.itemOrder" v-for="item in form.navbar">
              <el-tag :type="questionDoRightTag(item.right)" class="do-exam-title-tag"
                @click="goAnchor('#question-' + item.itemOrder)">{{ item.itemOrder }}</el-tag>
            </span>
          </el-col>
        </el-row>
      </el-card>
@@ -44,14 +44,15 @@
          <h3>{{ titleItem.title }}</h3>
          <el-card class="exampaper-item-box" v-if="titleItem.questionList.length !== 0">
            <el-form-item :key="questionItem.itemOrder" :label="questionItem.itemOrder + '.'"
                          v-for="questionItem in titleItem.questionList" class="exam-question-item"
                          label-width="50px" :id="'question-' + questionItem.itemOrder">
              <MarkPaperShow :qType="questionItem.questionType" :question="questionItem" :answer="form.navbar"/>
              v-for="questionItem in titleItem.questionList" class="exam-question-item" label-width="50px"
              :id="'question-' + questionItem.itemOrder">
              <MarkPaperShow :qType="questionItem.questionType" :question="questionItem" :answer="form.navbar" />
            </el-form-item>
          </el-card>
        </el-row>
      </el-form>
    </div>
    <el-empty v-if="empty" style="width:1200px;height:500px;"></el-empty>
  </div>
</template>
@@ -63,20 +64,21 @@
export default {
  name: 'MarkPaperDetail',
  components: { MarkPaperShow },
  mounted () {
  mounted() {
    let id = this.$route.query.id
    if (id && parseInt(id) !== 0) {
      this.formLoading = true
      examPaperAnswerApi.read(id).then(re => {
        this.formLoading = true
        this.form = re.data
        console.log('this.form', this.form);
        if (!this.form.titleItems) this.empty = true;
        this.formLoading = false
      })
    }
  },
  data () {
  data() {
    return {
      empty: false,
      paperQuestionList: [],
      form: {},
      formLoading: false,
@@ -86,7 +88,7 @@
    }
  },
  methods: {
    open () {
    open() {
      this.$confirm('确认是否提交成绩批改?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
@@ -103,20 +105,20 @@
        })
      })
    },
    goAnchor (selector) {
    goAnchor(selector) {
      this.$el.querySelector(selector).scrollIntoView({ behavior: 'instant', block: 'center', inline: 'nearest' })
    },
    questionDoRightTag (status) {
    questionDoRightTag(status) {
      return this.enumFormat(this.doRightTag, status)
    },
    getStudentPaper () {
    getStudentPaper() {
      getStudentExam(this.examInfo.examId, this.userId).then(res => {
        this.examInfo = res.data.data
      })
    }
  },
  computed: {
    formattedDoTime () {
    formattedDoTime() {
      const totalSeconds = this.form.doTime
      const minutes = Math.floor(totalSeconds / 60)
      const seconds = totalSeconds % 60
@@ -131,7 +133,6 @@
</script>
<style scoped>
.paper-container {
  display: flex;
  flex-direction: row;
@@ -146,7 +147,8 @@
}
.paper-form {
  flex: 1; /* 占据剩余空间 */
  flex: 1;
  /* 占据剩余空间 */
  margin-left: 300px;
}
@@ -157,5 +159,4 @@
  font-size: 14px;
  margin-top: 10px;
}
</style>
src/views/answer/info.vue
@@ -34,7 +34,13 @@
              </template>
            </el-table-column>
            <el-table-column prop="doTime" label="耗时" width="80px" align="center" />
            <el-table-column prop="submitTime" label="提交时间" width="240px" align="center" />
            <el-table-column prop="submitTime" label="提交时间" width="240px" align="center">
              <template slot-scope="{row}">
                <span :style="row.status === 0 ? '' : 'color: red'">
                  {{ row.status === 0 ? row.submitTime : '缺考' }}
                </span>
              </template>
            </el-table-column>
            <el-table-column label="操作" width="120px" align="center">
              <template slot-scope="{row}">
                <el-button size="mini" @click="view(row)">详情</el-button>