| | |
| | | * @Author: Morpheus |
| | | * @Date: 2021-07-31 16:31:54 |
| | | * @Last Modified by: liu |
| | | * @Last Modified time: 2021-10-09 16:08:06 |
| | | * @Last Modified time: 2021-11-22 11:59:02 |
| | | * menu-name 考试管理 |
| | | */ |
| | | <template> |
| | |
| | | |
| | | <script> |
| | | import { mapState } from "vuex"; |
| | | import { getExamDetail } from "@/api/examapi/examination"; |
| | | import { getExamDetail, getNowTime } from "@/api/examapi/examination"; |
| | | import { updateApplyStatus } from "@/api/examapi/applyexam"; |
| | | export default { |
| | | data() { |
| | |
| | | var data = res.data.data[0]; |
| | | // console.log(data,333); |
| | | //当前时间 |
| | | var nowD = new Date(), |
| | | var nowD, |
| | | 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; |
| | | getNowTime().then((res) => { |
| | | nowD = new Date(res.data.data); |
| | | //对比时间 |
| | | //getTime() 方法可返回距 1970 年 1 月 1 日之间的毫秒数。 |
| | | if (nowD.getTime() > startD.getTime()) { |
| | | if (endD.getTime() < nowD.getTime()) { |
| | | that.isTime = 1; |
| | | } else { |
| | | that.isTime = 2; |
| | | } |
| | | } else { |
| | | that.isTime = 2; |
| | | that.isTime = 3; |
| | | } |
| | | } else { |
| | | that.isTime = 3; |
| | | } |
| | | if (res.data.data.length > 0) { |
| | | that.pageDisable = true; |
| | | if (data.sex == 1) { |
| | | that.sex = "男"; |
| | | } |
| | | if (data.sex == 2) { |
| | | that.sex = "女"; |
| | | } |
| | | that.option.data = [ |
| | | { |
| | | title: that.resData.examName, |
| | | color: "#ffa820", |
| | | subtext: "开始考试", |
| | | click: function () { |
| | | window.parent.startExam(); |
| | | if (res.data.data.length > 0) { |
| | | that.pageDisable = true; |
| | | if (data.sex == 1) { |
| | | that.sex = "男"; |
| | | } |
| | | if (data.sex == 2) { |
| | | that.sex = "女"; |
| | | } |
| | | that.option.data = [ |
| | | { |
| | | title: that.resData.examName, |
| | | color: "#ffa820", |
| | | subtext: "开始考试", |
| | | click: function () { |
| | | window.parent.startExam(); |
| | | }, |
| | | list: [ |
| | | { |
| | | title: "姓名: ", |
| | | value: that.resData.realName, |
| | | check: true, |
| | | }, |
| | | { |
| | | title: "准考证号: ", |
| | | value: that.resData.candidateNo, |
| | | check: true, |
| | | }, |
| | | { |
| | | title: "身份证号: ", |
| | | value: that.resData.idCardNo, |
| | | check: true, |
| | | }, |
| | | { |
| | | title: "性别: ", |
| | | value: that.sex, |
| | | check: true, |
| | | }, |
| | | ], |
| | | }, |
| | | list: [ |
| | | { |
| | | title: "姓名: ", |
| | | value: that.resData.realName, |
| | | check: true, |
| | | }, |
| | | { |
| | | title: "准考证号: ", |
| | | value: that.resData.candidateNo, |
| | | check: true, |
| | | }, |
| | | { |
| | | title: "身份证号: ", |
| | | value: that.resData.idCardNo, |
| | | check: true, |
| | | }, |
| | | { |
| | | title: "性别: ", |
| | | value: that.sex, |
| | | check: true, |
| | | }, |
| | | ], |
| | | }, |
| | | ]; |
| | | that.$store.commit("SetexamUserData", that.option.data[0]); |
| | | } |
| | | ]; |
| | | that.$store.commit("SetexamUserData", that.option.data[0]); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | (error) => { |