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