Compare commits
No commits in common. "91c9b684787146920741aa9df84c4a25a2b09fa4" and "40e7655d876e54c8a4603a3d0b4fc86071b34a12" have entirely different histories.
91c9b68478
...
40e7655d87
@ -91,7 +91,7 @@ export interface BaseInfoType {
|
||||
}
|
||||
|
||||
interface kfdmObj{
|
||||
xmdm:number
|
||||
xmdm:string
|
||||
kfdm:string
|
||||
}
|
||||
// 路由参数
|
||||
@ -118,10 +118,7 @@ export interface CarInfoType {
|
||||
}
|
||||
|
||||
// TODO
|
||||
export interface ExaminerInfoType {
|
||||
code?: string
|
||||
name?: string
|
||||
}
|
||||
export interface ExaminerInfoType {}
|
||||
|
||||
// 一些运行配置
|
||||
export interface EnvironmentConfigurationType {
|
||||
|
||||
@ -2,8 +2,7 @@ import common from '@ohos.app.ability.common';
|
||||
// ------------------------------
|
||||
// 基础共用类型
|
||||
// ------------------------------
|
||||
import { MA_SYSTEMPARMType } from './Table'
|
||||
|
||||
import {MA_SYSTEMPARMType} from './Table'
|
||||
/** 基础考试字段 */
|
||||
interface BaseExamFields {
|
||||
kchp?: string;
|
||||
@ -12,13 +11,13 @@ interface BaseExamFields {
|
||||
kssj?: string;
|
||||
kskm?: string;
|
||||
ksxm?: string;
|
||||
kscj?: number;
|
||||
kslc?: number;
|
||||
kscj?: string;
|
||||
kslc?: string;
|
||||
dwlc?: string;
|
||||
zpsj?: string;
|
||||
jssj?: string;
|
||||
czlx?: string;
|
||||
cs?: number;
|
||||
cs?: string;
|
||||
}
|
||||
|
||||
// ------------------------------
|
||||
@ -212,11 +211,12 @@ export interface Plc {
|
||||
vision: Vision,
|
||||
radar: Radar,
|
||||
extend: object
|
||||
|
||||
//轨迹回放需要
|
||||
method?: string
|
||||
itemno: string
|
||||
type: 1 | 2
|
||||
serial: 1 | 2
|
||||
method?:string
|
||||
itemno:string
|
||||
type:1|2
|
||||
serial:1|2
|
||||
}
|
||||
|
||||
interface Qfsj {
|
||||
@ -241,19 +241,16 @@ export interface DrvexamType extends BaseExamFields {
|
||||
lsh?: string;
|
||||
zp?: string;
|
||||
sbxh?: string;
|
||||
kffs?: number;
|
||||
kffs?: string;
|
||||
kfsj?: string;
|
||||
jssj?: string
|
||||
kfxm?: string;
|
||||
kfxmmx?: string;
|
||||
ghks?: string;
|
||||
ksxtbh?: string;
|
||||
ksysfzmhm?: string;
|
||||
Ksy2sfzmhm?: string;
|
||||
ksdd?: string
|
||||
kslx?: string
|
||||
zpsj?: string
|
||||
dwlc?: string
|
||||
ksdd:string
|
||||
kslx:string
|
||||
}
|
||||
|
||||
|
||||
@ -346,6 +343,7 @@ export interface ProjectCenterInfos {
|
||||
20400?: ProjectInfo
|
||||
20600?: ProjectInfo
|
||||
20700?: ProjectInfo
|
||||
|
||||
40100?: ProjectInfo
|
||||
40200?: ProjectInfo
|
||||
40300?: ProjectInfo
|
||||
@ -377,11 +375,10 @@ export interface MarkRule {
|
||||
nocancelid?: number
|
||||
NoCancelId?: number
|
||||
gps_sid?: number,
|
||||
GPS_SID?: boolean
|
||||
score?: number
|
||||
GPS_SID?:boolean
|
||||
score?:number
|
||||
xmmcStr?: string
|
||||
desc?: string
|
||||
type?: 0|1|2
|
||||
}
|
||||
|
||||
export interface UploadExamMileage {
|
||||
@ -389,30 +386,40 @@ export interface UploadExamMileage {
|
||||
examinationRoomId: string
|
||||
lsh: string
|
||||
kslc: number
|
||||
kskssj: string
|
||||
kskssj:string
|
||||
}
|
||||
|
||||
export interface SYSSET {
|
||||
v_no?: string,
|
||||
v_name?: string,
|
||||
v_value?: string
|
||||
v_no: string,
|
||||
v_name: string,
|
||||
v_value: string
|
||||
|
||||
/** 轨迹文件 **/
|
||||
key?: number;
|
||||
name?: string;
|
||||
value?: string;
|
||||
key?:string;
|
||||
name?:string;
|
||||
value?:string;
|
||||
|
||||
}
|
||||
|
||||
export interface ProjectRoads {
|
||||
param_3?: string[]
|
||||
param_4?: string[]
|
||||
param_10?: string[]
|
||||
param_11?: string[]
|
||||
param_9?: string[]
|
||||
param_12?: string[]
|
||||
/****** 评判初始化数据*****/
|
||||
export interface JudgeInitObj{
|
||||
name:string
|
||||
kskm:string
|
||||
systemparm:MA_SYSTEMPARMType[]
|
||||
mark:MarkRule[]
|
||||
sysset:SYSSET[]
|
||||
}
|
||||
|
||||
interface MAPPOINT {
|
||||
export interface ProjectRoads{
|
||||
param_3?:string[]
|
||||
param_4?:string[]
|
||||
param_10?:string[]
|
||||
param_11?:string[]
|
||||
param_9?:string[]
|
||||
param_12?:string[]
|
||||
}
|
||||
|
||||
interface MAPPOINT{
|
||||
point_no: number,
|
||||
gps_e: number,
|
||||
gps_n: number,
|
||||
@ -433,77 +440,50 @@ interface MAPITEMPOINTITEM {
|
||||
subname: string
|
||||
}
|
||||
|
||||
export interface JudgeUI {
|
||||
export interface JudgeUI{
|
||||
context: common.UIAbilityContext;
|
||||
idCard: string
|
||||
wayno: number
|
||||
startFullTime: string
|
||||
idCard:string
|
||||
startFullTime:string
|
||||
mapPointArr: MAPPOINT[]
|
||||
mapPointItemArr: MAPITEMPOINTITEM[]
|
||||
systemparmArr: SYSTEMPARMARR[]
|
||||
carinfoArr: CARINFO[]
|
||||
kfArr: JudgeEventKf[]
|
||||
judgeConfigObj: object
|
||||
judgeConfig: SyssetConfig[]
|
||||
projectsObj: ProjectInfos
|
||||
projects: ProjectInfo[]
|
||||
projectsCenterObj: ProjectInfos
|
||||
cdsbInfoObj?: CDSBInfos
|
||||
itemInfoObj?: ItemInfos
|
||||
markRuleListObj: object
|
||||
lsh: string
|
||||
carType: string
|
||||
totalScore: number
|
||||
passingScore: number
|
||||
serialNumber: string
|
||||
kssycs: string
|
||||
isDdxk: boolean
|
||||
ddxkTime: number
|
||||
ddxkKsxmArr: string[]
|
||||
ddxkKfArr: string[]
|
||||
manualMarkRules: MarkRule[]
|
||||
carlist: string
|
||||
carName: string
|
||||
xldm: string
|
||||
kslx: string
|
||||
ksdd: string
|
||||
errorMsg: string
|
||||
name: string
|
||||
kfArrScroller: Scroller
|
||||
disConnectErrorOpen: boolean
|
||||
currentXmdm?: number
|
||||
isRequiredProjectsEnd: boolean
|
||||
isAllProjectsEnd: boolean
|
||||
isManualProjectIn: boolean
|
||||
isProjectIn: boolean
|
||||
examSubject: string
|
||||
singlePlay: boolean
|
||||
examMileage: string
|
||||
jl: number
|
||||
dwztErrorVisible: boolean
|
||||
isDeductedPopShow: boolean
|
||||
loadingPopupVisible: boolean
|
||||
endPopupVisible: boolean
|
||||
defaultTabIndex: number
|
||||
isDwztRight: boolean
|
||||
draw: boolean
|
||||
lane: JudgeLane
|
||||
sd: string
|
||||
dw: string
|
||||
judgeConfigObj:object
|
||||
projectsObj:ProjectInfos
|
||||
|
||||
lsh:string
|
||||
totalScore:number
|
||||
passingScore:number
|
||||
serialNumber:string
|
||||
xldm:string
|
||||
kslx:string
|
||||
ksdd:string
|
||||
|
||||
isAllProjectsEnd:boolean
|
||||
examSubject:string
|
||||
singlePlay:boolean
|
||||
examMileage:string
|
||||
jl:number
|
||||
|
||||
isDeductedPopShow:boolean
|
||||
defaultTabIndex:number
|
||||
isDwztRight:boolean
|
||||
draw:boolean
|
||||
|
||||
|
||||
sd:string
|
||||
dw:string
|
||||
}
|
||||
|
||||
|
||||
export interface ItemInfo {
|
||||
model: string
|
||||
xmdm: number
|
||||
xmxh: string
|
||||
export interface Km3JudgeInitConfig{
|
||||
map_point: MAPPOINT[]
|
||||
map_point_item: MAPITEMPOINTITEM[]
|
||||
iteminfo:[]
|
||||
roads:string
|
||||
sharps:string
|
||||
}
|
||||
|
||||
|
||||
export interface Ksjs {
|
||||
export interface Ksjs{
|
||||
// 累计前进距离
|
||||
qjjl?: number,
|
||||
|
||||
// 累计倒车距离
|
||||
dcjl?: number
|
||||
d1?: number
|
||||
@ -514,64 +494,14 @@ export interface Ksjs {
|
||||
d6?: number
|
||||
}
|
||||
|
||||
export interface CDSBInfo {
|
||||
export interface CDSBInfo{
|
||||
kdid?: string
|
||||
sbbh?: string
|
||||
sbbm?: string
|
||||
itemsno?: string
|
||||
modelKey?: string
|
||||
xmdm?: number,
|
||||
xmxh?: string
|
||||
}
|
||||
|
||||
export interface SYSTEMPARMARR {
|
||||
NO1: number,
|
||||
NO2: number,
|
||||
NO3: number,
|
||||
TXT1: string,
|
||||
TXT2: string,
|
||||
TXT3: string,
|
||||
}
|
||||
|
||||
export interface CARINFO {
|
||||
CARID: string,
|
||||
IPADDR: string,
|
||||
CARCLASS: string,
|
||||
KSCX: string,
|
||||
CARNAME: string,
|
||||
FLAG: string,
|
||||
BK1: string,
|
||||
BK2: string
|
||||
}
|
||||
|
||||
export interface KmItem {
|
||||
code: string
|
||||
status: number
|
||||
}
|
||||
|
||||
export interface TKmItem {
|
||||
code: string
|
||||
status: string
|
||||
}
|
||||
|
||||
export interface KmItems {
|
||||
'1'?: KmItem
|
||||
}
|
||||
|
||||
export interface JudgeConfigObj {
|
||||
'1'?: string
|
||||
}
|
||||
|
||||
export interface MarkRules {
|
||||
'1'?: MarkRule
|
||||
}
|
||||
|
||||
export interface CDSBInfos {
|
||||
'1'?: CDSBInfo
|
||||
}
|
||||
|
||||
export interface ItemInfos {
|
||||
'1'?: ItemInfo
|
||||
xmdm?:string,
|
||||
xmxh?:string
|
||||
}
|
||||
|
||||
// export const defaultCdsbInfoObj:DefaultJudgeConfigObj = {
|
||||
@ -579,222 +509,17 @@ export interface ItemInfos {
|
||||
// }
|
||||
|
||||
|
||||
/****** 评判初始化数据*****/
|
||||
export interface JudgeInitObj extends Km3JudgeInitConfig {
|
||||
sdkver: string,
|
||||
appver: string
|
||||
kskm: number
|
||||
kchp: string
|
||||
kchm: number
|
||||
kscx: string
|
||||
cxcode: string
|
||||
name: string
|
||||
carmodel: string
|
||||
allitems: ItemInfo[]
|
||||
iteminfo?: ItemInfo[]
|
||||
systemparm: MA_SYSTEMPARMType[]
|
||||
mark: MarkRule[]
|
||||
sysset: SyssetConfig[]
|
||||
itemInfoObj?: ItemInfos
|
||||
carlist: string
|
||||
carinfo: CARINFO[]
|
||||
|
||||
}
|
||||
|
||||
export interface JudgeKsxm {
|
||||
xmdm: number
|
||||
xmxh: string
|
||||
}
|
||||
|
||||
export interface JudgeKfxm {
|
||||
xmdm: number
|
||||
kfdm: string
|
||||
export interface JudgeUI_I{
|
||||
context:common.UIAbilityContext
|
||||
}
|
||||
|
||||
/****** 评判开始考试数据*****/
|
||||
export interface JudgeBeginObj {
|
||||
kgid: string
|
||||
kgxm: string
|
||||
exam: 0 | 1
|
||||
replay: 0 | 1
|
||||
track: string
|
||||
xm: string
|
||||
sex: 0 | 1
|
||||
kslsh: string
|
||||
sfzmhm: string
|
||||
ksyy: string
|
||||
kscx: string
|
||||
kkcs: number
|
||||
sfyk: number
|
||||
ykkkcs: number
|
||||
wayno: number
|
||||
czlx: number
|
||||
kskssj: number
|
||||
passing: number
|
||||
ksxm: JudgeKsxm[]
|
||||
ddxk: 0 | 1
|
||||
ddkssj: number
|
||||
ykxm: number[]
|
||||
kfxm: JudgeKfxm[]
|
||||
yklc: number
|
||||
special?: number[]
|
||||
sczb?: 0 | 1
|
||||
sczbkf?: JudgeKfxm[]
|
||||
dmndg: boolean
|
||||
mfxx: boolean
|
||||
mfxxn: boolean
|
||||
export interface JudgeBeginObj{
|
||||
exam:0|1
|
||||
}
|
||||
|
||||
export interface JudgeXmjs {
|
||||
xmdm: number
|
||||
xmxh: string
|
||||
xmhg: 0 | 1
|
||||
}
|
||||
|
||||
export interface JudgeKf {
|
||||
xmdm: number
|
||||
kfdm?: string
|
||||
markcatalog: string
|
||||
type: 0 | 1 | 2 | 3
|
||||
xmmcStr?: string
|
||||
desc?: string
|
||||
score?: number
|
||||
markserial?: string
|
||||
kfxh?: string
|
||||
}
|
||||
|
||||
|
||||
export interface JudgeEventKf {
|
||||
itemno?: number
|
||||
markcatalog?: string
|
||||
markshow?: string
|
||||
markserial?: string
|
||||
markstandard?: number,
|
||||
markreal?: number
|
||||
kfxh?: string
|
||||
onlyoneid?: number
|
||||
OnlyOneKind?: number
|
||||
nocancelid?: number
|
||||
NoCancelId?: number
|
||||
gps_sid?: number,
|
||||
GPS_SID?:boolean
|
||||
score?:number
|
||||
xmmcStr?: string
|
||||
desc?: string
|
||||
xmdm?: number
|
||||
type?: 0 | 1 | 2 |3
|
||||
}
|
||||
|
||||
export interface JudgeKsjs {
|
||||
type: 0 | 1
|
||||
qjjl: number
|
||||
dcjl: number
|
||||
d1: number
|
||||
d2: number
|
||||
d3: number
|
||||
d4: number
|
||||
d5: number
|
||||
d6: number
|
||||
}
|
||||
|
||||
export interface JudgeSound {
|
||||
xmdm: number
|
||||
code: string[]
|
||||
type: 0 | 1
|
||||
}
|
||||
|
||||
export interface JudgeSoundB {
|
||||
xmdm: number
|
||||
code: string
|
||||
type: 0 | 1
|
||||
}
|
||||
|
||||
export interface JudgeLane {
|
||||
road: string
|
||||
num: number
|
||||
count: number
|
||||
}
|
||||
|
||||
export interface JudgeNongps {
|
||||
type: 0 | 1 | 2 | 3 | 4
|
||||
}
|
||||
|
||||
interface UdpKf{
|
||||
kfxh:string
|
||||
directives:string
|
||||
}
|
||||
export interface JudgeUdpKf {
|
||||
data:UdpKf
|
||||
}
|
||||
|
||||
|
||||
export interface JudgePerformInfo {
|
||||
time: number
|
||||
carzt:-1 | 0 |1
|
||||
grade:number
|
||||
qjjl:number
|
||||
dcjl:number
|
||||
dxjl:number
|
||||
bxjl:number
|
||||
hint:string
|
||||
lane:PerLane
|
||||
}
|
||||
|
||||
interface PerLane{
|
||||
MapRoad_Code_No:string
|
||||
MapRoad_Name:string
|
||||
TouchLineType:number
|
||||
TouchDir:number
|
||||
TouchLineTypeCS:number
|
||||
TouchLineDirCS:number
|
||||
BasePointInLaneNo:number
|
||||
BaseLaneCount:number
|
||||
FrontPointLaneNo:number
|
||||
FrontPointLaneCount:number
|
||||
Body_LF_ToLeftEdge:number
|
||||
Body_LB_ToLeftEdge:number
|
||||
Body_RF_ToRightEdge:number
|
||||
Body_RB_ToRightEdge:number
|
||||
Wheel_RF_ToRightEdge:number
|
||||
Wheel_RB_ToRightEdge:number
|
||||
Wheel_RF_ToBaseLine:number
|
||||
Wheel_LF_ToRightEdge:number
|
||||
Wheel_LB_ToRightEdge:number
|
||||
Wheel_LF_ToBaseLine:number
|
||||
Wheel_LB_ToBaseLine:number
|
||||
BasePointInLaneDir:string
|
||||
CrossLineAttr:number
|
||||
InShapeAttr:number
|
||||
ShapeNo:number
|
||||
CrossPointNo:number
|
||||
}
|
||||
|
||||
export interface JudgeCallBackData {
|
||||
event: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11
|
||||
sj: number
|
||||
carzt: -1 | 0 | 1
|
||||
xmks: JudgeKsxm
|
||||
xmjs: JudgeXmjs
|
||||
kf: JudgeKf
|
||||
ksjs: JudgeKsjs
|
||||
xmqx: JudgeKsxm
|
||||
sound: JudgeSound
|
||||
mndg: string
|
||||
lane: JudgeLane
|
||||
precast: JudgeKsxm
|
||||
nongps: JudgeNongps
|
||||
}
|
||||
|
||||
export interface Km3JudgeInitConfig {
|
||||
map_point?: MAPPOINT[]
|
||||
map_point_item?: MAPITEMPOINTITEM[]
|
||||
iteminfo?: ItemInfo[]
|
||||
roads?: string
|
||||
sharps?: string
|
||||
}
|
||||
|
||||
export interface DistanceClass {
|
||||
setTimeData: (n: number) => void
|
||||
export interface DistanceClass{
|
||||
setTimeData:(n:number)=> void
|
||||
}
|
||||
|
||||
export interface WR {
|
||||
|
||||
@ -51,11 +51,7 @@ import {
|
||||
AmplifyItem,
|
||||
ProjectRoads,
|
||||
JudgeCallBacData,
|
||||
JudgeUI,
|
||||
CDSBInfos,
|
||||
ItemInfos,
|
||||
MarkRules,
|
||||
DefaultJudgeConfigObj
|
||||
JudgeUI
|
||||
} from '../model';
|
||||
import { GetSyncData } from '../utils/table/Operation';
|
||||
import dayTs from '../utils/Date';
|
||||
@ -102,13 +98,13 @@ struct Index {
|
||||
//模拟考试项目
|
||||
@State projects: ProjectInfo[] = []
|
||||
@State projectsObj: ProjectInfos = {}
|
||||
@State projectsCenterObj: ProjectInfos = {}
|
||||
@State markRuleListObj: MarkRules = {}
|
||||
@State cdsbInfoObj?: CDSBInfos = {}
|
||||
@State itemInfoObj?: ItemInfos = {}
|
||||
@State projectsCenterObj: ProjectInfo = {}
|
||||
@State markRuleListObj: MarkRule = {}
|
||||
@State cdsbInfoObj?: CDSBInfo = {}
|
||||
@State itemInfoObj?: object = {}
|
||||
@State timer: number = 0
|
||||
@State judgeConfig: SyssetConfig[] = []
|
||||
@State judgeConfigObj: DefaultJudgeConfigObj = defaultJudgeConfigObj
|
||||
@State judgeConfigObj: object = defaultJudgeConfigObj
|
||||
//流水号
|
||||
@State lsh: string = ''
|
||||
@State kszp: string = ''
|
||||
@ -145,7 +141,7 @@ struct Index {
|
||||
//项目是否进行中
|
||||
@State isProjectIn: boolean = false;
|
||||
//正在进行的项目代码
|
||||
@State currentXmdm?: number = 0
|
||||
@State currentXmdm: string = ''
|
||||
// 必考项目除靠边停车是否全部完成
|
||||
@State isRequiredProjectsEnd: boolean = false;
|
||||
@State isAllProjectsEnd: boolean = false;
|
||||
@ -285,8 +281,8 @@ struct Index {
|
||||
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)
|
||||
this.markRuleListObj[`${mark.itemno}_${mark.markserial}`] = tempObj
|
||||
this.markRuleListObj[`${mark.itemno}_${mark.markserial}`].markserial = mark.markserial
|
||||
})
|
||||
}
|
||||
|
||||
@ -303,7 +299,7 @@ struct Index {
|
||||
|
||||
syssetParams.forEach((sys:SYSSET) => {
|
||||
if (judgeConfig.isTrajectoryOpen) {
|
||||
sys.v_no = String(sys.key);
|
||||
sys.v_no = sys.key;
|
||||
sys.v_name = sys.name;
|
||||
sys.v_value = sys.value
|
||||
}
|
||||
@ -346,7 +342,7 @@ struct Index {
|
||||
const currentProject:ProjectInfo = Reflect.get(this.projectsObj,kf.xmdm)
|
||||
|
||||
// 过滤考前绕车一周上车准备的扣分
|
||||
if (currentParams.sczb == "1" && kf.xmdm == 1) {
|
||||
if (currentParams.sczb == "1" && kf.xmdm == '1') {
|
||||
return
|
||||
}
|
||||
|
||||
@ -367,7 +363,8 @@ struct Index {
|
||||
Reflect.set(this.projectsObj,1,project_1)
|
||||
|
||||
}
|
||||
Reflect.set(this.judgeConfigObj, sys.v_no, value)
|
||||
this.judgeConfigObj[sys.v_no] = value
|
||||
|
||||
});
|
||||
this.judgeConfig = syssetJudgeConfigArr;
|
||||
}
|
||||
@ -498,7 +495,7 @@ struct Index {
|
||||
const xmdm = Number( key.split('~')[0] )
|
||||
const currentProject:ProjectInfo = Reflect.get(projectsObj, xmdm)
|
||||
if (currentProject) {
|
||||
const cdsbInfo:CDSBInfo = {
|
||||
this.cdsbInfoObj[newKey] = {
|
||||
kdid: cdsb.kdid,
|
||||
sbbh: cdsb.sbbh,
|
||||
sbbm: cdsb.sbbm,
|
||||
@ -507,7 +504,6 @@ struct Index {
|
||||
xmdm,
|
||||
xmxh: key.split('~')[1],
|
||||
}
|
||||
Reflect.set(this.cdsbInfoObj, newKey, cdsbInfo)
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -524,19 +520,19 @@ struct Index {
|
||||
const xmdm = Number(key.split('~')[0])
|
||||
const currentProject:ProjectInfo = Reflect.get(projectsObj,xmdm)
|
||||
if (currentProject && (carlistArr.length == 0 || carlistArr.includes(carlist))) {
|
||||
Reflect.set(this.itemInfoObj,newKey, {
|
||||
this.itemInfoObj[newKey] = {
|
||||
modelKey: newKey,
|
||||
xmdm,
|
||||
xmxh: key.split('~')[1],
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 评判相关初始化
|
||||
async initJudge() {
|
||||
const JUDGEUI:JudgeUI = this;
|
||||
const judge = new Judge(JUDGEUI);
|
||||
const test:JudgeUI = this;
|
||||
const judge = new Judge(test);
|
||||
// await judge.init<typeof Index>()
|
||||
await judge.onJudgeFn(async (judgeData:JudgeCallBacData) => {
|
||||
// const { xmmcStr, carztStr, kfArr } = judgeData;
|
||||
@ -551,9 +547,8 @@ struct Index {
|
||||
async goDdxkItems() {
|
||||
const judgeConfigObj = this.judgeConfigObj
|
||||
|
||||
const config_432:string = Reflect.get(judgeConfigObj,'432')
|
||||
//科目二强制开始断点续考
|
||||
if (config_432 != '0' || this.examSubject == "2") {
|
||||
if (judgeConfigObj['432'] != 0 || this.examSubject == "2") {
|
||||
//断点续考判断
|
||||
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
||||
const examItems: string = currentParams?.examItems;
|
||||
@ -564,7 +559,7 @@ struct Index {
|
||||
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") {
|
||||
if (judgeConfigObj['432'] == 2 || this.examSubject == "2") {
|
||||
//TODO 带项目带里程
|
||||
if (ddxkKsxmArr?.length) {
|
||||
//断点续考
|
||||
@ -662,7 +657,7 @@ struct Index {
|
||||
const beginDataObj:JudgeBeginObj = JSON.parse(beginData)
|
||||
|
||||
const examSubject = this.carInfo.examSubject;
|
||||
this.examSubject =( isTrajectoryOpen ? (initDataObj.kskm) : examSubject) +'';
|
||||
this.examSubject = isTrajectoryOpen ? (initDataObj.kskm) : examSubject;
|
||||
this.carInfo.examSubject = this.examSubject
|
||||
this.singlePlay = beginDataObj.exam == 0;
|
||||
this.carName = initDataObj.name;
|
||||
@ -744,7 +739,7 @@ struct Index {
|
||||
|
||||
if (this.examSubject == "3") {
|
||||
Row() {
|
||||
if (Reflect.get(this.judgeConfigObj,'375') == '0') {
|
||||
if (this.judgeConfigObj['375'] == '0') {
|
||||
Text(`应行驶:${this.examMileage}m`)
|
||||
.fontColor('#E5CCA1')
|
||||
.fontSize(this.FONTSIZE)
|
||||
@ -761,7 +756,7 @@ struct Index {
|
||||
Column() {
|
||||
Row() {
|
||||
Text(this.carztStr).fontColor('#FFA500').fontSize(this.FONTSIZE)
|
||||
if (Reflect.get(this.judgeConfigObj,'342') == '0') {
|
||||
if (this.judgeConfigObj['342'] == '0') {
|
||||
Text(`${this.dw}挡`).fontColor('#FFA500').fontSize(this.FONTSIZE).padding({ left: 15, right: 15 })
|
||||
Text(`${this.sd}km/h`).fontColor('#FFA500').fontSize(this.FONTSIZE)
|
||||
}
|
||||
@ -1042,7 +1037,7 @@ struct Index {
|
||||
// type: 1,
|
||||
// name: 'button_media.wav'
|
||||
// })
|
||||
if (Reflect.get(this.judgeConfigObj,'353') == '0') {
|
||||
if (this.judgeConfigObj['353'] == '0') {
|
||||
this.endPopupVisible = true
|
||||
} else {
|
||||
Prompt.showToast({
|
||||
@ -1071,7 +1066,7 @@ struct Index {
|
||||
|
||||
|
||||
//科目三人工扣分弹窗
|
||||
if (this.isDeductedPopShow && this.examSubject == '3' && Reflect.get(this.judgeConfigObj,'342') == '0') {
|
||||
if (this.isDeductedPopShow && this.examSubject == '3' && this.judgeConfigObj['342'] == '0') {
|
||||
DeductedPopup({
|
||||
defaultTabIndex: this.defaultTabIndex,
|
||||
currentItems: Reflect.ownKeys(this.projectsObj).map(projectKey => {
|
||||
@ -1155,7 +1150,7 @@ struct Index {
|
||||
router.back()
|
||||
return
|
||||
}
|
||||
if (Reflect.get(this.judgeConfigObj,'344') == 1) {
|
||||
if (this.judgeConfigObj['344'] == 1) {
|
||||
Prompt.showToast({
|
||||
message: '考试未结束,不允许手动退出!',
|
||||
duration: 4000
|
||||
@ -1259,7 +1254,7 @@ struct Index {
|
||||
// 正在进行的项目 取消项目
|
||||
if (isManualProjectIn && currentProject.type == '2') {
|
||||
//判断人工是否能取消项目 && 当前项目有扣分的不能取消
|
||||
if (Reflect.get(this.judgeConfigObj,'340') == 1) {
|
||||
if (judgeConfigObj['340'] == 1) {
|
||||
await this.judge.setJudgeItem(projectCode, 2);
|
||||
Prompt.showToast({
|
||||
message: '项目取消',
|
||||
@ -1270,11 +1265,11 @@ struct Index {
|
||||
}
|
||||
|
||||
// 靠边停车时候可以触发
|
||||
if (Reflect.get(this.judgeConfigObj,'343') === '0') {
|
||||
if (judgeConfigObj['343'] === '0') {
|
||||
const xmmcStr = this.xmmcStr;
|
||||
if (xmmcStr == '无' || xmmcStr == '') {
|
||||
//512[6] 人工项目按钮放大确认
|
||||
const param512:string[] = (Reflect.get(this.judgeConfigObj,'512') || '').split(',');
|
||||
const param512:string[] = (judgeConfigObj['512'] || '').split(',');
|
||||
console.info('surenjun', param512)
|
||||
if (param512[6] !== '0') {
|
||||
this.amplifiedImgIndex = index;
|
||||
@ -1317,17 +1312,17 @@ struct Index {
|
||||
const projectType = currentProject.type;
|
||||
|
||||
//不允许人工触发的项目列表,以","分隔
|
||||
const unExitManualProjects:string[] = Reflect.get(this.judgeConfigObj,'332').split(',') || [];
|
||||
const unExitManualProjects:string[] = judgeConfigObj['332'].split(',') || [];
|
||||
//直线行驶中不进其他考试项目(0-否 1-是)
|
||||
const param348:string = Reflect.get(this.judgeConfigObj,'348') || '0',
|
||||
const param348:string = judgeConfigObj['348'] || '0',
|
||||
//里程不够允许手工点靠边停车(0-否 1-是)
|
||||
param387:string = Reflect.get(this.judgeConfigObj,'387') || '0',
|
||||
param387:string = judgeConfigObj['387'] || '0',
|
||||
//里程不够不报靠边停车(0-否+1-是+2-必考项目未完成且里程不够不报项目)
|
||||
param319:string = Reflect.get(this.judgeConfigObj,'319') || '0',
|
||||
param319:string = judgeConfigObj['319'] || '0',
|
||||
//人工项目是否能取消 1:可取消;
|
||||
param340:string = Reflect.get(this.judgeConfigObj,'340') || '0',
|
||||
param340:string = judgeConfigObj['340'] || '0',
|
||||
//307参数里设置的项目,项目已经做过,后续不能人工触发;
|
||||
param307:string[] = (Reflect.get(this.judgeConfigObj,'307') || '').split(',');
|
||||
param307:string[] = (judgeConfigObj['307'] || '').split(',');
|
||||
|
||||
//非行驶状态(没有速度),人工项目不能触发(按钮灰色)
|
||||
if (carztStr === '停车') {
|
||||
@ -1335,7 +1330,7 @@ struct Index {
|
||||
}
|
||||
|
||||
//车上是否能进行人工操作(0-能1-不能人工评判2-不能人工进项目3-都不能)
|
||||
if (Reflect.get(this.judgeConfigObj,'342') === '3' || Reflect.get(this.judgeConfigObj,'342') === '2') {
|
||||
if (judgeConfigObj['342'] === '3' || judgeConfigObj['342'] === '2') {
|
||||
return false
|
||||
}
|
||||
|
||||
@ -1390,12 +1385,12 @@ struct Index {
|
||||
const num = lane.num;
|
||||
const count = lane.count;
|
||||
|
||||
const param_3:string[] = (Reflect.get(this.judgeConfigObj,'514')?.split(',') || []);
|
||||
const param_4:string[] = (Reflect.get(this.judgeConfigObj,'515')?.split(',') || []);
|
||||
const param_10:string[] = (Reflect.get(this.judgeConfigObj,'516')?.split(',') || []);
|
||||
const param_11:string[] = (Reflect.get(this.judgeConfigObj,'517')?.split(',') || []);
|
||||
const param_9:string[] = (Reflect.get(this.judgeConfigObj,'518')?.split(',') || []);
|
||||
const param_12:string[] = (Reflect.get(this.judgeConfigObj,'519')?.split(',') || []);
|
||||
const param_3:string[] = (judgeConfigObj['514']?.split(',') || []);
|
||||
const param_4:string[] = (judgeConfigObj['515']?.split(',') || []);
|
||||
const param_10:string[] = (judgeConfigObj['516']?.split(',') || []);
|
||||
const param_11:string[] = (judgeConfigObj['517']?.split(',') || []);
|
||||
const param_9:string[] = (judgeConfigObj['518']?.split(',') || []);
|
||||
const param_12:string[] = (judgeConfigObj['519']?.split(',') || []);
|
||||
|
||||
const projectRoads:ProjectRoads = {
|
||||
//直线行驶
|
||||
@ -1425,7 +1420,7 @@ struct Index {
|
||||
//设置了514-519参数,只能在设置的路段触发对应项目
|
||||
if (currentProjectRoad.includes(road)) {
|
||||
//如果525为1,则514-519设置的路段不能触发对应项目
|
||||
if (Reflect.get(this.judgeConfigObj,'525') == '1') {
|
||||
if (judgeConfigObj['525'] == '1') {
|
||||
return false
|
||||
}
|
||||
} else {
|
||||
@ -1434,7 +1429,7 @@ struct Index {
|
||||
|
||||
//405参数为2是,如果在最左侧车道,超车项目不能触发;
|
||||
if (projectCode == '10' &&
|
||||
Reflect.get(this.judgeConfigObj,'405') == '2' &&
|
||||
judgeConfigObj['405'] == '2' &&
|
||||
(num === count) &&
|
||||
num > 0
|
||||
) {
|
||||
@ -1465,10 +1460,10 @@ struct Index {
|
||||
getIsManualKf = () => {
|
||||
if (this.examSubject == '3') {
|
||||
//杭州训练模式不允许人工评判
|
||||
if (this.singlePlay && Reflect.get(this.judgeConfigObj,'211') == 'zjhz') {
|
||||
if (this.singlePlay && this.judgeConfigObj['211'] == 'zjhz') {
|
||||
return false
|
||||
}
|
||||
if (Reflect.get(this.judgeConfigObj,'342') == '0') {
|
||||
if (this.judgeConfigObj['342'] == '0') {
|
||||
return true
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -12,7 +12,7 @@ import libJudgeSdk from "libjudgesdk.so"
|
||||
*
|
||||
* @desc 获取版本信息
|
||||
**/
|
||||
export async function examJudgeVersion(): Promise<string> {
|
||||
export async function examJudgeVersion() {
|
||||
return await libJudgeSdk.examJudgeVersion();
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ export async function examJudgeVersion(): Promise<string> {
|
||||
* @desc 设置评判日志级别和日志回调函数
|
||||
*/
|
||||
export async function examJudgeSetLogCallback(level: number, handleLog: Function): Promise<string> {
|
||||
const temp:number = libJudgeSdk.examJudgeSetLogCallback(level, handleLog);
|
||||
const temp = libJudgeSdk.examJudgeSetLogCallback(level, handleLog);
|
||||
return await handle(temp, 'examJudgeSetLogCallback')
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ export async function examJudgeSetLogCallback(level: number, handleLog: Function
|
||||
*/
|
||||
export async function examJudgeInit(data) {
|
||||
const str = JSON.stringify(data);
|
||||
const temp:number = libJudgeSdk.examJudgeInit(str, str.length);
|
||||
const temp = libJudgeSdk.examJudgeInit(str, str.length);
|
||||
return await handle(temp, 'examJudgeInit')
|
||||
}
|
||||
|
||||
@ -44,7 +44,8 @@ export async function examJudgeInit(data) {
|
||||
* @desc 执行实时考试过程 实时传递传感信息
|
||||
*/
|
||||
export async function examJudgeRealExam(data) {
|
||||
const temp:number = libJudgeSdk.examJudgeRealExam(JSON.stringify(data), str.length);
|
||||
const str = JSON.stringify(data);
|
||||
const temp = libJudgeSdk.examJudgeRealExam(str, str.length);
|
||||
return await handle(temp, 'examJudgeRealExam')
|
||||
}
|
||||
|
||||
@ -53,8 +54,8 @@ export async function examJudgeRealExam(data) {
|
||||
* @desc 设置评判输出的考试过程数据回调函数
|
||||
*/
|
||||
//js_examJudgeSetRealExamCallback
|
||||
export async function examJudgeSetRealExamCallback(fn:Function) {
|
||||
const temp:number = libJudgeSdk.examJudgeSetRealExamCallback(fn);
|
||||
export async function examJudgeSetRealExamCallback(fn) {
|
||||
const temp = libJudgeSdk.examJudgeSetRealExamCallback(fn);
|
||||
return await handle(temp, 'examJudgeSetRealExamCallback')
|
||||
}
|
||||
|
||||
@ -62,8 +63,8 @@ export async function examJudgeSetRealExamCallback(fn:Function) {
|
||||
*
|
||||
* @desc 设置轨迹图像回调函数
|
||||
*/
|
||||
export async function examJudgeMapImageSetCallback(fn:Function) {
|
||||
const temp:number = libJudgeSdk.examJudgeMapImageSetCallback(fn);
|
||||
export async function examJudgeMapImageSetCallback(fn) {
|
||||
const temp = libJudgeSdk.examJudgeMapImageSetCallback(fn);
|
||||
return await handle(temp, 'examJudgeMapImageSetCallback')
|
||||
}
|
||||
|
||||
@ -80,7 +81,7 @@ export async function examJudgeArtificialMark(
|
||||
//扣分类型:number
|
||||
type: number
|
||||
) {
|
||||
const temp:number= libJudgeSdk.examJudgeArtificialMark(itemno, serial, type);
|
||||
const temp = libJudgeSdk.examJudgeArtificialMark(itemno, serial, type);
|
||||
return await handle(temp, 'examJudgeArtificialMark')
|
||||
}
|
||||
|
||||
@ -94,7 +95,7 @@ export async function examJudgeArtificialItem(
|
||||
//操作类型
|
||||
type: number = 0
|
||||
) {
|
||||
const temp:number = libJudgeSdk.examJudgeArtificialItem(itemno, type);
|
||||
const temp = libJudgeSdk.examJudgeArtificialItem(itemno, type);
|
||||
return await handle(temp, 'examJudgeArtificialMark')
|
||||
}
|
||||
|
||||
@ -103,8 +104,8 @@ export async function examJudgeArtificialItem(
|
||||
*
|
||||
* @desc 设置地图轨迹图像绘制的开关
|
||||
*/
|
||||
export async function examJudgeMapSetDrawing(bool:boolean) {
|
||||
const temp:number = libJudgeSdk.examJudgeMapSetDrawing(bool);
|
||||
export async function examJudgeMapSetDrawing(fn) {
|
||||
const temp = libJudgeSdk.examJudgeMapSetDrawing(fn);
|
||||
return await handle(temp, 'examJudgeMapSetDrawing')
|
||||
}
|
||||
|
||||
@ -115,7 +116,7 @@ export async function examJudgeMapSetDrawing(bool:boolean) {
|
||||
*/
|
||||
export async function examJudgeBeginExam(data) {
|
||||
const str = JSON.stringify(data);
|
||||
const temp:number = libJudgeSdk.examJudgeBeginExam(str, str.length);
|
||||
const temp = libJudgeSdk.examJudgeBeginExam(str, str.length);
|
||||
return await handle(temp, 'examJudgeBeginExam')
|
||||
}
|
||||
|
||||
@ -123,16 +124,16 @@ export async function examJudgeBeginExam(data) {
|
||||
/* @params level:日志等级,infoStr:日志信息,len:数据长度
|
||||
* @desc处理日志文件
|
||||
*/
|
||||
// export function handleLog(level, infoStr, len) {
|
||||
// //TODO
|
||||
// }
|
||||
export function handleLog(level, infoStr, len) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
/*
|
||||
* @desc结束考试
|
||||
*
|
||||
*/
|
||||
export async function examJudgeEndExam() {
|
||||
const temp:number = libJudgeSdk.examJudgeEndExam();
|
||||
const temp = libJudgeSdk.examJudgeEndExam();
|
||||
return await handle(temp, 'examJudgeEndExam')
|
||||
}
|
||||
|
||||
@ -141,7 +142,7 @@ export async function examJudgeEndExam() {
|
||||
*
|
||||
*/
|
||||
export async function examJudgeDestroy() {
|
||||
const temp:number = libJudgeSdk.examJudgeDestroy();
|
||||
const temp = libJudgeSdk.examJudgeDestroy();
|
||||
return await handle(temp, 'examJudgeDestroy')
|
||||
}
|
||||
|
||||
@ -150,7 +151,7 @@ export async function examJudgeDestroy() {
|
||||
*
|
||||
*/
|
||||
export async function examJudgeMapSetParam(width: number, height: number) {
|
||||
const temp:number = libJudgeSdk.examJudgeMapSetParam(width, height);
|
||||
const temp = libJudgeSdk.examJudgeMapSetParam(width, height);
|
||||
return await handle(temp, 'examJudgeMapSetParam')
|
||||
}
|
||||
|
||||
@ -159,7 +160,7 @@ export async function examJudgeMapSetParam(width: number, height: number) {
|
||||
*
|
||||
*/
|
||||
export async function examJudgeMapSetScaling(scaling?: number) {
|
||||
const temp:number = libJudgeSdk.examJudgeMapSetScaling(scaling || 1);
|
||||
const temp = libJudgeSdk.examJudgeMapSetScaling(scaling || 1);
|
||||
return await handle(temp, 'examJudgeMapSetScaling')
|
||||
}
|
||||
|
||||
@ -168,7 +169,7 @@ export async function examJudgeMapSetScaling(scaling?: number) {
|
||||
*
|
||||
*/
|
||||
export async function examJudgeSetPerformCallback(fn) {
|
||||
const temp:number = libJudgeSdk.examJudgeSetPerformCallback(fn);
|
||||
const temp = libJudgeSdk.examJudgeSetPerformCallback(fn);
|
||||
return await handle(temp, 'examJudgeSetPerformCallback')
|
||||
}
|
||||
|
||||
@ -177,16 +178,17 @@ export async function examJudgeSetPerformCallback(fn) {
|
||||
* @desc 语音播报结束
|
||||
* /
|
||||
*/
|
||||
interface SoundParam{
|
||||
|
||||
export async function examJudgeSoundEnd(param: {
|
||||
//项目代码
|
||||
xmdm: number,
|
||||
itemno: number,
|
||||
//语音码
|
||||
code: string,
|
||||
//语音类型
|
||||
type: 0|1,
|
||||
}
|
||||
export async function examJudgeSoundEnd(param: SoundParam) {
|
||||
const temp:number = libJudgeSdk.examJudgeSoundEnd(param.xmdm, param.code, param.type);
|
||||
type: number,
|
||||
}) {
|
||||
const { itemno, code, type } = param;
|
||||
const temp = libJudgeSdk.examJudgeSoundEnd(itemno, code, type);
|
||||
return await handle(temp, 'examJudgeSoundEnd')
|
||||
}
|
||||
|
||||
@ -195,16 +197,16 @@ export async function examJudgeSoundEnd(param: SoundParam) {
|
||||
* @desc 实时距离计算
|
||||
*
|
||||
* */
|
||||
interface DistanceParam{
|
||||
export async function examCalcGpsDistance(param: {
|
||||
jd1: number,
|
||||
wd1: number,
|
||||
jd2: number,
|
||||
wd2: number,
|
||||
h: number
|
||||
}
|
||||
export async function examCalcGpsDistance(param:DistanceParam):Promise<number> {
|
||||
const temp:number = libJudgeSdk.examCalcGpsDistance(param.jd1, param.wd1, param.jd2, param.wd2, param.h);
|
||||
return temp
|
||||
}):Promise<number> {
|
||||
const { jd1, wd1, jd2, wd2, h } = param
|
||||
const temp = libJudgeSdk.examCalcGpsDistance(jd1, wd1, jd2, wd2, h);
|
||||
return await temp;
|
||||
}
|
||||
|
||||
|
||||
@ -212,7 +214,7 @@ export async function examCalcGpsDistance(param:DistanceParam):Promise<number> {
|
||||
* @desc通用处理函数
|
||||
*
|
||||
*/
|
||||
async function handle(temp:number, fnName:string): Promise<string> {
|
||||
async function handle(temp, fnName): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (temp == 0) {
|
||||
resolve(temp);
|
||||
@ -31,7 +31,7 @@ export interface MarkRule {
|
||||
score?:number
|
||||
xmmcStr?: string
|
||||
desc?: string
|
||||
xmdm?: number
|
||||
xmdm?: string
|
||||
type?: 0 | 1 | 2
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ import { GetCurrentTime, NumberToByteArray } from '../../../utils/Common';
|
||||
import systemTime from '@ohos.systemDateTime';
|
||||
import { Array2Byte } from './Common';
|
||||
import { CarInfoType } from '../../../model';
|
||||
import { Gps, Lane,Plc,Vision,Radar, Sensor,DefaultJudgeConfigObj, JudgeLane} from '../../../model/Judge'
|
||||
import { Gps, Lane,Plc,Vision,Radar, Sensor,DefaultJudgeConfigObj} from '../../../model/Judge'
|
||||
|
||||
interface Extend {}
|
||||
|
||||
@ -72,7 +72,7 @@ export function getDwStatusType(dw?:number) {
|
||||
|
||||
|
||||
// 中心实时项目状态转换
|
||||
export function getCenterProjectStatus(status?:number):string {
|
||||
export function getCenterProjectStatus(status?:number) {
|
||||
switch (status) {
|
||||
//不考
|
||||
case 0:
|
||||
@ -98,8 +98,8 @@ export function getKmProjectVoice(
|
||||
// 1:项目开始 2:项目结束
|
||||
type: 1 | 2,
|
||||
judgeConfig:object,
|
||||
lane:JudgeLane,
|
||||
xmxh:string
|
||||
lane:Lane,
|
||||
xmxh:number
|
||||
) {
|
||||
const carInfo = AppStorage.get<CarInfoType>('carInfo');
|
||||
const examSubject = carInfo.examSubject;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user