fuliqi
2024-06-20 8c0f29a39e8328b80635e803400d2825e2516408
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<template>
  <div>
    <el-row style="text-align: center;margin-top: 20px;margin-bottom: 20px; font-size: 28px">xxx考试</el-row>
    <el-row :gutter="20">
      <el-col :span="8" class="info">
        <span class="exam-info">学员姓名:</span>
        <span class="exam-info">{{userName}}</span>
      </el-col>
      <el-col :span="8" class="info">
        <span class="exam-info">交卷时间:</span>
        <span class="exam-info">{{examInfo.updateTime}}</span>
      </el-col>
      <el-col :span="8" class="info">
        <span class="exam-info">完成耗时:</span>
        <span class="exam-info">{{examInfo.doTime}}</span>
      </el-col>
    </el-row>
    <el-row class="paper-warp">
      <div v-for="(paper,index) in examInfo.paperQuestionList" :key="index" class="paperTitleWarp">
        <div class="paperTitle">{{ paper.title }}</div>
        <div class="question-warp">
          <div v-for="(doQuestion, index) in paper.questionList" :key="index">
            <DoQuestion :question="doQuestion" :qType="paper.questionType" :qLoading="questionLoading"></DoQuestion>
          </div>
        </div>
      </div>
    </el-row>
  </div>
</template>
 
<script>
import DoQuestion from '@/components/question/DoQuestion'
import { getStudentExam } from '@/api/exam'
 
export default {
  name: 'MarkPaperDetail',
  components: { DoQuestion },
  mounted () {
    this.examInfo.examId = this.$route.query.examId
    this.examInfo.examName = this.$route.query.examName
    this.userId = this.$route.query.userId
    if (this.examInfo.examId && this.userId) {
      this.getStudentPaper()
    }
  },
  data () {
    return {
      paperQuestionList: [
 
      ],
      userId: null,
      userName: null,
      questionLoading: false,
      examInfo: {
        examId: null,
        examName: '',
        doTime: 0,
        updateTime: null,
        paperQuestionList: []
      }
    }
  },
  methods: {
    getStudentPaper () {
      getStudentExam(this.examInfo.examId, this.userId).then(res => {
        this.examInfo = res.data.data
      })
    }
  }
}
</script>
 
<style scoped>
.question-warp {
  margin-top: 50px;
 
}
 
.exam-info {
}
 
.info {
  display: flex;
  flex-direction: row;
  justify-content: center;
}
</style>