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KUz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUg
AKpoC6EahQGcxEZjgoi2IrHu/qpGWX7PNSzVttpd90gzFFS269lvzs2I1qsb2pY7
HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEA
uI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+GXYkHAQa
TOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTg
xSvgGrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1q
CjqTE5s7FCMTY5w/0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5x
O/fIR/RpbxXyEV6DHpx8Uq79AtoSqFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs
6GAqm4VKQPNriiTsBhYscw==
-----END CERTIFICATE-----
......@@ -5,13 +5,13 @@ export default class ExamAPI extends BaseAPI {
* 获取考试信息
* @param {[string]} examId resource_id
*/
getTopic = (examId) => this.get(`/xexam/v1/exam/sheet/${examId}`, {})
getTopic = examId => this.get(`/xexam/v1/exam/sheet/${examId}`, {})
/* 缓存考试 */
setCache = (examId = {}, obj = {}) => this.post(`/xexam/v1/exam/cache/${examId}`, obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
setCache = (examId = '', obj = {}) => this.post(`/xexam/v1/exam/cache/${examId}`, obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
/* 获取缓存 */
getCache = (examId) => this.get(`/xexam/v1/exam/cache/${examId}`, {})
getCache = examId => this.get(`/xexam/v1/exam/cache/${examId}`, {})
/* 缓存考试 */
endExam = (examId = {}, obj = {}) => this.post(`/xexam/v1/exam/sheet/${examId}`, obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
endExam = (examId = '', obj = {}) => this.post(`/xexam/v1/exam/sheet/${examId}`, obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
/**
* 进入考试
*/
......
......@@ -5,7 +5,7 @@ export default class TestAPI extends BaseAPI {
* 获取考试信息
* @param {[string]} examId resource_id
*/
getExamInfo = (examId) => this.get(`/xexam/v1/exam/view/${examId}`, {})
getExamInfo = examId => this.get(`/xexam/v1/exam/view/${examId}`, {})
/**
* 进入考试
*/
......
......@@ -5,14 +5,14 @@ export default class TestAPI extends BaseAPI {
* get传输方式
* @param {[string]} id resource_id
*/
getTest = (id) => this.get(`/vue-client/get/${id}`, {})
getTest = id => this.get(`/vue-client/get/${id}`, {})
/**
* post传输方式
* @param {[object]} obj
*/
postTest = (obj = {}) => this.post('/passport/rest/login', obj, { headers: { 'Content-Type': 'multipart/form-data' } })
/**
* 当前登录用户,检测是否该系统有权限
*/
getInfo = () => this.post('/user_center/get_user_info', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
* 当前登录用户,检测是否该系统有权限
*/
getInfo = () => this.post('/user_center/get_user_info', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
}
......@@ -3,14 +3,7 @@
<div ref="wrapper">
<div class="info">
<div class="shape">
<img
:src="
info.id_photo
? info.id_photo
: 'https://zws-imgs-pub.ezijing.com/static/public/e0c63e4d4554f0852e1558426aad20d1.png'
"
alt=""
/>
<img :src="info.id_photo ? info.id_photo : 'https://zws-imgs-pub.ezijing.com/static/public/e0c63e4d4554f0852e1558426aad20d1.png'" />
</div>
<div class="right">
<div class="name">{{ info.name }}</div>
......@@ -132,8 +125,7 @@ export default {
info: { type: Object, default: () => {} }
},
data() {
return {
}
return {}
},
mounted() {
if (!this.isMobile()) {
......@@ -196,7 +188,7 @@ export default {
}
}
}
.order-scroll{
.order-scroll {
// max-height: 100px;
// overflow-y: scroll;
}
......
......@@ -7,21 +7,26 @@
<div class="num">{{ questionData.q_order }}/{{ questionParams.question.total_question_count }}</div>
</div>
<div class="title">
<div class="num">{{ questionData.q_order }}.</div><div class="des" v-html="questionData.content"></div>
<div class="num">{{ questionData.q_order }}.</div>
<div class="des" v-html="questionData.content"></div>
</div>
<!-- <div class="describe" ></div> -->
<ul :class="questionData.question_item_type == 2 ? 'check-option' : 'radio-option'">
<template v-for="(item, index) in questionData.options">
<li
:key="index"
:class="questionParams.answerRecord[questionData.question_item_id]
? questionParams.answerRecord[questionData.question_item_id][questionData.id]
? questionParams.answerRecord[questionData.question_item_id][questionData.id].answer.find(id => { return id === item.id })
? 'active'
:class="
questionParams.answerRecord[questionData.question_item_id]
? questionParams.answerRecord[questionData.question_item_id][questionData.id]
? questionParams.answerRecord[questionData.question_item_id][questionData.id].answer.find(id => {
return id === item.id
})
? 'active'
: ''
: ''
: ''
: ''"
>
"
>
<div @click="changeOptions(questionData.question_item_type, questionData.question_item_id, questionData.id, item.id)">
<div class="icon"></div>
<div class="txt" v-html="item.option"></div>
......@@ -37,9 +42,15 @@
<div class="num">{{ questionData.q_order }}/{{ questionParams.question.total_question_count }}</div>
</div>
<div class="title">
<div class="num">{{ questionData.q_order }}.</div><div class="des" v-html="questionData.content"></div>
<div class="num">{{ questionData.q_order }}.</div>
<div class="des" v-html="questionData.content"></div>
</div>
<el-input @input="QAChange(questionData.question_item_id, questionData.id, questionData.textContent)" type="textarea" placeholder="请输入内容" v-model="questionData.textContent"></el-input>
<el-input
@input="QAChange(questionData.question_item_id, questionData.id, questionData.textContent)"
type="textarea"
placeholder="请输入内容"
v-model="questionData.textContent"
></el-input>
</template>
<!-- 复合题 -->
<template v-if="questionData.question_item_type == 5 || questionData.question_item_type == 7 || questionData.question_item_type == 8">
......@@ -54,29 +65,35 @@
<template v-for="(item, index) in questionData.list">
<li :key="'type5' + index">
<div :class="item.q_order === questionParams.questionIndex + 1 ? 'active title' : 'title'">
<div class="num">{{ item.q_order }}.</div><div class="des" v-html="item.content"></div>
<div class="num">{{ item.q_order }}.</div>
<div class="des" v-html="item.content"></div>
</div>
<div v-if="item.type == 3" @click="changeIndex(item.q_order)">
<el-input @input="QAChildChange(questionData.question_item_id, item, item.answer)" type="textarea" placeholder="请输入内容" v-model="item.answer"></el-input>
</div>
<!-- <el-input @input="QAChange(questionData.question_item_id, questionData.id)" type="textarea" placeholder="请输入内容" v-model="questionData.textContent"></el-input> -->
<ul v-else :class="item.type == 2 ? 'check-option' : 'radio-option'"><!-- radio-option check-option -->
<ul v-else :class="item.type == 2 ? 'check-option' : 'radio-option'">
<!-- radio-option check-option -->
<template v-if="item.options">
<template v-for="(items, cIndex) in item.options">
<li
:id="items.id"
:key="'c' + cIndex"
:class="questionParams.answerRecord[questionData.question_item_id]
? questionParams.answerRecord[questionData.question_item_id][item.id]
? questionParams.answerRecord[questionData.question_item_id][item.id].answer.find(id => { return id === items.id })
? 'active'
:class="
questionParams.answerRecord[questionData.question_item_id]
? questionParams.answerRecord[questionData.question_item_id][item.id]
? questionParams.answerRecord[questionData.question_item_id][item.id].answer.find(id => {
return id === items.id
})
? 'active'
: ''
: ''
: ''
: ''"
>
"
>
<div @click="changeOptions(item.type, questionData.question_item_id, item.id, items.id, item.q_order)">
<div class="icon"></div>
<div class="txt">{{items.option}}</div>
<div class="txt">{{ items.option }}</div>
</div>
</li>
</template>
......@@ -94,8 +111,7 @@ import action from '@action'
import Bus from '@/components/common/bus.js'
import _ from 'lodash'
export default {
components: {
},
components: {},
props: {
contentHeight: { type: Number, default: () => {} },
questionParams: { type: Object, default: () => {} }
......@@ -108,11 +124,26 @@ export default {
textarea: ''
}
},
computed: {
examId() {
return this.$route.params.examId
},
changeQuestionIndex() {
return this.questionParams.questionIndex
}
},
watch: {
changeQuestionIndex(newV, oldV) {
this.dataCombined()
this.signCallback()
this.$nextTick(() => {
this.createTag()
})
}
},
beforeDestroy() {
clearInterval(this.setCacheTime)
},
created() {
},
mounted() {
clearInterval(this.setCacheTime)
this.setCacheTime = setInterval(() => {
......@@ -128,7 +159,9 @@ export default {
this.questionParams.question.question_items.map((item, index) => {
if (parseInt(item.question_item_type) === 5 || parseInt(item.question_item_type) === 7 || parseInt(item.question_item_type) === 8) {
item.question_list.map(cItem => {
const currentItem = cItem.list.find(items => { return items.q_order === this.questionParams.questionIndex + 1 })
const currentItem = cItem.list.find(items => {
return items.q_order === this.questionParams.questionIndex + 1
})
if (currentItem) {
this.questionData = {}
this.questionData.common_content = cItem.common_content
......@@ -148,7 +181,7 @@ export default {
this.questionData.list.map(el => {
if (el.type === 3) {
if (this.questionParams.answerRecord[pId]) {
this.questionParams.answerRecord[pId][el.id] ? el.answer = this.questionParams.answerRecord[pId][el.id].answer[0] : el.answer = ''
this.questionParams.answerRecord[pId][el.id] ? (el.answer = this.questionParams.answerRecord[pId][el.id].answer[0]) : (el.answer = '')
} else {
el.answer = ''
}
......@@ -161,7 +194,9 @@ export default {
})
this.$forceUpdate()
} else {
const currentItem = item.question_list.find(items => { return items.q_order === this.questionParams.questionIndex + 1 })
const currentItem = item.question_list.find(items => {
return items.q_order === this.questionParams.questionIndex + 1
})
if (currentItem) {
this.questionData = currentItem
const key = ['question_item_id', 'question_item_title', 'question_item_type']
......@@ -214,19 +249,15 @@ export default {
// 问答题回答
QAChange(pId, cId, length) {
// if (length.length < 500) {
this.questionParams.answerRecord[pId]
? this.questionParams.answerRecord[pId][cId]
? this.questionParams.answerRecord[pId][cId].answer = [this.questionData.textContent]
: this.questionParams.answerRecord[pId][cId] = {
answer: [this.questionData.textContent],
sign: false
}
: this.questionParams.answerRecord[pId] = {
[cId]: {
answer: [this.questionData.textContent],
sign: false
}
if (this.questionParams.answerRecord[pId]) {
if (this.questionParams.answerRecord[pId][cId]) {
this.questionParams.answerRecord[pId][cId].answer = [this.questionData.textContent]
} else {
this.questionParams.answerRecord[pId][cId] = { answer: [this.questionData.textContent], sign: false }
}
} else {
this.questionParams.answerRecord[pId] = { [cId]: { answer: [this.questionData.textContent], sign: false } }
}
this.$forceUpdate()
// } else {
// this.$message({
......@@ -245,40 +276,32 @@ export default {
this.questionParams.questionIndex = order - 1
}
if (parseInt(type) !== 2) {
this.questionParams.answerRecord[pId]
? this.questionParams.answerRecord[pId][cId]
? this.questionParams.answerRecord[pId][cId].answer = [optId]
: this.questionParams.answerRecord[pId][cId] = {
answer: [optId],
sign: false
}
: this.questionParams.answerRecord[pId] = {
[cId]: {
answer: [optId],
sign: false
}
if (this.questionParams.answerRecord[pId]) {
if (this.questionParams.answerRecord[pId][cId]) {
this.questionParams.answerRecord[pId][cId].answer = [optId]
} else {
this.questionParams.answerRecord[pId][cId] = { answer: [optId], sign: false }
}
} else {
this.questionParams.answerRecord[pId] = { [cId]: { answer: [optId], sign: false } }
}
} else {
this.questionParams.answerRecord[pId]
? this.questionParams.answerRecord[pId][cId]
? (() => {
const optChack = this.questionParams.answerRecord[pId][cId].answer.findIndex(item => { return item === optId })
if (optChack === -1) {
this.questionParams.answerRecord[pId][cId].answer.push(optId)
} else {
this.questionParams.answerRecord[pId][cId].answer.splice(optChack, 1)
}
})()
: this.questionParams.answerRecord[pId][cId] = {
answer: [optId],
sign: false
}
: this.questionParams.answerRecord[pId] = {
[cId]: {
answer: [optId],
sign: false
if (this.questionParams.answerRecord[pId]) {
if (this.questionParams.answerRecord[pId][cId]) {
const optCheck = this.questionParams.answerRecord[pId][cId].answer.findIndex(item => {
return item === optId
})
if (optCheck === -1) {
this.questionParams.answerRecord[pId][cId].answer.push(optId)
} else {
this.questionParams.answerRecord[pId][cId].answer.splice(optCheck, 1)
}
} else {
this.questionParams.answerRecord[pId][cId] = { answer: [optId], sign: false }
}
} else {
this.questionParams.answerRecord[pId] = { [cId]: { answer: [optId], sign: false } }
}
}
Bus.$emit('monitoringChanges')
this.$forceUpdate()
......@@ -287,27 +310,28 @@ export default {
const param = {
answer: JSON.stringify(this.questionParams.answerRecord)
}
action.Exam.setCache(this.$route.params.examId, param).then(res => {
}).catch(err => {
// if (err.message.indexOf('error') !== -1) {
// this.$confirm('网络异常,请保持网络通畅', '提示', {
// confirmButtonText: '退出考试',
// cancelButtonText: '重新提交',
// type: 'warning'
// }).then(() => {
// this.$router.replace({
// path: `/login/${JSON.parse(window.localStorage.getItem('examInfo')).exam_id}`
// })
// }).catch(() => {
// this.endExamRequest()
// })
// } else {
// // this.$alert(err.message, {
// // callback: action => {}
// // })
// console.log(err.message)
// }
})
action.Exam.setCache(this.examId, param)
.then(res => {})
.catch(err => {
// if (err.message.indexOf('error') !== -1) {
// this.$confirm('网络异常,请保持网络通畅', '提示', {
// confirmButtonText: '退出考试',
// cancelButtonText: '重新提交',
// type: 'warning'
// }).then(() => {
// this.$router.replace({
// path: `/login/${JSON.parse(window.localStorage.getItem('examInfo')).exam_id}`
// })
// }).catch(() => {
// this.endExamRequest()
// })
// } else {
// // this.$alert(err.message, {
// // callback: action => {}
// // })
// console.log(err.message)
// }
})
},
// 标记
onSignHandle() {
......@@ -317,11 +341,7 @@ export default {
this.questionData.list.forEach(item => {
if (this.questionParams.answerRecord[pId]) {
if (this.questionParams.answerRecord[pId][item.id]) {
if (this.questionParams.answerRecord[pId][item.id].sign) {
this.questionParams.answerRecord[pId][item.id].sign = false
} else {
this.questionParams.answerRecord[pId][item.id].sign = true
}
this.questionParams.answerRecord[pId][item.id].sign = !this.questionParams.answerRecord[pId][item.id].sign
} else {
this.questionParams.answerRecord[pId][item.id] = { sign: true, answer: [] }
}
......@@ -330,21 +350,15 @@ export default {
}
})
} else {
this.questionParams.answerRecord[pId]
? this.questionParams.answerRecord[pId][cId]
? this.questionParams.answerRecord[pId][cId].sign
? this.questionParams.answerRecord[pId][cId].sign = false
: this.questionParams.answerRecord[pId][cId].sign = true
: this.questionParams.answerRecord[pId][cId] = {
sign: true,
answer: []
}
: this.questionParams.answerRecord[pId] = {
[cId]: {
sign: true,
answer: []
}
if (this.questionParams.answerRecord[pId]) {
if (this.questionParams.answerRecord[pId][cId]) {
this.questionParams.answerRecord[pId][cId].sign = !this.questionParams.answerRecord[pId][cId].sign
} else {
this.questionParams.answerRecord[pId][cId] = { sign: true, answer: [] }
}
} else {
this.questionParams.answerRecord[pId] = { [cId]: { sign: true, answer: [] } }
}
}
this.signCallback()
},
......@@ -354,9 +368,9 @@ export default {
let isSign = false
this.questionParams.answerRecord[pId]
? this.questionParams.answerRecord[pId][cId]
? isSign = this.questionParams.answerRecord[pId][cId].sign
: isSign = false
: isSign = false
? (isSign = this.questionParams.answerRecord[pId][cId].sign)
: (isSign = false)
: (isSign = false)
this.$emit('isSign', isSign)
Bus.$emit('monitoringChanges')
},
......@@ -383,78 +397,65 @@ export default {
$('body').append(script2)
$('body').append(script)
}
},
computed: {
changeQuestionIndex() {
return this.questionParams.questionIndex
}
},
watch: {
changeQuestionIndex(newV, oldV) {
this.dataCombined()
this.signCallback()
this.$nextTick(() => {
this.createTag()
})
}
}
}
</script>
<style lang="scss" scoped>
::v-deep{
.el-textarea__inner{
::v-deep {
.el-textarea__inner {
height: 150px;
}
}
.title-type{
.title-type {
width: 100%;
height: 45px;
border-bottom:1px solid #ccc;
border-bottom: 1px solid #ccc;
display: flex;
align-items: center;
.type{
.type {
font-size: 18px;
color: #222222;
}
.num{
.num {
margin-left: auto;
font-size: 18px;
color: #222222;
}
}
.title{
.title {
font-size: 18px;
font-weight: bold;
color: #222222;
line-height: 25px;
display: flex;
.num{
.num {
font-size: 32px;
font-weight: bold;
color: #222222;
line-height: 45px;
margin-top: 5px;
}
.des{
.des {
margin-left: 5px;
padding-top: 18px;
&::v-deep p{
&::v-deep p {
margin: 0;
}
}
}
.describe{
.describe {
font-size: 18px;
color: #222222;
line-height: 25px;
margin-top: 20px;
}
.radio-option,.check-option{
.radio-option,
.check-option {
padding: 24px 0 0 0;
margin: 0;
list-style: none;
li{
li {
// cursor: pointer;
margin-bottom: 20px;
// display: flex;
......@@ -463,7 +464,7 @@ export default {
div {
float: left;
cursor: pointer;
.icon{
.icon {
width: 18px;
height: 18px;
border: 1px solid #999999;
......@@ -471,14 +472,14 @@ export default {
margin-top: 3px;
float: left;
}
.txt{
.txt {
max-width: 95%;
font-size: 18px;
color: #222222;
line-height: 28px;
margin-left: 10px;
float: left;
&::v-deep p{
&::v-deep p {
margin: 0;
}
}
......@@ -497,36 +498,36 @@ export default {
// line-height: 28px;
// margin-left: 10px;
// }
&.active{
.icon{
&.active {
.icon {
width: 8px;
height: 8px;
border: 6px solid #C01540;
border: 6px solid #c01540;
}
}
}
}
.check-option{
.icon{
.check-option {
.icon {
border-radius: 3px !important;
}
}
.case-que{
::v-deep{
img{
.case-que {
::v-deep {
img {
display: block;
width:100%;
width: 100%;
}
}
display: flex;
.stem{
.stem {
flex: 1;
font-size: 14px;
font-weight: bold;
color: #222222;
line-height: 28px;
}
.topics{
.topics {
flex: 1;
margin: 0;
padding: 0 0 0 20px;
......@@ -536,19 +537,19 @@ export default {
&::-webkit-scrollbar {
display: none;
}
li{
.title{
li {
.title {
font-size: 18px;
font-weight: bold;
color: #222222;
line-height: 25px;
&.active{
&.active {
color: #c01540;
.num{
.num {
color: #c01540 !important;
}
}
span{
span {
font-size: 32px;
font-weight: bold;
color: #222222;
......
......@@ -11,7 +11,7 @@
<!-- <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> -->
<!-- <meta http-equiv="Pragma" content="no-cache" /> -->
<!-- <meta http-equiv="Expires" content="0" /> -->
<title>标题</title>
<title></title>
<meta name="viewport" id="viewport" content="initial-scale=-1,maximum-scale=1,shrink-to-fit=no,user-scalable=no" />
</head>
<body>
......
......@@ -25,12 +25,7 @@
</div>
</div>
<div :class="isMobile() ? 'right scroll' : 'right hidden'" ref="wrapper">
<answer-card
:questionParams="questionParams"
:changeTime="changeTime"
:info="sInfo.info"
@switchQuestion="switchQuestion"
></answer-card>
<answer-card :questionParams="questionParams" :changeTime="changeTime" :info="studentInfo" @switchQuestion="switchQuestion"></answer-card>
</div>
<ul class="flag-tips">
<li>
......@@ -56,10 +51,7 @@
<div @click="changeIndex('prev')" :class="this.questionParams.questionIndex !== 0 ? 'active' : ''">
上一题
</div>
<div
:class="questionParams.questionIndex + 1 !== questionParams.question.total_question_count ? 'active' : ''"
@click="changeIndex('next')"
>
<div :class="questionParams.questionIndex + 1 !== questionParams.question.total_question_count ? 'active' : ''" @click="changeIndex('next')">
下一题
</div>
</div>
......@@ -91,7 +83,7 @@ import BScroll from 'better-scroll'
export default {
metaInfo() {
return {
title: JSON.parse(window.localStorage.getItem('examInfo')).name || ''
title: this.examInfo.name || ''
}
},
components: {
......@@ -100,14 +92,23 @@ export default {
'my-dia': dialogComponent
},
data() {
let studentInfo = {}
let examInfo = {}
try {
studentInfo = JSON.parse(window.localStorage.getItem('studentInfo'))
examInfo = JSON.parse(window.localStorage.getItem('examInfo'))
} catch (error) {
console.log(error)
}
return {
isExamEnd: false,
isExamTimeDate: true,
itemSign: false,
examTime: '00:00:00 倒计时',
clearTime: null,
sInfo: JSON.parse(window.localStorage.getItem('studentInfo')),
examInfo: JSON.parse(window.localStorage.getItem('examInfo')),
studentInfo,
examInfo,
title: '提示',
prompt: '确定后要结束本次考试?还有作答时间,结束考试后,将不能返回本次考试!',
isPopup: false,
......@@ -125,6 +126,20 @@ export default {
}
}
},
computed: {
examId() {
return this.$route.params.examId || this.examInfo.exam_id
},
changeQuestionIndex() {
return this.questionParams.questionIndex
}
},
watch: {
changeQuestionIndex(newV, oldV) {
this.refreshBscroll()
}
},
mounted() {
// this.sendExamInfo(3)
this.setTick()
......@@ -149,8 +164,8 @@ export default {
},
sendExamInfo(status) {
const param = {
student_id: this.sInfo.info.student_id,
exam_id: this.examInfo.exam_id,
student_id: this.studentInfo.student_id,
exam_id: this.examId,
status: status
}
action.Login.sendExamInfo(param)
......@@ -160,9 +175,7 @@ export default {
})
},
countHeight() {
this.contentHeight = parseInt(
document.body.clientHeight - (this.getDom('head-h').offsetHeight + this.getDom('foot-h').offsetHeight)
)
this.contentHeight = parseInt(document.body.clientHeight - (this.getDom('head-h').offsetHeight + this.getDom('foot-h').offsetHeight))
},
// 标记
signHandle() {
......@@ -178,12 +191,7 @@ export default {
this.$alert('考试时间到', {
confirmButtonText: '确定',
callback: action => {
this.$router.replace({
path: '/examEnd',
query: {
id: JSON.parse(window.localStorage.getItem('examInfo')).exam_id
}
})
this.$router.replace({ path: '/examEnd', query: { id: this.examId } })
}
})
} else {
......@@ -229,7 +237,7 @@ export default {
const param = {
answer: JSON.stringify(this.questionParams.answerRecord)
}
action.Exam.endExam(this.$route.params.examId, param).then(res => {
action.Exam.endExam(this.examId, param).then(res => {
if (!n) {
clearInterval(this.clearTime)
this.$router.replace({
......@@ -249,7 +257,7 @@ export default {
// })
// .then(() => {
// this.$router.replace({
// path: `/login/${JSON.parse(window.localStorage.getItem('examInfo')).exam_id}`
// path: `/login/${this.examId}`
// })
// })
// .catch(action => {
......@@ -263,18 +271,18 @@ export default {
// })
},
countDown(time) {
const lefttime = parseInt(time / 1000)
const h = this.addZero(parseInt((lefttime / (60 * 60)) % 24))
const m = this.addZero(parseInt((lefttime / 60) % 60))
const s = this.addZero(parseInt(lefttime % 60))
const leftTime = parseInt(time / 1000)
const h = this.addZero(parseInt((leftTime / (60 * 60)) % 24))
const m = this.addZero(parseInt((leftTime / 60) % 60))
const s = this.addZero(parseInt(leftTime % 60))
this.examTime = `${h} : ${m} : ${s} 倒计时`
},
setTick() {
let flag = true
this.clearTime = setInterval(() => {
const nowtime = new Date()
const endtime = new Date(this.examInfo.end_time.replace(/-/g, '/'))
const countTime = endtime.getTime() - nowtime.getTime()
const nowTime = new Date()
const endTime = new Date(this.examInfo.end_time.replace(/-/g, '/'))
const countTime = endTime.getTime() - nowTime.getTime()
if (countTime <= 0) {
this.isExamTimeDate = false
clearInterval(this.clearTime)
......@@ -305,8 +313,7 @@ export default {
if (type === 'prev') {
this.questionParams.questionIndex > 0 && this.questionParams.questionIndex--
} else {
this.questionParams.questionIndex + 1 !== this.questionParams.question.total_question_count &&
this.questionParams.questionIndex++
this.questionParams.questionIndex + 1 !== this.questionParams.question.total_question_count && this.questionParams.questionIndex++
}
this.refreshBscroll()
},
......@@ -322,7 +329,7 @@ export default {
this.refreshBscroll()
},
getTopic() {
action.Exam.getTopic(this.$route.params.examId)
action.Exam.getTopic(this.examId)
.then(res => {
this.questionParams.question = res
this.getCache()
......@@ -333,8 +340,8 @@ export default {
})
},
getCache() {
if (this.$route.params.examId) {
action.Exam.getCache(this.$route.params.examId)
if (this.examId) {
action.Exam.getCache(this.examId)
.then(res => {
const data = JSON.parse(res.answer)
if (data !== null && data !== 'null') {
......@@ -371,16 +378,6 @@ export default {
const isPc = !isPhone && !isAndroid && !isSymbian
return isPc
}
},
computed: {
changeQuestionIndex() {
return this.questionParams.questionIndex
}
},
watch: {
changeQuestionIndex(newV, oldV) {
this.refreshBscroll()
}
}
}
</script>
......
......@@ -17,26 +17,16 @@
<li :key="index" v-else-if="item.key == 'educational_background'">
<div class="name">学历</div>
<el-select v-model="form.educational_background" placeholder="请选择" style="width:100%" v-if="item.enabled_edit">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select>
<el-select disabled v-model="form.educational_background" placeholder="请选择" style="width:100%" v-else>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select>
</li>
<li :key="index" v-else>
<div class="name">{{ item.name }}</div>
<input :type="typeInput(item.key)" v-model="form[item.key]" @keydown="keydown($event)" v-if="item.enabled_edit">
<input :type="typeInput(item.key)" v-model="form[item.key]" @keydown="keydown($event)" disabled v-else>
<input :type="typeInput(item.key)" v-model="form[item.key]" @keydown="keydown($event)" v-if="item.enabled_edit" />
<input :type="typeInput(item.key)" v-model="form[item.key]" @keydown="keydown($event)" disabled v-else />
</li>
</template>
</ul>
......@@ -68,13 +58,22 @@ import action from '@action'
export default {
metaInfo() {
return {
title: JSON.parse(window.localStorage.getItem('examInfo')).name || ''
title: this.examInfo.name || ''
}
},
data() {
let studentInfo = {}
let examInfo = {}
try {
studentInfo = JSON.parse(window.localStorage.getItem('studentInfo'))
examInfo = JSON.parse(window.localStorage.getItem('examInfo'))
} catch (error) {
console.log(error)
}
return {
sInfo: JSON.parse(window.localStorage.getItem('studentInfo')),
examInfo: JSON.parse(window.localStorage.getItem('examInfo')) || {},
studentInfo,
examInfo,
form: {
educational_background: ''
},
......@@ -109,18 +108,11 @@ export default {
this.setInput()
this.defaultInto()
},
mounted() {
// console.log(this.examInfo.config.info)
},
computed: {
typeInput() {
return (k) => {
const type = k === 'age' || k === 'mobile' ? 'number' : 'text'
return type
}
}
},
methods: {
typeInput(k) {
const type = k === 'age' || k === 'mobile' ? 'number' : 'text'
return type
},
setInput() {
const key = Object.keys(this.examInfo.config.info)
const value = Object.values(this.examInfo.config.info)
......@@ -141,28 +133,19 @@ export default {
})
},
// 禁止input输入空格
keydown (event) {
keydown(event) {
event.keyCode === 32 && (event.returnValue = false)
},
agree() {
// 判断考试时间开始没有
// console.log(this.isExamStatus(this.examInfo.start_time > 0))
this.isExamStatus(this.examInfo.start_time) > 0
? (() => {
this.$router.replace({
path: '/examTime'
})
})()
: (() => {
this.$router.replace({
path: `/examAnswer/${this.examInfo.exam_id}`
})
})()
if (this.isExamStatus(this.examInfo.start_time) > 0) {
this.$router.replace({ path: '/examTime' })
} else {
this.$router.replace({ path: `/examAnswer/${this.examInfo.exam_id}` })
}
},
disagree() {
this.$router.replace({
path: `/login/${this.examInfo.exam_id}`
})
this.$router.replace({ path: `/login/${this.examInfo.exam_id}` })
},
// 判断进入考试页面还是倒计时页面
isExamStatus(date) {
......@@ -183,37 +166,34 @@ export default {
defaultInto() {
const key = Object.keys(this.form)
key.map(item => {
this.form[item] = item === 'age'
? parseInt(this.sInfo.info[item]) === 0
? ''
: this.sInfo.info[item]
: this.sInfo.info[item]
this.form[item] = item === 'age' ? (parseInt(this.studentInfo[item]) === 0 ? '' : this.studentInfo[item]) : this.studentInfo[item]
})
},
// 确认信息
confirmInfo() {
if (this.verification()) {
action.Login.confirmInfo(this.examInfo.exam_id, this.form).then(res => {
if (!res.code) {
this.isTreaty = true
window.localStorage.setItem('studentInfo', JSON.stringify(res))
}
}).catch(err => {
if (parseInt(err.status) === 403) {
this.$alert(err.message, {
callback: action => {
this.$router.replace({
path: `/login/${JSON.parse(window.localStorage.getItem('examInfo')).exam_id}`
})
}
})
} else {
this.$alert(err.message, {
callback: action => {
}
})
}
})
action.Login.confirmInfo(this.examInfo.exam_id, this.form)
.then(res => {
if (!res.code) {
this.isTreaty = true
window.localStorage.setItem('studentInfo', JSON.stringify(res.info))
}
})
.catch(err => {
if (parseInt(err.status) === 403) {
this.$alert(err.message, {
callback: action => {
this.$router.replace({
path: `/login/${JSON.parse(window.localStorage.getItem('examInfo')).exam_id}`
})
}
})
} else {
this.$alert(err.message, {
callback: action => {}
})
}
})
}
},
// 验证信息是否为空
......@@ -231,13 +211,13 @@ export default {
return false
} else {
if (this.allForm[i].key === 'mobile') {
if (!(/^1[3456789]\d{9}$/.test(this.form.mobile))) {
if (!/^1[3456789]\d{9}$/.test(this.form.mobile)) {
this.$alert('手机号格式不正确')
return false
}
}
if (this.allForm[i].key === 'email') {
if (!(/^([a-zA-Z\d])(\w)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/.test(this.form.email))) {
if (!/^([a-zA-Z\d])(\w)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/.test(this.form.email)) {
this.$alert('邮箱格式不正确')
return false
}
......@@ -247,13 +227,13 @@ export default {
} else {
if (this.form[this.allForm[i].key] !== '') {
if (this.allForm[i].key === 'mobile') {
if (!(/^1[3456789]\d{9}$/.test(this.form.mobile))) {
if (!/^1[3456789]\d{9}$/.test(this.form.mobile)) {
this.$alert('手机号格式不正确')
return false
}
}
if (this.allForm[i].key === 'email') {
if (!(/^([a-zA-Z\d])(\w)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/.test(this.form.email))) {
if (!/^([a-zA-Z\d])(\w)+@[a-zA-Z\d]+\.[a-zA-Z]{2,4}$/.test(this.form.email)) {
this.$alert('邮箱格式不正确')
return false
}
......@@ -267,42 +247,42 @@ export default {
}
</script>
<style lang="scss" scoped>
.box{
.box {
display: flex;
justify-content: center;
background: url(../../assets/images/con-info-bg.png) center;
background-size: cover;
background-attachment:fixed;
background-attachment: fixed;
background-position: 0 0;
padding-bottom: 100px;
min-height: 100%;
}
.confirm-mian{
.confirm-mian {
width: 100%;
height: 100%;
}
.con-info{
.con-info {
width: 100%;
height: 100%;
.head{
.head {
position: sticky;
top: 0;
height: 80px;
background: #FFFFFF;
background: #ffffff;
font-size: 24px;
font-weight: bold;
color: #222222;
line-height: 80px;
padding-left: 30px;
}
.info-form{
.info-form {
height: max-content;
margin-top: 40px;
width: 400px;
background: #FFFFFF;
background: #ffffff;
border-radius: 8px;
padding-bottom: 30px;
.tit{
.tit {
text-align: center;
margin-top: 30px;
font-size: 18px;
......@@ -310,48 +290,48 @@ export default {
color: #222222;
line-height: 25px;
}
ul{
ul {
width: 320px;
margin: 0 auto 0 auto;
padding: 0;
list-style: none;
li{
li {
margin-bottom: 20px;
.name{
.name {
font-size: 14px;
color: #222222;
line-height: 20px;
margin-bottom: 10px;
}
input{
input {
width: 310px;
height: 45px;
border-radius: 2px;
border: 1px solid #F1F1F1;
border: 1px solid #f1f1f1;
font-size: 14px;
color: #222222;
padding: 0 0 0 10px;
outline: none;
}
.select-btn{
.select-btn {
width: 100%;
display: flex;
div{
div {
width: 150px;
height: 40px;
border-radius: 4px;
border: 1px solid #CCCCCC;
border: 1px solid #cccccc;
font-size: 14px;
font-weight: bold;
color: #999999;
line-height: 14px;
text-align: center;
line-height: 40px;
&:nth-child(2){
&:nth-child(2) {
margin-left: auto;
}
&.active{
background: #C01540;
&.active {
background: #c01540;
color: #fff;
border: none;
}
......@@ -359,80 +339,82 @@ export default {
}
}
}
.confirm-btn{
.confirm-btn {
width: 320px;
height: 40px;
background: #C01540;
background: #c01540;
border-radius: 4px;
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
color: #ffffff;
line-height: 14px;
margin: 0 auto;
text-align: center;
line-height: 40px;
margin-top: 30px;
cursor: pointer;
}
}
}
.explain-box{
.explain-box {
width: 100%;
min-height: 100%;
background: #F9F9F9;
.head{
background: #f9f9f9;
.head {
height: 80px;
background: #FFFFFF;
background: #ffffff;
font-size: 24px;
font-weight: bold;
color: #222222;
line-height: 80px;
padding-left: 30px;
}
.exp-text{
.exp-text {
width: 900px;
background: #FFFFFF;
background: #ffffff;
border-radius: 8px;
padding: 40px 40px 80px;
margin: 40px auto 0;
margin-top: 40px;
.t{
.t {
font-size: 18px;
font-weight: bold;
color: #222222;
line-height: 25px;
display: flex;
&::v-deep p{
&::v-deep p {
margin: 0;
}
}
}
.exp-btn{
.exp-btn {
position: absolute;
bottom: 40px;
left: 50%;
-webkit-transform: translateX(-50%);
.tips{
transform: translateX(-50%);
.tips {
font-size: 14px;
color: #222222;
line-height: 20px;
}
.btn-box{
.btn-box {
width: 240px;
display: flex;
margin: 20px auto 0;
div{
div {
width: 100px;
height: 40px;
background: #C01540;
background: #c01540;
border-radius: 4px;
font-size: 14px;
font-weight: bold;
color: #FFFFFF;
color: #ffffff;
line-height: 40px;
text-align: center;
&:nth-child(2){
cursor: pointer;
&:nth-child(2) {
border-radius: 4px;
border: 1px solid #CCCCCC;
border: 1px solid #cccccc;
background: none;
color: #999;
margin-left: auto;
......@@ -441,7 +423,7 @@ export default {
}
}
}
.none{
.none {
display: none;
}
</style>
......@@ -13,20 +13,8 @@
<div :class="loginParam.is ? 'form prohibit' : 'form'">
<div class="tips">{{ tips }}</div>
<!-- 您登录的次数已超过最大限制 -->
<input
type="text"
v-model="examineeNumber"
placeholder="请输入准考证号"
v-show="!loginParam.is"
@keydown="keydown($event)"
/>
<input
type="text"
placeholder="请输入准考证号"
readonly="readonly"
class="prohibit"
v-show="loginParam.is"
/>
<input type="text" v-model="examineeNumber" placeholder="请输入准考证号" v-show="!loginParam.is" @keydown="keydown($event)" />
<input type="text" placeholder="请输入准考证号" readonly="readonly" class="prohibit" v-show="loginParam.is" />
<div class="btn" @click="login">登录</div>
<!-- <div class="btn prohibit">登录</div> -->
<div class="time-tips" v-show="loginParam.is">{{ loginParam.countTimeText }}</div>
......@@ -34,7 +22,7 @@
</div>
</div>
</div>
<div class="welcome-msg mian-cont900" v-if="data" v-html="data.config.welcome_message"></div>
<div class="welcome-msg mian-cont900" v-if="data && data.config" v-html="data.config.welcome_message"></div>
</div>
</template>
<script>
......@@ -46,16 +34,16 @@ export default {
},
metaInfo() {
return {
title: JSON.parse(window.localStorage.getItem('examInfo')).name || ''
title: this.data.name
}
},
data() {
return {
tips: '',
claerExamTime: null,
clearExamTime: null,
title: '提示',
prompt: '不能退出全屏',
data: '',
data: {},
examineeNumber: '',
isPopup: false,
loginParam: {
......@@ -65,6 +53,11 @@ export default {
}
}
},
computed: {
examId() {
return this.$route.params.examId
}
},
mounted() {
this.getExamInfo()
this.tipsMobileAngle()
......@@ -78,10 +71,7 @@ export default {
const winWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth || 0
const winHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight || 0
if (winHeight > winWidth) {
this.$message({
message: '请横屏预览',
type: 'warning'
})
this.$message({ message: '请横屏预览', type: 'warning' })
}
}
},
......@@ -89,19 +79,19 @@ export default {
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)
},
getExamInfo() {
action.Login.getExamInfo(this.$route.params.examId).then(res => {
action.Login.getExamInfo(this.examId).then(res => {
window.localStorage.setItem('examInfo', JSON.stringify(res))
this.data = res
if (this.getEnabledTime() < 0) {
this.examTimeInit()
} else {
let claearTimes = null
claearTimes = setInterval(() => {
let clearTimes = null
clearTimes = setInterval(() => {
// console.log(this.getAfterTime())
if (this.getAfterTime() <= 0) {
this.tips = '超过登录时间'
this.loginParam.is = true
clearInterval(claearTimes)
clearInterval(clearTimes)
}
}, 1000)
this.loginParam.is = false
......@@ -109,11 +99,7 @@ export default {
})
},
sendExamInfo(studentId) {
const param = {
student_id: studentId,
exam_id: this.data.exam_id,
status: 2
}
const param = { student_id: studentId, exam_id: this.examId, status: 2 }
action.Login.sendExamInfo(param)
.then(res => {})
.catch(err => {
......@@ -126,25 +112,23 @@ export default {
},
getAfterTime() {
const curTime = new Date()
const endtTime = new Date(this.data.end_time)
const countTime = endtTime.getTime() - curTime.getTime()
const endTime = new Date(this.data.end_time)
const countTime = endTime.getTime() - curTime.getTime()
return countTime
},
getEnabledTime() {
const curTime = new Date()
const setCurTime = this.data.config.enabled_before
? new Date(curTime.setMinutes(curTime.getMinutes() + this.data.config.before_login))
: curTime
const setCurTime = this.data.config.enabled_before ? new Date(curTime.setMinutes(curTime.getMinutes() + this.data.config.before_login)) : curTime
const startTime = new Date(this.data.start_time)
const countTime = setCurTime.getTime() - startTime.getTime()
return countTime
},
examTimeInit() {
this.loginParam.is = true
this.claerExamTime = setInterval(() => {
this.clearExamTime = setInterval(() => {
const date = this.getEnabledTime()
if (date >= 0) {
clearInterval(this.claerExamTime)
clearInterval(this.clearExamTime)
this.loginParam.is = false
} else {
this.countDown(Math.abs(date))
......@@ -156,21 +140,23 @@ export default {
},
// 倒计时
countDown(time) {
const lefttime = parseInt(time / 1000)
const leftTime = parseInt(time / 1000)
const datSec = 24 * 60 * 60
const hourSer = 60 * 60
const minuteSec = 60
const dd = Math.floor(lefttime / datSec)
const hh = Math.floor((lefttime % datSec) / hourSer)
const mm = Math.floor((lefttime % hourSer) / minuteSec)
const ss = lefttime % minuteSec
this.loginParam.countTimeText = dd > 0 ? `距离开考还有: ${dd}${this.addZero(hh)}${this.addZero(mm)}${this.addZero(ss)}秒` : `距离开考还有: ${this.addZero(hh)}${this.addZero(mm)}${this.addZero(ss)}秒`
const dd = Math.floor(leftTime / datSec)
const hh = Math.floor((leftTime % datSec) / hourSer)
const mm = Math.floor((leftTime % hourSer) / minuteSec)
const ss = leftTime % minuteSec
this.loginParam.countTimeText =
dd > 0
? `距离开考还有: ${dd}${this.addZero(hh)}${this.addZero(mm)}${this.addZero(ss)}秒`
: `距离开考还有: ${this.addZero(hh)}${this.addZero(mm)}${this.addZero(ss)}秒`
},
// 开启全屏
fullScreen() {
const el = document.documentElement
const rfs =
el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen
const rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullscreen
if (typeof rfs !== 'undefined' && rfs) {
rfs.call(el)
}
......@@ -189,17 +175,16 @@ export default {
this.$alert('请输入准考证号')
return false
}
action.Login.userLogin(this.data.exam_id, { examinee_number: this.examineeNumber })
action.Login.userLogin(this.examId, { examinee_number: this.examineeNumber })
.then(res => {
window.localStorage.setItem('studentInfo', JSON.stringify(res))
window.localStorage.setItem('studentInfo', JSON.stringify(res.info))
const status = parseInt(res.sheet_status)
// this.sendExamInfo(res.info.student_id)
if (status === 0) {
this.$router.replace({
name: 'confirmInfo'
})
this.$router.push({ name: 'confirmInfo', params: { examId: this.examId } })
} else if (status === 1) {
this.$alert('已提交考卷')
}
status === 1 && this.$alert('已提交考卷')
})
.catch(err => {
if (err.message.indexOf('error') !== -1) {
......@@ -232,7 +217,7 @@ export default {
position: absolute;
bottom: 0;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
margin-bottom: -115px;
}
}
......@@ -335,6 +320,7 @@ export default {
line-height: 40px;
text-align: center;
font-style: normal;
cursor: pointer;
&.prohibit {
color: #ccc;
background: #eee;
......
export default [
{ path: '/', redirect: '*' },
/* 测试页面 */
......@@ -6,7 +5,7 @@ export default [
/* 登录页面 */
{ path: '/login/:examId', component: () => import('../pages/login/index.vue') },
/* 确认信息 */
{ path: '/confirmInfo', name: 'confirmInfo', component: () => import('../pages/login/confirmInfo.vue') },
{ path: '/confirmInfo/:examId', name: 'confirmInfo', component: () => import('../pages/login/confirmInfo.vue') },
/* 考试倒计时 */
{ path: '/examTime', name: 'examTime', component: () => import('../pages/exam/examTime.vue') },
/* 答题 */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论