This commit is contained in:
2025-07-15 15:53:35 +08:00
parent 8c292532c4
commit 601e17e255
3 changed files with 55 additions and 40 deletions

View File

@ -94,7 +94,6 @@ export default {
showNext: true, showNext: true,
loading: false, loading: false,
handleText: '交卷', handleText: '交卷',
pageLoading: false,
// ID // ID
paperId: '', paperId: '',
// //
@ -172,6 +171,12 @@ export default {
*/ */
handNext() { handNext() {
this.requestFullScreen(); this.requestFullScreen();
if (this.loading) {
return this.$message({
type: 'info',
message: '已交卷,请勿操作!'
})
}
const index = this.cardItem.sort + 1 const index = this.cardItem.sort + 1
this.handSave(this.allItem[index]) this.handSave(this.allItem[index])
}, },
@ -180,6 +185,12 @@ export default {
*/ */
handPrevious() { handPrevious() {
this.requestFullScreen(); this.requestFullScreen();
if (this.loading) {
return this.$message({
type: 'info',
message: '已交卷,请勿操作!'
})
}
const index = this.cardItem.sort - 1 const index = this.cardItem.sort - 1
this.handSave(this.allItem[index]) this.handSave(this.allItem[index])
}, },

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="24"> <el-row :gutter="24" v-if="detailData">
<el-col :span="24" style="margin-bottom: 20px"> <el-col :span="24" style="margin-bottom: 20px">
<el-alert title="点击`开始考试`后将自动进入考试,请诚信考试!" type="error" style="margin-bottom: 10px" /> <el-alert title="点击`开始考试`后将自动进入考试,请诚信考试!" type="error" style="margin-bottom: 10px" />
<el-card class="pre-exam"> <el-card class="pre-exam">
@ -21,9 +21,13 @@
<el-button :loading="loading" type="primary" icon="el-icon-caret-right" @click="handleCreate"> <el-button :loading="loading" type="primary" icon="el-icon-caret-right" @click="handleCreate">
开始考试 开始考试
</el-button> </el-button>
<el-button @click="handleBack"> </el-col>
返回 </el-row>
</el-button> <el-row :gutter="24" v-else>
<el-col :span="24" style="margin-bottom: 20px">
<el-card class="pre-exam">
<div>暂无考试信息,请前往报名考试应用报名</div>
</el-card>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -37,7 +41,7 @@ export default {
data() { data() {
return { return {
user: JSON.parse(localStorage.getItem("user")), user: JSON.parse(localStorage.getItem("user")),
detailData: {}, detailData: undefined,
postForm: { postForm: {
examId: '', examId: '',
userId: JSON.parse(localStorage.getItem("user")).id, userId: JSON.parse(localStorage.getItem("user")).id,
@ -51,8 +55,10 @@ export default {
methods: { methods: {
fetchData() { fetchData() {
getRegExamList().then(response => { getRegExamList().then(response => {
this.detailData = response.data[0] || {} if (response.data.length > 0) {
this.detailData = response.data[0]
this.postForm.examId = this.detailData.examId this.postForm.examId = this.detailData.examId
}
}) })
}, },
handleCreate() { handleCreate() {
@ -71,9 +77,6 @@ export default {
this.loading = false this.loading = false
}) })
}, },
handleBack() {
this.$router.push({ name: 'ExamOnline' })
},
requestFullScreen() { requestFullScreen() {
const element = document.documentElement; const element = document.documentElement;
console.log(element.requestFullscreen) console.log(element.requestFullscreen)

View File

@ -7,7 +7,7 @@
<el-row :gutter="24" style="margin-top: 50px"> <el-row :gutter="24" style="margin-top: 50px">
<el-col :span="8" class="text-center"> <el-col :span="8" class="text-center">
考生姓名{{ paperData.userId_dictText }} 考生姓名{{ user.realName }}
</el-col> </el-col>
<el-col :span="8" class="text-center"> <el-col :span="8" class="text-center">
@ -116,6 +116,7 @@ import { paperResult } from '@/api/paper/exam'
export default { export default {
data() { data() {
return { return {
user: JSON.parse(localStorage.getItem("user")),
// ID // ID
paperId: '', paperId: '',
paperData: { paperData: {
@ -194,7 +195,6 @@ export default {
</script> </script>
<style scoped> <style scoped>
.qu-content { .qu-content {
border-bottom: #eee 1px solid; border-bottom: #eee 1px solid;
@ -206,7 +206,8 @@ export default {
line-height: 30px; line-height: 30px;
} }
.el-checkbox-group label,.el-radio-group label{ .el-checkbox-group label,
.el-radio-group label {
width: 100%; width: 100%;
} }
@ -216,13 +217,13 @@ export default {
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
} }
.card-line { .card-line {
padding-left: 10px padding-left: 10px
} }
.card-line span { .card-line span {
cursor: pointer; cursor: pointer;
margin: 2px; margin: 2px;
} }
</style> </style>