From df26c5424389cbd7fb1aa28a610b124cbac26c54 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 09 Oct 2021 16:23:39 +0800
Subject: [PATCH] +
---
src/views/exam/startexam.vue | 74 ++++++++++++++++++++++++++-----------
1 files changed, 52 insertions(+), 22 deletions(-)
diff --git a/src/views/exam/startexam.vue b/src/views/exam/startexam.vue
index 2aaa1ea..8ead43d 100644
--- a/src/views/exam/startexam.vue
+++ b/src/views/exam/startexam.vue
@@ -1,8 +1,8 @@
/*
* @Author: Morpheus
* @Date: 2021-07-31 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-18 17:09:52
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-10-09 16:08:06
* menu-name 考试管理
*/
<template>
@@ -51,7 +51,7 @@
resData: null,
sex: "",
pageDisable: false,
- isTime:2,
+ isTime: 2,
option: {
span: 8,
data: [
@@ -61,7 +61,6 @@
],
},
};
-
},
computed: {
...mapState({
@@ -89,18 +88,18 @@
//开始考试跳转
startExam() {
//判断是否到了考试时间
- if(this.isTime==3){
+ if (this.isTime == 3) {
this.$message({
- type: "warning",
- message: "未到考试时间!"
+ type: "warning",
+ message: "未到考试时间!",
});
return;
}
//已超过考试截止时间
- if(this.isTime==1){
+ if (this.isTime == 1) {
this.$message({
- type: "warning",
- message: "已过考试时间!"
+ type: "warning",
+ message: "已过考试时间!",
});
return;
}
@@ -111,9 +110,30 @@
examType: this.resData.examType,
examId: this.resData.id,
userId: this.userInfo.user_id,
+ candidateNo: this.resData.candidateNo,
};
+ // this.$notify({
+ // message:
+ // "考试期间切勿退出登入、关闭浏览器, 否则考试成绩无效, 如有问题及时联系管理人员!",
+ // duration: 6000,
+ // showClose: false,
+ // customClass: "beginS",
+ // // type: "warning",
+ // });
+ // return;
updateApplyStatus(data).then((res) => {
that.resData["examScoreId"] = res.data.id;
+ this.$store.commit("SetScoreId", res.data.id);
+ console.log(res.data.id, "ididididiidididididid");
+ window.name = "";
+ this.$notify({
+ message:
+ "考试期间切勿退出登入、关闭浏览器, 否则考试成绩无效, 如有问题及时联系管理人员!",
+ duration: 6000,
+ showClose: false,
+ customClass: "beginS",
+ // type: "warning",
+ });
that.$router.push({
path: `/startexam/${that.resData.id}`,
query: that.resData,
@@ -125,23 +145,24 @@
getExamDetail(this.userInfo.user_id).then(
(res) => {
that.resData = res.data.data[0];
+
var data = res.data.data[0];
// console.log(data,333);
//当前时间
- var nowD = new Date(),
- startD = new Date(data.startTime),
- //考试截止时间
- endD = new Date(data.endTime);
+ var nowD = new Date(),
+ startD = new Date(data.startTime),
+ //考试截止时间
+ endD = new Date(data.endTime);
//对比时间
//getTime() 方法可返回距 1970 年 1 月 1 日之间的毫秒数。
- if( nowD.getTime() > startD.getTime()){
- if(endD.getTime() < nowD.getTime()){
- that.isTime = 1;
- }else{
- that.isTime = 2;
- }
- }else{
- that.isTime = 3;
+ if (nowD.getTime() > startD.getTime()) {
+ if (endD.getTime() < nowD.getTime()) {
+ that.isTime = 1;
+ } else {
+ that.isTime = 2;
+ }
+ } else {
+ that.isTime = 3;
}
if (res.data.data.length > 0) {
that.pageDisable = true;
@@ -253,4 +274,13 @@
}
}
}
+
+.beginS {
+ height: 180px;
+ width: 500px;
+}
+.el-notification__content {
+ font-size: 90px !important;
+ line-height: 44px !important;
+}
</style>
--
Gitblit v1.9.3