|
@@ -29,13 +29,13 @@
|
|
|
</uni-col>
|
|
|
</uni-row>
|
|
|
<uni-row>
|
|
|
-
|
|
|
+
|
|
|
</uni-row>
|
|
|
</uni-card>
|
|
|
- <view style="text-align: center;width: 300px;margin: auto;">
|
|
|
- <button type="primary" @click="infoExit()" v-if="exams.length===0&&!enter">退出
|
|
|
- </button>
|
|
|
- </view>
|
|
|
+ <view style="text-align: center;width: 300px;margin: auto;">
|
|
|
+ <button type="primary" @click="infoExit()" v-if="exams.length===0&&!enter">退出
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
<view v-if="!enter" v-for="o in exams" :key="o">
|
|
|
<uni-card style="background-color:#f0fff3; " class="box-card" v-if="o.state==0&&exams.length>1">
|
|
|
<uni-row class="allceter">
|
|
@@ -49,6 +49,12 @@
|
|
|
<button v-if="o.tryCount<o.limitCount" type="primary" @click="enterExam(o.id)">进入考试</button>
|
|
|
</uni-col>
|
|
|
</uni-row>
|
|
|
+ <l-divider color="#0e7020"></l-divider>
|
|
|
+ <uni-row>
|
|
|
+ <view style="font-size: 10px;color: #0e7020;">
|
|
|
+ <strong>考试时间为: </strong>{{o.startTime}}--{{o.endTime}}
|
|
|
+ </view>
|
|
|
+ </uni-row>
|
|
|
</uni-card>
|
|
|
<uni-card style="background-color:#6a0001;" class="box-card" v-if="o.state==1&&exams.length>1">
|
|
|
<uni-row class="allceter">
|
|
@@ -62,6 +68,12 @@
|
|
|
<!-- <button type="primary" @click="enterExam(o.id)">进入考试</button> -->
|
|
|
</uni-col>
|
|
|
</uni-row>
|
|
|
+ <l-divider />
|
|
|
+ <uni-row>
|
|
|
+ <view style="font-size: 10px;color: #6a0001;">
|
|
|
+ <strong>考试时间为: </strong>{{o.startTime}}--{{o.endTime}}
|
|
|
+ </view>
|
|
|
+ </uni-row>
|
|
|
</uni-card>
|
|
|
<uni-card style="background-color:#e6f7ff;" class="box-card" v-if="o.state==2&&exams.length>1">
|
|
|
<uni-row class="allceter">
|
|
@@ -75,6 +87,12 @@
|
|
|
<!-- <button type="primary" @click="enterExam(o.id)">进入考试</button> -->
|
|
|
</uni-col>
|
|
|
</uni-row>
|
|
|
+ <l-divider />
|
|
|
+ <uni-row>
|
|
|
+ <view style="font-size: 10px;color: #7a5324;">
|
|
|
+ <strong>考试时间为: </strong>{{o.startTime}}--{{o.endTime}}
|
|
|
+ </view>
|
|
|
+ </uni-row>
|
|
|
</uni-card>
|
|
|
<uni-card style="background-color:#e3e3e3;" class="box-card" v-if="o.state==3&&exams.length>1">
|
|
|
<uni-row class="allceter">
|
|
@@ -88,15 +106,22 @@
|
|
|
<!-- <button type="primary" @click="enterExam(o.id)">进入考试</button> -->
|
|
|
</uni-col>
|
|
|
</uni-row>
|
|
|
+ <l-divider />
|
|
|
+ <uni-row>
|
|
|
+ <view style="font-size: 10px;color: #000000;">
|
|
|
+ <strong>考试时间为: </strong>{{o.startTime}}--{{o.endTime}}
|
|
|
+ </view>
|
|
|
+ </uni-row>
|
|
|
</uni-card>
|
|
|
</view>
|
|
|
</uni-section>
|
|
|
- <uni-section v-if="exams.length===1||enter">
|
|
|
+ <uni-section v-show="exams.length===1||enter">
|
|
|
<uni-card :is-shadow="false">
|
|
|
<!-- <view style="padding-top: 30px;text-align: center;">
|
|
|
<h1>考试须知</h1>
|
|
|
</view> -->
|
|
|
- <view style="width: 100%;text-align: center;margin-bottom: 20px;padding-top:30px ;padding-bottom: 15px;">
|
|
|
+ <view
|
|
|
+ style="width: 100%;text-align: center;margin-bottom: 20px;padding-top:30px ;padding-bottom: 15px;">
|
|
|
<h1>{{ exam.title }}</h1>
|
|
|
</view>
|
|
|
<l-divider color="#adadad">
|
|
@@ -106,9 +131,7 @@
|
|
|
</l-divider>
|
|
|
<view class="text" style="width: 100%;text-align: center;padding: 15px;">
|
|
|
<view>
|
|
|
- <view class="userInfo">
|
|
|
- <view>当前考试:<strong>{{ exam.title }}</strong></view>
|
|
|
- </view>
|
|
|
+
|
|
|
<view class="userInfo">
|
|
|
<view>考生号:<strong>{{ user.username }}</strong></view>
|
|
|
</view>
|
|
@@ -128,16 +151,28 @@
|
|
|
<h2>考试须知</h2>
|
|
|
</strong>
|
|
|
</l-divider>
|
|
|
+ <view style="text-align: center;margin-bottom: 10px;color: #1d5b9d;">
|
|
|
+ {{'考试时间:'+exam.startTime+'———'+exam.endTime}}
|
|
|
+ </view>
|
|
|
<view class="text">
|
|
|
|
|
|
- <view style="width: 70vh; margin: auto;font-size: 16px;">
|
|
|
- <rich-text :nodes="exam.message"></rich-text>
|
|
|
+ <view id="examMessage" style="width: 70vh; margin: auto;font-size: 16px;">
|
|
|
+
|
|
|
+
|
|
|
+ <!-- <rich-text :nodes="exam.message"></rich-text> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
- <button type="primary" style="margin-top: 50px" @click="examStart(exam.id)">开始考试</button>
|
|
|
+ <button v-if="exam.state===0" type="primary" style="margin-top: 50px"
|
|
|
+ @click="examStart(exam.id)">开始考试</button>
|
|
|
+ <button v-else type="default" style="margin-top: 50px" disabled="true">未在考试时间</button>
|
|
|
+ <view style="text-align: center;margin: auto;margin-top: 30px;">
|
|
|
+ <button type="primary" @click="infoExit()" v-if="exams.length===1">退出
|
|
|
+ </button>
|
|
|
+ </view>
|
|
|
<button v-if="exams.length>1&&enter" style="margin-top: 30px;" @click="enter=!enter">返回
|
|
|
</button>
|
|
|
- </uni-card >
|
|
|
+
|
|
|
+ </uni-card>
|
|
|
</uni-section>
|
|
|
</view>
|
|
|
<view style="width: 80vh;margin: auto;padding-bottom: 30px;">
|
|
@@ -146,13 +181,13 @@
|
|
|
</button>
|
|
|
</view>
|
|
|
</view>
|
|
|
-<uni-popup ref="inputDialog" type="dialog">
|
|
|
- <uni-popup-dialog style="width: 50vh;" ref="inputClose" title="考生信息" >
|
|
|
- <view >
|
|
|
+ <uni-popup ref="inputDialog" type="dialog">
|
|
|
+ <uni-popup-dialog style="width: 50vh;" ref="inputClose" title="考生信息">
|
|
|
+ <view>
|
|
|
<view style="text-align: center;"><strong>姓名:</strong><strong>{{ user.realname }}</strong></view>
|
|
|
<view></view>
|
|
|
<view style="text-align: center;"><strong>考号:</strong><strong>{{ user.username }}</strong></view>
|
|
|
- <view></view>
|
|
|
+ <view></view>
|
|
|
</view>
|
|
|
</uni-popup-dialog>
|
|
|
</uni-popup>
|
|
@@ -161,8 +196,6 @@
|
|
|
<script>
|
|
|
import {
|
|
|
exit,
|
|
|
- request,
|
|
|
-
|
|
|
getExamCreateExam,
|
|
|
getExamOnlineExam,
|
|
|
getExamQueryById,
|
|
@@ -179,7 +212,9 @@
|
|
|
data() {
|
|
|
return {
|
|
|
isLoading: true,
|
|
|
- exams: [],
|
|
|
+ exams: [{
|
|
|
+ id: 1
|
|
|
+ }],
|
|
|
enter: false,
|
|
|
exam: {
|
|
|
id: 1,
|
|
@@ -196,9 +231,7 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
-
|
|
|
- if(window.screen.width<1024||window.screen.height<768){
|
|
|
+ if (window.screen.width < 1024 || window.screen.height < 768) {
|
|
|
window.alert("当前设备屏幕分辨率过低!请更换设备")
|
|
|
exit()
|
|
|
return;
|
|
@@ -216,11 +249,12 @@
|
|
|
if (this.exams.length === 1) {
|
|
|
this.enterExam(this.exams[0].id)
|
|
|
}
|
|
|
-this.$refs.inputDialog.open()
|
|
|
+ this.$refs.inputDialog.open()
|
|
|
}).catch(xhr => {
|
|
|
console.log(xhr);
|
|
|
});
|
|
|
|
|
|
+
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -232,7 +266,8 @@ this.$refs.inputDialog.open()
|
|
|
console.log(data)
|
|
|
this.exam = data.data.result
|
|
|
console.log(this.exam);
|
|
|
-
|
|
|
+
|
|
|
+ document.getElementById('examMessage').innerHTML = this.exam.message
|
|
|
this.enter = !this.enter
|
|
|
|
|
|
}).catch(xhr => {
|
|
@@ -268,12 +303,12 @@ this.$refs.inputDialog.open()
|
|
|
toExamStart()
|
|
|
})
|
|
|
} else {
|
|
|
- this.messageToggle('warn',"你有正在进行中的考试,正在跳转......")
|
|
|
+ this.messageToggle('warn', "你有正在进行中的考试,正在跳转......")
|
|
|
sessionStorage.setItem("examId", dataList.data.result.id)
|
|
|
- setTimeout(()=>{
|
|
|
+ setTimeout(() => {
|
|
|
toExamStart()
|
|
|
- },2000)
|
|
|
-
|
|
|
+ }, 2000)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
})
|
|
@@ -307,7 +342,7 @@ this.$refs.inputDialog.open()
|
|
|
.box-card {
|
|
|
margin: 20px auto auto;
|
|
|
width: 100%;
|
|
|
- height: 70px;
|
|
|
+ height: 110px;
|
|
|
}
|
|
|
|
|
|
.allceter {
|