fix: 语音播报两边
This commit is contained in:
parent
98e17164e1
commit
fff89ecf75
@ -125,17 +125,19 @@ export class BaseJudge {
|
||||
ProjectStart(xmdm, that.xmxh, judgeUI)
|
||||
UploadProgressPhoto(xmdm, that.plcData!, judgeUI)
|
||||
}
|
||||
// this.judgeUI.projectsObj[xmdm].isUpload = true
|
||||
|
||||
break;
|
||||
}
|
||||
case 2: {
|
||||
dConsole.log(JudgeTag, ExamProcessDataTag, "项目结束判定1")
|
||||
const project: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
|
||||
const isStart = await this.checkProjectIsStart(xmdm, 2, judgeUI, that)
|
||||
// const isStart = await this.checkProjectIsStart(xmdm, 1, judgeUI, that, kf)
|
||||
|
||||
if (isStart) {
|
||||
// 项目结束了就不再生成数据
|
||||
dConsole.info(JudgeTag, ExamProcessDataTag, ' 项目是否结束 =>', project.isEnd)
|
||||
if (!project.isEnd) {
|
||||
// if (isStart) {
|
||||
// // 项目结束了就不再生成数据
|
||||
// dConsole.info(JudgeTag, ExamProcessDataTag, ' 项目是否结束 =>', project.isEnd)
|
||||
// if (!project.isEnd) {
|
||||
// judgeTask.addTask(async () => {
|
||||
// dConsole.info(JudgeTag, `项目结束-${xmdm}-${project.name}`)
|
||||
// await endProject(xmdm);
|
||||
@ -145,8 +147,8 @@ export class BaseJudge {
|
||||
// isDelay: true
|
||||
// })
|
||||
ProjectEnd(xmdm, that.xmxh, judgeUI)
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
dConsole.log(JudgeTag, ExamProcessDataTag, "项目结束判定3")
|
||||
try {
|
||||
const param512: JudgeConfigObj = (Reflect.get(judgeUI.judgeConfigObj, '512') || '').split(',');
|
||||
@ -169,8 +171,8 @@ export class BaseJudge {
|
||||
that.avPlayer?.playAudio([`voice/${currentKf.markcatalog}.mp3`,
|
||||
`voice/mark_${Math.abs(currentKf?.score || 0)}.mp3`])
|
||||
}
|
||||
const isStart = await this.checkProjectIsStart(Number(currentKf.xmdm), 2, judgeUI, that);
|
||||
if (isStart) {
|
||||
// const isStart = await this.checkProjectIsStart(Number(currentKf.xmdm), 2, judgeUI, that, kf);
|
||||
// if (isStart) {
|
||||
// await judgeTask.addTask(async () => {
|
||||
// dConsole.info(JudgeTag, `项目扣分-${currentKf.markcatalog}-${currentKf.desc}`)
|
||||
// await pointsDedute(Number(currentKf.xmdm), currentKf)
|
||||
@ -178,7 +180,10 @@ export class BaseJudge {
|
||||
// isDelay: true
|
||||
// })
|
||||
DeductPoints(Number(currentKf.xmdm), currentKf, that.xmmcEndCode || "", judgeUI)
|
||||
if (judgeUI.totalScore < judgeUI.passingScore) {
|
||||
ProjectEnd(xmdm, that.xmxh, judgeUI)
|
||||
}
|
||||
// }
|
||||
break
|
||||
}
|
||||
case 5: {
|
||||
@ -367,7 +372,6 @@ export class BaseJudge {
|
||||
})
|
||||
return
|
||||
}
|
||||
//
|
||||
that.avPlayer?.playAudio(['voice/exam_waiting.mp3'], judgeUI.singlePlay, async () => {
|
||||
try {
|
||||
if (!judgeUI.singlePlay) {
|
||||
@ -393,7 +397,6 @@ export class BaseJudge {
|
||||
await this.endExam(judgeUI, that)
|
||||
}
|
||||
})
|
||||
await this.endExam(judgeUI, that)
|
||||
})
|
||||
}
|
||||
|
||||
@ -402,7 +405,6 @@ export class BaseJudge {
|
||||
const singlePlay = judgeUI.singlePlay
|
||||
//TODO 断网考试结束补传
|
||||
// await uploadDisConnectData();
|
||||
|
||||
let backTimeOut = setTimeout(() => {
|
||||
router.back()
|
||||
}, 90 * 1000)
|
||||
@ -506,58 +508,62 @@ export class BaseJudge {
|
||||
}, param302 === "8" ? 3000 : 0)
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测扣分、结束项目时该项目是否开始
|
||||
*
|
||||
*/
|
||||
async checkProjectIsStart(xmdm: number, currentType: 1 | 2, judgeUI: JudgePage, that: JudgeBusiness, kf?: MarkRule): Promise<boolean> {
|
||||
if (xmdm == 20) {
|
||||
return true
|
||||
}
|
||||
const currentProject: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
|
||||
|
||||
if (!currentProject.isUpload) {
|
||||
dConsole.info(JudgeTag, '项目补传开始')
|
||||
// judgeTask.addTask(async () => {
|
||||
// await this.beginProject(xmdm)
|
||||
// }, {
|
||||
// isDelay: true
|
||||
// })
|
||||
// judgeTask.addTask(async () => {
|
||||
// await this.uploadProgressPhoto(xmdm)
|
||||
// }, {
|
||||
// isDelay: true
|
||||
// })
|
||||
currentProject.isUpload = true;
|
||||
Reflect.set(judgeUI.projectsObj, xmdm, currentProject)
|
||||
if (currentType == 2) {
|
||||
//项目结束需要等补传完毕
|
||||
// judgeTask.addTask(async () => {
|
||||
// await this.pointsDedute(xmdm, kf!)
|
||||
// }, {
|
||||
// isDelay: true
|
||||
// })
|
||||
}
|
||||
//扣分补传判断是否合格 不合格补传项目结束
|
||||
if (currentType == 1 || (currentType == 2 && that.totalScore < judgeUI.passingScore)) {
|
||||
// judgeTask.addTask(async () => {
|
||||
// await this.endProject(xmdm)
|
||||
// }, {
|
||||
// isDelay: true
|
||||
// })
|
||||
currentProject.isEnd = true;
|
||||
Reflect.set(judgeUI.projectsObj, xmdm, currentProject)
|
||||
}
|
||||
// judgeTask.addTask(async () => {
|
||||
// this.checkExamIsEnd()
|
||||
// })
|
||||
return false;
|
||||
}
|
||||
return true
|
||||
}
|
||||
// async checkProjectIsStart(xmdm: number, currentType: 1 | 2, judgeUI: JudgePage, that: JudgeBusiness, kf?: MarkRule[]): Promise<boolean> {
|
||||
// if (xmdm == 20) {
|
||||
// return true
|
||||
// }
|
||||
// const currentProject: ProjectInfo = Reflect.get(judgeUI.projectsObj, xmdm)
|
||||
//
|
||||
// if (!currentProject.isUpload) {
|
||||
// dConsole.info(JudgeTag, '项目补传开始')
|
||||
// // judgeTask.addTask(async () => {
|
||||
// // await this.beginProject(xmdm)
|
||||
// // }, {
|
||||
// // isDelay: true
|
||||
// // })
|
||||
// // judgeTask.addTask(async () => {
|
||||
// // await this.uploadProgressPhoto(xmdm)
|
||||
// // }, {
|
||||
// // isDelay: true
|
||||
// // })
|
||||
// ProjectStart(xmdm, that.xmxh, judgeUI)
|
||||
// UploadProgressPhoto(xmdm, that.plcData!, judgeUI)
|
||||
// currentProject.isUpload = true;
|
||||
// Reflect.set(judgeUI.projectsObj, xmdm, currentProject)
|
||||
// if (currentType == 2) {
|
||||
// //项目结束需要等补传完毕
|
||||
// // judgeTask.addTask(async () => {
|
||||
// // await this.pointsDedute(xmdm, kf!)
|
||||
// // }, {
|
||||
// // isDelay: true
|
||||
// // })\
|
||||
// const currentKf = kf[kf.length -1];
|
||||
// DeductPoints(Number(currentKf.xmdm), currentKf, that.xmmcEndCode || "", judgeUI)
|
||||
// }
|
||||
// //扣分补传判断是否合格 不合格补传项目结束
|
||||
// if (currentType == 1 || (currentType == 2 && that.totalScore < judgeUI.passingScore)) {
|
||||
// // judgeTask.addTask(async () => {
|
||||
// // await this.endProject(xmdm)
|
||||
// // }, {
|
||||
// // isDelay: true
|
||||
// // })
|
||||
// ProjectEnd(xmdm, that.xmxh, judgeUI)
|
||||
// currentProject.isEnd = true;
|
||||
// Reflect.set(judgeUI.projectsObj, xmdm, currentProject)
|
||||
// }
|
||||
// // judgeTask.addTask(async () => {
|
||||
// // this.checkExamIsEnd()
|
||||
// // })
|
||||
// return false;
|
||||
// }
|
||||
// return true
|
||||
// }
|
||||
|
||||
async judgeStart(callBack: Function, judgeUI: JudgePage, that: JudgeBusiness, beginExamInfo: JudgeBeginObj, initInfo: JudgeInitObj) {
|
||||
const name = judgeUI.name
|
||||
|
||||
@ -708,7 +708,7 @@ struct UserInfoPage {
|
||||
|
||||
this.list = JSON.parse(JSON.stringify(dataList))
|
||||
|
||||
dConsole.log("temp list", JSON.stringify(this.list))
|
||||
dConsole.log(UserInfoTag, "temp list", JSON.stringify(this.list))
|
||||
this.list.forEach((listData, index) => {
|
||||
//考过一次不允许切换学员
|
||||
if (listData.kssycs == '1') {
|
||||
@ -730,7 +730,7 @@ struct UserInfoPage {
|
||||
})
|
||||
|
||||
// await upDateTableByArray('USERLIST', this.list || [])
|
||||
dConsole.log("temp list", JSON.stringify(this.list))
|
||||
dConsole.log(UserInfoTag, "temp list", JSON.stringify(this.list))
|
||||
|
||||
// await sqlInsertCommonFn("USERLIST", this.list || [])
|
||||
await SqlInsertTable('USERLIST', this.list || [])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user