20240205
luoJunYong.123 3 years ago
parent 4fd860cf8c
commit 0f6a60f794
  1. 32
      src/components/case/index.vue

@ -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="projectId" placeholder="请选择" class="select" :disabled="projectPermissions != 0" @change="selectProject"> <el-select v-model="projectName" 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"
@ -220,12 +220,7 @@ export default {
if(status !== 1) { if(status !== 1) {
this.popContainer = true this.popContainer = true
clearInterval(this.intervalJudge) clearInterval(this.intervalJudge)
this.Submit(false) this.sureSubmit(false)
this.$message({
showClose: true,
message: '考试已结束,试卷已自动提交',
type: 'success'
});
}else { }else {
} }
}) })
@ -242,12 +237,7 @@ export default {
this.popContainer = true this.popContainer = true
clearInterval(this.intervalJudge) clearInterval(this.intervalJudge)
// //
this.Submit(false) this.sureSubmit(false)
this.$message({
showClose: true,
message: '考试已结束,试卷已自动提交',
type: 'success'
});
}else { }else {
} }
}) })
@ -394,6 +384,7 @@ export default {
this.selectProjects({ this.selectProjects({
projectId: this.topicList[0].projectId projectId: this.topicList[0].projectId
}) })
this.gotuQueryVariable() this.gotuQueryVariable()
// //
} }
@ -542,7 +533,6 @@ export default {
}, },
// //
Submit(judge=true) { Submit(judge=true) {
if(judge) {
this.$confirm("此操作将视为结束考试, 是否继续?", "提示", { this.$confirm("此操作将视为结束考试, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@ -556,12 +546,9 @@ export default {
message: "已取消提交" message: "已取消提交"
}); });
}); });
}else {
this.sureSubmit()
}
}, },
sureSubmit(){ sureSubmit(judge=true){
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')
@ -607,10 +594,19 @@ export default {
} }
this.sss = 0; this.sss = 0;
this.popContainer = true; this.popContainer = true;
if(judge) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '提交成功' message: '提交成功'
}); });
}else {
this.$confirm('考试已结束,已自动提交。', '提示', {
confirmButtonText: '确定',
type: 'info',
center: true
})
}
this.requires = list this.requires = list
} }
this.loading = false this.loading = false

Loading…
Cancel
Save