| | |
| | | <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> |
| | |
| | | <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> |
| | | |
| | |
| | | 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, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | open () { |
| | | open() { |
| | | this.$confirm('确认是否提交成绩批改?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | 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 |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | .paper-container { |
| | | display: flex; |
| | | flex-direction: row; |
| | |
| | | } |
| | | |
| | | .paper-form { |
| | | flex: 1; /* 占据剩余空间 */ |
| | | flex: 1; |
| | | /* 占据剩余空间 */ |
| | | margin-left: 300px; |
| | | } |
| | | |
| | |
| | | font-size: 14px; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | </style> |