| | |
| | | <template> |
| | | <div> |
| | | <el-row style="text-align: center;margin-top: 20px;margin-bottom: 20px; font-size: 28px">语文考试</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-main> |
| | | <div class="paper-container"> |
| | | <div class="paper-card"> |
| | | <el-card style="height: 100vh"> |
| | | <el-row style="text-align: left; margin-bottom : 20px; font-size: 20px">语文考试</el-row> |
| | | <el-row> |
| | | <el-col class="info"> |
| | | <span class="exam-info">学员姓名:</span> |
| | | <span class="exam-info">{{ userName }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col class="info"> |
| | | <span class="exam-info">交卷时间:</span> |
| | | <span class="exam-info">{{ examInfo.updateTime }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col class="info"> |
| | | <span class="exam-info">完成耗时:</span> |
| | | <span class="exam-info">{{ examInfo.doTime }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col class="info"> |
| | | <span class="exam-info">得分:</span> |
| | | <span class="exam-info">{{ 30 + ' / ' + 70 }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider></el-divider> |
| | | <el-row class="do-exam-title"> |
| | | <el-col :span="24"> |
| | | <span :key="item.itemOrder" v-for="item in answer.answerItems"> |
| | | <el-tag :type="questionDoRightTag(item.doRight)" class="do-exam-title-tag" |
| | | @click="goAnchor('#question-' + item.itemOrder)">{{ item.itemOrder }}</el-tag> |
| | | </span> |
| | | </el-col> |
| | | </el-row> |
| | | </el-card> |
| | | </div> |
| | | <div class="paper-form"> |
| | | <el-form :model="form" ref="form" v-loading="formLoading" label-width="100px"> |
| | | <el-row :key="index" v-for="(titleItem, index) in form.titleItems"> |
| | | <h3>{{ titleItem.name }}</h3> |
| | |
| | | </el-card> |
| | | </el-row> |
| | | </el-form> |
| | | </el-main> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { getStudentExam } from '@/api/exam' |
| | | import QuestionAnswerShow from '@/views/answer/components/QuestionAnswerShow' |
| | | import examPaperAnswerApi from '@/api/examPaperAnswer' |
| | | import { mapGetters, mapState } from 'vuex' |
| | | |
| | | export default { |
| | | name: 'MarkPaperDetail', |
| | |
| | | 'code': 1, 'message': '成功', 'data': { |
| | | 'paper': { |
| | | 'id': 30, |
| | | 'level': 1, |
| | | 'subjectId': 4, |
| | | 'paperType': 7, |
| | | 'score': '15', |
| | | 'classes': null, |
| | | 'name': '这是一个测试试卷', |
| | | 'suggestTime': 12, |
| | | 'limitDateTime': null, |
| | |
| | | 'knowledgeIdList': [8, 9] |
| | | }] |
| | | }, { |
| | | 'name': '填空题', |
| | | 'questionItems': [{ |
| | | 'id': 2, |
| | | 'questionType': 4, |
| | | 'title': '中华四大名著都有', |
| | | 'gradeLevel': 1, |
| | | 'analyze': '题目比较简单,自行分析', |
| | | 'correct': null, |
| | | 'correctArray': '红楼梦,白楼梦,青楼梦,绿楼梦', |
| | | 'score': '10', |
| | | 'difficult': 3, |
| | | 'itemOrder': 7, |
| | | 'knowledgeIdList': [8, 9], |
| | | 'items': [ |
| | | { prefix: '1', content: '红楼梦' }, |
| | | { prefix: '2', content: '白楼梦' }, |
| | | { prefix: '3', content: '青楼梦' }, |
| | | { prefix: '4', content: '绿楼梦' } |
| | | ] |
| | | } |
| | | ] |
| | | }, { |
| | | 'name': '语音题', |
| | | 'questionItems': [{ |
| | | 'id': 55, |
| | | 'questionType': 1, |
| | | 'title': '听音频回答出小明今天吃的什么', |
| | | 'items': [ |
| | | { 'prefix': 'A', 'content': '番茄', 'score': null, 'itemUuid': null }, |
| | | { 'prefix': 'B', 'content': '白菜', 'score': null, 'itemUuid': null }, |
| | | { 'prefix': 'C', 'content': '香蕉', 'score': null, 'itemUuid': null }, |
| | | { 'prefix': 'D', 'content': '菠萝', 'score': null, 'itemUuid': null } |
| | | ], |
| | | 'analyze': '题目比较简单,自行分析', |
| | | 'correctArray': null, |
| | | 'correct': 'A', |
| | | 'score': '2.5', |
| | | 'difficult': 3, |
| | | 'itemOrder': 8, |
| | | 'knowledgeIdList': [8, 9] |
| | | }] |
| | | }, { |
| | | 'name': '简答题', |
| | | 'questionItems': [{ |
| | | 'id': 1, |
| | |
| | | 'correct': '红楼梦、西游记、水浒传、三国演义', |
| | | 'score': '10', |
| | | 'difficult': 3, |
| | | 'itemOrder': 7, |
| | | 'itemOrder': 9, |
| | | 'knowledgeIdList': [8, 9] |
| | | } |
| | | ] |
| | | }], |
| | | 'score': '15', |
| | | 'classes': null |
| | | }, |
| | | 'answer': { |
| | | 'id': 9, |
| | |
| | | 'score': '2.5', |
| | | 'questionScore': '2.5' |
| | | }, { |
| | | 'id': 33, |
| | | 'questionId': 2, |
| | | 'doRight': null, |
| | | 'content': 'A', |
| | | 'itemOrder': 7, |
| | | 'contentArray': ['红门梦', '三国演绎', '水壶转'], |
| | | 'score': '2.5', |
| | | 'questionScore': '2.5' |
| | | }, { |
| | | 'id': 25, |
| | | 'questionId': 55, |
| | | 'doRight': true, |
| | | 'content': 'A', |
| | | 'itemOrder': 8, |
| | | 'contentArray': null, |
| | | 'score': '2.5', |
| | | 'questionScore': '2.5' |
| | | }, { |
| | | 'id': 31, |
| | | 'questionId': 1, |
| | | 'doRight': null, |
| | | 'content': '红楼梦.......', |
| | | 'itemOrder': 6, |
| | | 'itemOrder': 9, |
| | | 'questionScore': '10' |
| | | }], |
| | | 'doTimeStr': '26秒' |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | goAnchor (selector) { |
| | | this.$el.querySelector(selector).scrollIntoView({ behavior: 'instant', block: 'center', inline: 'nearest' }) |
| | | }, |
| | | questionDoRightTag (status) { |
| | | return this.enumFormat(this.doRightTag, status) |
| | | }, |
| | | getStudentPaper () { |
| | | getStudentExam(this.examInfo.examId, this.userId).then(res => { |
| | | this.examInfo = res.data.data |
| | | }) |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters('enumItem', ['enumFormat']), |
| | | ...mapState('enumItem', { |
| | | doRightTag: state => state.exam.question.answer.doRightTag |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .question-warp { |
| | | margin-top: 50px; |
| | | |
| | | .paper-container { |
| | | display: flex; |
| | | flex-direction: row; |
| | | height: 100%; |
| | | padding: 20px; |
| | | min-height: 100%; |
| | | } |
| | | |
| | | .exam-info { |
| | | .paper-card { |
| | | position: fixed; |
| | | width: 270px; |
| | | } |
| | | |
| | | .paper-form { |
| | | flex: 1; /* 占据剩余空间 */ |
| | | margin-left: 300px; |
| | | } |
| | | |
| | | .info { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: center; |
| | | justify-content: left; |
| | | font-size: 14px; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | </style> |