|
|
@ -51,6 +51,7 @@ |
|
|
|
v-show="per == 0">重新开始</el-button> |
|
|
|
v-show="per == 0">重新开始</el-button> |
|
|
|
<el-button type="primary" |
|
|
|
<el-button type="primary" |
|
|
|
class="submit btn h-[40px]" |
|
|
|
class="submit btn h-[40px]" |
|
|
|
|
|
|
|
:loading="submiting" |
|
|
|
@click="submit" |
|
|
|
@click="submit" |
|
|
|
:disabled="isSubmit || !projectList.length">提交</el-button> |
|
|
|
:disabled="isSubmit || !projectList.length">提交</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -263,6 +264,7 @@ const curReq = ref<Record<string, any>[]>([]); |
|
|
|
const taskList = ref<Record<string, any>[]>([]); |
|
|
|
const taskList = ref<Record<string, any>[]>([]); |
|
|
|
const pannelTab = ref<string>('first'); |
|
|
|
const pannelTab = ref<string>('first'); |
|
|
|
const statusTimer = ref<any>(null); |
|
|
|
const statusTimer = ref<any>(null); |
|
|
|
|
|
|
|
const submiting = ref<boolean>(false); |
|
|
|
const reportId = ref<string | number>(''); |
|
|
|
const reportId = ref<string | number>(''); |
|
|
|
const countVal = ref<any>(''); |
|
|
|
const countVal = ref<any>(''); |
|
|
|
const getLevel = ref(); |
|
|
|
const getLevel = ref(); |
|
|
@ -464,6 +466,7 @@ const submit = async () => { |
|
|
|
type: 'warning', |
|
|
|
type: 'warning', |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(async () => { |
|
|
|
.then(async () => { |
|
|
|
|
|
|
|
submiting.value = true; |
|
|
|
const date = new Date(); |
|
|
|
const date = new Date(); |
|
|
|
const timeSum = Math.ceil((date.getTime() - entryTime.value.getTime()) / 60000); // 计算实验用时(分钟),向上取整 |
|
|
|
const timeSum = Math.ceil((date.getTime() - entryTime.value.getTime()) / 60000); // 计算实验用时(分钟),向上取整 |
|
|
|
const submitTime = dayjs(date).format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
const submitTime = dayjs(date).format('YYYY-MM-DD HH:mm:ss'); |
|
|
@ -493,20 +496,21 @@ const submit = async () => { |
|
|
|
|
|
|
|
|
|
|
|
let score = 0; |
|
|
|
let score = 0; |
|
|
|
// 给判分列表添加分数和运行结果 |
|
|
|
// 给判分列表添加分数和运行结果 |
|
|
|
taskList.value.map((e) => { |
|
|
|
taskList.value.map((e) => { |
|
|
|
const item = retMap?.scoreInfo.find((n) => n.lcId === e.judgmentId); |
|
|
|
const item = retMap?.scoreInfo.find((n) => n.lcId === e.judgmentId); |
|
|
|
if (item) { |
|
|
|
if (item) { |
|
|
|
e.examScore = item.questionScore; |
|
|
|
e.examScore = item.questionScore; |
|
|
|
e.finishedResult = item.calculate; // 1:正确,2:错误 |
|
|
|
e.finishedResult = item.calculate; // 1:正确,2:错误 |
|
|
|
score += item.questionScore; // 计算总分 |
|
|
|
score += item.questionScore; // 计算总分 |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
e.examScore = 0; |
|
|
|
e.examScore = 0; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
grade.value = score < 10 ? '0' + score : score; |
|
|
|
grade.value = score < 10 ? '0' + score : score; |
|
|
|
reportId.value = retMap.reportId; |
|
|
|
reportId.value = retMap.reportId; |
|
|
|
Cookies.set('sand-reportId', retMap.reportId); |
|
|
|
Cookies.set('sand-reportId', retMap.reportId); |
|
|
|
localStorage.setItem('sand-taskList', JSON.stringify(taskList.value)); |
|
|
|
localStorage.setItem('sand-taskList', JSON.stringify(taskList.value)); |
|
|
|
|
|
|
|
submiting.value = false; |
|
|
|
|
|
|
|
|
|
|
|
// 如果是竞赛,并且勾选了公布成绩详情的选项,则弹框提示 |
|
|
|
// 如果是竞赛,并且勾选了公布成绩详情的选项,则弹框提示 |
|
|
|
param.competitionId && |
|
|
|
param.competitionId && |
|
|
@ -521,7 +525,9 @@ const submit = async () => { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
.catch(() => {}); |
|
|
|
.catch(() => { |
|
|
|
|
|
|
|
submiting.value = false; |
|
|
|
|
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// 获取项目详情 |
|
|
|
// 获取项目详情 |
|
|
|