Commit 005a3fa5 authored by zhengke's avatar zhengke

修改

parent 3a011d37
......@@ -96,13 +96,22 @@ export default {
paperData: Object,
ExamStuId: Number,
SubmitTimes: Number,
StartTime: String
StartTime: String,
isExamOver: Boolean
},
setup(props, ctx) {
let Gid = uni.getStorageSync("userInfo").Id;
let data = reactive({
msg: { GuestId: Gid, PaperId: 5, PublishId: 1 },
questionList: props.paperData.Paper.GroupList,
isExamOver: props.isExamOver
});
watch(()=> props.isExamOver, (newVal, oldVal) => {
console.log(oldVal,'oldValoldVal');
console.log(newVal,'newVal');
if(newVal){
methods.savePaper();
}
});
let methods = {
changeNumToHan,
......@@ -132,9 +141,6 @@ export default {
dateTime = yy + '-' + mm + '-' + dd + ' ' + hh + ':' + mf + ':' + ss;
return dateTime
},
getCeshi(){
console.log('测试来了');
},
//交卷
async savePaper() {
let obj = JSON.parse(JSON.stringify(props.paperData.Paper));
......@@ -154,6 +160,8 @@ export default {
});
return
}
console.log('自动交卷了');
return;
let res = await submitPaper(obj);
if (res) {
console.log(119, res);
......
......@@ -324,11 +324,12 @@
</view>
</view>
<view class="answer-con" v-if="isShowAnswer">
<Answer
<answer
:paperData="peaperDetail"
:ExamStuId="Exam_Student_Id"
:StartTime="StartTime"
:SubmitTimes="SubmitTimes"
:isExamOver="isExamOver"
@hideAnswer="hideAnswerSheet"
@chooseTopic="jumpTopic"
ref="answer"
......@@ -371,7 +372,7 @@ import Dataquestion from "../../components/subject/Dataquestion.vue";
import SortingProblem from "../../components/subject/SortingProblem.vue";
import Connect from "../../components/subject/Connect.vue"; //"连线题"
import SharingChoose from "../../components/subject/SharingChoose.vue";
import Answer from "../../components/subject/answer.vue"; //答题卡
import answer from "../../components/subject/answer.vue"; //答题卡
export default {
components: {
SingleChoiceNumber,
......@@ -393,7 +394,7 @@ export default {
EntryProblem,
SharingChoose,
Connect,
Answer,
answer,
},
setup(props, context) {
let { refs } = getCurrentInstance();
......@@ -413,7 +414,8 @@ export default {
isAutoTime: false,
ExamStatus:-2,
StartTime:'', //页面加载后的时间
SubmitTimes: 0 //后台设置几分钟后可提交
SubmitTimes: 0 ,//后台设置几分钟后可提交
isExamOver:false
});
let methods = {
changeNumToHan,
......@@ -441,7 +443,7 @@ export default {
this.isOperate=true;
data.autoTimeStart = true;
// data.time = res.Data.Publish.ExamTimes * 60 * 1000;
data.time = 60000
data.time = 5000
}
}
}
......@@ -476,10 +478,14 @@ export default {
data.isShowAnswer = false;
data.isLast = false;
},
//考试结束
//倒计时完成考试结束
examFinish() {
console.log('进入');
this.$refs.answer.getCeshi();
uni.showToast({
title: '考试时间已到,系统将自动保存',
icon: "none",
});
data.isShowAnswer = true;
data.isExamOver = true;
},
};
onMounted(() => {
......
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