2025-04-11 09:06:08 +08:00
|
|
|
import router from '@ohos.router';
|
|
|
|
|
import Prompt from '@system.prompt';
|
|
|
|
|
import common from '@ohos.app.ability.common';
|
|
|
|
|
import DeductedPopup from './compontents/judge/DeductionPopup';
|
|
|
|
|
import AmplifyPopup from './compontents/judge/AmplifyPopup';
|
|
|
|
|
import Judge from './judgeSDK/judge';
|
|
|
|
|
import { uploadExamMileage } from '../api/judge';
|
|
|
|
|
import DwztErrorPopup from './compontents/judge/DwztErrorPopup';
|
|
|
|
|
import MsgPopup from './compontents/judge/MsgPopup';
|
2025-06-23 13:50:43 +08:00
|
|
|
import { JudgeConfig, JudgeTag } from '../config';
|
2025-04-11 09:06:08 +08:00
|
|
|
|
|
|
|
|
import {
|
2025-04-11 10:13:29 +08:00
|
|
|
AmplifyItem,
|
2025-06-20 16:42:34 +08:00
|
|
|
CARINFO,
|
2025-04-11 10:13:29 +08:00
|
|
|
CarInfoType,
|
2025-06-20 16:42:34 +08:00
|
|
|
CDSBInfo,
|
2025-04-11 10:13:29 +08:00
|
|
|
CDSBInfos,
|
|
|
|
|
DefaultJudgeConfigObj,
|
|
|
|
|
ES_CARINFOType,
|
|
|
|
|
ItemInfos,
|
|
|
|
|
JudgeBeginObj,
|
|
|
|
|
JudgeCallBacData,
|
|
|
|
|
JudgeInitObj,
|
2025-06-20 16:42:34 +08:00
|
|
|
LANE,
|
2025-04-11 10:13:29 +08:00
|
|
|
MA_CDSBINFOType,
|
|
|
|
|
MA_ITEMINFOType,
|
|
|
|
|
MA_SYSTEMPARMType,
|
2025-06-20 16:42:34 +08:00
|
|
|
MAPITEMPOINTITEM,
|
|
|
|
|
MAPPOINT,
|
2025-04-15 14:24:27 +08:00
|
|
|
MarkRule,
|
2025-04-11 10:13:29 +08:00
|
|
|
MarkRules,
|
|
|
|
|
MASYSSETTableType,
|
2025-06-20 16:42:34 +08:00
|
|
|
Project,
|
2025-04-11 10:13:29 +08:00
|
|
|
ProjectInfo,
|
|
|
|
|
ProjectInfos,
|
|
|
|
|
RouteParamsType,
|
|
|
|
|
SYSSET,
|
|
|
|
|
SyssetConfig,
|
2025-06-20 16:42:34 +08:00
|
|
|
SYSTEMPARMARR,
|
2025-07-16 15:44:49 +08:00
|
|
|
User,
|
2025-07-23 16:30:40 +08:00
|
|
|
ProcessDataEnumType,
|
|
|
|
|
PerLane
|
2025-04-11 09:06:08 +08:00
|
|
|
} from '../model';
|
|
|
|
|
import { GetSyncData } from '../utils/table/Operation';
|
|
|
|
|
import dayTs from '../utils/Date';
|
2025-07-02 15:53:11 +08:00
|
|
|
import { GetCurrentTime } from '../utils/Common';
|
2025-04-11 09:06:08 +08:00
|
|
|
import FileUtils from '../utils/FileUtils';
|
2025-06-19 18:03:14 +08:00
|
|
|
import SignalTrajectoryDialog from './Judge/SignalTrajectoryDialog';
|
2025-07-23 16:30:40 +08:00
|
|
|
import { DefaultJudgeConfigData, InitialPerLane, ProcessDataMock } from '../mock';
|
2025-06-23 17:24:47 +08:00
|
|
|
import { dConsole } from '../utils/LogWorker';
|
2025-06-26 17:28:28 +08:00
|
|
|
import ConfirmDialog from './compontents/ConfirmDialog';
|
|
|
|
|
import CarLoadingDialog from './compontents/CarLoading';
|
2025-07-02 10:41:49 +08:00
|
|
|
import HeaderComponent from './compontents/Header';
|
|
|
|
|
import MessageComponent from './Judge/Message';
|
|
|
|
|
import OperatingAreaComponent from './Judge/OperatingArea';
|
2025-07-02 15:53:11 +08:00
|
|
|
import JudgeAndProjectComponent from './Judge/JudgeAndProject';
|
|
|
|
|
import { GetIsExitManualProject } from './Judge/utils';
|
|
|
|
|
import { InitMapPoint, InitMapPointItem } from './Judge/TableUtils';
|
2025-04-11 09:06:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
@Entry
|
|
|
|
|
@Component
|
2025-06-23 13:50:43 +08:00
|
|
|
struct JudgePage {
|
2025-04-11 09:06:08 +08:00
|
|
|
@State wayno: number = 0
|
|
|
|
|
@State isDdxk: boolean = false;
|
|
|
|
|
//开始时间
|
|
|
|
|
@State startTime: string = '00:00:00'
|
|
|
|
|
@State startFullTime: string = ''
|
|
|
|
|
@State startHourTime: string = ''
|
|
|
|
|
@State startExamTime: string = ''
|
|
|
|
|
//科目类型
|
|
|
|
|
@State examSubject: string = '3';
|
|
|
|
|
@State ddxkTime: number = 0;
|
|
|
|
|
@State ddxkKsxmArr: string[] = []
|
|
|
|
|
@State ddxkKfArr: string[] = []
|
|
|
|
|
@State xmmcStr: string = ''
|
|
|
|
|
@State carztStr: string = ''
|
|
|
|
|
@State kfArr: MarkRule[] = []
|
|
|
|
|
@State name: string = ''
|
|
|
|
|
@State idCard: string = ''
|
|
|
|
|
@State singlePlay: boolean = false;
|
|
|
|
|
@State totalScore: number = 100
|
|
|
|
|
//模拟考试项目
|
|
|
|
|
@State projects: ProjectInfo[] = []
|
|
|
|
|
@State projectsObj: ProjectInfos = {}
|
|
|
|
|
@State projectsCenterObj: ProjectInfos = {}
|
|
|
|
|
@State markRuleListObj: MarkRules = {}
|
|
|
|
|
@State cdsbInfoObj?: CDSBInfos = {}
|
|
|
|
|
@State itemInfoObj?: ItemInfos = {}
|
|
|
|
|
@State timer: number = 0
|
|
|
|
|
@State judgeConfig: SyssetConfig[] = []
|
2025-06-23 11:13:58 +08:00
|
|
|
@State judgeConfigObj: DefaultJudgeConfigObj = DefaultJudgeConfigData
|
2025-04-11 09:06:08 +08:00
|
|
|
//流水号
|
|
|
|
|
@State lsh: string = ''
|
|
|
|
|
@State kszp: string = ''
|
|
|
|
|
@State ksdd: string = ''
|
|
|
|
|
@State kssycs: string = ''
|
|
|
|
|
@State ksxl: string = ''
|
|
|
|
|
@State kslx: string = ''
|
|
|
|
|
//监管线路代码
|
|
|
|
|
@State xldm: string = ''
|
|
|
|
|
//监管接口序列号
|
|
|
|
|
@State serialNumber: string = ''
|
|
|
|
|
@State syssetParam623: boolean = false;
|
|
|
|
|
@State syssetParam211: string = '';
|
|
|
|
|
@State carType: string = ''
|
|
|
|
|
@State carName: string = ''
|
|
|
|
|
@State isDeductedPopShow: boolean = false
|
|
|
|
|
@State isAmplifyPopShow: boolean = false
|
|
|
|
|
@State amplifiedImgIndex: number = 0
|
|
|
|
|
//行驶距离
|
|
|
|
|
@State jl: number = 0
|
|
|
|
|
//应考里程
|
|
|
|
|
@State examMileage: string = '0'
|
|
|
|
|
@State artSubject3Projects: string[] = ['直线', '会车', '变道', '超车', '掉头', '停车']
|
|
|
|
|
@State artSubject3ProjectsCodesArr: string[] = ['3', '9', '4', '10', '12', '11']
|
|
|
|
|
@State manualMarkRules: MarkRule[] = []
|
|
|
|
|
//科目三评判初始化数据
|
|
|
|
|
@State systemparmArr: SYSTEMPARMARR[] = []
|
|
|
|
|
@State mapPointItemArr: MAPITEMPOINTITEM[] = []
|
|
|
|
|
@State carinfoArr: CARINFO[] = []
|
|
|
|
|
@State mapPointArr: MAPPOINT[] = []
|
|
|
|
|
//手动项目是否在进行中
|
|
|
|
|
@State isManualProjectIn: boolean = false;
|
|
|
|
|
//项目是否进行中
|
|
|
|
|
@State isProjectIn: boolean = false;
|
|
|
|
|
//正在进行的项目代码
|
|
|
|
|
@State currentXmdm?: number = 0
|
|
|
|
|
// 必考项目除靠边停车是否全部完成
|
|
|
|
|
@State isRequiredProjectsEnd: boolean = false;
|
|
|
|
|
@State isAllProjectsEnd: boolean = false;
|
|
|
|
|
@State draw: boolean = false;
|
|
|
|
|
@State lane: LANE = { road: '', num: 0, count: 0 }
|
|
|
|
|
//定位差分状态时候正常
|
|
|
|
|
@State isDwztRight: boolean = true;
|
|
|
|
|
@State defaultTabIndex: number = 0;
|
|
|
|
|
//档位
|
|
|
|
|
@State dw: string = ''
|
|
|
|
|
//速度
|
|
|
|
|
@State sd: string = ''
|
|
|
|
|
@State mileageTimer: number = 0;
|
|
|
|
|
@State passingScore: number = 80
|
|
|
|
|
@State dwztErrorVisible: boolean = false;
|
2025-04-11 10:13:29 +08:00
|
|
|
@State popTimer: number | null = 0;
|
2025-04-11 09:06:08 +08:00
|
|
|
@State carlist: string = ''
|
|
|
|
|
@State errorMsg: string = ''
|
|
|
|
|
@State carInfo: CarInfoType = {}
|
|
|
|
|
@State isErrorMsgEnd: boolean = false
|
|
|
|
|
@State disConnectErrorOpen: boolean = false
|
2025-07-24 10:45:56 +08:00
|
|
|
@State @Watch("laneSignalChange") laneSignal: PerLane = InitialPerLane
|
2025-07-24 15:19:43 +08:00
|
|
|
laneSignalChange(){
|
|
|
|
|
dConsole.log("车道信号变化1",this.laneSignal)
|
2025-07-24 10:45:56 +08:00
|
|
|
}
|
2025-04-11 09:06:08 +08:00
|
|
|
public context = getContext(this) as common.UIAbilityContext;
|
2025-06-19 18:03:14 +08:00
|
|
|
// 信号查看弹窗
|
2025-06-26 17:28:28 +08:00
|
|
|
signalTrajectoryDialogController: CustomDialogController = new CustomDialogController({
|
2025-07-23 16:30:40 +08:00
|
|
|
builder: SignalTrajectoryDialog({
|
2025-07-24 15:19:43 +08:00
|
|
|
laneSignal: $laneSignal
|
2025-07-23 16:30:40 +08:00
|
|
|
}),
|
2025-06-19 18:03:14 +08:00
|
|
|
customStyle: true,
|
|
|
|
|
autoCancel: true
|
|
|
|
|
})
|
2025-06-26 17:28:28 +08:00
|
|
|
// 生成考试记录
|
|
|
|
|
generateExamRecordsDialogController: CustomDialogController = new CustomDialogController({
|
|
|
|
|
builder: CarLoadingDialog({
|
|
|
|
|
text: "正在生成考试记录,请稍等...",
|
|
|
|
|
}),
|
|
|
|
|
customStyle: true
|
|
|
|
|
})
|
2025-04-11 10:25:51 +08:00
|
|
|
private judge: Judge = new Judge(this)
|
2025-06-26 17:28:28 +08:00
|
|
|
// 结束考试弹窗
|
|
|
|
|
endExamDialogController: CustomDialogController = new CustomDialogController({
|
|
|
|
|
builder: ConfirmDialog({
|
|
|
|
|
text: "确认结束考试?",
|
|
|
|
|
onConfirm: async () => {
|
|
|
|
|
if (this.isErrorMsgEnd) {
|
2025-07-23 16:30:40 +08:00
|
|
|
dConsole.log(JudgeTag, "router back1")
|
2025-06-26 17:28:28 +08:00
|
|
|
router.back()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (Reflect.get(this.judgeConfigObj, '344') == 1) {
|
|
|
|
|
Prompt.showToast({
|
|
|
|
|
message: '考试未结束,不允许手动退出!',
|
|
|
|
|
duration: 4000
|
|
|
|
|
});
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.endExamDialogController.close()
|
|
|
|
|
// this.loadingPopupVisible = true
|
|
|
|
|
this.generateExamRecordsDialogController.open()
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
clearInterval(AppStorage.get('judgeTimer'))
|
|
|
|
|
try {
|
|
|
|
|
this.judge.checkExamIsEnd(true);
|
|
|
|
|
} catch (e) {
|
2025-07-23 16:30:40 +08:00
|
|
|
dConsole.log(JudgeTag, "router back2")
|
2025-06-26 17:28:28 +08:00
|
|
|
router.back()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}),
|
|
|
|
|
customStyle: true
|
|
|
|
|
})
|
2025-04-11 09:06:08 +08:00
|
|
|
|
|
|
|
|
async aboutToDisappear() {
|
2025-07-04 13:49:43 +08:00
|
|
|
this.generateExamRecordsDialogController.close()
|
2025-04-11 09:06:08 +08:00
|
|
|
clearInterval(this.mileageTimer)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async aboutToAppear() {
|
2025-04-11 10:13:29 +08:00
|
|
|
this.carInfo = AppStorage.get<CarInfoType>('carInfo')!
|
|
|
|
|
this.singlePlay = AppStorage.get<boolean>('singlePlay')!
|
2025-04-11 09:06:08 +08:00
|
|
|
this.startFullTime = GetCurrentTime(1);
|
2025-06-19 16:53:49 +08:00
|
|
|
this.startTime = dayTs().format("YYYY-MM-DD HH:mm:ss")
|
|
|
|
|
this.startExamTime = dayTs().format("YYYY-MM-DD HH:mm:ss")
|
2025-07-16 16:44:00 +08:00
|
|
|
// let count = 0;
|
|
|
|
|
// const totalTimes = 1000;
|
|
|
|
|
// const intervalTime = 100; // 0.1秒 = 100毫秒
|
|
|
|
|
//
|
|
|
|
|
// const timer = setInterval(() => {
|
|
|
|
|
// if (count < totalTimes) {
|
|
|
|
|
// dConsole.writeProcessData(ProcessDataEnumType.FourOneLogByteData, ProcessDataMock);
|
|
|
|
|
// dConsole.writeProcessData(ProcessDataEnumType.FourOneLogData, ProcessDataMock);
|
|
|
|
|
// dConsole.writeProcessData(ProcessDataEnumType.JudgeExamData, ProcessDataMock);
|
|
|
|
|
// dConsole.writeProcessData(ProcessDataEnumType.JudgeLogData, ProcessDataMock);
|
|
|
|
|
// dConsole.writeProcessData(ProcessDataEnumType.JudgeProgressCallbackData, ProcessDataMock);
|
|
|
|
|
// dConsole.writeProcessData(ProcessDataEnumType.PlcData, ProcessDataMock);
|
|
|
|
|
// dConsole.writeProcessData(ProcessDataEnumType.WuxiExam, ProcessDataMock);
|
|
|
|
|
// dConsole.writeProcessData(ProcessDataEnumType.WuxiProgressData, ProcessDataMock);
|
|
|
|
|
// count++;
|
|
|
|
|
// console.log(`已调用 ${count} 次`);
|
|
|
|
|
// } else {
|
|
|
|
|
// dConsole.closeProcessData()
|
|
|
|
|
// clearInterval(timer);
|
|
|
|
|
// console.log('已完成1000次调用');
|
|
|
|
|
// }
|
|
|
|
|
// }, intervalTime);
|
2025-04-11 09:06:08 +08:00
|
|
|
//初始化数据库表
|
|
|
|
|
await this.initDb()
|
|
|
|
|
//断点续考
|
|
|
|
|
await this.goDdxkItems()
|
|
|
|
|
//初始化评判
|
2025-04-11 10:25:51 +08:00
|
|
|
await this.initJudge();
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//初始化相关数据库表
|
|
|
|
|
async initDb() {
|
2025-04-11 10:13:29 +08:00
|
|
|
this.examSubject = this.carInfo.examSubject!;
|
2025-04-11 09:06:08 +08:00
|
|
|
await this.initStudent();
|
|
|
|
|
await this.initCar();
|
|
|
|
|
|
|
|
|
|
//是否开启轨迹回放模式
|
|
|
|
|
if (JudgeConfig.isTrajectoryOpen) {
|
|
|
|
|
this.initTrajectoryParam(JudgeConfig.trajectoryPath)
|
|
|
|
|
} else {
|
|
|
|
|
await this.initSystemParam()
|
|
|
|
|
await this.initMarkRules();
|
|
|
|
|
await this.initSysset();
|
|
|
|
|
}
|
|
|
|
|
await this.initCDSBInfo()
|
|
|
|
|
await this.initItemInfo()
|
|
|
|
|
|
|
|
|
|
// 科目三新增读取表数据
|
|
|
|
|
if (this.examSubject == '3') {
|
2025-07-02 15:53:11 +08:00
|
|
|
this.mapPointArr = await InitMapPoint()
|
|
|
|
|
this.mapPointItemArr = await InitMapPointItem()
|
2025-04-11 09:06:08 +08:00
|
|
|
//定时上传考试里程
|
|
|
|
|
// let mileageTimer = setInterval(()=>{
|
|
|
|
|
// this.uploadMileage()
|
|
|
|
|
// },5000)
|
|
|
|
|
// this.mileageTimer = mileageTimer
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 查询考车信息
|
|
|
|
|
async initCar() {
|
|
|
|
|
const result = await GetSyncData<ES_CARINFOType>("ES_CARINFO")
|
|
|
|
|
const carInfo = result[0] || {};
|
2025-04-11 10:13:29 +08:00
|
|
|
this.carName = decodeURI(carInfo.carclass!)
|
2025-06-23 17:24:47 +08:00
|
|
|
dConsole.log(JudgeTag, "查看carType", carInfo.cartype)
|
2025-04-11 10:13:29 +08:00
|
|
|
this.carType = carInfo.kscx!
|
2025-04-11 09:06:08 +08:00
|
|
|
this.carinfoArr.push({
|
2025-04-11 10:13:29 +08:00
|
|
|
CARID: carInfo.carid!,
|
2025-04-11 09:06:08 +08:00
|
|
|
IPADDR: '',
|
2025-04-11 10:13:29 +08:00
|
|
|
CARCLASS: decodeURI(carInfo.carclass!),
|
|
|
|
|
KSCX: carInfo.kscx!,
|
2025-04-11 09:06:08 +08:00
|
|
|
// CARNAME: decodeURI(carInfo.carname),
|
|
|
|
|
CARNAME: "",
|
2025-04-11 10:13:29 +08:00
|
|
|
FLAG: carInfo.flag!,
|
|
|
|
|
BK1: carInfo.bk1!,
|
|
|
|
|
BK2: carInfo.bk2!,
|
2025-04-11 09:06:08 +08:00
|
|
|
})
|
2025-06-23 17:24:47 +08:00
|
|
|
dConsole.info(JudgeTag, 'surenjun =>carinfoArrr', JSON.stringify(this.carinfoArr))
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取考生信息
|
|
|
|
|
async initStudent() {
|
|
|
|
|
const students = await GetSyncData<User>('USER')
|
|
|
|
|
const stuInfo = students[0];
|
|
|
|
|
this.name = stuInfo.xm || '测试考生';
|
|
|
|
|
this.idCard = stuInfo.sfzmhm || '01234567891010';
|
|
|
|
|
this.lsh = this.singlePlay ? '0000000000000' : stuInfo.lsh;
|
|
|
|
|
this.kszp = stuInfo.kszp;
|
|
|
|
|
this.ksdd = stuInfo.ksdd;
|
|
|
|
|
this.kssycs = stuInfo.kssycs;
|
|
|
|
|
this.ksxl = stuInfo.ksxl;
|
|
|
|
|
this.wayno = Number(stuInfo.ksxl);
|
|
|
|
|
this.xldm = stuInfo.xldm;
|
2025-04-11 10:13:29 +08:00
|
|
|
this.kslx = stuInfo.kslx!;
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取扣分代码信息
|
|
|
|
|
async initMarkRules(markRules ?: MarkRule[]) {
|
|
|
|
|
const markRuleParams = markRules || await GetSyncData<MarkRule>('MA_MARKRULE')
|
|
|
|
|
|
|
|
|
|
markRuleParams.forEach(mark => {
|
|
|
|
|
const tempObj: MarkRule = {
|
2025-04-11 10:13:29 +08:00
|
|
|
itemno: Number(mark.itemno),
|
2025-04-11 09:06:08 +08:00
|
|
|
markcatalog: mark.markcatalog,
|
2025-04-11 10:13:29 +08:00
|
|
|
markshow: decodeURI(mark.markshow!),
|
|
|
|
|
markreal: Number(mark.markreal!),
|
2025-04-11 09:06:08 +08:00
|
|
|
markserial: mark.markserial,
|
|
|
|
|
kfxh: mark.kfxh,
|
2025-04-11 10:13:29 +08:00
|
|
|
OnlyOneKind: Number(mark.onlyoneid!),
|
|
|
|
|
NoCancelId: Number(mark.nocancelid!),
|
2025-04-11 09:06:08 +08:00
|
|
|
GPS_SID: mark.gps_sid == 0 ? false : true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//筛选出人工评判的扣分
|
|
|
|
|
if (Number(tempObj.markserial) > 100 && Number(tempObj.markserial) < 200) {
|
|
|
|
|
this.manualMarkRules.push(tempObj)
|
|
|
|
|
}
|
|
|
|
|
tempObj.markserial = mark.markserial
|
|
|
|
|
Reflect.set(this.markRuleListObj, `${mark.itemno}_${mark.markserial}`, tempObj)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取sysset表信息
|
|
|
|
|
async initSysset(sysset?: SYSSET[]) {
|
|
|
|
|
const syssetParams: SYSSET[] | MASYSSETTableType[] = sysset || await GetSyncData<MASYSSETTableType>('MA_SYSSET')
|
|
|
|
|
const serialNumberArr = (syssetParams as SYSSET[]).filter(sys => sys.v_no === '901');
|
2025-06-23 17:24:47 +08:00
|
|
|
dConsole.info(JudgeTag, 'surenjun serialNumberArr' + JSON.stringify(serialNumberArr))
|
2025-04-11 09:06:08 +08:00
|
|
|
this.serialNumber = (serialNumberArr[0] && serialNumberArr[0].v_value) || '';
|
|
|
|
|
const syssetJudgeConfigArr: SyssetConfig[] = []
|
|
|
|
|
|
2025-04-11 10:13:29 +08:00
|
|
|
syssetParams.forEach((sys: SYSSET | MASYSSETTableType) => {
|
2025-04-11 09:06:08 +08:00
|
|
|
if (JudgeConfig.isTrajectoryOpen) {
|
2025-04-11 10:13:29 +08:00
|
|
|
sys.v_no = String((sys as SYSSET).key!);
|
|
|
|
|
sys.v_name = (sys as SYSSET).name!;
|
|
|
|
|
sys.v_value = (sys as SYSSET).value!
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const v_no_num = Number(sys.v_no)
|
2025-04-11 10:13:29 +08:00
|
|
|
const value = decodeURIComponent(sys.v_value!)
|
2025-04-11 09:06:08 +08:00
|
|
|
if (v_no_num >= 10 && v_no_num <= 900) {
|
|
|
|
|
const name =
|
|
|
|
|
syssetJudgeConfigArr.push({
|
|
|
|
|
key: v_no_num, value: value,
|
2025-04-11 10:13:29 +08:00
|
|
|
name: decodeURI(sys.v_name!)
|
2025-04-11 09:06:08 +08:00
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//623 考试中是否可以查看轨迹画面(0-否+1-是)
|
|
|
|
|
if (sys.v_no == '623') {
|
|
|
|
|
this.syssetParam623 = value == '1' ? true : false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//科目三应行驶距离参数
|
|
|
|
|
if (sys.v_no == '303') {
|
|
|
|
|
this.examMileage = this.examMileage == '0' ? (sys.v_value + '') : this.examMileage;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// //地点版本参数
|
|
|
|
|
// if (sys.v_no == '211') {
|
|
|
|
|
// this.syssetParam211 = decodeURIComponent(sys.v_value + '')
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//364 绕车一周评判时机(1-开始考试后判 2-开始考试前判)
|
|
|
|
|
if (sys.v_no == '364' && sys.v_value == "2") {
|
|
|
|
|
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
|
|
|
|
const kfdm = currentParams.kfdm;
|
2025-04-11 10:13:29 +08:00
|
|
|
currentParams.kfdm?.forEach(kf => {
|
2025-04-11 09:06:08 +08:00
|
|
|
const currentKf: MarkRule = Reflect.get(this.markRuleListObj, `${kf.xmdm}_${kf.kfdm}`)
|
|
|
|
|
const currentProject: ProjectInfo = Reflect.get(this.projectsObj, kf.xmdm)
|
|
|
|
|
// 过滤考前绕车一周上车准备的扣分
|
|
|
|
|
if (currentParams.sczb == "1" && kf.xmdm == 1) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.kfArr.push({
|
|
|
|
|
//扣分项目名称
|
|
|
|
|
xmmcStr: currentProject.name,
|
2025-04-11 10:13:29 +08:00
|
|
|
xmdm: kf.xmdm + "",
|
2025-04-11 09:06:08 +08:00
|
|
|
desc: currentKf.markshow,
|
|
|
|
|
score: currentKf.markreal,
|
|
|
|
|
markcatalog: currentKf.markcatalog,
|
|
|
|
|
markserial: currentKf.markserial,
|
|
|
|
|
kfxh: currentKf.kfxh
|
|
|
|
|
})
|
2025-04-11 10:13:29 +08:00
|
|
|
this.totalScore += Number(currentKf!.markreal);
|
2025-04-11 09:06:08 +08:00
|
|
|
})
|
2025-04-11 10:13:29 +08:00
|
|
|
const project_1: ProjectInfo = Reflect.get(this.projectsObj, 1)
|
|
|
|
|
project_1.type = kfdm!.length ? '4' : '3';
|
2025-04-11 09:06:08 +08:00
|
|
|
Reflect.set(this.projectsObj, 1, project_1)
|
|
|
|
|
}
|
2025-04-11 10:13:29 +08:00
|
|
|
Reflect.set(this.judgeConfigObj, sys.v_no!, value)
|
2025-04-11 09:06:08 +08:00
|
|
|
});
|
|
|
|
|
this.judgeConfig = syssetJudgeConfigArr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//初始化systemParam表
|
2025-04-11 10:13:29 +08:00
|
|
|
async initSystemParam(sysParam?: MA_SYSTEMPARMType []) {
|
2025-04-11 09:06:08 +08:00
|
|
|
let systemParms: MA_SYSTEMPARMType[] = sysParam || await GetSyncData<MA_SYSTEMPARMType>('MA_SYSTEMPARM')
|
|
|
|
|
|
|
|
|
|
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
|
|
|
|
//小车车型列表
|
|
|
|
|
const sCarTypes = ['C1', 'C2', 'C5']
|
|
|
|
|
if (this.singlePlay) {
|
|
|
|
|
this.wayno = Number(currentParams.wayno) || 1;
|
|
|
|
|
}
|
|
|
|
|
//真实监管下发的项目
|
|
|
|
|
let kStringArr: string[] = (currentParams.kString?.split(',') || []).filter(item => item);
|
2025-06-23 17:24:47 +08:00
|
|
|
dConsole.info(JudgeTag, 'surenjun kStringArr', JSON.stringify(kStringArr))
|
2025-04-11 09:06:08 +08:00
|
|
|
let isInExam = kStringArr.length > 0;
|
|
|
|
|
let carNo = '', allItems: string[] = [];
|
|
|
|
|
systemParms.forEach((systemParm) => {
|
|
|
|
|
if (JudgeConfig.isTrajectoryOpen) {
|
2025-04-11 10:13:29 +08:00
|
|
|
systemParm.no1 = systemParm.NO1! + '';
|
|
|
|
|
systemParm.no2 = systemParm.NO2! + '';
|
|
|
|
|
systemParm.no3 = systemParm.NO3! + '';
|
|
|
|
|
systemParm.txt1 = systemParm.TXT1!;
|
|
|
|
|
systemParm.txt2 = systemParm.TXT2!;
|
|
|
|
|
systemParm.txt3 = systemParm.TXT3!;
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
2025-04-15 14:24:27 +08:00
|
|
|
const txt1 = decodeURI(systemParm.txt1 || "")
|
|
|
|
|
const txt2 = decodeURI(systemParm.txt2 || "")
|
2025-04-11 09:06:08 +08:00
|
|
|
|
|
|
|
|
const no1 = systemParm.no1;
|
|
|
|
|
const no2 = systemParm.no2;
|
|
|
|
|
const no3 = systemParm.no3;
|
|
|
|
|
|
|
|
|
|
//获取当前考车的no2
|
|
|
|
|
if (systemParm.no1 == "3" && systemParm.no3 == "1") {
|
|
|
|
|
if (txt1 === this.carName) {
|
2025-04-15 14:24:27 +08:00
|
|
|
carNo = systemParm?.no2 || ""
|
2025-04-11 09:06:08 +08:00
|
|
|
this.carlist = carNo
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取及格分数线
|
|
|
|
|
if (systemParm.no1 == "3" && systemParm.no3 == "3" && carNo === systemParm.no2) {
|
|
|
|
|
this.passingScore = Number(txt1) || 0;
|
|
|
|
|
}
|
|
|
|
|
//根据车型获取应行驶里程数
|
|
|
|
|
if (systemParm.no1 == "3" && systemParm.no3 == "15" && carNo === systemParm.no2) {
|
2025-04-15 14:24:27 +08:00
|
|
|
this.examMileage = ((decodeURI(systemParm.txt1 || "")) || '').split('^')[0];
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
//获取当前考车的考试项目
|
|
|
|
|
if (carNo !== '' && systemParm.no1 == "3" && systemParm.no2 == carNo && systemParm.no3 == "10") {
|
2025-04-15 14:24:27 +08:00
|
|
|
allItems = decodeURIComponent(systemParm.txt1 || "").split(',').filter(txt => txt !== '')
|
2025-06-26 16:13:33 +08:00
|
|
|
dConsole.info(JudgeTag, '考试项目', allItems)
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
|
//科目二获取项目
|
2025-04-15 14:24:27 +08:00
|
|
|
(this.examSubject == "2" && allItems.length && systemParm.no1 == '6' && allItems.includes(systemParm?.no2 || ""))
|
2025-04-11 09:06:08 +08:00
|
|
|
||
|
|
|
|
|
//科目三获取项目
|
|
|
|
|
(this.examSubject == "3" && systemParm.no1 == "6")
|
|
|
|
|
) {
|
2025-04-15 14:24:27 +08:00
|
|
|
const name = decodeURI(systemParm.txt1 || "")
|
2025-04-11 09:06:08 +08:00
|
|
|
//小车过滤掉 夜间模拟行驶
|
|
|
|
|
if (sCarTypes.includes(this.carType) && name === '夜间行驶') {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
const currentProject: ProjectInfo = {
|
|
|
|
|
name,
|
2025-04-15 14:24:27 +08:00
|
|
|
abbreviation: decodeURI(systemParm.txt3 || ""),
|
2025-04-11 09:06:08 +08:00
|
|
|
projectCode: no2,
|
|
|
|
|
projectCodeCenter: txt2,
|
|
|
|
|
//是否是必考 加减档设置成非必考
|
|
|
|
|
isRequired: no2 == '14' ? false : allItems.includes(no2 + ''),
|
|
|
|
|
//是否考过了
|
|
|
|
|
isEnd: false,
|
|
|
|
|
//项目开始数据是否上传过
|
|
|
|
|
isUpload: false,
|
|
|
|
|
}
|
|
|
|
|
const no2Num = Number(systemParm.no2)
|
|
|
|
|
//真实监管下发考试项目
|
|
|
|
|
if (isInExam && !(kStringArr.includes(txt2) || kStringArr.includes(no2 + ''))) {
|
2025-06-23 17:24:47 +08:00
|
|
|
dConsole.info(JudgeTag, 'surenjun =>', txt2)
|
|
|
|
|
dConsole.info(JudgeTag, 'surenjun => no2', systemParm.no2)
|
2025-04-11 09:06:08 +08:00
|
|
|
currentProject.type = '3'
|
|
|
|
|
currentProject.isUpload = true
|
|
|
|
|
currentProject.isEnd = true
|
|
|
|
|
this.ddxkKsxmArr.push(txt2)
|
|
|
|
|
}
|
|
|
|
|
Reflect.set(this.projectsObj, no2Num, currentProject)
|
|
|
|
|
Reflect.set(this.projectsCenterObj, txt2, currentProject)
|
|
|
|
|
this.projects.push(currentProject);
|
|
|
|
|
}
|
|
|
|
|
this.systemparmArr.push({
|
2025-06-20 16:42:34 +08:00
|
|
|
NO1: Number(systemParm.no1),
|
|
|
|
|
NO2: Number(systemParm.no2),
|
|
|
|
|
NO3: Number(systemParm.no3),
|
|
|
|
|
TXT1: decodeURIComponent(systemParm.txt1 || ""),
|
|
|
|
|
TXT2: decodeURIComponent(systemParm.txt2 || ""),
|
|
|
|
|
TXT3: decodeURIComponent(systemParm.txt3 || ""),
|
2025-04-11 09:06:08 +08:00
|
|
|
})
|
|
|
|
|
})
|
2025-07-21 10:00:55 +08:00
|
|
|
dConsole.log(JudgeTag, "考试项目", JSON.stringify(this.projects))
|
2025-06-27 14:33:38 +08:00
|
|
|
if (!this.projects.length) {
|
2025-04-11 09:06:08 +08:00
|
|
|
Prompt.showToast({
|
|
|
|
|
message: '读取数据库信息失败,请重新联网更新!',
|
|
|
|
|
duration: 8000
|
|
|
|
|
});
|
2025-07-23 16:30:40 +08:00
|
|
|
dConsole.log(JudgeTag, "router back3")
|
2025-04-11 09:06:08 +08:00
|
|
|
router.back();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取场地设备信息
|
|
|
|
|
async initCDSBInfo() {
|
|
|
|
|
const cdsbParams: MA_CDSBINFOType[] = await GetSyncData<MA_CDSBINFOType>('MA_CDSBINFO')
|
|
|
|
|
//只记录考试项目的模型
|
|
|
|
|
const projectsObj = this.projectsObj
|
|
|
|
|
cdsbParams.forEach((cdsb) => {
|
2025-04-15 14:24:27 +08:00
|
|
|
const key = decodeURI(cdsb.itemsno || "")
|
2025-04-11 09:06:08 +08:00
|
|
|
const newKey = key.split('~').join('_')
|
|
|
|
|
const xmdm = Number(key.split('~')[0])
|
|
|
|
|
const currentProject: ProjectInfo = Reflect.get(projectsObj, xmdm)
|
|
|
|
|
if (currentProject) {
|
|
|
|
|
const cdsbInfo: CDSBInfo = {
|
|
|
|
|
kdid: cdsb.kdid,
|
|
|
|
|
sbbh: cdsb.sbbh,
|
|
|
|
|
sbbm: cdsb.sbbm,
|
|
|
|
|
itemsno: key,
|
|
|
|
|
modelKey: newKey,
|
|
|
|
|
xmdm,
|
|
|
|
|
xmxh: key.split('~')[1],
|
|
|
|
|
}
|
2025-04-11 10:13:29 +08:00
|
|
|
Reflect.set(this.cdsbInfoObj!, newKey, cdsbInfo)
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取itemInfo表信息
|
|
|
|
|
async initItemInfo() {
|
|
|
|
|
const infoParams: MA_ITEMINFOType[] = await GetSyncData<MA_ITEMINFOType>('MA_ITEMINFO');
|
|
|
|
|
const carlist = this.carlist;
|
|
|
|
|
const projectsObj = this.projectsObj
|
|
|
|
|
infoParams.forEach((info) => {
|
2025-04-15 14:24:27 +08:00
|
|
|
const key = decodeURI(info.itemsno || "");
|
|
|
|
|
const carlistArr = info.carlist === '' ? [] : (decodeURI(info.carlist || "").split(',') || []);
|
2025-04-11 09:06:08 +08:00
|
|
|
const newKey = key.split('~').join('_')
|
|
|
|
|
const xmdm = Number(key.split('~')[0])
|
|
|
|
|
const currentProject: ProjectInfo = Reflect.get(projectsObj, xmdm)
|
|
|
|
|
if (currentProject && (carlistArr.length == 0 || carlistArr.includes(carlist))) {
|
2025-04-11 10:13:29 +08:00
|
|
|
Reflect.set(this.itemInfoObj!, newKey, {
|
2025-04-11 09:06:08 +08:00
|
|
|
modelKey: newKey,
|
|
|
|
|
xmdm,
|
|
|
|
|
xmxh: key.split('~')[1],
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 评判相关初始化
|
|
|
|
|
async initJudge() {
|
2025-04-11 10:25:51 +08:00
|
|
|
await this.judge.onJudgeFn(async (judgeData: JudgeCallBacData) => {
|
2025-04-11 10:13:29 +08:00
|
|
|
this.xmmcStr = judgeData.xmmcStr || "";
|
|
|
|
|
this.carztStr = judgeData.carztStr || "";
|
2025-06-27 14:33:38 +08:00
|
|
|
dConsole.log(JudgeTag, "扣分", judgeData.kfArr)
|
2025-04-11 10:13:29 +08:00
|
|
|
this.kfArr = judgeData.kfArr || [];
|
2025-04-11 09:06:08 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 断点续考判断
|
|
|
|
|
async goDdxkItems() {
|
|
|
|
|
const judgeConfigObj = this.judgeConfigObj
|
|
|
|
|
|
|
|
|
|
const config_432: string = Reflect.get(judgeConfigObj, '432')
|
|
|
|
|
//科目二强制开始断点续考
|
|
|
|
|
if (config_432 != '0' || this.examSubject == "2") {
|
|
|
|
|
//断点续考判断
|
|
|
|
|
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
2025-04-11 10:13:29 +08:00
|
|
|
const examItems: string | undefined = currentParams?.examItems;
|
2025-04-11 09:06:08 +08:00
|
|
|
// 2024-01-03 16:29:26;0;20300,;2,4^2,4;null;
|
|
|
|
|
if (examItems !== '' && examItems !== undefined) {
|
2025-06-23 17:24:47 +08:00
|
|
|
dConsole.info(JudgeTag, 'surenjun examItems=>', JSON.stringify(examItems))
|
2025-04-11 09:06:08 +08:00
|
|
|
const examItemsArrs = examItems.split(';');
|
|
|
|
|
const startTime = examItemsArrs[0]
|
|
|
|
|
const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
|
|
|
|
|
const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || []
|
|
|
|
|
if (config_432 == '2' || this.examSubject == "2") {
|
|
|
|
|
//TODO 带项目带里程
|
|
|
|
|
if (ddxkKsxmArr?.length) {
|
|
|
|
|
//断点续考
|
|
|
|
|
ddxkKsxmArr.forEach(xmdm => {
|
|
|
|
|
const currentProjectCenter: Project = Reflect.get(this.projectsCenterObj, xmdm)
|
|
|
|
|
const projectCode = currentProjectCenter.projectCode
|
|
|
|
|
const currentProject: Project = Reflect.get(this.projectsObj, projectCode)
|
|
|
|
|
if (currentProject) {
|
|
|
|
|
currentProject.type = '3'
|
|
|
|
|
currentProject.isUpload = true
|
|
|
|
|
currentProject.isEnd = true
|
|
|
|
|
Reflect.set(this.projectsObj, projectCode, currentProject)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.ddxkKsxmArr = ddxkKsxmArr
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//扣分续考
|
|
|
|
|
ddxkKfArr.forEach((kf) => {
|
|
|
|
|
const xmdm = kf.split(',')[0]
|
|
|
|
|
const kfdm = kf.split(',')[1]
|
|
|
|
|
const currentKf: MarkRule = Reflect.get(this.markRuleListObj, `${xmdm}_${kfdm}`)
|
|
|
|
|
const currentProject: ProjectInfo = Reflect.get(this.projectsObj, xmdm) || { name: '通用评判' }
|
|
|
|
|
|
|
|
|
|
if (currentProject) {
|
|
|
|
|
currentProject.type = '4'
|
|
|
|
|
Reflect.set(this.projectsObj, xmdm, currentProject)
|
|
|
|
|
}
|
|
|
|
|
this.kfArr.push({
|
|
|
|
|
//扣分项目名称
|
|
|
|
|
xmmcStr: currentProject.name,
|
|
|
|
|
desc: currentKf.markshow,
|
|
|
|
|
score: currentKf.markreal,
|
|
|
|
|
markcatalog: currentKf.markcatalog,
|
|
|
|
|
markserial: currentKf.markserial,
|
|
|
|
|
kfxh: currentKf.kfxh
|
|
|
|
|
})
|
2025-04-11 10:13:29 +08:00
|
|
|
this.totalScore += Number(currentKf.markreal!)
|
2025-04-11 09:06:08 +08:00
|
|
|
})
|
|
|
|
|
this.ddxkKfArr = ddxkKfArr
|
|
|
|
|
this.ddxkTime = Date.parse(startTime);
|
|
|
|
|
this.isDdxk = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 初始化本地systemparam表、markrule表
|
|
|
|
|
async initTrajectoryParam(trajectoryPath: string) {
|
|
|
|
|
const isTrajectoryOpen = JudgeConfig.isTrajectoryOpen
|
|
|
|
|
//轨迹回放读取 systemparam表、markrule表
|
|
|
|
|
const fileUtil = new FileUtils(this.context);
|
|
|
|
|
const folderPath = await fileUtil.initFolder(trajectoryPath);
|
|
|
|
|
const str = await fileUtil.readFile(folderPath);
|
|
|
|
|
const strArr = str.split('\n');
|
|
|
|
|
const initData = strArr[0]
|
|
|
|
|
const beginData = strArr[1]
|
|
|
|
|
|
|
|
|
|
const initDataObj: JudgeInitObj = JSON.parse(initData)
|
|
|
|
|
const beginDataObj: JudgeBeginObj = JSON.parse(beginData)
|
|
|
|
|
|
|
|
|
|
const examSubject = this.carInfo.examSubject;
|
|
|
|
|
this.examSubject = (isTrajectoryOpen ? (initDataObj.kskm) : examSubject) + '';
|
|
|
|
|
this.carInfo.examSubject = this.examSubject
|
|
|
|
|
this.singlePlay = beginDataObj.exam == 0;
|
|
|
|
|
this.carName = initDataObj.name;
|
2025-04-11 10:13:29 +08:00
|
|
|
await this.initSystemParam(initDataObj.systemparm as MA_SYSTEMPARMType[])
|
2025-04-11 09:06:08 +08:00
|
|
|
await this.initMarkRules(initDataObj.mark);
|
2025-04-11 10:13:29 +08:00
|
|
|
await this.initSysset(initDataObj.sysset as SYSSET[]);
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 上传考试里程
|
|
|
|
|
async uploadMileage() {
|
|
|
|
|
if (!this.singlePlay) {
|
|
|
|
|
const carInfo = this.carInfo
|
|
|
|
|
|
|
|
|
|
await uploadExamMileage({
|
2025-04-11 10:13:29 +08:00
|
|
|
carId: carInfo.carId!,
|
|
|
|
|
examinationRoomId: carInfo.examinationRoomId!,
|
2025-04-11 09:06:08 +08:00
|
|
|
lsh: this.lsh,
|
|
|
|
|
kskssj: this.startExamTime,
|
|
|
|
|
kslc: this.jl
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-07-02 10:41:49 +08:00
|
|
|
// 信号区域
|
|
|
|
|
@Builder
|
|
|
|
|
logoExpansionBuilder() {
|
|
|
|
|
Image($rawfile(this.isDwztRight ? 'judge/xh_green.png' : 'judge/xh_red.png')).width(50).margin({
|
|
|
|
|
left: 10
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 当前项目
|
|
|
|
|
@Builder
|
|
|
|
|
backAreaBuilder() {
|
|
|
|
|
Text(`当前项目:${this.xmmcStr || '无'} `).fontColor('#E5CCA1').fontSize(34)
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-11 09:06:08 +08:00
|
|
|
build() {
|
|
|
|
|
Column() {
|
2025-06-27 14:33:38 +08:00
|
|
|
// 顶部
|
2025-07-02 10:41:49 +08:00
|
|
|
HeaderComponent({
|
2025-07-24 10:20:54 +08:00
|
|
|
logoExpansionBuilder: () => {
|
|
|
|
|
this.logoExpansionBuilder()
|
|
|
|
|
},
|
2025-07-02 10:41:49 +08:00
|
|
|
customizeReturnArea: true,
|
2025-07-24 10:20:54 +08:00
|
|
|
backAreaBuilder: () => {
|
|
|
|
|
this.backAreaBuilder()
|
|
|
|
|
}
|
2025-07-02 10:41:49 +08:00
|
|
|
})
|
2025-04-11 09:06:08 +08:00
|
|
|
Row() {
|
|
|
|
|
Row() {
|
|
|
|
|
Column() {
|
2025-07-02 10:41:49 +08:00
|
|
|
// 考生信息展示区域
|
|
|
|
|
MessageComponent({
|
|
|
|
|
name: this.name,
|
|
|
|
|
idCard: this.idCard,
|
|
|
|
|
startTime: this.startTime,
|
|
|
|
|
examSubject: this.examSubject,
|
|
|
|
|
examMileage: this.examMileage,
|
|
|
|
|
jl: this.jl,
|
|
|
|
|
wayno: this.wayno,
|
|
|
|
|
judgeConfigObj: this.judgeConfigObj,
|
|
|
|
|
})
|
2025-07-02 15:53:11 +08:00
|
|
|
// 扣分列表和评判列表
|
|
|
|
|
JudgeAndProjectComponent({
|
|
|
|
|
carztStr: this.carztStr,
|
|
|
|
|
judgeConfigObj: this.judgeConfigObj,
|
|
|
|
|
dw: this.dw,
|
|
|
|
|
sd: this.sd,
|
|
|
|
|
kfArr: this.kfArr,
|
|
|
|
|
examSubject: this.examSubject,
|
|
|
|
|
projects: this.projects,
|
|
|
|
|
artSubject3Projects: this.artSubject3Projects,
|
|
|
|
|
artSubject3ProjectsCodesArr: this.artSubject3ProjectsCodesArr,
|
|
|
|
|
projectsObj: this.projectsObj,
|
|
|
|
|
isManualProjectIn: this.isManualProjectIn,
|
|
|
|
|
isProjectIn: this.isProjectIn,
|
|
|
|
|
jl: this.jl,
|
|
|
|
|
examMileage: this.examMileage,
|
|
|
|
|
isRequiredProjectsEnd: this.isRequiredProjectsEnd,
|
|
|
|
|
lane: this.lane,
|
|
|
|
|
examClick: (index: number) => {
|
|
|
|
|
this.setManualProjectFn(index)
|
|
|
|
|
}
|
|
|
|
|
})
|
2025-04-11 09:06:08 +08:00
|
|
|
}.height('100%').alignItems(HorizontalAlign.Start)
|
|
|
|
|
}.width('75%').height('100%')
|
|
|
|
|
|
2025-07-02 10:41:49 +08:00
|
|
|
// 操作区域,分数显示区域
|
|
|
|
|
OperatingAreaComponent({
|
|
|
|
|
totalScore: this.totalScore,
|
|
|
|
|
kszp: this.kszp,
|
|
|
|
|
examSubject: this.examSubject,
|
|
|
|
|
singlePlay: this.singlePlay,
|
|
|
|
|
judgeConfigObj: this.judgeConfigObj,
|
|
|
|
|
signalViewingClick: () => {
|
2025-07-16 16:44:00 +08:00
|
|
|
dConsole.writeProcessData(ProcessDataEnumType.FourOneLogByteData, '测试测试')
|
2025-07-02 10:41:49 +08:00
|
|
|
this.signalTrajectoryDialogController.open()
|
|
|
|
|
},
|
|
|
|
|
artificialEvaluationClick: () => {
|
|
|
|
|
this.isDeductedPopShow = true
|
|
|
|
|
},
|
|
|
|
|
endTheExamClick: () => {
|
|
|
|
|
this.endExamDialogController.open()
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
2025-07-02 10:41:49 +08:00
|
|
|
})
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
.height('90%')
|
|
|
|
|
.justifyContent(FlexAlign.Start)
|
|
|
|
|
.padding({
|
|
|
|
|
top: 37,
|
|
|
|
|
left: 60,
|
|
|
|
|
bottom: 35,
|
|
|
|
|
right: 60
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//科目三人工扣分弹窗
|
|
|
|
|
if (this.isDeductedPopShow && this.examSubject == '3' && Reflect.get(this.judgeConfigObj, '342') == '0') {
|
|
|
|
|
DeductedPopup({
|
|
|
|
|
defaultTabIndex: this.defaultTabIndex,
|
2025-04-11 10:13:29 +08:00
|
|
|
// currentItems: Reflect.ownKeys(this.projectsObj).map(projectKey => {
|
|
|
|
|
// const project: ProjectInfo = Reflect.get(this.projectsObj, projectKey)
|
|
|
|
|
// return project.type == '2' ? project.projectCode : undefined
|
|
|
|
|
// }).filter(project => project !== undefined),
|
|
|
|
|
currentItems: Object.entries(this.projectsObj).filter((item: [string, ProjectInfo]) => {
|
|
|
|
|
return item[1].type === '2'
|
|
|
|
|
}).map((item: [string, ProjectInfo]) => item[1].projectCode!),
|
2025-04-11 09:06:08 +08:00
|
|
|
markRules: this.manualMarkRules,
|
|
|
|
|
closePopup: () => {
|
|
|
|
|
this.isDeductedPopShow = false;
|
|
|
|
|
this.defaultTabIndex = 0;
|
|
|
|
|
},
|
2025-07-04 10:50:33 +08:00
|
|
|
confirmMark: async (item: string, serial: string) => {
|
2025-04-11 09:06:08 +08:00
|
|
|
clearTimeout(this.popTimer)
|
|
|
|
|
this.popTimer = setTimeout(async () => {
|
|
|
|
|
const judge = this.judge
|
2025-07-04 10:50:33 +08:00
|
|
|
await judge.setJudgeMark(item, serial);
|
2025-04-11 09:06:08 +08:00
|
|
|
this.isDeductedPopShow = false
|
|
|
|
|
this.popTimer = null;
|
|
|
|
|
}, 500)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//科目三人工项目确认框
|
|
|
|
|
if (this.isAmplifyPopShow && this.examSubject == '3') {
|
|
|
|
|
AmplifyPopup({
|
|
|
|
|
amplifyImgIndex: this.amplifiedImgIndex,
|
|
|
|
|
confirmAmplify: async (amplify: AmplifyItem) => {
|
|
|
|
|
clearTimeout(this.popTimer)
|
|
|
|
|
this.popTimer = setTimeout(async () => {
|
|
|
|
|
const judge = this.judge
|
|
|
|
|
await judge.setJudgeItem(amplify.projectCode, 1);
|
|
|
|
|
this.isAmplifyPopShow = false
|
|
|
|
|
this.popTimer = null;
|
|
|
|
|
}, 500)
|
|
|
|
|
},
|
|
|
|
|
closeAmplifyPop: () => {
|
|
|
|
|
this.isAmplifyPopShow = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.errorMsg) {
|
|
|
|
|
MsgPopup({
|
|
|
|
|
title: this.errorMsg,
|
|
|
|
|
confirmFn: () => {
|
|
|
|
|
this.errorMsg = ''
|
|
|
|
|
this.isErrorMsgEnd = true;
|
|
|
|
|
if (this.disConnectErrorOpen) {
|
|
|
|
|
this.context.terminateSelf()
|
|
|
|
|
} else {
|
|
|
|
|
router.back()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.dwztErrorVisible) {
|
|
|
|
|
DwztErrorPopup({
|
|
|
|
|
title: '当前差分状态异常,学员将无法正常进行考试评判,请将车辆行驶到开阔地,等待程序自检,差分正常后会自动关闭该对话框',
|
|
|
|
|
cancelFn: () => {
|
|
|
|
|
this.dwztErrorVisible = false;
|
|
|
|
|
},
|
|
|
|
|
confirmFn: () => {
|
|
|
|
|
clearInterval(this.timer);
|
2025-07-01 11:08:13 +08:00
|
|
|
// clearInterval(AppStorage.get('judgeTimer'))
|
2025-04-11 09:06:08 +08:00
|
|
|
this.judge.checkExamIsEnd(true);
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.height('100%').backgroundColor('#000').justifyContent(FlexAlign.Start)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//人工项目操作
|
|
|
|
|
async setManualProjectFn(index: number) {
|
|
|
|
|
const isManualProjectIn = this.isManualProjectIn;
|
|
|
|
|
const artSubject3ProjectsCodesArr = this.artSubject3ProjectsCodesArr;
|
|
|
|
|
const projectsObj = this.projectsObj;
|
|
|
|
|
|
2025-04-11 10:13:29 +08:00
|
|
|
const projectCode = artSubject3ProjectsCodesArr[index]
|
2025-07-02 15:53:11 +08:00
|
|
|
let sideParkingStatus = GetIsExitManualProject(index, this.judgeConfigObj, this.artSubject3ProjectsCodesArr, this.projectsObj, this.carztStr, this.isManualProjectIn, this.isProjectIn, this.jl, this.examMileage, this.isRequiredProjectsEnd, this.lane)
|
2025-04-11 09:06:08 +08:00
|
|
|
if (index === 5) {
|
2025-07-02 15:53:11 +08:00
|
|
|
dConsole.info(JudgeTag, 'surenjun 靠边停车状态=> ', sideParkingStatus)
|
2025-04-11 09:06:08 +08:00
|
|
|
}
|
|
|
|
|
const currentProject: ProjectInfo = Reflect.get(projectsObj, projectCode)
|
2025-07-02 15:53:11 +08:00
|
|
|
if (sideParkingStatus) {
|
2025-04-11 09:06:08 +08:00
|
|
|
// 正在进行的项目 取消项目
|
|
|
|
|
if (isManualProjectIn && currentProject.type == '2') {
|
|
|
|
|
//判断人工是否能取消项目 && 当前项目有扣分的不能取消
|
|
|
|
|
if (Reflect.get(this.judgeConfigObj, '340') == 1) {
|
|
|
|
|
await this.judge.setJudgeItem(projectCode, 2);
|
|
|
|
|
Prompt.showToast({
|
|
|
|
|
message: '项目取消',
|
|
|
|
|
duration: 2000
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 靠边停车时候可以触发
|
|
|
|
|
if (Reflect.get(this.judgeConfigObj, '343') === '0') {
|
|
|
|
|
const xmmcStr = this.xmmcStr;
|
|
|
|
|
if (xmmcStr == '无' || xmmcStr == '') {
|
|
|
|
|
//512[6] 人工项目按钮放大确认
|
|
|
|
|
const param512: string[] = (Reflect.get(this.judgeConfigObj, '512') || '').split(',');
|
2025-06-23 17:24:47 +08:00
|
|
|
dConsole.info(JudgeTag, 'surenjun', param512)
|
2025-04-11 09:06:08 +08:00
|
|
|
if (param512[6] !== '0') {
|
|
|
|
|
this.amplifiedImgIndex = index;
|
|
|
|
|
this.isAmplifyPopShow = true
|
|
|
|
|
} else {
|
|
|
|
|
const judge = this.judge
|
|
|
|
|
await judge.setJudgeItem(projectCode, 1);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
if (index === 5) {
|
|
|
|
|
Prompt.showToast({
|
|
|
|
|
message: `${xmmcStr}未结束,不允许靠边停车`,
|
|
|
|
|
duration: 8000
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.amplifiedImgIndex = index;
|
|
|
|
|
this.isAmplifyPopShow = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|