Compare commits

...

2 Commits

3 changed files with 26 additions and 21 deletions

View File

@ -329,12 +329,12 @@ export default class Judge {
private isEndTip: boolean = false; private isEndTip: boolean = false;
private deductedPopShowTimer: number = 0; private deductedPopShowTimer: number = 0;
// 校验考试是否结束 // 校验考试是否结束
// 校验考试是否结束
checkExamIsEnd = checkExamIsEnd =
async (isManual?: boolean) => { async (isManual?: boolean) => {
const {judgeUI,avPlayer,isExamEnd,isEndTip,ksjs} = this; const {judgeUI,avPlayer,isExamEnd,isEndTip,ksjs} = this;
const { isAllProjectsEnd, examSubject, singlePlay, totalScore, judgeConfigObj, passingScore, examMileage, jl } = const {isAllProjectsEnd,examSubject,singlePlay,totalScore,judgeConfigObj,passingScore,examMileage,jl} = judgeUI;
judgeUI; const param302 = judgeConfigObj['302'];
if (isExamEnd) { if (isExamEnd) {
return return
} }
@ -346,24 +346,21 @@ export default class Judge {
this.isExamEnd = true this.isExamEnd = true
this.isManual = true this.isManual = true
} else { } else {
const param302 = judgeConfigObj['302'];
const param342 = judgeConfigObj['342']; const param342 = judgeConfigObj['342'];
const param512 = (judgeConfigObj['512'] || '').split(','); const param512 = (judgeConfigObj['512'] || '').split(',');
//单机模式 //单机模式
if (singlePlay) { if (singlePlay) {
console.info(judgeTag + ' isAllProjectsEnd => ', isAllProjectsEnd) console.info(judgeTag + ' isAllProjectsEnd => ', isAllProjectsEnd)
if (isAllProjectsEnd && jl >= examMileage) { if (isAllProjectsEnd && jl >= examMileage) {
//成绩合格 //成绩合格
if (totalScore >= passingGrade && !isEndTip) { if (totalScore >= passingGrade && !isEndTip) {
if (examSubject == 3 && (param342 == 0 || param342 == 2) && if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
(param302 != 6 || param302 != 7 || param302 != 8)) {
if (param512[7] != 0) { if (param512[7] != 0) {
clearTimeout(this.deductedPopShowTimer) // clearTimeout(this.deductedPopShowTimer)
avPlayer.playAudio(['voice/综合评判.mp3']) // avPlayer.playAudio(['voice/综合评判.mp3'])
this.judgeUI.isDeductedPopShow = true // this.judgeUI.isDeductedPopShow = true
this.judgeUI.defaultTabIndex = 1 // this.judgeUI.defaultTabIndex = 1
this.isEndTip = true // this.isEndTip = true
return return
} }
} else { } else {
@ -385,15 +382,17 @@ export default class Judge {
//成绩不合格 //成绩不合格
if (totalScore < passingGrade) { if (totalScore < passingGrade) {
//科目三不合格报靠边停车 //科目三不合格报靠边停车
if (examSubject == 3 && param302 == 1) { if (examSubject == 3 ) {
if( param302 == 1){
avPlayer.playAudio([`voice/考试结束.mp3`]); avPlayer.playAudio([`voice/考试结束.mp3`]);
}else if(param302 == 0){
return return
} }
}
await examJudgeEndExam() await examJudgeEndExam()
this.isExamEnd = true this.isExamEnd = true
return return
} }
//成绩合格 //成绩合格
if (isAllProjectsEnd && totalScore >= passingGrade && !isEndTip) { if (isAllProjectsEnd && totalScore >= passingGrade && !isEndTip) {
if (examSubject == 2) { if (examSubject == 2) {
@ -414,8 +413,7 @@ export default class Judge {
return return
} }
if (examSubject == 3 && (param342 == 0 || param342 == 2) && if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
(param302 != 6 || param302 != 7 || param302 != 8)) {
if (param512[7] != 0) { if (param512[7] != 0) {
clearTimeout(this.deductedPopShowTimer) clearTimeout(this.deductedPopShowTimer)
this.judgeUI.isDeductedPopShow = false this.judgeUI.isDeductedPopShow = false
@ -1225,6 +1223,13 @@ export default class Judge {
}) })
}) })
} else { } else {
//收到综合评判语音时,显示综合评判弹窗
if(code[0] == 'zhpp'){
clearTimeout(this.deductedPopShowTimer)
this.judgeUI.isDeductedPopShow = true
this.judgeUI.defaultTabIndex = 1
this.isEndTip = true
}
avPlayer.playAudio([`voice/${code[0]}.mp3`]) avPlayer.playAudio([`voice/${code[0]}.mp3`])
} }
} }
@ -1248,8 +1253,8 @@ export default class Judge {
totalScore < passingScore) { totalScore < passingScore) {
avPlayer.playAudio([`voice/考试结束.mp3`]) avPlayer.playAudio([`voice/考试结束.mp3`])
} }
//联网模式下手动结束直接退出 //联网模式下:项目没有做完、当前分数大于及格分;手动结束直接退出
if (!singlePlay && isManual && !isAllProjectsEnd) { if (!singlePlay && isManual && !isAllProjectsEnd && totalScore >= passingScore) {
avPlayer.playAudio(['voice/empty.mp3'], true, () => { avPlayer.playAudio(['voice/empty.mp3'], true, () => {
this.isUdpEnd = true; this.isUdpEnd = true;
closeAllFiles() closeAllFiles()

Binary file not shown.

Binary file not shown.