feat: judge.ets文件修改
This commit is contained in:
parent
f4c64fe800
commit
8ce99c7d86
@ -91,7 +91,7 @@ export interface BaseInfoType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface kfdmObj{
|
interface kfdmObj{
|
||||||
xmdm:string
|
xmdm:number
|
||||||
kfdm:string
|
kfdm:string
|
||||||
}
|
}
|
||||||
// 路由参数
|
// 路由参数
|
||||||
@ -118,7 +118,10 @@ export interface CarInfoType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
export interface ExaminerInfoType {}
|
export interface ExaminerInfoType {
|
||||||
|
code?: string
|
||||||
|
name?: string
|
||||||
|
}
|
||||||
|
|
||||||
// 一些运行配置
|
// 一些运行配置
|
||||||
export interface EnvironmentConfigurationType {
|
export interface EnvironmentConfigurationType {
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import common from '@ohos.app.ability.common';
|
|||||||
// 基础共用类型
|
// 基础共用类型
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
import { MA_SYSTEMPARMType } from './Table'
|
import { MA_SYSTEMPARMType } from './Table'
|
||||||
|
|
||||||
/** 基础考试字段 */
|
/** 基础考试字段 */
|
||||||
interface BaseExamFields {
|
interface BaseExamFields {
|
||||||
kchp?: string;
|
kchp?: string;
|
||||||
@ -11,13 +12,13 @@ interface BaseExamFields {
|
|||||||
kssj?: string;
|
kssj?: string;
|
||||||
kskm?: string;
|
kskm?: string;
|
||||||
ksxm?: string;
|
ksxm?: string;
|
||||||
kscj?: string;
|
kscj?: number;
|
||||||
kslc?: string;
|
kslc?: number;
|
||||||
dwlc?: string;
|
dwlc?: string;
|
||||||
zpsj?: string;
|
zpsj?: string;
|
||||||
jssj?: string;
|
jssj?: string;
|
||||||
czlx?: string;
|
czlx?: string;
|
||||||
cs?: string;
|
cs?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
@ -211,7 +212,6 @@ export interface Plc {
|
|||||||
vision: Vision,
|
vision: Vision,
|
||||||
radar: Radar,
|
radar: Radar,
|
||||||
extend: object
|
extend: object
|
||||||
|
|
||||||
//轨迹回放需要
|
//轨迹回放需要
|
||||||
method?: string
|
method?: string
|
||||||
itemno: string
|
itemno: string
|
||||||
@ -241,16 +241,19 @@ export interface DrvexamType extends BaseExamFields {
|
|||||||
lsh?: string;
|
lsh?: string;
|
||||||
zp?: string;
|
zp?: string;
|
||||||
sbxh?: string;
|
sbxh?: string;
|
||||||
kffs?: string;
|
kffs?: number;
|
||||||
kfsj?: string;
|
kfsj?: string;
|
||||||
|
jssj?: string
|
||||||
kfxm?: string;
|
kfxm?: string;
|
||||||
kfxmmx?: string;
|
kfxmmx?: string;
|
||||||
ghks?: string;
|
ghks?: string;
|
||||||
ksxtbh?: string;
|
ksxtbh?: string;
|
||||||
ksysfzmhm?: string;
|
ksysfzmhm?: string;
|
||||||
Ksy2sfzmhm?: string;
|
Ksy2sfzmhm?: string;
|
||||||
ksdd:string
|
ksdd?: string
|
||||||
kslx:string
|
kslx?: string
|
||||||
|
zpsj?: string
|
||||||
|
dwlc?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -343,7 +346,6 @@ export interface ProjectCenterInfos {
|
|||||||
20400?: ProjectInfo
|
20400?: ProjectInfo
|
||||||
20600?: ProjectInfo
|
20600?: ProjectInfo
|
||||||
20700?: ProjectInfo
|
20700?: ProjectInfo
|
||||||
|
|
||||||
40100?: ProjectInfo
|
40100?: ProjectInfo
|
||||||
40200?: ProjectInfo
|
40200?: ProjectInfo
|
||||||
40300?: ProjectInfo
|
40300?: ProjectInfo
|
||||||
@ -379,6 +381,7 @@ export interface MarkRule {
|
|||||||
score?: number
|
score?: number
|
||||||
xmmcStr?: string
|
xmmcStr?: string
|
||||||
desc?: string
|
desc?: string
|
||||||
|
type?: 0|1|2
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UploadExamMileage {
|
export interface UploadExamMileage {
|
||||||
@ -390,26 +393,16 @@ export interface UploadExamMileage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface SYSSET {
|
export interface SYSSET {
|
||||||
v_no: string,
|
v_no?: string,
|
||||||
v_name: string,
|
v_name?: string,
|
||||||
v_value: string
|
v_value?: string
|
||||||
|
|
||||||
/** 轨迹文件 **/
|
/** 轨迹文件 **/
|
||||||
key?:string;
|
key?: number;
|
||||||
name?: string;
|
name?: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****** 评判初始化数据*****/
|
|
||||||
export interface JudgeInitObj{
|
|
||||||
name:string
|
|
||||||
kskm:string
|
|
||||||
systemparm:MA_SYSTEMPARMType[]
|
|
||||||
mark:MarkRule[]
|
|
||||||
sysset:SYSSET[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ProjectRoads {
|
export interface ProjectRoads {
|
||||||
param_3?: string[]
|
param_3?: string[]
|
||||||
param_4?: string[]
|
param_4?: string[]
|
||||||
@ -443,47 +436,74 @@ interface MAPITEMPOINTITEM {
|
|||||||
export interface JudgeUI {
|
export interface JudgeUI {
|
||||||
context: common.UIAbilityContext;
|
context: common.UIAbilityContext;
|
||||||
idCard: string
|
idCard: string
|
||||||
|
wayno: number
|
||||||
startFullTime: string
|
startFullTime: string
|
||||||
mapPointArr: MAPPOINT[]
|
mapPointArr: MAPPOINT[]
|
||||||
mapPointItemArr: MAPITEMPOINTITEM[]
|
mapPointItemArr: MAPITEMPOINTITEM[]
|
||||||
|
systemparmArr: SYSTEMPARMARR[]
|
||||||
|
carinfoArr: CARINFO[]
|
||||||
|
kfArr: JudgeEventKf[]
|
||||||
judgeConfigObj: object
|
judgeConfigObj: object
|
||||||
|
judgeConfig: SyssetConfig[]
|
||||||
projectsObj: ProjectInfos
|
projectsObj: ProjectInfos
|
||||||
|
projects: ProjectInfo[]
|
||||||
|
projectsCenterObj: ProjectInfos
|
||||||
|
cdsbInfoObj?: CDSBInfos
|
||||||
|
itemInfoObj?: ItemInfos
|
||||||
|
markRuleListObj: object
|
||||||
lsh: string
|
lsh: string
|
||||||
|
carType: string
|
||||||
totalScore: number
|
totalScore: number
|
||||||
passingScore: number
|
passingScore: number
|
||||||
serialNumber: string
|
serialNumber: string
|
||||||
|
kssycs: string
|
||||||
|
isDdxk: boolean
|
||||||
|
ddxkTime: number
|
||||||
|
ddxkKsxmArr: string[]
|
||||||
|
ddxkKfArr: string[]
|
||||||
|
manualMarkRules: MarkRule[]
|
||||||
|
carlist: string
|
||||||
|
carName: string
|
||||||
xldm: string
|
xldm: string
|
||||||
kslx: string
|
kslx: string
|
||||||
ksdd: string
|
ksdd: string
|
||||||
|
errorMsg: string
|
||||||
|
name: string
|
||||||
|
kfArrScroller: Scroller
|
||||||
|
disConnectErrorOpen: boolean
|
||||||
|
currentXmdm?: number
|
||||||
|
isRequiredProjectsEnd: boolean
|
||||||
isAllProjectsEnd: boolean
|
isAllProjectsEnd: boolean
|
||||||
|
isManualProjectIn: boolean
|
||||||
|
isProjectIn: boolean
|
||||||
examSubject: string
|
examSubject: string
|
||||||
singlePlay: boolean
|
singlePlay: boolean
|
||||||
examMileage: string
|
examMileage: string
|
||||||
jl: number
|
jl: number
|
||||||
|
dwztErrorVisible: boolean
|
||||||
isDeductedPopShow: boolean
|
isDeductedPopShow: boolean
|
||||||
|
loadingPopupVisible: boolean
|
||||||
|
endPopupVisible: boolean
|
||||||
defaultTabIndex: number
|
defaultTabIndex: number
|
||||||
isDwztRight: boolean
|
isDwztRight: boolean
|
||||||
draw: boolean
|
draw: boolean
|
||||||
|
lane: JudgeLane
|
||||||
|
|
||||||
sd: string
|
sd: string
|
||||||
dw: string
|
dw: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Km3JudgeInitConfig{
|
|
||||||
map_point: MAPPOINT[]
|
export interface ItemInfo {
|
||||||
map_point_item: MAPITEMPOINTITEM[]
|
model: string
|
||||||
iteminfo:[]
|
xmdm: number
|
||||||
roads:string
|
xmxh: string
|
||||||
sharps:string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export interface Ksjs {
|
export interface Ksjs {
|
||||||
// 累计前进距离
|
// 累计前进距离
|
||||||
qjjl?: number,
|
qjjl?: number,
|
||||||
|
|
||||||
// 累计倒车距离
|
// 累计倒车距离
|
||||||
dcjl?: number
|
dcjl?: number
|
||||||
d1?: number
|
d1?: number
|
||||||
@ -500,22 +520,277 @@ export interface CDSBInfo{
|
|||||||
sbbm?: string
|
sbbm?: string
|
||||||
itemsno?: string
|
itemsno?: string
|
||||||
modelKey?: string
|
modelKey?: string
|
||||||
xmdm?:string,
|
xmdm?: number,
|
||||||
xmxh?: string
|
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
|
||||||
|
}
|
||||||
|
|
||||||
// export const defaultCdsbInfoObj:DefaultJudgeConfigObj = {
|
// export const defaultCdsbInfoObj:DefaultJudgeConfigObj = {
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
export interface JudgeUI_I{
|
/****** 评判初始化数据*****/
|
||||||
context:common.UIAbilityContext
|
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 JudgeBeginObj {
|
export interface JudgeBeginObj {
|
||||||
|
kgid: string
|
||||||
|
kgxm: string
|
||||||
exam: 0 | 1
|
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 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 {
|
export interface DistanceClass {
|
||||||
|
|||||||
@ -51,7 +51,11 @@ import {
|
|||||||
AmplifyItem,
|
AmplifyItem,
|
||||||
ProjectRoads,
|
ProjectRoads,
|
||||||
JudgeCallBacData,
|
JudgeCallBacData,
|
||||||
JudgeUI
|
JudgeUI,
|
||||||
|
CDSBInfos,
|
||||||
|
ItemInfos,
|
||||||
|
MarkRules,
|
||||||
|
DefaultJudgeConfigObj
|
||||||
} from '../model';
|
} from '../model';
|
||||||
import { GetSyncData } from '../utils/table/Operation';
|
import { GetSyncData } from '../utils/table/Operation';
|
||||||
import dayTs from '../utils/Date';
|
import dayTs from '../utils/Date';
|
||||||
@ -98,13 +102,13 @@ struct Index {
|
|||||||
//模拟考试项目
|
//模拟考试项目
|
||||||
@State projects: ProjectInfo[] = []
|
@State projects: ProjectInfo[] = []
|
||||||
@State projectsObj: ProjectInfos = {}
|
@State projectsObj: ProjectInfos = {}
|
||||||
@State projectsCenterObj: ProjectInfo = {}
|
@State projectsCenterObj: ProjectInfos = {}
|
||||||
@State markRuleListObj: MarkRule = {}
|
@State markRuleListObj: MarkRules = {}
|
||||||
@State cdsbInfoObj?: CDSBInfo = {}
|
@State cdsbInfoObj?: CDSBInfos = {}
|
||||||
@State itemInfoObj?: object = {}
|
@State itemInfoObj?: ItemInfos = {}
|
||||||
@State timer: number = 0
|
@State timer: number = 0
|
||||||
@State judgeConfig: SyssetConfig[] = []
|
@State judgeConfig: SyssetConfig[] = []
|
||||||
@State judgeConfigObj: object = defaultJudgeConfigObj
|
@State judgeConfigObj: DefaultJudgeConfigObj = defaultJudgeConfigObj
|
||||||
//流水号
|
//流水号
|
||||||
@State lsh: string = ''
|
@State lsh: string = ''
|
||||||
@State kszp: string = ''
|
@State kszp: string = ''
|
||||||
@ -141,7 +145,7 @@ struct Index {
|
|||||||
//项目是否进行中
|
//项目是否进行中
|
||||||
@State isProjectIn: boolean = false;
|
@State isProjectIn: boolean = false;
|
||||||
//正在进行的项目代码
|
//正在进行的项目代码
|
||||||
@State currentXmdm: string = ''
|
@State currentXmdm?: number = 0
|
||||||
// 必考项目除靠边停车是否全部完成
|
// 必考项目除靠边停车是否全部完成
|
||||||
@State isRequiredProjectsEnd: boolean = false;
|
@State isRequiredProjectsEnd: boolean = false;
|
||||||
@State isAllProjectsEnd: boolean = false;
|
@State isAllProjectsEnd: boolean = false;
|
||||||
@ -281,8 +285,8 @@ struct Index {
|
|||||||
if (Number(tempObj.markserial) > 100 && Number(tempObj.markserial) < 200) {
|
if (Number(tempObj.markserial) > 100 && Number(tempObj.markserial) < 200) {
|
||||||
this.manualMarkRules.push(tempObj)
|
this.manualMarkRules.push(tempObj)
|
||||||
}
|
}
|
||||||
this.markRuleListObj[`${mark.itemno}_${mark.markserial}`] = tempObj
|
tempObj.markserial = mark.markserial
|
||||||
this.markRuleListObj[`${mark.itemno}_${mark.markserial}`].markserial = mark.markserial
|
Reflect.set(this.markRuleListObj, `${mark.itemno}_${mark.markserial}`, tempObj)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -299,7 +303,7 @@ struct Index {
|
|||||||
|
|
||||||
syssetParams.forEach((sys:SYSSET) => {
|
syssetParams.forEach((sys:SYSSET) => {
|
||||||
if (judgeConfig.isTrajectoryOpen) {
|
if (judgeConfig.isTrajectoryOpen) {
|
||||||
sys.v_no = sys.key;
|
sys.v_no = String(sys.key);
|
||||||
sys.v_name = sys.name;
|
sys.v_name = sys.name;
|
||||||
sys.v_value = sys.value
|
sys.v_value = sys.value
|
||||||
}
|
}
|
||||||
@ -342,7 +346,7 @@ struct Index {
|
|||||||
const currentProject:ProjectInfo = Reflect.get(this.projectsObj,kf.xmdm)
|
const currentProject:ProjectInfo = Reflect.get(this.projectsObj,kf.xmdm)
|
||||||
|
|
||||||
// 过滤考前绕车一周上车准备的扣分
|
// 过滤考前绕车一周上车准备的扣分
|
||||||
if (currentParams.sczb == "1" && kf.xmdm == '1') {
|
if (currentParams.sczb == "1" && kf.xmdm == 1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,8 +367,7 @@ struct Index {
|
|||||||
Reflect.set(this.projectsObj,1,project_1)
|
Reflect.set(this.projectsObj,1,project_1)
|
||||||
|
|
||||||
}
|
}
|
||||||
this.judgeConfigObj[sys.v_no] = value
|
Reflect.set(this.judgeConfigObj, sys.v_no, value)
|
||||||
|
|
||||||
});
|
});
|
||||||
this.judgeConfig = syssetJudgeConfigArr;
|
this.judgeConfig = syssetJudgeConfigArr;
|
||||||
}
|
}
|
||||||
@ -495,7 +498,7 @@ struct Index {
|
|||||||
const xmdm = Number( key.split('~')[0] )
|
const xmdm = Number( key.split('~')[0] )
|
||||||
const currentProject:ProjectInfo = Reflect.get(projectsObj, xmdm)
|
const currentProject:ProjectInfo = Reflect.get(projectsObj, xmdm)
|
||||||
if (currentProject) {
|
if (currentProject) {
|
||||||
this.cdsbInfoObj[newKey] = {
|
const cdsbInfo:CDSBInfo = {
|
||||||
kdid: cdsb.kdid,
|
kdid: cdsb.kdid,
|
||||||
sbbh: cdsb.sbbh,
|
sbbh: cdsb.sbbh,
|
||||||
sbbm: cdsb.sbbm,
|
sbbm: cdsb.sbbm,
|
||||||
@ -504,6 +507,7 @@ struct Index {
|
|||||||
xmdm,
|
xmdm,
|
||||||
xmxh: key.split('~')[1],
|
xmxh: key.split('~')[1],
|
||||||
}
|
}
|
||||||
|
Reflect.set(this.cdsbInfoObj, newKey, cdsbInfo)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -520,19 +524,19 @@ struct Index {
|
|||||||
const xmdm = Number(key.split('~')[0])
|
const xmdm = Number(key.split('~')[0])
|
||||||
const currentProject:ProjectInfo = Reflect.get(projectsObj,xmdm)
|
const currentProject:ProjectInfo = Reflect.get(projectsObj,xmdm)
|
||||||
if (currentProject && (carlistArr.length == 0 || carlistArr.includes(carlist))) {
|
if (currentProject && (carlistArr.length == 0 || carlistArr.includes(carlist))) {
|
||||||
this.itemInfoObj[newKey] = {
|
Reflect.set(this.itemInfoObj,newKey, {
|
||||||
modelKey: newKey,
|
modelKey: newKey,
|
||||||
xmdm,
|
xmdm,
|
||||||
xmxh: key.split('~')[1],
|
xmxh: key.split('~')[1],
|
||||||
}
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 评判相关初始化
|
// 评判相关初始化
|
||||||
async initJudge() {
|
async initJudge() {
|
||||||
const test:JudgeUI = this;
|
const JUDGEUI:JudgeUI = this;
|
||||||
const judge = new Judge(test);
|
const judge = new Judge(JUDGEUI);
|
||||||
// await judge.init<typeof Index>()
|
// await judge.init<typeof Index>()
|
||||||
await judge.onJudgeFn(async (judgeData:JudgeCallBacData) => {
|
await judge.onJudgeFn(async (judgeData:JudgeCallBacData) => {
|
||||||
// const { xmmcStr, carztStr, kfArr } = judgeData;
|
// const { xmmcStr, carztStr, kfArr } = judgeData;
|
||||||
@ -547,8 +551,9 @@ struct Index {
|
|||||||
async goDdxkItems() {
|
async goDdxkItems() {
|
||||||
const judgeConfigObj = this.judgeConfigObj
|
const judgeConfigObj = this.judgeConfigObj
|
||||||
|
|
||||||
|
const config_432:string = Reflect.get(judgeConfigObj,'432')
|
||||||
//科目二强制开始断点续考
|
//科目二强制开始断点续考
|
||||||
if (judgeConfigObj['432'] != 0 || this.examSubject == "2") {
|
if (config_432 != '0' || this.examSubject == "2") {
|
||||||
//断点续考判断
|
//断点续考判断
|
||||||
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
||||||
const examItems: string = currentParams?.examItems;
|
const examItems: string = currentParams?.examItems;
|
||||||
@ -559,7 +564,7 @@ struct Index {
|
|||||||
const startTime = examItemsArrs[0]
|
const startTime = examItemsArrs[0]
|
||||||
const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
|
const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
|
||||||
const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || []
|
const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || []
|
||||||
if (judgeConfigObj['432'] == 2 || this.examSubject == "2") {
|
if (config_432 == '2' || this.examSubject == "2") {
|
||||||
//TODO 带项目带里程
|
//TODO 带项目带里程
|
||||||
if (ddxkKsxmArr?.length) {
|
if (ddxkKsxmArr?.length) {
|
||||||
//断点续考
|
//断点续考
|
||||||
@ -657,7 +662,7 @@ struct Index {
|
|||||||
const beginDataObj:JudgeBeginObj = JSON.parse(beginData)
|
const beginDataObj:JudgeBeginObj = JSON.parse(beginData)
|
||||||
|
|
||||||
const examSubject = this.carInfo.examSubject;
|
const examSubject = this.carInfo.examSubject;
|
||||||
this.examSubject = isTrajectoryOpen ? (initDataObj.kskm) : examSubject;
|
this.examSubject =( isTrajectoryOpen ? (initDataObj.kskm) : examSubject) +'';
|
||||||
this.carInfo.examSubject = this.examSubject
|
this.carInfo.examSubject = this.examSubject
|
||||||
this.singlePlay = beginDataObj.exam == 0;
|
this.singlePlay = beginDataObj.exam == 0;
|
||||||
this.carName = initDataObj.name;
|
this.carName = initDataObj.name;
|
||||||
@ -739,7 +744,7 @@ struct Index {
|
|||||||
|
|
||||||
if (this.examSubject == "3") {
|
if (this.examSubject == "3") {
|
||||||
Row() {
|
Row() {
|
||||||
if (this.judgeConfigObj['375'] == '0') {
|
if (Reflect.get(this.judgeConfigObj,'375') == '0') {
|
||||||
Text(`应行驶:${this.examMileage}m`)
|
Text(`应行驶:${this.examMileage}m`)
|
||||||
.fontColor('#E5CCA1')
|
.fontColor('#E5CCA1')
|
||||||
.fontSize(this.FONTSIZE)
|
.fontSize(this.FONTSIZE)
|
||||||
@ -756,7 +761,7 @@ struct Index {
|
|||||||
Column() {
|
Column() {
|
||||||
Row() {
|
Row() {
|
||||||
Text(this.carztStr).fontColor('#FFA500').fontSize(this.FONTSIZE)
|
Text(this.carztStr).fontColor('#FFA500').fontSize(this.FONTSIZE)
|
||||||
if (this.judgeConfigObj['342'] == '0') {
|
if (Reflect.get(this.judgeConfigObj,'342') == '0') {
|
||||||
Text(`${this.dw}挡`).fontColor('#FFA500').fontSize(this.FONTSIZE).padding({ left: 15, right: 15 })
|
Text(`${this.dw}挡`).fontColor('#FFA500').fontSize(this.FONTSIZE).padding({ left: 15, right: 15 })
|
||||||
Text(`${this.sd}km/h`).fontColor('#FFA500').fontSize(this.FONTSIZE)
|
Text(`${this.sd}km/h`).fontColor('#FFA500').fontSize(this.FONTSIZE)
|
||||||
}
|
}
|
||||||
@ -1037,7 +1042,7 @@ struct Index {
|
|||||||
// type: 1,
|
// type: 1,
|
||||||
// name: 'button_media.wav'
|
// name: 'button_media.wav'
|
||||||
// })
|
// })
|
||||||
if (this.judgeConfigObj['353'] == '0') {
|
if (Reflect.get(this.judgeConfigObj,'353') == '0') {
|
||||||
this.endPopupVisible = true
|
this.endPopupVisible = true
|
||||||
} else {
|
} else {
|
||||||
Prompt.showToast({
|
Prompt.showToast({
|
||||||
@ -1066,7 +1071,7 @@ struct Index {
|
|||||||
|
|
||||||
|
|
||||||
//科目三人工扣分弹窗
|
//科目三人工扣分弹窗
|
||||||
if (this.isDeductedPopShow && this.examSubject == '3' && this.judgeConfigObj['342'] == '0') {
|
if (this.isDeductedPopShow && this.examSubject == '3' && Reflect.get(this.judgeConfigObj,'342') == '0') {
|
||||||
DeductedPopup({
|
DeductedPopup({
|
||||||
defaultTabIndex: this.defaultTabIndex,
|
defaultTabIndex: this.defaultTabIndex,
|
||||||
currentItems: Reflect.ownKeys(this.projectsObj).map(projectKey => {
|
currentItems: Reflect.ownKeys(this.projectsObj).map(projectKey => {
|
||||||
@ -1150,7 +1155,7 @@ struct Index {
|
|||||||
router.back()
|
router.back()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.judgeConfigObj['344'] == 1) {
|
if (Reflect.get(this.judgeConfigObj,'344') == 1) {
|
||||||
Prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '考试未结束,不允许手动退出!',
|
message: '考试未结束,不允许手动退出!',
|
||||||
duration: 4000
|
duration: 4000
|
||||||
@ -1254,7 +1259,7 @@ struct Index {
|
|||||||
// 正在进行的项目 取消项目
|
// 正在进行的项目 取消项目
|
||||||
if (isManualProjectIn && currentProject.type == '2') {
|
if (isManualProjectIn && currentProject.type == '2') {
|
||||||
//判断人工是否能取消项目 && 当前项目有扣分的不能取消
|
//判断人工是否能取消项目 && 当前项目有扣分的不能取消
|
||||||
if (judgeConfigObj['340'] == 1) {
|
if (Reflect.get(this.judgeConfigObj,'340') == 1) {
|
||||||
await this.judge.setJudgeItem(projectCode, 2);
|
await this.judge.setJudgeItem(projectCode, 2);
|
||||||
Prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '项目取消',
|
message: '项目取消',
|
||||||
@ -1265,11 +1270,11 @@ struct Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 靠边停车时候可以触发
|
// 靠边停车时候可以触发
|
||||||
if (judgeConfigObj['343'] === '0') {
|
if (Reflect.get(this.judgeConfigObj,'343') === '0') {
|
||||||
const xmmcStr = this.xmmcStr;
|
const xmmcStr = this.xmmcStr;
|
||||||
if (xmmcStr == '无' || xmmcStr == '') {
|
if (xmmcStr == '无' || xmmcStr == '') {
|
||||||
//512[6] 人工项目按钮放大确认
|
//512[6] 人工项目按钮放大确认
|
||||||
const param512:string[] = (judgeConfigObj['512'] || '').split(',');
|
const param512:string[] = (Reflect.get(this.judgeConfigObj,'512') || '').split(',');
|
||||||
console.info('surenjun', param512)
|
console.info('surenjun', param512)
|
||||||
if (param512[6] !== '0') {
|
if (param512[6] !== '0') {
|
||||||
this.amplifiedImgIndex = index;
|
this.amplifiedImgIndex = index;
|
||||||
@ -1312,17 +1317,17 @@ struct Index {
|
|||||||
const projectType = currentProject.type;
|
const projectType = currentProject.type;
|
||||||
|
|
||||||
//不允许人工触发的项目列表,以","分隔
|
//不允许人工触发的项目列表,以","分隔
|
||||||
const unExitManualProjects:string[] = judgeConfigObj['332'].split(',') || [];
|
const unExitManualProjects:string[] = Reflect.get(this.judgeConfigObj,'332').split(',') || [];
|
||||||
//直线行驶中不进其他考试项目(0-否 1-是)
|
//直线行驶中不进其他考试项目(0-否 1-是)
|
||||||
const param348:string = judgeConfigObj['348'] || '0',
|
const param348:string = Reflect.get(this.judgeConfigObj,'348') || '0',
|
||||||
//里程不够允许手工点靠边停车(0-否 1-是)
|
//里程不够允许手工点靠边停车(0-否 1-是)
|
||||||
param387:string = judgeConfigObj['387'] || '0',
|
param387:string = Reflect.get(this.judgeConfigObj,'387') || '0',
|
||||||
//里程不够不报靠边停车(0-否+1-是+2-必考项目未完成且里程不够不报项目)
|
//里程不够不报靠边停车(0-否+1-是+2-必考项目未完成且里程不够不报项目)
|
||||||
param319:string = judgeConfigObj['319'] || '0',
|
param319:string = Reflect.get(this.judgeConfigObj,'319') || '0',
|
||||||
//人工项目是否能取消 1:可取消;
|
//人工项目是否能取消 1:可取消;
|
||||||
param340:string = judgeConfigObj['340'] || '0',
|
param340:string = Reflect.get(this.judgeConfigObj,'340') || '0',
|
||||||
//307参数里设置的项目,项目已经做过,后续不能人工触发;
|
//307参数里设置的项目,项目已经做过,后续不能人工触发;
|
||||||
param307:string[] = (judgeConfigObj['307'] || '').split(',');
|
param307:string[] = (Reflect.get(this.judgeConfigObj,'307') || '').split(',');
|
||||||
|
|
||||||
//非行驶状态(没有速度),人工项目不能触发(按钮灰色)
|
//非行驶状态(没有速度),人工项目不能触发(按钮灰色)
|
||||||
if (carztStr === '停车') {
|
if (carztStr === '停车') {
|
||||||
@ -1330,7 +1335,7 @@ struct Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//车上是否能进行人工操作(0-能1-不能人工评判2-不能人工进项目3-都不能)
|
//车上是否能进行人工操作(0-能1-不能人工评判2-不能人工进项目3-都不能)
|
||||||
if (judgeConfigObj['342'] === '3' || judgeConfigObj['342'] === '2') {
|
if (Reflect.get(this.judgeConfigObj,'342') === '3' || Reflect.get(this.judgeConfigObj,'342') === '2') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1385,12 +1390,12 @@ struct Index {
|
|||||||
const num = lane.num;
|
const num = lane.num;
|
||||||
const count = lane.count;
|
const count = lane.count;
|
||||||
|
|
||||||
const param_3:string[] = (judgeConfigObj['514']?.split(',') || []);
|
const param_3:string[] = (Reflect.get(this.judgeConfigObj,'514')?.split(',') || []);
|
||||||
const param_4:string[] = (judgeConfigObj['515']?.split(',') || []);
|
const param_4:string[] = (Reflect.get(this.judgeConfigObj,'515')?.split(',') || []);
|
||||||
const param_10:string[] = (judgeConfigObj['516']?.split(',') || []);
|
const param_10:string[] = (Reflect.get(this.judgeConfigObj,'516')?.split(',') || []);
|
||||||
const param_11:string[] = (judgeConfigObj['517']?.split(',') || []);
|
const param_11:string[] = (Reflect.get(this.judgeConfigObj,'517')?.split(',') || []);
|
||||||
const param_9:string[] = (judgeConfigObj['518']?.split(',') || []);
|
const param_9:string[] = (Reflect.get(this.judgeConfigObj,'518')?.split(',') || []);
|
||||||
const param_12:string[] = (judgeConfigObj['519']?.split(',') || []);
|
const param_12:string[] = (Reflect.get(this.judgeConfigObj,'519')?.split(',') || []);
|
||||||
|
|
||||||
const projectRoads:ProjectRoads = {
|
const projectRoads:ProjectRoads = {
|
||||||
//直线行驶
|
//直线行驶
|
||||||
@ -1420,7 +1425,7 @@ struct Index {
|
|||||||
//设置了514-519参数,只能在设置的路段触发对应项目
|
//设置了514-519参数,只能在设置的路段触发对应项目
|
||||||
if (currentProjectRoad.includes(road)) {
|
if (currentProjectRoad.includes(road)) {
|
||||||
//如果525为1,则514-519设置的路段不能触发对应项目
|
//如果525为1,则514-519设置的路段不能触发对应项目
|
||||||
if (judgeConfigObj['525'] == '1') {
|
if (Reflect.get(this.judgeConfigObj,'525') == '1') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1429,7 +1434,7 @@ struct Index {
|
|||||||
|
|
||||||
//405参数为2是,如果在最左侧车道,超车项目不能触发;
|
//405参数为2是,如果在最左侧车道,超车项目不能触发;
|
||||||
if (projectCode == '10' &&
|
if (projectCode == '10' &&
|
||||||
judgeConfigObj['405'] == '2' &&
|
Reflect.get(this.judgeConfigObj,'405') == '2' &&
|
||||||
(num === count) &&
|
(num === count) &&
|
||||||
num > 0
|
num > 0
|
||||||
) {
|
) {
|
||||||
@ -1460,10 +1465,10 @@ struct Index {
|
|||||||
getIsManualKf = () => {
|
getIsManualKf = () => {
|
||||||
if (this.examSubject == '3') {
|
if (this.examSubject == '3') {
|
||||||
//杭州训练模式不允许人工评判
|
//杭州训练模式不允许人工评判
|
||||||
if (this.singlePlay && this.judgeConfigObj['211'] == 'zjhz') {
|
if (this.singlePlay && Reflect.get(this.judgeConfigObj,'211') == 'zjhz') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (this.judgeConfigObj['342'] == '0') {
|
if (Reflect.get(this.judgeConfigObj,'342') == '0') {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import libJudgeSdk from "libjudgesdk.so"
|
|||||||
*
|
*
|
||||||
* @desc 获取版本信息
|
* @desc 获取版本信息
|
||||||
**/
|
**/
|
||||||
export async function examJudgeVersion() {
|
export async function examJudgeVersion(): Promise<string> {
|
||||||
return await libJudgeSdk.examJudgeVersion();
|
return await libJudgeSdk.examJudgeVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ export async function examJudgeVersion() {
|
|||||||
* @desc 设置评判日志级别和日志回调函数
|
* @desc 设置评判日志级别和日志回调函数
|
||||||
*/
|
*/
|
||||||
export async function examJudgeSetLogCallback(level: number, handleLog: Function): Promise<string> {
|
export async function examJudgeSetLogCallback(level: number, handleLog: Function): Promise<string> {
|
||||||
const temp = libJudgeSdk.examJudgeSetLogCallback(level, handleLog);
|
const temp:number = libJudgeSdk.examJudgeSetLogCallback(level, handleLog);
|
||||||
return await handle(temp, 'examJudgeSetLogCallback')
|
return await handle(temp, 'examJudgeSetLogCallback')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ export async function examJudgeSetLogCallback(level: number, handleLog: Function
|
|||||||
*/
|
*/
|
||||||
export async function examJudgeInit(data) {
|
export async function examJudgeInit(data) {
|
||||||
const str = JSON.stringify(data);
|
const str = JSON.stringify(data);
|
||||||
const temp = libJudgeSdk.examJudgeInit(str, str.length);
|
const temp:number = libJudgeSdk.examJudgeInit(str, str.length);
|
||||||
return await handle(temp, 'examJudgeInit')
|
return await handle(temp, 'examJudgeInit')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,8 +44,7 @@ export async function examJudgeInit(data) {
|
|||||||
* @desc 执行实时考试过程 实时传递传感信息
|
* @desc 执行实时考试过程 实时传递传感信息
|
||||||
*/
|
*/
|
||||||
export async function examJudgeRealExam(data) {
|
export async function examJudgeRealExam(data) {
|
||||||
const str = JSON.stringify(data);
|
const temp:number = libJudgeSdk.examJudgeRealExam(JSON.stringify(data), str.length);
|
||||||
const temp = libJudgeSdk.examJudgeRealExam(str, str.length);
|
|
||||||
return await handle(temp, 'examJudgeRealExam')
|
return await handle(temp, 'examJudgeRealExam')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,8 +53,8 @@ export async function examJudgeRealExam(data) {
|
|||||||
* @desc 设置评判输出的考试过程数据回调函数
|
* @desc 设置评判输出的考试过程数据回调函数
|
||||||
*/
|
*/
|
||||||
//js_examJudgeSetRealExamCallback
|
//js_examJudgeSetRealExamCallback
|
||||||
export async function examJudgeSetRealExamCallback(fn) {
|
export async function examJudgeSetRealExamCallback(fn:Function) {
|
||||||
const temp = libJudgeSdk.examJudgeSetRealExamCallback(fn);
|
const temp:number = libJudgeSdk.examJudgeSetRealExamCallback(fn);
|
||||||
return await handle(temp, 'examJudgeSetRealExamCallback')
|
return await handle(temp, 'examJudgeSetRealExamCallback')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,8 +62,8 @@ export async function examJudgeSetRealExamCallback(fn) {
|
|||||||
*
|
*
|
||||||
* @desc 设置轨迹图像回调函数
|
* @desc 设置轨迹图像回调函数
|
||||||
*/
|
*/
|
||||||
export async function examJudgeMapImageSetCallback(fn) {
|
export async function examJudgeMapImageSetCallback(fn:Function) {
|
||||||
const temp = libJudgeSdk.examJudgeMapImageSetCallback(fn);
|
const temp:number = libJudgeSdk.examJudgeMapImageSetCallback(fn);
|
||||||
return await handle(temp, 'examJudgeMapImageSetCallback')
|
return await handle(temp, 'examJudgeMapImageSetCallback')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +80,7 @@ export async function examJudgeArtificialMark(
|
|||||||
//扣分类型:number
|
//扣分类型:number
|
||||||
type: number
|
type: number
|
||||||
) {
|
) {
|
||||||
const temp = libJudgeSdk.examJudgeArtificialMark(itemno, serial, type);
|
const temp:number= libJudgeSdk.examJudgeArtificialMark(itemno, serial, type);
|
||||||
return await handle(temp, 'examJudgeArtificialMark')
|
return await handle(temp, 'examJudgeArtificialMark')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,7 +94,7 @@ export async function examJudgeArtificialItem(
|
|||||||
//操作类型
|
//操作类型
|
||||||
type: number = 0
|
type: number = 0
|
||||||
) {
|
) {
|
||||||
const temp = libJudgeSdk.examJudgeArtificialItem(itemno, type);
|
const temp:number = libJudgeSdk.examJudgeArtificialItem(itemno, type);
|
||||||
return await handle(temp, 'examJudgeArtificialMark')
|
return await handle(temp, 'examJudgeArtificialMark')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,8 +103,8 @@ export async function examJudgeArtificialItem(
|
|||||||
*
|
*
|
||||||
* @desc 设置地图轨迹图像绘制的开关
|
* @desc 设置地图轨迹图像绘制的开关
|
||||||
*/
|
*/
|
||||||
export async function examJudgeMapSetDrawing(fn) {
|
export async function examJudgeMapSetDrawing(bool:boolean) {
|
||||||
const temp = libJudgeSdk.examJudgeMapSetDrawing(fn);
|
const temp:number = libJudgeSdk.examJudgeMapSetDrawing(bool);
|
||||||
return await handle(temp, 'examJudgeMapSetDrawing')
|
return await handle(temp, 'examJudgeMapSetDrawing')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,7 +115,7 @@ export async function examJudgeMapSetDrawing(fn) {
|
|||||||
*/
|
*/
|
||||||
export async function examJudgeBeginExam(data) {
|
export async function examJudgeBeginExam(data) {
|
||||||
const str = JSON.stringify(data);
|
const str = JSON.stringify(data);
|
||||||
const temp = libJudgeSdk.examJudgeBeginExam(str, str.length);
|
const temp:number = libJudgeSdk.examJudgeBeginExam(str, str.length);
|
||||||
return await handle(temp, 'examJudgeBeginExam')
|
return await handle(temp, 'examJudgeBeginExam')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,16 +123,16 @@ export async function examJudgeBeginExam(data) {
|
|||||||
/* @params level:日志等级,infoStr:日志信息,len:数据长度
|
/* @params level:日志等级,infoStr:日志信息,len:数据长度
|
||||||
* @desc处理日志文件
|
* @desc处理日志文件
|
||||||
*/
|
*/
|
||||||
export function handleLog(level, infoStr, len) {
|
// export function handleLog(level, infoStr, len) {
|
||||||
//TODO
|
// //TODO
|
||||||
}
|
// }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @desc结束考试
|
* @desc结束考试
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function examJudgeEndExam() {
|
export async function examJudgeEndExam() {
|
||||||
const temp = libJudgeSdk.examJudgeEndExam();
|
const temp:number = libJudgeSdk.examJudgeEndExam();
|
||||||
return await handle(temp, 'examJudgeEndExam')
|
return await handle(temp, 'examJudgeEndExam')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,7 +141,7 @@ export async function examJudgeEndExam() {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function examJudgeDestroy() {
|
export async function examJudgeDestroy() {
|
||||||
const temp = libJudgeSdk.examJudgeDestroy();
|
const temp:number = libJudgeSdk.examJudgeDestroy();
|
||||||
return await handle(temp, 'examJudgeDestroy')
|
return await handle(temp, 'examJudgeDestroy')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +150,7 @@ export async function examJudgeDestroy() {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function examJudgeMapSetParam(width: number, height: number) {
|
export async function examJudgeMapSetParam(width: number, height: number) {
|
||||||
const temp = libJudgeSdk.examJudgeMapSetParam(width, height);
|
const temp:number = libJudgeSdk.examJudgeMapSetParam(width, height);
|
||||||
return await handle(temp, 'examJudgeMapSetParam')
|
return await handle(temp, 'examJudgeMapSetParam')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,7 +159,7 @@ export async function examJudgeMapSetParam(width: number, height: number) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function examJudgeMapSetScaling(scaling?: number) {
|
export async function examJudgeMapSetScaling(scaling?: number) {
|
||||||
const temp = libJudgeSdk.examJudgeMapSetScaling(scaling || 1);
|
const temp:number = libJudgeSdk.examJudgeMapSetScaling(scaling || 1);
|
||||||
return await handle(temp, 'examJudgeMapSetScaling')
|
return await handle(temp, 'examJudgeMapSetScaling')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -169,7 +168,7 @@ export async function examJudgeMapSetScaling(scaling?: number) {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function examJudgeSetPerformCallback(fn) {
|
export async function examJudgeSetPerformCallback(fn) {
|
||||||
const temp = libJudgeSdk.examJudgeSetPerformCallback(fn);
|
const temp:number = libJudgeSdk.examJudgeSetPerformCallback(fn);
|
||||||
return await handle(temp, 'examJudgeSetPerformCallback')
|
return await handle(temp, 'examJudgeSetPerformCallback')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,17 +177,16 @@ export async function examJudgeSetPerformCallback(fn) {
|
|||||||
* @desc 语音播报结束
|
* @desc 语音播报结束
|
||||||
* /
|
* /
|
||||||
*/
|
*/
|
||||||
|
interface SoundParam{
|
||||||
export async function examJudgeSoundEnd(param: {
|
|
||||||
//项目代码
|
//项目代码
|
||||||
itemno: number,
|
xmdm: number,
|
||||||
//语音码
|
//语音码
|
||||||
code: string,
|
code: string,
|
||||||
//语音类型
|
//语音类型
|
||||||
type: number,
|
type: 0|1,
|
||||||
}) {
|
}
|
||||||
const { itemno, code, type } = param;
|
export async function examJudgeSoundEnd(param: SoundParam) {
|
||||||
const temp = libJudgeSdk.examJudgeSoundEnd(itemno, code, type);
|
const temp:number = libJudgeSdk.examJudgeSoundEnd(param.xmdm, param.code, param.type);
|
||||||
return await handle(temp, 'examJudgeSoundEnd')
|
return await handle(temp, 'examJudgeSoundEnd')
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,16 +195,16 @@ export async function examJudgeSoundEnd(param: {
|
|||||||
* @desc 实时距离计算
|
* @desc 实时距离计算
|
||||||
*
|
*
|
||||||
* */
|
* */
|
||||||
export async function examCalcGpsDistance(param: {
|
interface DistanceParam{
|
||||||
jd1: number,
|
jd1: number,
|
||||||
wd1: number,
|
wd1: number,
|
||||||
jd2: number,
|
jd2: number,
|
||||||
wd2: number,
|
wd2: number,
|
||||||
h: number
|
h: number
|
||||||
}):Promise<number> {
|
}
|
||||||
const { jd1, wd1, jd2, wd2, h } = param
|
export async function examCalcGpsDistance(param:DistanceParam):Promise<number> {
|
||||||
const temp = libJudgeSdk.examCalcGpsDistance(jd1, wd1, jd2, wd2, h);
|
const temp:number = libJudgeSdk.examCalcGpsDistance(param.jd1, param.wd1, param.jd2, param.wd2, param.h);
|
||||||
return await temp;
|
return temp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -214,7 +212,7 @@ export async function examCalcGpsDistance(param: {
|
|||||||
* @desc通用处理函数
|
* @desc通用处理函数
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
async function handle(temp, fnName): Promise<string> {
|
async function handle(temp:number, fnName:string): Promise<string> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (temp == 0) {
|
if (temp == 0) {
|
||||||
resolve(temp);
|
resolve(temp);
|
||||||
@ -31,7 +31,7 @@ export interface MarkRule {
|
|||||||
score?:number
|
score?:number
|
||||||
xmmcStr?: string
|
xmmcStr?: string
|
||||||
desc?: string
|
desc?: string
|
||||||
xmdm?: string
|
xmdm?: number
|
||||||
type?: 0 | 1 | 2
|
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 systemTime from '@ohos.systemDateTime';
|
||||||
import { Array2Byte } from './Common';
|
import { Array2Byte } from './Common';
|
||||||
import { CarInfoType } from '../../../model';
|
import { CarInfoType } from '../../../model';
|
||||||
import { Gps, Lane,Plc,Vision,Radar, Sensor,DefaultJudgeConfigObj} from '../../../model/Judge'
|
import { Gps, Lane,Plc,Vision,Radar, Sensor,DefaultJudgeConfigObj, JudgeLane} from '../../../model/Judge'
|
||||||
|
|
||||||
interface Extend {}
|
interface Extend {}
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ export function getDwStatusType(dw?:number) {
|
|||||||
|
|
||||||
|
|
||||||
// 中心实时项目状态转换
|
// 中心实时项目状态转换
|
||||||
export function getCenterProjectStatus(status?:number) {
|
export function getCenterProjectStatus(status?:number):string {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
//不考
|
//不考
|
||||||
case 0:
|
case 0:
|
||||||
@ -98,8 +98,8 @@ export function getKmProjectVoice(
|
|||||||
// 1:项目开始 2:项目结束
|
// 1:项目开始 2:项目结束
|
||||||
type: 1 | 2,
|
type: 1 | 2,
|
||||||
judgeConfig:object,
|
judgeConfig:object,
|
||||||
lane:Lane,
|
lane:JudgeLane,
|
||||||
xmxh:number
|
xmxh:string
|
||||||
) {
|
) {
|
||||||
const carInfo = AppStorage.get<CarInfoType>('carInfo');
|
const carInfo = AppStorage.get<CarInfoType>('carInfo');
|
||||||
const examSubject = carInfo.examSubject;
|
const examSubject = carInfo.examSubject;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user