fix: 修复考试结束两次返回
This commit is contained in:
parent
d35c015f7f
commit
801932c42e
@ -405,9 +405,9 @@ export class BaseJudge {
|
||||
const singlePlay = judgeUI.singlePlay
|
||||
//TODO 断网考试结束补传
|
||||
// await uploadDisConnectData();
|
||||
let backTimeOut = setTimeout(() => {
|
||||
router.back()
|
||||
}, 90 * 1000)
|
||||
// let backTimeOut = setTimeout(() => {
|
||||
// router.back()
|
||||
// }, 90 * 1000)
|
||||
|
||||
console.info(JudgeTag, '考试结束 end')
|
||||
const param302 = judgeUI.judgeConfigObj.param_302;
|
||||
@ -424,11 +424,9 @@ export class BaseJudge {
|
||||
case 'voice/unqualified_one.wav':
|
||||
currentKssycs = 0;
|
||||
break;
|
||||
|
||||
case 'voice/unqualified_two.wav':
|
||||
currentKssycs = 1;
|
||||
break;
|
||||
|
||||
case 'voice/qualified.mp3':
|
||||
currentKssycs = 0;
|
||||
break;
|
||||
@ -471,7 +469,7 @@ export class BaseJudge {
|
||||
if (!singlePlay) {
|
||||
// await uploadProgressData();
|
||||
}
|
||||
clearTimeout(backTimeOut)
|
||||
// clearTimeout(backTimeOut)
|
||||
//语音播放扣分项
|
||||
let score = 0;
|
||||
//结束考试时候是否播报一遍所有扣分
|
||||
@ -743,7 +741,7 @@ export class BaseJudge {
|
||||
}
|
||||
// 考试结束
|
||||
case 5: {
|
||||
dConsole.info(JudgeTag, "考试结束", ksjs)
|
||||
dConsole.info(JudgeTag, "考试结束距离1", ksjs)
|
||||
that.ksjs = ksjs;
|
||||
dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, JSON.stringify({
|
||||
method: 'examJudgeEndExam'
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 过程数据处理
|
||||
*/
|
||||
import { ExamProcessDataTag, ProcessDataTag, QueueTag } from '../../config';
|
||||
import { ExamProcessDataTag, JudgeTag, ProcessDataTag, QueueTag } from '../../config';
|
||||
import {
|
||||
CarInfoType,
|
||||
CDSBInfo,
|
||||
@ -184,6 +184,7 @@ export const TheExamIsOver = async (judgeUI: JudgePage, that: JudgeBusiness, cal
|
||||
const carInfo: CarInfoType = AppStorage.get("carInfo")!
|
||||
const photoBase64 = await GetPhotoBase64(judgeUI.context);
|
||||
const ksjs = that.ksjs!
|
||||
dConsole.log(JudgeTag, "考试结束距离", that.ksjs)
|
||||
const data: RegulatoryInterfaceParams = {
|
||||
JGHOST: AppStorage.get<string>("JGHOST") || "",
|
||||
xtlb: '17',
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
// 处理worker线程的消息tcp拿差分改正数,udp给后置机
|
||||
import worker, { ErrorEvent, MessageEvents, ThreadWorkerGlobalScope } from '@ohos.worker';
|
||||
import { SerialPortTag, WorkerTag } from '../config';
|
||||
import { WorkerTag } from '../config';
|
||||
import {
|
||||
CenterCallBackMsgType,
|
||||
EnvironmentConfigurationType,
|
||||
@ -10,7 +10,6 @@ import {
|
||||
} from '../model';
|
||||
import { CenterUDPBusinessInstance } from '../utils/business/CenterUdpBusiness';
|
||||
import { DifferentialSignal } from '../utils/business/DifferentialSignal';
|
||||
import { JudgeUdpBusinessInstance } from '../utils/business/JudgeUdpBusiness';
|
||||
import { ObtainUdpBusinessInstance } from '../utils/business/ObtainUdpBusiness';
|
||||
import { SerialPortService } from '../utils/business/SerialPortService';
|
||||
|
||||
@ -71,7 +70,7 @@ function getDataFn(config: EnvironmentConfigurationType) {
|
||||
// 需要观察
|
||||
// console.log(WorkerTag, "后置机消息", data)
|
||||
const res = await SerialPortService.getData()
|
||||
console.log(SerialPortTag, "档位原始数据", res)
|
||||
// console.log(SerialPortTag, "档位原始数据", res)
|
||||
if (res.length > 0) {
|
||||
const dataArray = data.split(",");
|
||||
// 替换data的第28位
|
||||
|
||||
@ -93,7 +93,7 @@ async function InitExam(dirName: string) {
|
||||
async function WriteProcessData(type: ProcessDataEnumType, data: string) {
|
||||
let result: LogWorkerMessage = JSON.parse(data)
|
||||
if (type === ProcessDataEnumType.WuxiExam) {
|
||||
writeQueue.push({ type, data: result.data });
|
||||
writeQueue.push({ type, data: result.data || "" });
|
||||
} else {
|
||||
writeQueue.push({ type, data });
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user