|
|
@ -5,7 +5,7 @@ |
|
|
|
<div class="flex a-center j-between"> |
|
|
|
<div class="flex a-center j-between"> |
|
|
|
<div class="flex a-center" style="width: 28%"> |
|
|
|
<div class="flex a-center" style="width: 28%"> |
|
|
|
<p>实训项目</p> |
|
|
|
<p>实训项目</p> |
|
|
|
<el-select v-model="projectName" placeholder="请选择" class="select" :disabled="projectPermissions != 0" @change="selectProject"> |
|
|
|
<el-select v-model="projectId" placeholder="请选择" class="select" :disabled="projectPermissions != 0" @change="selectProject"> |
|
|
|
<el-option |
|
|
|
<el-option |
|
|
|
v-for="item in topicList" |
|
|
|
v-for="item in topicList" |
|
|
|
:key="item.projectId" |
|
|
|
:key="item.projectId" |
|
|
@ -32,7 +32,8 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button style="background: #202020;color: #d0d0d0;font-size:14px;" v-show="projectPermissions == 0" @click="reload" :disabled="popContainer"> |
|
|
|
<el-button style="background: #202020;color: #d0d0d0;font-size:14px;" v-show="projectPermissions == 0" |
|
|
|
|
|
|
|
@click="reload" :disabled="popContainer && (assessmentId!='' && assessmentId!='null' && assessmentId!=null)"> |
|
|
|
重新开始 |
|
|
|
重新开始 |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
<el-button class="submit-btn" style="margin-right:7px" @click="Submit()" :disabled="popContainer">提交</el-button> |
|
|
|
<el-button class="submit-btn" style="margin-right:7px" @click="Submit()" :disabled="popContainer">提交</el-button> |
|
|
@ -80,7 +81,7 @@ |
|
|
|
></i> |
|
|
|
></i> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="score" label="得分" align="center"></el-table-column> |
|
|
|
<el-table-column prop="scores" label="得分" align="center"></el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</el-card> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
</el-col> |
|
|
@ -187,55 +188,26 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
created() { |
|
|
|
const test = this.getQueryVariable('test') |
|
|
|
let assessmentId = this.getQueryVariable('assessmentId') |
|
|
|
if(test) { |
|
|
|
sessionStorage.setItem('assessmentId',assessmentId) |
|
|
|
// 获取老师新加的项目 |
|
|
|
this.assessmentId = assessmentId |
|
|
|
setInterval(() => { |
|
|
|
if(assessmentId == '' || assessmentId == null || assessmentId == 'null') { |
|
|
|
let params = { |
|
|
|
|
|
|
|
"systemId":sessionStorage.getItem('systemId'), |
|
|
|
|
|
|
|
"cId":sessionStorage.getItem('cid'), |
|
|
|
|
|
|
|
"permissions":0, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
getProjectBySystemId(params).then((data)=>{ |
|
|
|
|
|
|
|
if(data.status == 200){ |
|
|
|
|
|
|
|
if(this.topicList.length !== data.data.projects.length) { |
|
|
|
|
|
|
|
this.topicList = data.data.projects |
|
|
|
|
|
|
|
if(!this.topicList.some(item => item.projectId===this.projectId)) { |
|
|
|
|
|
|
|
this.selectProjects({projectId: this.topicList[0].projectId}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}).catch((error)=>{ |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, 10000) |
|
|
|
|
|
|
|
}else { |
|
|
|
}else { |
|
|
|
if(process.env.NODE_ENV === "development") { |
|
|
|
|
|
|
|
this.intervalJudge = setInterval(() => { |
|
|
|
this.intervalJudge = setInterval(() => { |
|
|
|
const data = { |
|
|
|
const data = { |
|
|
|
id: parseInt(sessionStorage.getItem('assessmentId')), |
|
|
|
id: parseInt(sessionStorage.getItem('assessmentId')), |
|
|
|
token: parseInt(sessionStorage.getItem('token')) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
checkTest(data).then(data => { |
|
|
|
checkTest(data).then(data => { |
|
|
|
const { data: { data: { status } } } = data |
|
|
|
const { data: { data: { status } } } = data |
|
|
|
if(status !== 1) { |
|
|
|
if(status !== 1) { |
|
|
|
this.popContainer = true |
|
|
|
this.popContainer = true |
|
|
|
clearInterval(this.intervalJudge) |
|
|
|
clearInterval(this.intervalJudge) |
|
|
|
this.sureSubmit(false) |
|
|
|
this.$confirm('考试已结束,已自动为您提交。', '提示', { |
|
|
|
}else { |
|
|
|
confirmButtonText: '确定', |
|
|
|
} |
|
|
|
type: 'info', |
|
|
|
|
|
|
|
center: true |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, 4000) |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
this.intervalJudge = setInterval(() => { |
|
|
|
|
|
|
|
const data = { |
|
|
|
|
|
|
|
id: parseInt(sessionStorage.getItem('assessmentId')), |
|
|
|
|
|
|
|
token: parseInt(sessionStorage.getItem('token')) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
checkTest(data).then(data => { |
|
|
|
|
|
|
|
const { data: { data: { status } } } = data |
|
|
|
|
|
|
|
if(status !== 1) { |
|
|
|
|
|
|
|
this.popContainer = true |
|
|
|
|
|
|
|
clearInterval(this.intervalJudge) |
|
|
|
|
|
|
|
// 提交 |
|
|
|
// 提交 |
|
|
|
this.sureSubmit(false) |
|
|
|
this.sureSubmit(false) |
|
|
|
}else { |
|
|
|
}else { |
|
|
@ -243,7 +215,6 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, 4000) |
|
|
|
}, 4000) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
countVal: { |
|
|
|
countVal: { |
|
|
@ -318,23 +289,24 @@ export default { |
|
|
|
sessionStorage.setItem('classId', classId) |
|
|
|
sessionStorage.setItem('classId', classId) |
|
|
|
this.assessmentId = assessmentId |
|
|
|
this.assessmentId = assessmentId |
|
|
|
this.classId = classId |
|
|
|
this.classId = classId |
|
|
|
|
|
|
|
console.log() |
|
|
|
} |
|
|
|
} |
|
|
|
let tokens = sessionStorage.getItem('token') |
|
|
|
let tokens = sessionStorage.getItem('token') |
|
|
|
if(this.getQueryVariable('test')) { |
|
|
|
// if(this.getQueryVariable('projectId')) { |
|
|
|
let params = { |
|
|
|
// let params = { |
|
|
|
"systemId":sessionStorage.getItem('systemId'), |
|
|
|
// "systemId":sessionStorage.getItem('systemId'), |
|
|
|
"cId":sessionStorage.getItem('cid'), |
|
|
|
// "cId":sessionStorage.getItem('cid'), |
|
|
|
"permissions":0, |
|
|
|
// "permissions":0, |
|
|
|
} |
|
|
|
// } |
|
|
|
getProjectBySystemId(params).then((data)=>{ |
|
|
|
// getProjectBySystemId(params).then((data)=>{ |
|
|
|
if(data.status == 200){ |
|
|
|
// if(data.status == 200){ |
|
|
|
//获取当前时间 |
|
|
|
// //获取当前时间 |
|
|
|
this.topicList = data.data.projects |
|
|
|
// this.topicList = data.data.projects |
|
|
|
this.selectProjects({projectId: this.topicList[0].projectId}) |
|
|
|
// this.selectProjects({projectId: this.topicList[0].projectId}) |
|
|
|
} |
|
|
|
// } |
|
|
|
}).catch((error)=>{ |
|
|
|
// }).catch((error)=>{ |
|
|
|
}) |
|
|
|
// }) |
|
|
|
}else { |
|
|
|
// }else { |
|
|
|
if(tokens || token){ |
|
|
|
if(tokens || token){ |
|
|
|
this.projectPermissions = this.projectId ? 1 : 0 |
|
|
|
this.projectPermissions = this.projectId ? 1 : 0 |
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
|
this.assessmentId && this.projectId && this.checkVer() |
|
|
@ -348,7 +320,7 @@ export default { |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// } |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
getQueryVariable(name) { |
|
|
|
getQueryVariable(name) { |
|
|
@ -469,16 +441,18 @@ export default { |
|
|
|
this.hintOpen = data.data.projectManage.hintOpen; |
|
|
|
this.hintOpen = data.data.projectManage.hintOpen; |
|
|
|
this.countDown(timestamp); |
|
|
|
this.countDown(timestamp); |
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
let projectId = this.getQueryVariable('projectId') |
|
|
|
if(projectId != null){ |
|
|
|
if(projectId != null && projectId != '' && projectId != 'null'){ |
|
|
|
//获取当前时间 |
|
|
|
//获取当前时间 |
|
|
|
this.getBeginTime() |
|
|
|
this.getBeginTime() |
|
|
|
// this.topicList = [data.data.projectManage]; |
|
|
|
this.topicList = [data.data.projectManage]; |
|
|
|
this.projectId = +params.projectId |
|
|
|
this.projectId = +params.projectId |
|
|
|
this.projectName = data.data.projectManage.projectName |
|
|
|
this.projectName = data.data.projectManage.projectName |
|
|
|
|
|
|
|
this.projectId = data.data.projectManage.projectId; |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
}else{ |
|
|
|
}else{ |
|
|
|
this.projectName = data.data.projectManage.projectName |
|
|
|
this.projectName = data.data.projectManage.projectName |
|
|
|
|
|
|
|
this.projectId = data.data.projectManage.projectId; |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
} |
|
|
|
} |
|
|
@ -504,18 +478,15 @@ export default { |
|
|
|
let cid = sessionStorage.getItem('cid') |
|
|
|
let cid = sessionStorage.getItem('cid') |
|
|
|
let systemId = sessionStorage.getItem('systemId') |
|
|
|
let systemId = sessionStorage.getItem('systemId') |
|
|
|
this.projectName = data.data.projectManage.projectName; |
|
|
|
this.projectName = data.data.projectManage.projectName; |
|
|
|
|
|
|
|
this.projectId = data.data.projectManage.projectId; |
|
|
|
|
|
|
|
console.log() |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
this.projectManage = data.data.projectManage; |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
this.requires = data.data.projectJudgmentVos; |
|
|
|
//线上 |
|
|
|
//线上 |
|
|
|
|
|
|
|
location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
//测试服 |
|
|
|
//测试服 |
|
|
|
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
//本地 |
|
|
|
//本地 |
|
|
|
if(process.env.NODE_ENV === "development") { |
|
|
|
|
|
|
|
location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
}).catch((error)=>{ |
|
|
@ -532,23 +503,35 @@ export default { |
|
|
|
this.startCountFn(); |
|
|
|
this.startCountFn(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//提交 |
|
|
|
//提交 |
|
|
|
Submit(judge=true) { |
|
|
|
Submit() { |
|
|
|
this.$confirm("此操作将视为结束考试, 是否继续?", "提示", { |
|
|
|
this.$confirm('此操作将视为结束考试, 是否继续?', '提示', { |
|
|
|
confirmButtonText: "确定", |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: "取消", |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: "warning", |
|
|
|
type: 'warning' |
|
|
|
center: true |
|
|
|
|
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
|
this.sureSubmit() |
|
|
|
console.log('=====') |
|
|
|
|
|
|
|
this.sureSubmit(true) |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
this.$message({ |
|
|
|
this.$message({ |
|
|
|
type: "info", |
|
|
|
type: "info", |
|
|
|
message: "已取消提交" |
|
|
|
message: "已取消提交" |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
// this.$confirm("此操作将视为结束考试, 是否继续?", "提示", { |
|
|
|
|
|
|
|
// confirmButtonText: '确定', |
|
|
|
|
|
|
|
// cancelButtonText: '取消', |
|
|
|
|
|
|
|
// type: "warning", |
|
|
|
|
|
|
|
// center: true |
|
|
|
|
|
|
|
// }).then(() => { |
|
|
|
|
|
|
|
// this.sureSubmit(true) |
|
|
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
|
|
// this.$message({ |
|
|
|
|
|
|
|
// type: "info", |
|
|
|
|
|
|
|
// message: "已取消提交" |
|
|
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
// }); |
|
|
|
}, |
|
|
|
}, |
|
|
|
sureSubmit(judge=true){ |
|
|
|
sureSubmit(judge){ |
|
|
|
this.actEndTime = new Date().getTime(); |
|
|
|
this.actEndTime = new Date().getTime(); |
|
|
|
let ruleReqs = sessionStorage.getItem('ruleReqs') |
|
|
|
let ruleReqs = sessionStorage.getItem('ruleReqs') |
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
|
let startTime = sessionStorage.getItem('startTime') |
|
|
@ -573,6 +556,7 @@ export default { |
|
|
|
"submitTime": this.actEndTime, |
|
|
|
"submitTime": this.actEndTime, |
|
|
|
"systemId": systemId, |
|
|
|
"systemId": systemId, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
console.log(params) |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
submit(params).then((data)=>{ |
|
|
|
submit(params).then((data)=>{ |
|
|
|
if(data.status == 200){ |
|
|
|
if(data.status == 200){ |
|
|
@ -587,7 +571,7 @@ export default { |
|
|
|
for (var i=0;i<datas.length;i++){ |
|
|
|
for (var i=0;i<datas.length;i++){ |
|
|
|
if (datas[i].lcId== list[j].judgmentId){ |
|
|
|
if (datas[i].lcId== list[j].judgmentId){ |
|
|
|
list[j].flag = datas[i].flag |
|
|
|
list[j].flag = datas[i].flag |
|
|
|
list[j].score = datas[i].judgmentScore |
|
|
|
list[j].scores = datas[i].judgmentScore |
|
|
|
list[j].right = datas[i].calculate |
|
|
|
list[j].right = datas[i].calculate |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -600,13 +584,12 @@ export default { |
|
|
|
message: '提交成功' |
|
|
|
message: '提交成功' |
|
|
|
}); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
}else { |
|
|
|
this.$confirm('考试已结束,已自动提交。', '提示', { |
|
|
|
this.$confirm('考试已结束,已自动为您提交。', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
confirmButtonText: '确定', |
|
|
|
type: 'info', |
|
|
|
type: 'info', |
|
|
|
center: true |
|
|
|
center: true |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.requires = list |
|
|
|
this.requires = list |
|
|
|
} |
|
|
|
} |
|
|
|
this.loading = false |
|
|
|
this.loading = false |
|
|
@ -652,14 +635,13 @@ export default { |
|
|
|
this.minutes = `${m > 9 ? m : `0${m}`}`; |
|
|
|
this.minutes = `${m > 9 ? m : `0${m}`}`; |
|
|
|
this.seconds = `${s > 9 ? s : `0${s}`}`; |
|
|
|
this.seconds = `${s > 9 ? s : `0${s}`}`; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.$alert('考核结束,已自动交卷', '提示', { |
|
|
|
this.$confirm('考试已结束,已自动为您提交。', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
confirmButtonText: '确定', |
|
|
|
callback: action => { |
|
|
|
type: 'info', |
|
|
|
|
|
|
|
center: true |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
this.sss = 0 |
|
|
|
this.sss = 0 |
|
|
|
this.sureSubmit() |
|
|
|
this.sureSubmit(true) |
|
|
|
this.day = '00'; |
|
|
|
this.day = '00'; |
|
|
|
this.hour = '00'; |
|
|
|
this.hour = '00'; |
|
|
|
this.minutes = '00'; |
|
|
|
this.minutes = '00'; |
|
|
@ -713,9 +695,9 @@ export default { |
|
|
|
this.hour = "00"; |
|
|
|
this.hour = "00"; |
|
|
|
this.grade = '00' |
|
|
|
this.grade = '00' |
|
|
|
//线上 |
|
|
|
//线上 |
|
|
|
// location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
location.href = 'http://www.huorantech.cn/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
//测试服 |
|
|
|
//测试服 |
|
|
|
location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
// location.href = 'http://39.108.250.202/banksystem/#/index/list?'+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
//本地 |
|
|
|
//本地 |
|
|
|
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
// location.href = "http://192.168.31.254:8093/#/index/list?"+'token='+token+'&cid='+cid+'&systemId='+systemId |
|
|
|
}, |
|
|
|
}, |
|
|
|