From a3f19959cbc1ad380ba84e6d8699d3e00afa07a7 Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期三, 26 六月 2024 18:05:29 +0800
Subject: [PATCH] feat:考试监控
---
src/views/exam/exam/MarkPaperDetail.vue | 171 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 143 insertions(+), 28 deletions(-)
diff --git a/src/views/exam/exam/MarkPaperDetail.vue b/src/views/exam/exam/MarkPaperDetail.vue
index 283198e..bedd2ab 100644
--- a/src/views/exam/exam/MarkPaperDetail.vue
+++ b/src/views/exam/exam/MarkPaperDetail.vue
@@ -1,21 +1,48 @@
<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-divider></el-divider>
+ <div style="text-align: center">
+ <el-button type="primary" style="width: 120px;height: 35px" @click="submit">鎻愪氦鎵规敼</el-button>
+ </div>
+ </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>
@@ -29,7 +56,7 @@
</el-card>
</el-row>
</el-form>
- </el-main>
+ </div>
</div>
</template>
@@ -37,6 +64,7 @@
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',
@@ -50,9 +78,9 @@
'code': 1, 'message': '鎴愬姛', 'data': {
'paper': {
'id': 30,
- 'level': 1,
- 'subjectId': 4,
'paperType': 7,
+ 'score': '15',
+ 'classes': null,
'name': '杩欐槸涓�涓祴璇曡瘯鍗�',
'suggestTime': 12,
'limitDateTime': null,
@@ -200,6 +228,48 @@
'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,
@@ -211,13 +281,11 @@
'correct': '绾㈡ゼ姊︺�佽タ娓歌銆佹按娴掍紶銆佷笁鍥芥紨涔�',
'score': '10',
'difficult': 3,
- 'itemOrder': 7,
+ 'itemOrder': 9,
'knowledgeIdList': [8, 9]
}
]
}],
- 'score': '15',
- 'classes': null
},
'answer': {
'id': 9,
@@ -279,11 +347,29 @@
'score': '2.5',
'questionScore': '2.5'
}, {
+ 'id': 33,
+ 'questionId': 2,
+ 'doRight': null,
+ 'content': 'A',
+ 'itemOrder': 7,
+ 'contentArray': ['绾㈤棬姊�', '涓夊浗婕旂粠', '姘村6杞�'],
+ '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绉�'
@@ -323,27 +409,56 @@
}
},
methods: {
+ submit () {
+ // 鎻愪氦鎵规敼
+ },
+ 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>
--
Gitblit v1.8.0