Compare commits

..

No commits in common. "c726ec81cd92dad09325f286b0cf346b53be847f" and "47da6430c285dac8b05b459f75c06c7730104ee7" have entirely different histories.

3 changed files with 21 additions and 26 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} = judgeUI; const { isAllProjectsEnd, examSubject, singlePlay, totalScore, judgeConfigObj, passingScore, examMileage, jl } =
const param302 = judgeConfigObj['302']; judgeUI;
if (isExamEnd) { if (isExamEnd) {
return return
} }
@ -346,21 +346,24 @@ 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) && (param302 != 6 || param302 != 7 || param302 != 8)) { if (examSubject == 3 && (param342 == 0 || param342 == 2) &&
(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 {
@ -382,17 +385,15 @@ export default class Judge {
//成绩不合格 //成绩不合格
if (totalScore < passingGrade) { if (totalScore < passingGrade) {
//科目三不合格报靠边停车 //科目三不合格报靠边停车
if (examSubject == 3 ) { if (examSubject == 3 && param302 == 1) {
if( param302 == 1){ avPlayer.playAudio([`voice/考试结束.mp3`]);
avPlayer.playAudio([`voice/考试结束.mp3`]); return
}else if(param302 == 0){
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) {
@ -413,7 +414,8 @@ export default class Judge {
return return
} }
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) { if (examSubject == 3 && (param342 == 0 || param342 == 2) &&
(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
@ -1223,13 +1225,6 @@ 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`])
} }
} }
@ -1253,8 +1248,8 @@ export default class Judge {
totalScore < passingScore) { totalScore < passingScore) {
avPlayer.playAudio([`voice/考试结束.mp3`]) avPlayer.playAudio([`voice/考试结束.mp3`])
} }
//联网模式下:项目没有做完、当前分数大于及格分;手动结束直接退出 //联网模式下手动结束直接退出
if (!singlePlay && isManual && !isAllProjectsEnd && totalScore >= passingScore) { if (!singlePlay && isManual && !isAllProjectsEnd) {
avPlayer.playAudio(['voice/empty.mp3'], true, () => { avPlayer.playAudio(['voice/empty.mp3'], true, () => {
this.isUdpEnd = true; this.isUdpEnd = true;
closeAllFiles() closeAllFiles()