feat:评判修改
This commit is contained in:
parent
7c42a590a6
commit
c3eecd2b1a
@ -73,10 +73,10 @@ export const getMessageHeartbeat = async (msg) => {
|
||||
const tempData = await getPlcData(msg);
|
||||
const examType = examSubject == 2?2:3
|
||||
const {sensor,gps} = tempData;
|
||||
const {zfxd,yfxd,shtd,ygd,jgd,skd,dh1,dh2,lhq,jsc,ssc,fsc,lb,mkg,aqd,ygq,cs,fdjzs} = sensor
|
||||
const {zfxd,yfxd,shtd,ygd,jgd,skd,dh1,dh2,lhq,jsc,ssc,fsc,lb,mkg,aqd,ygq,cs,fdjzs,dw} = sensor
|
||||
const {jd,wd, hxj, fyj, hbg,sd} = gps
|
||||
const translateSignals = getTranslateSignals(
|
||||
[zfxd, yfxd, shtd, ygd, jgd, skd, dh1, dh2, lhq, jsc, ssc, fsc, lb, mkg, aqd, 0, 0, 0, 0, 0, 0, ygq, sensor.wd, 0]
|
||||
[zfxd, yfxd, shtd, ygd, jgd, skd, dh1, dh2, lhq, jsc, ssc, fsc, lb, mkg, aqd].concat(getDwStatusType(dw)).concat([0,0,ygq, sensor.wd, 0])
|
||||
)
|
||||
const translateProject = getTranslateProject();
|
||||
//@ts-ignore
|
||||
@ -92,7 +92,7 @@ export const getMessageHeartbeat = async (msg) => {
|
||||
}
|
||||
|
||||
const arr = [
|
||||
//考生号
|
||||
//考生号
|
||||
asclshArr.map(lsh => string2Bytes(lsh, 8)[0]),
|
||||
//考试员号
|
||||
ascksyhArr.map(ksyh => string2Bytes(ksyh, 8)[0]),
|
||||
@ -284,4 +284,17 @@ const getPlcData = async (plc: string) => {
|
||||
}
|
||||
|
||||
return tempData
|
||||
}
|
||||
|
||||
const getDwStatusType = (dw)=> {
|
||||
switch (dw){
|
||||
case 0:return [0,0,0,0]
|
||||
case 1: return [0,0,0,1]
|
||||
case 2: return [0,0,1,0]
|
||||
case 3: return [0,0,1,1]
|
||||
case 4: return [0,1,0,0]
|
||||
case 5: return [0,1,0,1]
|
||||
case 9: return [1,0,0,1]
|
||||
default :return [0,0,0,0]
|
||||
}
|
||||
}
|
||||
@ -645,7 +645,7 @@ struct UserInfo {
|
||||
const {code,keystr,message} = await this.beginExam();
|
||||
console.info('surenjun','开始考试接口调用结束')
|
||||
//@ts-ignore TODO code转换
|
||||
if (code == '' && code == undefined) {
|
||||
if (code != 1) {
|
||||
promptAction.showToast({
|
||||
message,
|
||||
duration: 4000
|
||||
@ -663,7 +663,7 @@ struct UserInfo {
|
||||
sczb: Number(this.isBoardPrePareSetPopupOpen),
|
||||
kfdm: this.sczbkf,
|
||||
//真实监管项目
|
||||
kString: keystr || ''
|
||||
kString: decodeURIComponent( keystr || '')
|
||||
}
|
||||
}, router.RouterMode.Single);
|
||||
this.updateTimeLimit = false
|
||||
|
||||
@ -815,19 +815,28 @@ export default class Judge {
|
||||
this.isExamEnd = true
|
||||
}
|
||||
this.isManual = true
|
||||
|
||||
} else {
|
||||
const param302 = judgeConfigObj['302'];
|
||||
const param342 = judgeConfigObj['342'];
|
||||
const param512 = (judgeConfigObj['512'] || '').split(',');
|
||||
|
||||
//单机模式
|
||||
if (singlePlay) {
|
||||
console.info(judgeTag + ' isAllProjectsEnd => ',isAllProjectsEnd)
|
||||
if (isAllProjectsEnd) {
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
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
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const param302 = judgeConfigObj['302'];
|
||||
const param342 = judgeConfigObj['342'];
|
||||
const param512 = (judgeConfigObj['512'] || '').split(',');
|
||||
//成绩不合格
|
||||
if (totalScore < passingGrade) {
|
||||
//科目三不合格报靠边停车
|
||||
@ -841,7 +850,6 @@ export default class Judge {
|
||||
}
|
||||
//成绩合格
|
||||
if (isAllProjectsEnd && totalScore >= passingGrade && !isEndTip) {
|
||||
|
||||
//考试合格自动退出
|
||||
if(examSubject == 3 && param302 == 4){
|
||||
await examJudgeEndExam()
|
||||
@ -874,7 +882,7 @@ export default class Judge {
|
||||
const {judgeUI,endExam,handleSEP,kfArr,avPlayer,judgeTask,isManual} = this;
|
||||
const {judgeConfigObj,examSubject,isAllProjectsEnd,totalScore,passingScore} = judgeUI;
|
||||
//计算考试分数
|
||||
this.judgeUI.totalScore = isAllProjectsEnd ? totalScore : 0;
|
||||
// this.judgeUI.totalScore = isAllProjectsEnd ? totalScore : 0;
|
||||
const singlePlay = globalThis.singlePlay
|
||||
const param302 = judgeConfigObj['302'];
|
||||
// globalThis.windowClass.setWindowSystemBarEnable(['navigation'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user