提交 2d907bda authored 作者: lihuihui's avatar lihuihui

修改bug

上级 1fda54c0
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"check:node": "node build/checkNodeVersion.js", "check:node": "node build/checkNodeVersion.js",
"lint": "eslint --ext .js --ext .jsx --ext .vue src/", "lint": "eslint --ext .js --ext .jsx --ext .vue src/",
"lint:fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/", "lint:fix": "eslint --fix --ext .js --ext .jsx --ext .vue src/",
"dev": "npm run check:node && cross-env NODE_ENV=development node build/getSSL.js && cross-env NODE_ENV=development SERVER_PORT=3001 webpack-dev-server --inline --progress --config build/webpack.client.conf.js", "dev": "npm run check:node && cross-env NODE_ENV=development node build/getSSL.js && cross-env NODE_ENV=development SERVER_PORT=3003 webpack-dev-server --inline --progress --config build/webpack.client.conf.js",
"build:test": "npm run check:node && cross-env NODE_ENV=test webpack --progress --config build/webpack.client.conf.js && cross-env NODE_ENV=test node ./build/uploadAliyunCDN.js", "build:test": "npm run check:node && cross-env NODE_ENV=test webpack --progress --config build/webpack.client.conf.js && cross-env NODE_ENV=test node ./build/uploadAliyunCDN.js",
"build:pro": "npm run check:node && cross-env NODE_ENV=production webpack --progress --config build/webpack.client.conf.js && cross-env NODE_ENV=production node ./build/uploadAliyunCDN.js" "build:pro": "npm run check:node && cross-env NODE_ENV=production webpack --progress --config build/webpack.client.conf.js && cross-env NODE_ENV=production node ./build/uploadAliyunCDN.js"
}, },
......
...@@ -86,6 +86,24 @@ ...@@ -86,6 +86,24 @@
</div> </div>
</template> </template>
</div> </div>
<ul class="flag-tips">
<li>
<div class="circle1"></div>
<div class="txt">已答</div>
</li>
<li>
<div class="circle2"></div>
<div class="txt">未答</div>
</li>
<li>
<div class="circle3"></div>
<div class="txt">当前</div>
</li>
<li>
<div class="circle4"></div>
<div class="txt">标记</div>
</li>
</ul>
</div> </div>
</template> </template>
<script> <script>
...@@ -169,14 +187,15 @@ export default { ...@@ -169,14 +187,15 @@ export default {
margin-right: 0; margin-right: 0;
} }
&.stu1{ &.stu1{
background: #EEEEEE; background: #999;
border: 1px solid #CCCCCC; border: 1px solid #999;
} }
&.stu2{ &.stu2{
width: 22px; width: 22px;
height: 22px; height: 22px;
line-height: 22px; line-height: 22px;
border: 2px solid #0FC118; border: 2px solid #0FC118;
background: rgba(15, 193, 24, 0.1);
} }
&.stu3{ &.stu3{
&::after{ &::after{
...@@ -208,14 +227,8 @@ export default { ...@@ -208,14 +227,8 @@ export default {
.circle1{ .circle1{
width: 24px; width: 24px;
height: 24px; height: 24px;
background: #EEEEEE; background: #999;
border: 1px solid #CCCCCC; border: 1px solid #999;
border-radius: 50%;
}
.circle1{
width: 24px;
height: 24px;
border: 1px solid #CCCCCC;
border-radius: 50%; border-radius: 50%;
} }
.circle2{ .circle2{
...@@ -228,6 +241,7 @@ export default { ...@@ -228,6 +241,7 @@ export default {
width: 24px; width: 24px;
height: 24px; height: 24px;
border: 2px solid #0FC118; border: 2px solid #0FC118;
background: rgba(15, 193, 24, 0.1);
border-radius: 50%; border-radius: 50%;
} }
.circle4{ .circle4{
......
...@@ -210,6 +210,7 @@ export default { ...@@ -210,6 +210,7 @@ export default {
line-height: 80px; line-height: 80px;
} }
.right{ .right{
position: relative;
width: 260px; width: 260px;
margin-left: auto; margin-left: auto;
display: flex; display: flex;
......
<template> <template>
<div class="confirm-mian"> <div class="confirm-mian">
<div class="con-info" v-if="!isTreaty"> <div class="con-info" v-if="!isTreaty">
<div class="head">全国统一高考试卷A</div> <div class="head">{{ examInfo.name }}</div>
<div class="box">
<div class="info-form"> <div class="info-form">
<div class="tit">基本信息确认</div> <div class="tit">基本信息确认</div>
<ul> <ul>
<li> <template v-for="(item, index) in allForm">
<div class="name">姓名</div> <li :key="index" v-if="item.key != 'gender'">
<input type="text" v-model="form.name" @keydown="keydown($event)"> <div class="name">{{ item.name }}</div>
<input :type="typeInput(item.key)" v-model="form[item.key]" @keydown="keydown($event)">
</li> </li>
<li> <li :key="index" v-else>
<div class="name">学号</div>
<input type="text" v-model="form.student_number" @keydown="keydown($event)">
</li>
<li>
<div class="name">性别</div> <div class="name">性别</div>
<div class="select-btn"> <div class="select-btn">
<div :class="form.gender == 1 && 'active'" @click="selectGender(1)"></div> <div :class="form.gender == 1 && 'active'" @click="selectGender(1)"></div>
<div :class="form.gender == 2 && 'active'" @click="selectGender(2)"></div> <div :class="form.gender == 2 && 'active'" @click="selectGender(2)"></div>
</div> </div>
</li> </li>
</template>
</ul> </ul>
<div class="confirm-btn" @click="confirmInfo">确定</div> <div class="confirm-btn" @click="confirmInfo">确定</div>
</div> </div>
</div> </div>
</div>
<div class="explain-box" v-if="isTreaty"> <div class="explain-box" v-if="isTreaty">
<div class="head">全国统一高考试卷A</div> <div class="head">{{ examInfo.name }}</div>
<div class="exp-text"> <div class="exp-text">
<p>为保证本考试的公平性和严肃性,本次考试将会:{{examInfo.config.promise_message}}</p> <p>为保证本考试的公平性和严肃性,本次考试将会:{{examInfo.config.promise_message}}</p>
<!-- <p v-html="examInfo.config.promise_message"></p> --> <!-- <p v-html="examInfo.config.promise_message"></p> -->
...@@ -47,18 +47,37 @@ export default { ...@@ -47,18 +47,37 @@ export default {
return { return {
sInfo: JSON.parse(window.sessionStorage.getItem('studentInfo')), sInfo: JSON.parse(window.sessionStorage.getItem('studentInfo')),
examInfo: JSON.parse(window.sessionStorage.getItem('examInfo')), examInfo: JSON.parse(window.sessionStorage.getItem('examInfo')),
form: { form: {},
name: '', allForm: [],
student_number: this.$store.state.studentInfo.student_number,
gender: 0
},
isTreaty: false isTreaty: false
} }
}, },
mounted() { created() {
this.setInput()
this.defaultInto() this.defaultInto()
}, },
mounted() {
// console.log(this.examInfo.config.info)
},
computed: {
typeInput() {
return (k) => {
const type = k === 'age' || k === 'mobile' || k === 'id_number' ? 'number' : 'text'
return type
}
}
},
methods: { methods: {
setInput() {
const key = Object.keys(this.examInfo.config.info)
const value = Object.values(this.examInfo.config.info)
for (let i = 0; i < value.length; i++) {
this.form[key[i]] = ''
value[i].key = key[i]
}
this.allForm = value
console.log(this.allForm)
},
// 禁止input输入空格 // 禁止input输入空格
keydown (event) { keydown (event) {
event.keyCode === 32 && (event.returnValue = false) event.keyCode === 32 && (event.returnValue = false)
...@@ -68,29 +87,17 @@ export default { ...@@ -68,29 +87,17 @@ export default {
// console.log(this.isExamStatus(this.examInfo.start_time > 0)) // console.log(this.isExamStatus(this.examInfo.start_time > 0))
this.isExamStatus(this.examInfo.start_time) > 0 this.isExamStatus(this.examInfo.start_time) > 0
? (() => { ? (() => {
// this.$router.push({
// name: 'examTime',
// replace: true
// })
this.$router.replace({ this.$router.replace({
path: '/examTime' path: '/examTime'
}) })
})() })()
: (() => { : (() => {
// this.$router.push({
// path: `/examAnswer/${this.examInfo.exam_id}`,
// replace: true
// })
this.$router.replace({ this.$router.replace({
path: `/examAnswer/${this.examInfo.exam_id}` path: `/examAnswer/${this.examInfo.exam_id}`
}) })
})() })()
}, },
disagree() { disagree() {
// this.$router.push({
// path: `/login/${this.examInfo.exam_id}`,
// replace: true
// })
this.$router.replace({ this.$router.replace({
path: `/login/${this.examInfo.exam_id}` path: `/login/${this.examInfo.exam_id}`
}) })
...@@ -105,6 +112,8 @@ export default { ...@@ -105,6 +112,8 @@ export default {
// 选择男女 // 选择男女
selectGender(t) { selectGender(t) {
this.form.gender = t this.form.gender = t
this.$forceUpdate()
console.log(this.form)
}, },
// 默认信息获取 // 默认信息获取
defaultInto() { defaultInto() {
...@@ -115,9 +124,7 @@ export default { ...@@ -115,9 +124,7 @@ export default {
}, },
// 确认信息 // 确认信息
confirmInfo() { confirmInfo() {
const val = Object.values(this.form) if (this.verification()) {
console.log(this.verification(val))
if (this.verification(val)) {
action.Login.confirmInfo(this.form).then(res => { action.Login.confirmInfo(this.form).then(res => {
if (!res.code) { if (!res.code) {
this.isTreaty = true this.isTreaty = true
...@@ -130,20 +137,30 @@ export default { ...@@ -130,20 +137,30 @@ export default {
} }
}, },
// 验证信息是否为空 // 验证信息是否为空
verification(val) { verification() {
console.log(val) for (let i = 0; i < this.allForm.length; i++) {
for (let i = 0; i < val.length; i++) { if (!this.allForm[i].required) {
if (val[i] === '' || val[i] === 0 || val[i] === '0') { if (this.form[this.allForm[i].key] === '') {
this.$alert('请完善信息') this.$alert('请完善信息')
return false return false
} }
} }
}
return true return true
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.box{
display: flex;
justify-content: center;
background: url(../../assets/images/con-info-bg.png) center;
background-size: cover;
background-attachment:fixed;
background-position: 0 0;
padding-bottom: 100px;
}
.confirm-mian{ .confirm-mian{
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -151,10 +168,9 @@ export default { ...@@ -151,10 +168,9 @@ export default {
.con-info{ .con-info{
width: 100%; width: 100%;
height: 100%; height: 100%;
background: url(../../assets/images/con-info-bg.png);
background-size: cover;
.head{ .head{
// width: 100%; position: sticky;
top: 0;
height: 80px; height: 80px;
background: #FFFFFF; background: #FFFFFF;
font-size: 24px; font-size: 24px;
...@@ -164,16 +180,11 @@ export default { ...@@ -164,16 +180,11 @@ export default {
padding-left: 30px; padding-left: 30px;
} }
.info-form{ .info-form{
// margin: 0 auto;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%,-50%);
margin-top: 40px; margin-top: 40px;
width: 400px; width: 400px;
height: 458px;
background: #FFFFFF; background: #FFFFFF;
border-radius: 8px; border-radius: 8px;
padding-bottom: 30px;
.tit{ .tit{
text-align: center; text-align: center;
margin-top: 30px; margin-top: 30px;
......
<template> <template>
<div class="login-box"> <div class="login-box">
<div class="content"> <div class="content">
<div class="mian-cont900"> <div class="mian-cont900 por">
<div class="title">{{ data.name }}</div> <div class="title">{{ data.name }}</div>
<div class="exam-time"> <div class="exam-time">
<div class="tit">考试时间</div> <div class="tit">考试时间</div>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div :class="loginParam.is ? 'form prohibit' : 'form'"> <div :class="loginParam.is ? 'form prohibit' : 'form'">
<div class="tips">{{ tips }}</div> <div class="tips">{{ tips }}</div>
<!-- 您登录的次数已超过最大限制 --> <!-- 您登录的次数已超过最大限制 -->
<input type="text" @click="fullScreen" v-model="examineeNumber" placeholder="请输入准考证号" v-show="!loginParam.is"> <input type="number" @click="fullScreen" v-model="examineeNumber" placeholder="请输入准考证号" v-show="!loginParam.is" @keydown="keydown($event)">
<input type="text" @click="fullScreen" placeholder="请输入准考证号" readonly="readonly" class="prohibit" v-show="loginParam.is"> <input type="text" @click="fullScreen" placeholder="请输入准考证号" readonly="readonly" class="prohibit" v-show="loginParam.is">
<div class="btn" @click="login">登录</div> <div class="btn" @click="login">登录</div>
<!-- <div class="btn prohibit">登录</div> --> <!-- <div class="btn prohibit">登录</div> -->
...@@ -57,12 +57,7 @@ export default { ...@@ -57,12 +57,7 @@ export default {
} }
}, },
mounted() { mounted() {
// window.onresize = () => {
// this.isPopup = true
// console.log(1111)
// }
action.Login.getExamInfo(this.$route.params.examId).then(res => { action.Login.getExamInfo(this.$route.params.examId).then(res => {
// this.$store.commit('setExamInfo', res)
window.sessionStorage.setItem('examInfo', JSON.stringify(res)) window.sessionStorage.setItem('examInfo', JSON.stringify(res))
this.data = res this.data = res
if (this.getEnabledTime() < 0) { if (this.getEnabledTime() < 0) {
...@@ -91,10 +86,6 @@ export default { ...@@ -91,10 +86,6 @@ export default {
const curTime = new Date() const curTime = new Date()
const endtTime = new Date(this.data.end_time) const endtTime = new Date(this.data.end_time)
const countTime = endtTime.getTime() - curTime.getTime() const countTime = endtTime.getTime() - curTime.getTime()
// const setStartTime = this.data.config.enabled_after
// ? new Date(startTime.setMinutes(startTime.getMinutes() + this.data.config.after_login))
// : curTime
// const countTime = setStartTime.getTime() - curTime.getTime()
return countTime return countTime
}, },
getEnabledTime() { getEnabledTime() {
...@@ -138,18 +129,21 @@ export default { ...@@ -138,18 +129,21 @@ export default {
} }
return false return false
}, },
// 禁止input输入空格
keydown (event) {
event.keyCode === 32 && (event.returnValue = false)
},
// 点击登录 // 点击登录
login() { login() {
if (!this.loginParam.is) { if (!this.loginParam.is) {
if (this.examineeNumber === '') {
this.$alert('请输入准考证号')
return false
}
action.Login.userLogin({ examinee_number: this.examineeNumber }).then(res => { action.Login.userLogin({ examinee_number: this.examineeNumber }).then(res => {
// this.$store.commit('setStudentInfo', res)
window.sessionStorage.setItem('studentInfo', JSON.stringify(res)) window.sessionStorage.setItem('studentInfo', JSON.stringify(res))
const status = parseInt(res.sheet_status) const status = parseInt(res.sheet_status)
if (status === 0) { if (status === 0) {
// this.$router.push({
// name: 'confirmInfo',
// replace: true
// })
this.$router.replace({ this.$router.replace({
name: 'confirmInfo' name: 'confirmInfo'
}) })
...@@ -168,20 +162,30 @@ export default { ...@@ -168,20 +162,30 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.welcome-msg{ .welcome-msg{
padding-top: 130px; padding-top: 130px;
} }
.mian-cont900{ .mian-cont900{
margin: 0 auto; margin: 0 auto;
width: 900px; width: 900px;
&.por{
position: absolute;
bottom: 0;
left: 50%;
-webkit-transform: translateX(-50%);
margin-bottom: -115px;
}
} }
.login-box{ .login-box{
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #fff; background: #fff;
.content{ .content{
position: relative;
width: 100%; width: 100%;
height: 387px; height: 50%;
// height: 387px;
background: url(../../assets/images/login-bg.png); background: url(../../assets/images/login-bg.png);
background-size: 100% 100%; background-size: 100% 100%;
.title{ .title{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论