|
|
@ -112,7 +112,7 @@ |
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import { mapState } from "vuex"; |
|
|
|
import { mapState } from "vuex"; |
|
|
|
import Setting from "@/setting"; |
|
|
|
import Setting from "@/setting"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
import Util from "@/libs/util"; |
|
|
|
import Bus from '@/libs/bus' |
|
|
|
import Bus from '@/libs/bus' |
|
|
|
import qs from 'qs' |
|
|
|
import qs from 'qs' |
|
|
|
export default { |
|
|
|
export default { |
|
|
@ -196,7 +196,7 @@ export default { |
|
|
|
"form.month": function (val) { |
|
|
|
"form.month": function (val) { |
|
|
|
if (val) { |
|
|
|
if (val) { |
|
|
|
let unit = 24 * 60 * 60 * 1000; |
|
|
|
let unit = 24 * 60 * 60 * 1000; |
|
|
|
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))]; |
|
|
|
this.date = [Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), Util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))]; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.date = []; |
|
|
|
this.date = []; |
|
|
|
} |
|
|
|
} |
|
|
@ -332,9 +332,9 @@ export default { |
|
|
|
this.assessmentId = this.item.assessmentId |
|
|
|
this.assessmentId = this.item.assessmentId |
|
|
|
this.classId = this.item.classId |
|
|
|
this.classId = this.item.classId |
|
|
|
if (row.status == 0) { |
|
|
|
if (row.status == 0) { |
|
|
|
return util.warningMsg("该实验尚未开始"); |
|
|
|
return Util.warningMsg("该实验尚未开始"); |
|
|
|
} else if (row.status == 2) { |
|
|
|
} else if (row.status == 2) { |
|
|
|
return util.warningMsg("该实验已经结束"); |
|
|
|
return Util.warningMsg("该实验已经结束"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.curRow = row; |
|
|
|
this.curRow = row; |
|
|
|
if (row.isEnableCode == 0) { // 是否启用邀请码(0、未启用 1、启用) |
|
|
|
if (row.isEnableCode == 0) { // 是否启用邀请码(0、未启用 1、启用) |
|
|
@ -348,6 +348,7 @@ export default { |
|
|
|
let date = data.stopTime; |
|
|
|
let date = data.stopTime; |
|
|
|
date = date.substring(0, 19); |
|
|
|
date = date.substring(0, 19); |
|
|
|
date = date.replace(/-/g, '/'); |
|
|
|
date = date.replace(/-/g, '/'); |
|
|
|
|
|
|
|
// return |
|
|
|
this.stopTime = new Date(date).getTime(); |
|
|
|
this.stopTime = new Date(date).getTime(); |
|
|
|
this.goSubSystem(); |
|
|
|
this.goSubSystem(); |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
@ -362,10 +363,10 @@ export default { |
|
|
|
this.$router.push(`/record/trialReport?reportId=${row.reportId}`); |
|
|
|
this.$router.push(`/record/trialReport?reportId=${row.reportId}`); |
|
|
|
}, |
|
|
|
}, |
|
|
|
saveIc () { |
|
|
|
saveIc () { |
|
|
|
if (!this.invitationCode) return util.warningMsg("请输入邀请码"); |
|
|
|
if (!this.invitationCode) return Util.warningMsg("请输入邀请码"); |
|
|
|
if (!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码"); |
|
|
|
if (!this.invitationCode || String(this.invitationCode).length < 6 || isNaN(this.invitationCode)) return Util.warningMsg("请输入6位纯数字邀请码"); |
|
|
|
this.$post(`${this.api.enterExam}?assessmentId=${this.item.assessmentId}&classId=${this.item.classId}&invitationCode=${this.invitationCode}`).then(res => { |
|
|
|
this.$post(`${this.api.enterExam}?assessmentId=${this.item.assessmentId}&classId=${this.item.classId}&invitationCode=${this.invitationCode}`).then(res => { |
|
|
|
util.successMsg("验证成功!"); |
|
|
|
Util.successMsg("验证成功!"); |
|
|
|
this.icVisible = false; |
|
|
|
this.icVisible = false; |
|
|
|
const data = res.assessmentInfo |
|
|
|
const data = res.assessmentInfo |
|
|
|
this.curRow.paperId = data.paperId || '' |
|
|
|
this.curRow.paperId = data.paperId || '' |
|
|
@ -381,7 +382,7 @@ export default { |
|
|
|
this.invitationCode = ""; |
|
|
|
this.invitationCode = ""; |
|
|
|
}, |
|
|
|
}, |
|
|
|
goSubSystem () { |
|
|
|
goSubSystem () { |
|
|
|
const token = util.local.get(Setting.tokenKey) |
|
|
|
const token = Util.local.get(Setting.tokenKey) |
|
|
|
const classId = this.classId |
|
|
|
const classId = this.classId |
|
|
|
const classItem = this.classList.find(e => e.id == classId) |
|
|
|
const classItem = this.classList.find(e => e.id == classId) |
|
|
|
const row = this.curRow |
|
|
|
const row = this.curRow |
|
|
@ -392,21 +393,24 @@ export default { |
|
|
|
window.open(this.$router.resolve(`/theoryExam?paperId=${paperId}&assessmentId=${this.assessmentId}&classId=${classId}&cid=${this.cid}&mallId=${mallId}&curriculumName=${row.sysName}`).href) |
|
|
|
window.open(this.$router.resolve(`/theoryExam?paperId=${paperId}&assessmentId=${this.assessmentId}&classId=${classId}&cid=${this.cid}&mallId=${mallId}&curriculumName=${row.sysName}`).href) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// 实训 |
|
|
|
// 实训 |
|
|
|
util.cookies.set("token", token) |
|
|
|
Util.cookies.set("token", token) |
|
|
|
util.cookies.set("assessmentId", this.assessmentId) |
|
|
|
Util.cookies.set("assessmentId", this.assessmentId) |
|
|
|
util.cookies.set("classId", classId) |
|
|
|
Util.cookies.set("classId", classId) |
|
|
|
util.cookies.set("className", classItem ? classItem.className : '') |
|
|
|
Util.cookies.set("className", classItem ? classItem.className : '') |
|
|
|
util.cookies.set("projectId", this.projectId) |
|
|
|
Util.cookies.set("projectId", this.projectId) |
|
|
|
util.cookies.set("courseId", this.cid) |
|
|
|
Util.cookies.set("courseId", this.cid) |
|
|
|
util.cookies.set("curriculumName", encodeURIComponent(row.sysName)); |
|
|
|
Util.cookies.set("curriculumName", encodeURIComponent(row.sysName)); |
|
|
|
util.cookies.set("startTime", row.startTime) |
|
|
|
Util.cookies.set("startTime", row.startTime) |
|
|
|
util.cookies.set("stopTime", row.stopTime) |
|
|
|
Util.cookies.set("stopTime", row.stopTime) |
|
|
|
util.cookies.set("systemId", this.systemId); |
|
|
|
Util.cookies.set("systemId", this.systemId); |
|
|
|
util.cookies.set('mallId', mallId) |
|
|
|
Util.cookies.set('mallId', mallId) |
|
|
|
util.cookies.set('fromManager', '', -1) |
|
|
|
Util.cookies.set('fromManager', '', -1) |
|
|
|
util.cookies.set('competitionId', '', -1) |
|
|
|
Util.cookies.set('competitionId', '', -1) |
|
|
|
util.cookies.set('isSubmit', '', -1) |
|
|
|
Util.cookies.set('stageId', '', -1) |
|
|
|
util.cookies.set('language', '', -1) |
|
|
|
Util.cookies.set('teamId', '', -1) |
|
|
|
|
|
|
|
Util.cookies.set('isSubmit', '', -1) |
|
|
|
|
|
|
|
Util.cookies.set('language', '', -1) |
|
|
|
|
|
|
|
Util.cookies.set('loaded', '', -1) |
|
|
|
let href = '' |
|
|
|
let href = '' |
|
|
|
if (curriculumId == 11) { |
|
|
|
if (curriculumId == 11) { |
|
|
|
href = `${Setting.systemPath}/#/index/list?token=${token}&cid=${this.cid}&systemId=${this.systemId}&projectId=${this.projectId}&mallId=${mallId}&assessmentId=${this.assessmentId}&classId=${classId}&stopTime=${this.stopTime}`; |
|
|
|
href = `${Setting.systemPath}/#/index/list?token=${token}&cid=${this.cid}&systemId=${this.systemId}&projectId=${this.projectId}&mallId=${mallId}&assessmentId=${this.assessmentId}&classId=${classId}&stopTime=${this.stopTime}`; |
|
|
@ -423,7 +427,7 @@ export default { |
|
|
|
href = `${location.origin}/pyTrials` // 8个python子系统都跳这个地址,子系统会通过cookie里的systemId识别展示哪套系统 |
|
|
|
href = `${location.origin}/pyTrials` // 8个python子系统都跳这个地址,子系统会通过cookie里的systemId识别展示哪套系统 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (!href) return util.errorMsg("该考核非Python考核,请选择其他考核"); |
|
|
|
if (!href) return Util.errorMsg("该考核非Python考核,请选择其他考核"); |
|
|
|
location.href = href; |
|
|
|
location.href = href; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|