diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index 75834230..fa71abd2 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -30,7 +30,7 @@ import { judgeConfig } from './judgeSDK/utils/judgeConfig'; import FileUtil from '../common/utils/File'; import SignDisplayCom from './compontents/signDisplayCom'; -import { CarInfoType } from '../model'; +import { CarInfoType, CommonType, KfdmType } from '../model'; @Entry @Component @@ -56,18 +56,13 @@ struct Index { @State startHourTime: string = '' @State startExamTime: string = '' //科目类型 - @State examSubject: 2 | 3 = 3; + @State examSubject: string = '3'; @State ddxkTime: number = 0; @State ddxkKsxmArr: string[] = [] @State ddxkKfArr: string[] = [] @State xmmcStr: string = '' @State carztStr: string = '' - @State kfArr: { - xmmcStr?: string, - score: string, - desc: string - markcatalog: string - }[] = [] + @State kfArr: KfdmType[] = [] @State name: string = '' @State idCard: string = '' @State singlePlay: boolean = false; @@ -80,8 +75,8 @@ struct Index { @State cdsbInfoObj: CDSBInfo = {} @State itemInfoObj: CDSBInfo = {} @State timer: number = 0 - @State judgeConfig: { [k: string]: string }[] = [] - @State judgeConfigObj: { [k: string]: any } = defaultJudgeConfigObj + @State judgeConfig: CommonType[] = [] + @State judgeConfigObj: object = defaultJudgeConfigObj //流水号 @State lsh: string = '' @State kszp: string = '' @@ -123,7 +118,6 @@ struct Index { @State isRequiredProjectsEnd: boolean = false; // @State isAllProjectsEnd: boolean = false; @State lane: LANE = { road: '', num: 0, count: 0 } - @State roadData: Object = {}; //定位差分状态时候正常 @State isDwztRight: boolean = true; @State defaultTabIndex: number = 0; @@ -173,13 +167,13 @@ struct Index { //初始化相关数据库表 async initDb() { this.examSubject = this.carInfo.examSubject; - const { isTrajectoryOpen, trajectoryPath } = judgeConfig + // const { isTrajectoryOpen, trajectoryPath } = judgeConfig await this.initStudent(); await this.initCar(); //是否开启轨迹回放模式 - if (isTrajectoryOpen) { - this.initTrajectoryParam(trajectoryPath) + if (judgeConfig.isTrajectoryOpen) { + this.initTrajectoryParam(judgeConfig.trajectoryPath) } else { await this.initSystemParam() await this.initMarkRules(); @@ -189,7 +183,7 @@ struct Index { await this.initItemInfo() // 科目三新增读取表数据 - if (examSubject == 3) { + if (this.examSubject == '3') { await this.initMapPoint() await this.initMapPointItem() //定时上传考试里程