feat:结束考试日志添加
This commit is contained in:
parent
cb86c2b903
commit
3b013f451c
@ -294,7 +294,7 @@ export default class Judge {
|
||||
//处理评判过程回调
|
||||
handleRealExam = async (strData, callBack) => {
|
||||
let examData: EXAMDATA = JSON.parse(strData);
|
||||
const {getDqxmStr,getKfStr,goJudgeVoice,setMndg,avPlayer,judgeUI} = this;
|
||||
const {getDqxmStr,getKfStr,goJudgeVoice,setMndg,avPlayer,fileLog,judgeUI} = this;
|
||||
const {carzt,xmks,kf,event,xmjs,xmqx,ksjs,sound,mndg,lane} = examData
|
||||
const param512 = (judgeUI.judgeConfigObj['512'] || '').split(',');
|
||||
//获取项目结束、项目开始代码
|
||||
@ -379,6 +379,9 @@ export default class Judge {
|
||||
//考试结束
|
||||
case 5:
|
||||
this.ksjs = ksjs;
|
||||
await fileLog.setExamJudgeData({
|
||||
method: 'examjudgeEndExam',
|
||||
})
|
||||
break;
|
||||
|
||||
//项目取消
|
||||
@ -756,78 +759,79 @@ export default class Judge {
|
||||
}
|
||||
|
||||
// 校验考试是否结束
|
||||
checkExamIsEnd = async (isManual?: boolean) => {
|
||||
const {judgeUI,avPlayer,isExamEnd,isEndTip} = this;
|
||||
const {isAllProjectsEnd,examSubject,singlePlay,totalScore,judgeConfigObj,passingScore} = judgeUI;
|
||||
checkExamIsEnd =
|
||||
async (isManual?: boolean) => {
|
||||
const {judgeUI,avPlayer,isExamEnd,isEndTip} = this;
|
||||
const {isAllProjectsEnd,examSubject,singlePlay,totalScore,judgeConfigObj,passingScore} = judgeUI;
|
||||
|
||||
if (isExamEnd) {
|
||||
return
|
||||
}
|
||||
//及格分
|
||||
let passingGrade = passingScore
|
||||
if (isManual) {
|
||||
if (isAllProjectsEnd) {
|
||||
// 考试合格
|
||||
if (totalScore >= passingGrade) {
|
||||
// 考试合格
|
||||
await examJudgeEndExam();
|
||||
this.isExamEnd = true
|
||||
}
|
||||
} else {
|
||||
// 考试不合格
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
if (isExamEnd) {
|
||||
return
|
||||
}
|
||||
this.isManual = true
|
||||
|
||||
} else {
|
||||
//单机模式
|
||||
if (singlePlay) {
|
||||
console.info(judgeTag + ' isAllProjectsEnd => ',isAllProjectsEnd)
|
||||
//及格分
|
||||
let passingGrade = passingScore
|
||||
if (isManual) {
|
||||
if (isAllProjectsEnd) {
|
||||
// 考试合格
|
||||
if (totalScore >= passingGrade) {
|
||||
// 考试合格
|
||||
await examJudgeEndExam();
|
||||
this.isExamEnd = true
|
||||
}
|
||||
} else {
|
||||
// 考试不合格
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
}
|
||||
this.isManual = true
|
||||
|
||||
} else {
|
||||
const param302 = judgeConfigObj['302'];
|
||||
const param342 = judgeConfigObj['342'];
|
||||
const param512 = (judgeConfigObj['512'] || '').split(',');
|
||||
//成绩不合格
|
||||
if (totalScore < passingGrade) {
|
||||
//科目三不合格报靠边停车
|
||||
if(examSubject == 3 && param302 ==1){
|
||||
avPlayer.playAudio([`voice/考试结束.mp3`]);
|
||||
return
|
||||
}
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
return
|
||||
}
|
||||
//成绩合格
|
||||
if (isAllProjectsEnd && totalScore >= passingGrade && !isEndTip) {
|
||||
|
||||
//考试合格自动退出
|
||||
if(examSubject == 3 && param302 == 4){
|
||||
//单机模式
|
||||
if (singlePlay) {
|
||||
console.info(judgeTag + ' isAllProjectsEnd => ',isAllProjectsEnd)
|
||||
if (isAllProjectsEnd) {
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
return
|
||||
}
|
||||
|
||||
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
|
||||
if(param512[7] != 0){
|
||||
avPlayer.playAudio(['voice/综合评判.mp3'])
|
||||
this.judgeUI.isDeductedPopShow = true
|
||||
this.judgeUI.defaultTabIndex = 1
|
||||
this.isEndTip = true
|
||||
} else {
|
||||
const param302 = judgeConfigObj['302'];
|
||||
const param342 = judgeConfigObj['342'];
|
||||
const param512 = (judgeConfigObj['512'] || '').split(',');
|
||||
//成绩不合格
|
||||
if (totalScore < passingGrade) {
|
||||
//科目三不合格报靠边停车
|
||||
if(examSubject == 3 && param302 ==1){
|
||||
avPlayer.playAudio([`voice/考试结束.mp3`]);
|
||||
return
|
||||
}
|
||||
} else {
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
return
|
||||
}
|
||||
//成绩合格
|
||||
if (isAllProjectsEnd && totalScore >= passingGrade && !isEndTip) {
|
||||
|
||||
//考试合格自动退出
|
||||
if(examSubject == 3 && param302 == 4){
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
return
|
||||
}
|
||||
|
||||
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
|
||||
if(param512[7] != 0){
|
||||
avPlayer.playAudio(['voice/综合评判.mp3'])
|
||||
this.judgeUI.isDeductedPopShow = true
|
||||
this.judgeUI.defaultTabIndex = 1
|
||||
this.isEndTip = true
|
||||
}
|
||||
} else {
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理考试结束
|
||||
public handEndExam = async (ksjs: KSJS) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user