Commit 8f4aeaa5 authored by zhengke's avatar zhengke

增加

parent 7f3fe2ab
<template>
<view>
<van-nav-bar fixed>
<template #left>
<van-icon name="cross" style="font-size: 32rpx; color: #111" @click="back" />
</template>
<template #title>
<view style="
font-size: 32rpx;
color: #111;
font-family: PingFang SC;
font-weight: 800;
">考试须知</view>
</template>
</van-nav-bar>
<view class="answer-Notice">
<view style="width:100%;text-align:center;">
<img style="width:169px;height:134px;"
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/examNotice.png"
alt="" />
</view>
<view class="examContent">
<view>1.本场考试满分{{paperData.Publish.ExamScore}}分</view>
<view style="margin:18rpx 0">
2.考试时长{{paperData.Publish.ExamTimes}}分钟,开考后{{paperData.Publish.SubmitTimes}}分钟内禁止交卷</view>
<view v-if="paperData.Publish.ExamNotice">
3.<view v-html="paperData.Publish.ExamNotice"></view>
</view>
</view>
</view>
<view class="submitBox">
<view class="submit" :class="{disabled: !canClick}" @click="back">
我已知晓<text v-if="totalTime>0">({{totalTime}}s)</text>
</view>
</view>
<van-toast id="van-toast" />
</view>
</template>
<script>
import {
ref,
reactive,
toRefs,
toRef,
getCurrentInstance,
watch,
computed,
onMounted,
} from "vue";
export default {
props: {
paperData: Object
},
setup(props, ctx) {
let Gid = uni.getStorageSync("userInfo").Id;
let data = reactive({
paperData: props.paperData,
totalTime: 5,
   canClick: true //添加canClick
});
let methods = {
//隐藏答题卡
back() {
if (!data.canClick) return
ctx.emit("hideNotice");
},
};
onMounted(() => {
data.canClick = false
let clock = setInterval(() => {
data.totalTime--
if (data.totalTime == 0) {
clearInterval(clock)
// this.totalTime = 5
data.canClick = true //这里重新开启
}
}, 1000)
});
return {
...toRefs(data),
...methods,
};
},
};
</script>
<style scoped>
.answer-Notice {
box-sizing: border-box;
padding: 30rpx;
height: calc(100vh - 300rpx);
overflow-y: auto;
}
.disabled{
background-color: rgba(0,172,249,0.5)!important;
}
.examContent {
margin-top: 20px;
font-family: PingFang SC;
font-size: 28rpx;
}
.submitBox {
width: 750rpx;
height: 150rpx;
position: fixed;
left: 0;
bottom: 0;
box-sizing: border-box;
padding-top: 40rpx;
}
.submit {
width: 600rpx;
height: 70rpx;
border-radius: 35rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #00acf9;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: bold;
color: #fff;
margin: 0 auto;
}
</style>
......@@ -15,7 +15,7 @@
</view>
</template>
</van-nav-bar>
<view class="exam-con" v-if="!isShowAnswer">
<view class="exam-con" v-if="!isShowAnswer&&!isShowNotice">
<i class="iconfont icon-caidanzu answerSheet" style="
position: absolute;
right: 30rpx;
......@@ -153,6 +153,9 @@
<answer :paperData="peaperDetail" :ExamStuId="Exam_Student_Id" :StartTime="StartTime"
:SubmitTimes="SubmitTimes" @hideAnswer="hideAnswerSheet" @chooseTopic="jumpTopic" ref="answer" />
</view>
<view class="answer-con" v-if="isShowNotice">
<examNotice :paperData="peaperDetail" @hideNotice="hideNotice" />
</view>
<van-toast id="van-toast" />
</view>
</template>
......@@ -199,6 +202,7 @@
import Connect from "../../components/subject/Connect.vue"; //"连线题"
import SharingChoose from "../../components/subject/SharingChoose.vue";
import answer from "../../components/subject/answer.vue"; //答题卡
import examNotice from "../../components/subject/examNotice.vue"; //考前须知
export default {
components: {
SingleChoiceNumber,
......@@ -221,6 +225,7 @@
SharingChoose,
Connect,
answer,
examNotice
},
setup(props, context) {
let {
......@@ -247,6 +252,7 @@
ExamStatus: -2,
StartTime: '', //页面加载后的时间
SubmitTimes: 0, //后台设置几分钟后可提交
isShowNotice: false //是否显示考前须知
});
let methods = {
changeNumToHan,
......@@ -271,6 +277,7 @@
this.SubmitTimes = res.Data.Publish.SubmitTimes;
//判断是答卷
if (res.Data.ExamStatusTemp == 1) {
this.isShowNotice = true;
this.isOperate = true;
data.autoTimeStart = true;
data.time = res.Data.Publish.ExamTimes * 60 * 1000;
......@@ -296,6 +303,11 @@
hideAnswerSheet() {
data.isShowAnswer = false;
},
//隐藏考前提示
hideNotice(){
console.log('进入');
data.isShowNotice = false;
},
//获取答案改变后的数据
getAnswerChange(val, index) {
data.peaperDetail.Paper.GroupList[index] = val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment