修改
This commit is contained in:
parent
8c292532c4
commit
601e17e255
@ -94,7 +94,6 @@ export default {
|
||||
showNext: true,
|
||||
loading: false,
|
||||
handleText: '交卷',
|
||||
pageLoading: false,
|
||||
// 试卷ID
|
||||
paperId: '',
|
||||
// 当前答题卡
|
||||
@ -172,6 +171,12 @@ export default {
|
||||
*/
|
||||
handNext() {
|
||||
this.requestFullScreen();
|
||||
if (this.loading) {
|
||||
return this.$message({
|
||||
type: 'info',
|
||||
message: '已交卷,请勿操作!'
|
||||
})
|
||||
}
|
||||
const index = this.cardItem.sort + 1
|
||||
this.handSave(this.allItem[index])
|
||||
},
|
||||
@ -180,6 +185,12 @@ export default {
|
||||
*/
|
||||
handPrevious() {
|
||||
this.requestFullScreen();
|
||||
if (this.loading) {
|
||||
return this.$message({
|
||||
type: 'info',
|
||||
message: '已交卷,请勿操作!'
|
||||
})
|
||||
}
|
||||
const index = this.cardItem.sort - 1
|
||||
this.handSave(this.allItem[index])
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="24">
|
||||
<el-row :gutter="24" v-if="detailData">
|
||||
<el-col :span="24" style="margin-bottom: 20px">
|
||||
<el-alert title="点击`开始考试`后将自动进入考试,请诚信考试!" type="error" style="margin-bottom: 10px" />
|
||||
<el-card class="pre-exam">
|
||||
@ -21,9 +21,13 @@
|
||||
<el-button :loading="loading" type="primary" icon="el-icon-caret-right" @click="handleCreate">
|
||||
开始考试
|
||||
</el-button>
|
||||
<el-button @click="handleBack">
|
||||
返回
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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-row>
|
||||
</div>
|
||||
@ -37,7 +41,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
user: JSON.parse(localStorage.getItem("user")),
|
||||
detailData: {},
|
||||
detailData: undefined,
|
||||
postForm: {
|
||||
examId: '',
|
||||
userId: JSON.parse(localStorage.getItem("user")).id,
|
||||
@ -51,8 +55,10 @@ export default {
|
||||
methods: {
|
||||
fetchData() {
|
||||
getRegExamList().then(response => {
|
||||
this.detailData = response.data[0] || {}
|
||||
this.postForm.examId = this.detailData.examId
|
||||
if (response.data.length > 0) {
|
||||
this.detailData = response.data[0]
|
||||
this.postForm.examId = this.detailData.examId
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCreate() {
|
||||
@ -71,9 +77,6 @@ export default {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
handleBack() {
|
||||
this.$router.push({ name: 'ExamOnline' })
|
||||
},
|
||||
requestFullScreen() {
|
||||
const element = document.documentElement;
|
||||
console.log(element.requestFullscreen)
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<el-row :gutter="24" style="margin-top: 50px">
|
||||
|
||||
<el-col :span="8" class="text-center">
|
||||
考生姓名:{{ paperData.userId_dictText }}
|
||||
考生姓名:{{ user.realName }}
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8" class="text-center">
|
||||
@ -25,14 +25,14 @@
|
||||
<div v-for="item in paperData.quList" :key="item.id" class="qu-content">
|
||||
|
||||
<p>{{ item.sort + 1 }}.{{ item.content }}(得分:{{ item.actualScore }})</p>
|
||||
<p v-if="item.image!=null && item.image!=''">
|
||||
<p v-if="item.image != null && item.image != ''">
|
||||
<el-image :src="item.image" style="max-width:100%;" />
|
||||
</p>
|
||||
<div v-if="item.quType === 1 || item.quType===3">
|
||||
<div v-if="item.quType === 1 || item.quType === 3">
|
||||
<el-radio-group v-model="radioValues[item.id]">
|
||||
<el-radio v-for="an in item.answerList" :label="an.id">
|
||||
{{ an.abc }}.{{ an.content }}
|
||||
<div v-if="an.image!=null && an.image!=''" style="clear: both">
|
||||
<div v-if="an.image != null && an.image != ''" style="clear: both">
|
||||
<el-image :src="an.image" style="max-width:100%;" />
|
||||
</div>
|
||||
</el-radio>
|
||||
@ -75,7 +75,7 @@
|
||||
<div v-if="item.quType === 2">
|
||||
<el-checkbox-group v-model="multiValues[item.id]">
|
||||
<el-checkbox v-for="an in item.answerList" :key="an.id" :label="an.id">{{ an.abc }}.{{ an.content }}
|
||||
<div v-if="an.image!=null && an.image!=''" style="clear: both">
|
||||
<div v-if="an.image != null && an.image != ''" style="clear: both">
|
||||
<el-image :src="an.image" style="max-width:100%;" />
|
||||
</div>
|
||||
</el-checkbox>
|
||||
@ -116,6 +116,7 @@ import { paperResult } from '@/api/paper/exam'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
user: JSON.parse(localStorage.getItem("user")),
|
||||
// 试卷ID
|
||||
paperId: '',
|
||||
paperData: {
|
||||
@ -194,35 +195,35 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.qu-content {
|
||||
|
||||
.qu-content{
|
||||
border-bottom: #eee 1px solid;
|
||||
padding-bottom: 10px;
|
||||
|
||||
border-bottom: #eee 1px solid;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
}
|
||||
.qu-content div {
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.qu-content div{
|
||||
line-height: 30px;
|
||||
}
|
||||
.el-checkbox-group label,
|
||||
.el-radio-group label {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.el-checkbox-group label,.el-radio-group label{
|
||||
width: 100%;
|
||||
}
|
||||
.card-title {
|
||||
background: #eee;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.card-title{
|
||||
background: #eee;
|
||||
line-height: 35px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
.card-line{
|
||||
padding-left: 10px
|
||||
}
|
||||
.card-line span {
|
||||
cursor: pointer;
|
||||
margin: 2px;
|
||||
}
|
||||
.card-line {
|
||||
padding-left: 10px
|
||||
}
|
||||
|
||||
.card-line span {
|
||||
cursor: pointer;
|
||||
margin: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user