Compare commits
2 Commits
246980c371
...
fab5f64df5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fab5f64df5 | ||
|
|
d697c69cee |
@ -197,7 +197,8 @@ interface UploadExamMileage {
|
|||||||
carId: string
|
carId: string
|
||||||
examinationRoomId: string
|
examinationRoomId: string
|
||||||
lsh: string
|
lsh: string
|
||||||
kslc: string
|
kslc: number
|
||||||
|
kskssj:string
|
||||||
}
|
}
|
||||||
|
|
||||||
// 上传考试里程
|
// 上传考试里程
|
||||||
@ -208,7 +209,7 @@ export async function uploadExamMileage(params: UploadExamMileage) {
|
|||||||
if (singlePlay) {
|
if (singlePlay) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const time = await GetCurrentTime()
|
const time = GetCurrentTime()
|
||||||
return request<object>({
|
return request<object>({
|
||||||
url: '/der2/services/exam/uploadExamMileage.ws',
|
url: '/der2/services/exam/uploadExamMileage.ws',
|
||||||
data: `<?xml version="1.0" encoding="UTF-8"?>
|
data: `<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|||||||
@ -90,10 +90,14 @@ export interface BaseInfoType {
|
|||||||
deviceNo?: string
|
deviceNo?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface kfdmObj{
|
||||||
|
xmdm:string
|
||||||
|
kfdm:string
|
||||||
|
}
|
||||||
// 路由参数
|
// 路由参数
|
||||||
export interface RouteParamsType {
|
export interface RouteParamsType {
|
||||||
sczb?: string;
|
sczb?: string;
|
||||||
kfdm?: string;
|
kfdm?: kfdmObj[];
|
||||||
type?: string;
|
type?: string;
|
||||||
wayno?: string;
|
wayno?: string;
|
||||||
kString?: string;
|
kString?: string;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
// ------------------------------
|
// ------------------------------
|
||||||
// 基础共用类型
|
// 基础共用类型
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
|
import {MA_SYSTEMPARMType} from './Table'
|
||||||
/** 基础考试字段 */
|
/** 基础考试字段 */
|
||||||
interface BaseExamFields {
|
interface BaseExamFields {
|
||||||
kchp?: string;
|
kchp?: string;
|
||||||
@ -41,11 +41,16 @@ export interface UDPParamType {
|
|||||||
|
|
||||||
/** 扣分代码项 */
|
/** 扣分代码项 */
|
||||||
export interface KfdmType {
|
export interface KfdmType {
|
||||||
xmdm: number;
|
|
||||||
kfdm: string;
|
xmmcStr: string
|
||||||
markreal: number;
|
xmdm: number
|
||||||
|
desc: string
|
||||||
|
score: number
|
||||||
markcatalog: string;
|
markcatalog: string;
|
||||||
score: number;
|
markserial: string
|
||||||
|
kfdm: string;
|
||||||
|
markreal?: number;
|
||||||
|
kfxh?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------
|
// ------------------------------
|
||||||
@ -213,10 +218,12 @@ interface Qfsj {
|
|||||||
jl: number
|
jl: number
|
||||||
sd: number
|
sd: number
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Show {
|
interface Show {
|
||||||
bh: number
|
bh: number
|
||||||
zb: Zb[]
|
zb: Zb[]
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Zb {
|
interface Zb {
|
||||||
x: number,
|
x: number,
|
||||||
y: number
|
y: number
|
||||||
@ -250,7 +257,162 @@ export interface DefaultJudgeConfigObj{
|
|||||||
param_375: string
|
param_375: string
|
||||||
param_387: string
|
param_387: string
|
||||||
param_432: string
|
param_432: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SyssetConfig {
|
||||||
|
key?: number
|
||||||
|
value?: string
|
||||||
|
name?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface JudgeCallBacData {
|
||||||
|
xmmcStr?: string
|
||||||
|
carztStr?: string
|
||||||
|
kfArr?: MarkRule[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** 考试过程中项目信息**/
|
||||||
|
export interface ProjectInfo {
|
||||||
|
//项目名称
|
||||||
|
name?: string
|
||||||
|
//项目代码
|
||||||
|
projectCode?: string
|
||||||
|
//无锡所项目代码
|
||||||
|
projectCodeCenter?: string
|
||||||
|
//项目简写
|
||||||
|
abbreviation?: string
|
||||||
|
///项目是否考过了
|
||||||
|
isEnd?: boolean,
|
||||||
|
|
||||||
|
//项目开始数据是否上传过
|
||||||
|
isUpload?: boolean
|
||||||
|
//是否是必考
|
||||||
|
isRequired?: boolean
|
||||||
|
//项目状态:未做 正在做 及格 不及格 有扣分
|
||||||
|
type?: '1' | '2' | '3' | '4' | '5'
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 科目二项目代码 **/
|
||||||
|
export type Km2XmdmEnum = 0 | 2 | 3 | 5 | 6
|
||||||
|
|
||||||
|
/** 科目三项目代码 **/
|
||||||
|
export type Km3XmdmEnum = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 41
|
||||||
|
|
||||||
|
/** 科目二无锡所项目代码 **/
|
||||||
|
export type Km2WxXmdmEnum = 20100 | 20300 | 20400 | 20600 | 20700
|
||||||
|
|
||||||
|
/** 科目三无锡所项目代码 **/
|
||||||
|
export type Km3WxXmdmEnum = 40100 | 40200 | 40300 | 40500 | 40700 | 41000
|
||||||
|
| 41100 | 41200 | 41300 | 41400 | 40600 | 41500 | 41700 | 40400 | 40800 | 40900
|
||||||
|
|
||||||
|
|
||||||
|
/** 考试过程中所有项目信息**/
|
||||||
|
export interface ProjectInfos {
|
||||||
|
0?: ProjectInfo
|
||||||
|
2?: ProjectInfo
|
||||||
|
3?: ProjectInfo
|
||||||
|
5?: ProjectInfo
|
||||||
|
6?: ProjectInfo
|
||||||
|
1?: ProjectInfo
|
||||||
|
4?: ProjectInfo
|
||||||
|
7?: ProjectInfo
|
||||||
|
8?: ProjectInfo
|
||||||
|
9?: ProjectInfo
|
||||||
|
10?: ProjectInfo
|
||||||
|
11?: ProjectInfo
|
||||||
|
12?: ProjectInfo
|
||||||
|
14?: ProjectInfo
|
||||||
|
15?: ProjectInfo
|
||||||
|
16?: ProjectInfo
|
||||||
|
41?: ProjectInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectCenterInfos {
|
||||||
|
20100?: ProjectInfo
|
||||||
|
20300?: ProjectInfo
|
||||||
|
20400?: ProjectInfo
|
||||||
|
20600?: ProjectInfo
|
||||||
|
20700?: ProjectInfo
|
||||||
|
|
||||||
|
40100?: ProjectInfo
|
||||||
|
40200?: ProjectInfo
|
||||||
|
40300?: ProjectInfo
|
||||||
|
40500?: ProjectInfo
|
||||||
|
40700?: ProjectInfo
|
||||||
|
41000?: ProjectInfo
|
||||||
|
41100?: ProjectInfo
|
||||||
|
41200?: ProjectInfo
|
||||||
|
41300?: ProjectInfo
|
||||||
|
41400?: ProjectInfo
|
||||||
|
40600?: ProjectInfo
|
||||||
|
41500?: ProjectInfo
|
||||||
|
41700?: ProjectInfo
|
||||||
|
40400?: ProjectInfo
|
||||||
|
40800?: ProjectInfo
|
||||||
|
40900?: ProjectInfo
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface MarkRule {
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface UploadExamMileage {
|
||||||
|
carId: string
|
||||||
|
examinationRoomId: string
|
||||||
|
lsh: string
|
||||||
|
kslc: number
|
||||||
|
kskssj:string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SYSSET {
|
||||||
|
v_no: string,
|
||||||
|
v_name: string,
|
||||||
|
v_value: string
|
||||||
|
|
||||||
|
/** 轨迹文件 **/
|
||||||
|
key?:string;
|
||||||
|
name?:string;
|
||||||
|
value?:string;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/****** 评判初始化数据*****/
|
||||||
|
export interface JudgeInitObj{
|
||||||
|
name:string
|
||||||
|
kskm:string
|
||||||
|
systemparm:MA_SYSTEMPARMType[]
|
||||||
|
mark:MarkRule[]
|
||||||
|
sysset:SYSSET[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProjectRoads{
|
||||||
|
param_3?:string[]
|
||||||
|
param_4?:string[]
|
||||||
|
param_10?:string[]
|
||||||
|
param_11?:string[]
|
||||||
|
param_9?:string[]
|
||||||
|
param_12?:string[]
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/****** 评判开始考试数据*****/
|
||||||
|
export interface JudgeBeginObj{
|
||||||
|
exam:0|1
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -212,4 +212,7 @@ export interface MA_MARKRULEType {
|
|||||||
markshow?: string
|
markshow?: string
|
||||||
txt1?: string
|
txt1?: string
|
||||||
kfxh?: string
|
kfxh?: string
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -20,7 +20,6 @@ import {
|
|||||||
MarkRule,
|
MarkRule,
|
||||||
Project,
|
Project,
|
||||||
ProjectObj,
|
ProjectObj,
|
||||||
SYSSET,
|
|
||||||
SYSTEMPARMARR
|
SYSTEMPARMARR
|
||||||
} from './judgeSDK/api/judgeSDK.d';
|
} from './judgeSDK/api/judgeSDK.d';
|
||||||
|
|
||||||
@ -40,7 +39,18 @@ import {
|
|||||||
MA_SYSTEMPARMType,
|
MA_SYSTEMPARMType,
|
||||||
MASYSSETTableType,
|
MASYSSETTableType,
|
||||||
RouteParamsType,
|
RouteParamsType,
|
||||||
User
|
User,
|
||||||
|
SYSSET,
|
||||||
|
SyssetConfig,
|
||||||
|
ProjectInfo,
|
||||||
|
ProjectInfos,
|
||||||
|
ProjectCenterInfos,
|
||||||
|
JudgeInitObj,
|
||||||
|
JudgeBeginObj,
|
||||||
|
UploadExamMileage,
|
||||||
|
AmplifyItem,
|
||||||
|
ProjectRoads,
|
||||||
|
JudgeCallBacData
|
||||||
} 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';
|
||||||
@ -48,6 +58,7 @@ import { GetCurrentTime } from '../utils/Common';
|
|||||||
import { chunkArr } from './judgeSDK/utils/Common';
|
import { chunkArr } from './judgeSDK/utils/Common';
|
||||||
import FileUtils from '../utils/FileUtils';
|
import FileUtils from '../utils/FileUtils';
|
||||||
|
|
||||||
|
|
||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
struct Index {
|
struct Index {
|
||||||
@ -78,20 +89,20 @@ struct Index {
|
|||||||
@State ddxkKfArr: string[] = []
|
@State ddxkKfArr: string[] = []
|
||||||
@State xmmcStr: string = ''
|
@State xmmcStr: string = ''
|
||||||
@State carztStr: string = ''
|
@State carztStr: string = ''
|
||||||
@State kfArr: KfdmType[] = []
|
@State kfArr: MarkRule[] = []
|
||||||
@State name: string = ''
|
@State name: string = ''
|
||||||
@State idCard: string = ''
|
@State idCard: string = ''
|
||||||
@State singlePlay: boolean = false;
|
@State singlePlay: boolean = false;
|
||||||
@State totalScore: number = 100
|
@State totalScore: number = 100
|
||||||
//模拟考试项目
|
//模拟考试项目
|
||||||
@State projects: Project[] = []
|
@State projects: ProjectInfo[] = []
|
||||||
@State projectsObj: ProjectObj = {}
|
@State projectsObj: ProjectInfos = {}
|
||||||
@State projectsCenterObj: ProjectObj = {}
|
@State projectsCenterObj: ProjectInfo = {}
|
||||||
@State markRuleListObj: MarkRule = {}
|
@State markRuleListObj: MarkRule = {}
|
||||||
@State cdsbInfoObj: CDSBInfo = {}
|
@State cdsbInfoObj: CDSBInfo = {}
|
||||||
@State itemInfoObj: CDSBInfo = {}
|
@State itemInfoObj: CDSBInfo = {}
|
||||||
@State timer: number = 0
|
@State timer: number = 0
|
||||||
@State judgeConfig: CommonType[] = []
|
@State judgeConfig: SyssetConfig[] = []
|
||||||
@State judgeConfigObj: object = defaultJudgeConfigObj
|
@State judgeConfigObj: object = defaultJudgeConfigObj
|
||||||
//流水号
|
//流水号
|
||||||
@State lsh: string = ''
|
@State lsh: string = ''
|
||||||
@ -103,7 +114,7 @@ struct Index {
|
|||||||
//监管线路代码
|
//监管线路代码
|
||||||
@State xldm: string = ''
|
@State xldm: string = ''
|
||||||
//监管接口序列号
|
//监管接口序列号
|
||||||
@State serialNumber: number = 0
|
@State serialNumber: number|string = 0
|
||||||
@State syssetParam623: boolean = false;
|
@State syssetParam623: boolean = false;
|
||||||
@State syssetParam211: string = '';
|
@State syssetParam211: string = '';
|
||||||
@State carType: string = ''
|
@State carType: string = ''
|
||||||
@ -111,7 +122,7 @@ struct Index {
|
|||||||
@State isDeductedPopShow: boolean = false
|
@State isDeductedPopShow: boolean = false
|
||||||
@State isAmplifyPopShow: boolean = false
|
@State isAmplifyPopShow: boolean = false
|
||||||
@State amplifiedImgIndex: number = 0
|
@State amplifiedImgIndex: number = 0
|
||||||
@State judge: any = {}
|
judge: Judge
|
||||||
//行驶距离
|
//行驶距离
|
||||||
@State jl: number = 0
|
@State jl: number = 0
|
||||||
//应考里程
|
//应考里程
|
||||||
@ -158,17 +169,17 @@ struct Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async aboutToAppear() {
|
async aboutToAppear() {
|
||||||
const time = await GetCurrentTime()
|
const time = GetCurrentTime()
|
||||||
this.carInfo = AppStorage.get<CarInfoType>('carInfo')
|
this.carInfo = AppStorage.get<CarInfoType>('carInfo')
|
||||||
this.singlePlay = AppStorage.get<boolean>('singlePlay')
|
this.singlePlay = AppStorage.get<boolean>('singlePlay')
|
||||||
this.startTime = time.split(' ')[1]
|
this.startTime = time.split(' ')[1]
|
||||||
this.startFullTime = await GetCurrentTime(1);
|
this.startFullTime = GetCurrentTime(1);
|
||||||
// this.startHourTime = await getCurrentHourTime()
|
// this.startHourTime = await getCurrentHourTime()
|
||||||
this.startTime = dayTs().format("HHmmssSSS")
|
this.startTime = dayTs().format("HHmmssSSS")
|
||||||
this.startExamTime = time
|
this.startExamTime = time
|
||||||
|
|
||||||
setInterval(async () => {
|
setInterval(async () => {
|
||||||
this.time = await GetCurrentTime();
|
this.time = GetCurrentTime();
|
||||||
this.examTime += 1;
|
this.examTime += 1;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
//初始化数据库表
|
//初始化数据库表
|
||||||
@ -250,10 +261,10 @@ struct Index {
|
|||||||
|
|
||||||
// 获取扣分代码信息
|
// 获取扣分代码信息
|
||||||
async initMarkRules(markRules ?: MarkRule[]) {
|
async initMarkRules(markRules ?: MarkRule[]) {
|
||||||
const markRuleParams = markRules || (await GetSyncData<MA_MARKRULEType>('MA_MARKRULE'))
|
const markRuleParams = markRules || await GetSyncData<MarkRule>('MA_MARKRULE')
|
||||||
|
|
||||||
markRuleParams.forEach(mark => {
|
markRuleParams.forEach(mark => {
|
||||||
const tempObj = {
|
const tempObj:MarkRule = {
|
||||||
itemno: mark.itemno * 1,
|
itemno: mark.itemno * 1,
|
||||||
markcatalog: mark.markcatalog,
|
markcatalog: mark.markcatalog,
|
||||||
markshow: decodeURI(mark.markshow),
|
markshow: decodeURI(mark.markshow),
|
||||||
@ -269,10 +280,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}`] = {
|
this.markRuleListObj[`${mark.itemno}_${mark.markserial}`] = tempObj
|
||||||
...tempObj,
|
this.markRuleListObj[`${mark.itemno}_${mark.markserial}`].markserial = mark.markserial
|
||||||
markserial: mark.markserial,
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,14 +289,14 @@ struct Index {
|
|||||||
|
|
||||||
// 获取sysset表信息
|
// 获取sysset表信息
|
||||||
async initSysset(sysset?: SYSSET[]) {
|
async initSysset(sysset?: SYSSET[]) {
|
||||||
const syssetParams: MASYSSETTableType[] = sysset || await GetSyncData<MASYSSETTableType>('MA_SYSSET')
|
const syssetParams: SYSSET[] | MASYSSETTableType[] = sysset || await GetSyncData<MASYSSETTableType>('MA_SYSSET')
|
||||||
const serialNumberArr = syssetParams.filter(sys => sys.v_no === '901');
|
const serialNumberArr = (syssetParams as SYSSET[]).filter(sys => sys.v_no === '901');
|
||||||
console.info('surenjun serialNumberArr' + JSON.stringify(serialNumberArr))
|
console.info('surenjun serialNumberArr' + JSON.stringify(serialNumberArr))
|
||||||
this.serialNumber = (serialNumberArr[0] && serialNumberArr[0].v_value) || '';
|
this.serialNumber = (serialNumberArr[0] && serialNumberArr[0].v_value) || '';
|
||||||
// const { isTrajectoryOpen } = judgeConfig
|
// const { isTrajectoryOpen } = judgeConfig
|
||||||
const syssetJudgeConfigArr = []
|
const syssetJudgeConfigArr:SyssetConfig[] = []
|
||||||
|
|
||||||
syssetParams.forEach((sys) => {
|
syssetParams.forEach((sys:SYSSET) => {
|
||||||
if (judgeConfig.isTrajectoryOpen) {
|
if (judgeConfig.isTrajectoryOpen) {
|
||||||
sys.v_no = sys.key;
|
sys.v_no = sys.key;
|
||||||
sys.v_name = sys.name;
|
sys.v_name = sys.name;
|
||||||
@ -295,9 +304,10 @@ struct Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// const { v_no, v_value } = sys;
|
// const { v_no, v_value } = sys;
|
||||||
const v_no_num = sys.v_no * 1;
|
const v_no_num = Number(sys.v_no)
|
||||||
const value = decodeURIComponent(sys.v_value)
|
const value = decodeURIComponent(sys.v_value)
|
||||||
if (v_no_num >= 10 && v_no_num <= 900) {
|
if (v_no_num >= 10 && v_no_num <= 900) {
|
||||||
|
const name =
|
||||||
syssetJudgeConfigArr.push({
|
syssetJudgeConfigArr.push({
|
||||||
key: v_no_num, value: value,
|
key: v_no_num, value: value,
|
||||||
name: decodeURI(sys.v_name)
|
name: decodeURI(sys.v_name)
|
||||||
@ -323,20 +333,22 @@ struct Index {
|
|||||||
if (sys.v_no == '364' && sys.v_value == "2") {
|
if (sys.v_no == '364' && sys.v_value == "2") {
|
||||||
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
let currentParams: RouteParamsType = router.getParams() as RouteParamsType;
|
||||||
// const { sczb, kfdm } = currentParams;
|
// const { sczb, kfdm } = currentParams;
|
||||||
|
const kfdm = currentParams.kfdm;
|
||||||
currentParams.kfdm.forEach(kf => {
|
currentParams.kfdm.forEach(kf => {
|
||||||
// const { xmdm, kfdm } = kf
|
// const { xmdm, kfdm } = kf
|
||||||
const currentKf = this.markRuleListObj[`${kf.xmdm}_${kf.kfdm}`];
|
|
||||||
const currentProject = this.projectsObj[xmdm]
|
const currentKf: MarkRule = Reflect.get(this.markRuleListObj,`${kf.xmdm}_${kf.kfdm}`)
|
||||||
|
const currentProject:ProjectInfo = Reflect.get(this.projectsObj,kf.xmdm)
|
||||||
|
|
||||||
// 过滤考前绕车一周上车准备的扣分
|
// 过滤考前绕车一周上车准备的扣分
|
||||||
if (currentParams.sczb == "1" && xmdm == '1') {
|
if (currentParams.sczb == "1" && kf.xmdm == '1') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.kfArr.push({
|
this.kfArr.push({
|
||||||
//扣分项目名称
|
//扣分项目名称
|
||||||
xmmcStr: currentProject.name,
|
xmmcStr: currentProject.name,
|
||||||
xmdm,
|
xmdm:kf.xmdm,
|
||||||
desc: currentKf.markshow,
|
desc: currentKf.markshow,
|
||||||
score: currentKf.markreal,
|
score: currentKf.markreal,
|
||||||
markcatalog: currentKf.markcatalog,
|
markcatalog: currentKf.markcatalog,
|
||||||
@ -345,10 +357,10 @@ struct Index {
|
|||||||
})
|
})
|
||||||
this.totalScore += currentKf.markreal * 1;
|
this.totalScore += currentKf.markreal * 1;
|
||||||
})
|
})
|
||||||
this.projectsObj[1].type = kfdm.length ? '4' : '3';
|
const project_1 = Reflect.get(this.projectsObj,1)
|
||||||
this.projectsObj = {
|
project_1.type = kfdm.length ? '4' : '3';
|
||||||
...this.projectsObj
|
Reflect.set(this.projectsObj,1,project_1)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.judgeConfigObj[sys.v_no] = value
|
this.judgeConfigObj[sys.v_no] = value
|
||||||
|
|
||||||
@ -372,7 +384,7 @@ struct Index {
|
|||||||
console.info('surenjun kStringArr', JSON.stringify(kStringArr))
|
console.info('surenjun kStringArr', JSON.stringify(kStringArr))
|
||||||
let isInExam = kStringArr.length > 0;
|
let isInExam = kStringArr.length > 0;
|
||||||
// const { isTrajectoryOpen } = judgeConfig
|
// const { isTrajectoryOpen } = judgeConfig
|
||||||
let carNo = '', allItems = [];
|
let carNo = '', allItems:string[] = [];
|
||||||
systemParms.forEach((systemParm) => {
|
systemParms.forEach((systemParm) => {
|
||||||
if (judgeConfig.isTrajectoryOpen) {
|
if (judgeConfig.isTrajectoryOpen) {
|
||||||
systemParm.no1 = systemParm.NO1 + '';
|
systemParm.no1 = systemParm.NO1 + '';
|
||||||
@ -385,6 +397,11 @@ struct Index {
|
|||||||
// const { no1, no2, no3, } = systemParm;
|
// const { no1, no2, no3, } = systemParm;
|
||||||
const txt1 = decodeURI(systemParm.txt1)
|
const txt1 = decodeURI(systemParm.txt1)
|
||||||
const txt2 = decodeURI(systemParm.txt2)
|
const txt2 = decodeURI(systemParm.txt2)
|
||||||
|
|
||||||
|
const no1 = systemParm.no1;
|
||||||
|
const no2 = systemParm.no2;
|
||||||
|
const no3 = systemParm.no3;
|
||||||
|
|
||||||
//获取当前考车的no2
|
//获取当前考车的no2
|
||||||
if (systemParm.no1 == "3" && systemParm.no3 == "1") {
|
if (systemParm.no1 == "3" && systemParm.no3 == "1") {
|
||||||
if (txt1 === this.carName) {
|
if (txt1 === this.carName) {
|
||||||
@ -413,42 +430,36 @@ struct Index {
|
|||||||
//科目三获取项目
|
//科目三获取项目
|
||||||
(this.examSubject == "3" && systemParm.no1 == "6")
|
(this.examSubject == "3" && systemParm.no1 == "6")
|
||||||
) {
|
) {
|
||||||
|
|
||||||
const name = decodeURI(systemParm.txt1)
|
const name = decodeURI(systemParm.txt1)
|
||||||
//小车过滤掉 夜间模拟行驶
|
//小车过滤掉 夜间模拟行驶
|
||||||
if (sCarTypes.includes(this.carType) && name === '夜间行驶') {
|
if (sCarTypes.includes(this.carType) && name === '夜间行驶') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const currentProject:ProjectInfo = {
|
||||||
const currentProject = {
|
|
||||||
name,
|
name,
|
||||||
abbreviation: decodeURI(systemParm.txt3),
|
abbreviation: decodeURI(systemParm.txt3),
|
||||||
projectCode: no2,
|
projectCode: no2,
|
||||||
projectCodeCenter: txt2,
|
projectCodeCenter: txt2,
|
||||||
//是否是必考 加减档设置成非必考
|
//是否是必考 加减档设置成非必考
|
||||||
isRequired: no2 == 14 ? false : allItems.includes(no2 + ''),
|
isRequired: no2 == '14' ? false : allItems.includes(no2 + ''),
|
||||||
//是否考过了
|
//是否考过了
|
||||||
isEnd: false,
|
isEnd: false,
|
||||||
//项目开始数据是否上传过
|
//项目开始数据是否上传过
|
||||||
isUpload: false,
|
isUpload: false,
|
||||||
}
|
}
|
||||||
this.projectsObj[systemParm.no2*1] = currentProject
|
const no2Num = Number(systemParm.no2)
|
||||||
this.projectsCenterObj[txt2] = currentProject
|
|
||||||
this.projects.push(currentProject);
|
|
||||||
|
|
||||||
//真实监管下发考试项目
|
//真实监管下发考试项目
|
||||||
if (isInExam && !(kStringArr.includes(txt2) || kStringArr.includes(no2 + ''))) {
|
if (isInExam && !(kStringArr.includes(txt2) || kStringArr.includes(no2 + ''))) {
|
||||||
console.info('surenjun =>', txt2)
|
console.info('surenjun =>', txt2)
|
||||||
console.info('surenjun => no2', systemParm.no2)
|
console.info('surenjun => no2', systemParm.no2)
|
||||||
this.projectsObj[systemParm.no2*1].type = '3'
|
currentProject.type = '3'
|
||||||
this.projectsObj[systemParm.no2*1].isUpload = true
|
currentProject.isUpload = true
|
||||||
this.projectsObj[systemParm.no2*1].isEnd = true
|
currentProject.isEnd = true
|
||||||
this.projectsCenterObj[txt2].type = '3'
|
|
||||||
this.projectsCenterObj[txt2].isUpload = true
|
|
||||||
this.projectsCenterObj[txt2].isEnd = true
|
|
||||||
// this.isDdxk = true
|
|
||||||
this.ddxkKsxmArr.push(txt2)
|
this.ddxkKsxmArr.push(txt2)
|
||||||
}
|
}
|
||||||
|
Reflect.set(this.projectsObj, no2Num, currentProject)
|
||||||
|
Reflect.set(this.projectsCenterObj, txt2, currentProject)
|
||||||
|
this.projects.push(currentProject);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.systemparmArr.push({
|
this.systemparmArr.push({
|
||||||
@ -478,10 +489,11 @@ struct Index {
|
|||||||
//只记录考试项目的模型
|
//只记录考试项目的模型
|
||||||
const projectsObj = this.projectsObj
|
const projectsObj = this.projectsObj
|
||||||
cdsbParams.forEach((cdsb) => {
|
cdsbParams.forEach((cdsb) => {
|
||||||
const key = decodeURI(cdsb.itemsno);
|
const key = decodeURI(cdsb.itemsno)
|
||||||
const newKey = key.split('~').join('_')
|
const newKey = key.split('~').join('_')
|
||||||
const xmdm = key.split('~')[0] * 1
|
const xmdm = Number( key.split('~')[0] )
|
||||||
if (projectsObj[xmdm]) {
|
const currentProject:ProjectInfo = Reflect.get(projectsObj, xmdm)
|
||||||
|
if (currentProject) {
|
||||||
this.cdsbInfoObj[newKey] = {
|
this.cdsbInfoObj[newKey] = {
|
||||||
kdid: cdsb.kdid,
|
kdid: cdsb.kdid,
|
||||||
sbbh: cdsb.sbbh,
|
sbbh: cdsb.sbbh,
|
||||||
@ -505,7 +517,8 @@ struct Index {
|
|||||||
const carlistArr = info.carlist === '' ? [] : (decodeURI(info.carlist).split(',') || []);
|
const carlistArr = info.carlist === '' ? [] : (decodeURI(info.carlist).split(',') || []);
|
||||||
const newKey = key.split('~').join('_')
|
const newKey = key.split('~').join('_')
|
||||||
const xmdm = Number(key.split('~')[0])
|
const xmdm = Number(key.split('~')[0])
|
||||||
if (projectsObj[xmdm] && (carlistArr.length == 0 || carlistArr.includes(carlist))) {
|
const currentProject:ProjectInfo = Reflect.get(projectsObj,xmdm)
|
||||||
|
if (currentProject && (carlistArr.length == 0 || carlistArr.includes(carlist))) {
|
||||||
this.itemInfoObj[newKey] = {
|
this.itemInfoObj[newKey] = {
|
||||||
modelKey: newKey,
|
modelKey: newKey,
|
||||||
xmdm,
|
xmdm,
|
||||||
@ -518,7 +531,7 @@ struct Index {
|
|||||||
// 评判相关初始化
|
// 评判相关初始化
|
||||||
async initJudge() {
|
async initJudge() {
|
||||||
const judge = new Judge(this);
|
const judge = new Judge(this);
|
||||||
await judge.onJudgeFn(async (judgeData) => {
|
await judge.onJudgeFn(async (judgeData:JudgeCallBacData) => {
|
||||||
// const { xmmcStr, carztStr, kfArr } = judgeData;
|
// const { xmmcStr, carztStr, kfArr } = judgeData;
|
||||||
this.xmmcStr = judgeData.xmmcStr;
|
this.xmmcStr = judgeData.xmmcStr;
|
||||||
this.carztStr = judgeData.carztStr;
|
this.carztStr = judgeData.carztStr;
|
||||||
@ -548,11 +561,14 @@ struct Index {
|
|||||||
if (ddxkKsxmArr?.length) {
|
if (ddxkKsxmArr?.length) {
|
||||||
//断点续考
|
//断点续考
|
||||||
ddxkKsxmArr.forEach(xmdm => {
|
ddxkKsxmArr.forEach(xmdm => {
|
||||||
const projectCode = this.projectsCenterObj[xmdm].projectCode
|
const currentProjectCenter:Project = Reflect.get(this.projectsCenterObj, xmdm)
|
||||||
if (this.projectsObj[projectCode]) {
|
const projectCode = currentProjectCenter.projectCode
|
||||||
this.projectsObj[projectCode].type = '3'
|
const currentProject:Project = Reflect.get(this.projectsObj,projectCode)
|
||||||
this.projectsObj[projectCode].isUpload = true
|
if (currentProject) {
|
||||||
this.projectsObj[projectCode].isEnd = true
|
currentProject.type = '3'
|
||||||
|
currentProject.isUpload = true
|
||||||
|
currentProject.isEnd = true
|
||||||
|
Reflect.set(this.projectsObj, projectCode, currentProject)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.ddxkKsxmArr = ddxkKsxmArr
|
this.ddxkKsxmArr = ddxkKsxmArr
|
||||||
@ -560,16 +576,18 @@ struct Index {
|
|||||||
}
|
}
|
||||||
//扣分续考
|
//扣分续考
|
||||||
ddxkKfArr.forEach((kf) => {
|
ddxkKfArr.forEach((kf) => {
|
||||||
const [xmdm, kfdm] = kf.split(',')
|
const xmdm = kf.split(',')[0]
|
||||||
const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`]
|
const kfdm = kf.split(',')[1]
|
||||||
const currentProject = this.projectsObj[xmdm] || { name: '通用评判' }
|
const currentKf:MarkRule = Reflect.get(this.markRuleListObj, `${xmdm}_${kfdm}`)
|
||||||
if (this.projectsObj[xmdm]) {
|
const currentProject:ProjectInfo = Reflect.get(this.projectsObj,xmdm) || { name: '通用评判' }
|
||||||
this.projectsObj[xmdm].type = '4'
|
|
||||||
|
if (currentProject) {
|
||||||
|
currentProject.type = '4'
|
||||||
|
Reflect.set(this.projectsObj, xmdm, currentProject)
|
||||||
}
|
}
|
||||||
this.kfArr.push({
|
this.kfArr.push({
|
||||||
//扣分项目名称
|
//扣分项目名称
|
||||||
xmmcStr: currentProject.name,
|
xmmcStr: currentProject.name,
|
||||||
xmdm,
|
|
||||||
desc: currentKf.markshow,
|
desc: currentKf.markshow,
|
||||||
score: currentKf.markreal,
|
score: currentKf.markreal,
|
||||||
markcatalog: currentKf.markcatalog,
|
markcatalog: currentKf.markcatalog,
|
||||||
@ -623,17 +641,20 @@ struct Index {
|
|||||||
|
|
||||||
// 初始化本地systemparam表、markrule表
|
// 初始化本地systemparam表、markrule表
|
||||||
async initTrajectoryParam(trajectoryPath: string) {
|
async initTrajectoryParam(trajectoryPath: string) {
|
||||||
const { isTrajectoryOpen } = judgeConfig
|
const isTrajectoryOpen = judgeConfig.isTrajectoryOpen
|
||||||
//轨迹回放读取 systemparam表、markrule表
|
//轨迹回放读取 systemparam表、markrule表
|
||||||
const fileUtil = new FileUtils(this.context);
|
const fileUtil = new FileUtils(this.context);
|
||||||
const folderPath = await fileUtil.initFolder(trajectoryPath);
|
const folderPath = await fileUtil.initFolder(trajectoryPath);
|
||||||
const str = await fileUtil.readFile(folderPath);
|
const str = await fileUtil.readFile(folderPath);
|
||||||
const strArr = str.split('\n');
|
const strArr = str.split('\n');
|
||||||
const [initData, beginData] = [strArr[0], strArr[1]];
|
const initData = strArr[0]
|
||||||
const initDataObj = JSON.parse(initData)
|
const beginData = strArr[1]
|
||||||
const beginDataObj = JSON.parse(beginData)
|
|
||||||
|
const initDataObj:JudgeInitObj = JSON.parse(initData)
|
||||||
|
const beginDataObj:JudgeBeginObj = JSON.parse(beginData)
|
||||||
|
|
||||||
const examSubject = this.carInfo.examSubject;
|
const examSubject = this.carInfo.examSubject;
|
||||||
this.examSubject = isTrajectoryOpen ? (initDataObj.kskm * 1) : 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;
|
||||||
@ -645,14 +666,14 @@ struct Index {
|
|||||||
// 上传考试里程
|
// 上传考试里程
|
||||||
async uploadMileage() {
|
async uploadMileage() {
|
||||||
if (!this.singlePlay) {
|
if (!this.singlePlay) {
|
||||||
const { lsh, startExamTime:kskssj, jl:kslc } = this
|
const carInfo = this.carInfo
|
||||||
const { carId, examinationRoomId } = this.carInfo;
|
|
||||||
await uploadExamMileage({
|
await uploadExamMileage({
|
||||||
carId,
|
carId:carInfo.carId,
|
||||||
examinationRoomId,
|
examinationRoomId:carInfo.examinationRoomId,
|
||||||
lsh,
|
lsh:this.lsh,
|
||||||
kskssj,
|
kskssj:this.startExamTime,
|
||||||
kslc
|
kslc:this.jl
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -742,7 +763,7 @@ struct Index {
|
|||||||
Flex({ direction: FlexDirection.Column }) {
|
Flex({ direction: FlexDirection.Column }) {
|
||||||
if (this.kfArr.length) {
|
if (this.kfArr.length) {
|
||||||
List({ scroller: this.kfArrScroller }) {
|
List({ scroller: this.kfArrScroller }) {
|
||||||
ForEach(this.kfArr, (item) => {
|
ForEach(this.kfArr, (item:MarkRule) => {
|
||||||
ListItem() {
|
ListItem() {
|
||||||
Column() {
|
Column() {
|
||||||
Row() {
|
Row() {
|
||||||
@ -811,7 +832,7 @@ struct Index {
|
|||||||
if (this.examSubject == "2") {
|
if (this.examSubject == "2") {
|
||||||
Flex({ wrap: FlexWrap.Wrap, direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween }) {
|
Flex({ wrap: FlexWrap.Wrap, direction: FlexDirection.Row, justifyContent: FlexAlign.SpaceBetween }) {
|
||||||
List({}) {
|
List({}) {
|
||||||
ForEach(chunkArr(this.projects, 2), (item) => {
|
ForEach(chunkArr(this.projects, 2), (item:[ProjectInfo,ProjectInfo]) => {
|
||||||
ListItem() {
|
ListItem() {
|
||||||
Row() {
|
Row() {
|
||||||
Row() {
|
Row() {
|
||||||
@ -819,7 +840,7 @@ struct Index {
|
|||||||
// Text(this.projectsObj[item[0].projectCode])
|
// Text(this.projectsObj[item[0].projectCode])
|
||||||
Text(item[0].abbreviation)
|
Text(item[0].abbreviation)
|
||||||
.fontSize(item[0].abbreviation.length > 5 ? 28 : 32)
|
.fontSize(item[0].abbreviation.length > 5 ? 28 : 32)
|
||||||
.fontColor(this.getProjectColor(this.projectsObj[item[0].projectCode].type))
|
.fontColor(this.getProjectColor(item[0]))
|
||||||
}
|
}
|
||||||
.backgroundImage($rawfile('judge/project_item.png'), ImageRepeat.NoRepeat)
|
.backgroundImage($rawfile('judge/project_item.png'), ImageRepeat.NoRepeat)
|
||||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||||
@ -833,7 +854,7 @@ struct Index {
|
|||||||
//#FF7566 #00FFD5 #E6DECF
|
//#FF7566 #00FFD5 #E6DECF
|
||||||
Text(item[1].abbreviation)
|
Text(item[1].abbreviation)
|
||||||
.fontSize(item[1].abbreviation.length > 5 ? 28 : 32)
|
.fontSize(item[1].abbreviation.length > 5 ? 28 : 32)
|
||||||
.fontColor(this.getProjectColor(this.projectsObj[item[1].projectCode].type))
|
.fontColor(this.getProjectColor(item[1]))
|
||||||
}
|
}
|
||||||
.backgroundImage($rawfile('judge/project_item.png'), ImageRepeat.NoRepeat)
|
.backgroundImage($rawfile('judge/project_item.png'), ImageRepeat.NoRepeat)
|
||||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||||
@ -855,7 +876,7 @@ struct Index {
|
|||||||
.margin({ right: 10 })
|
.margin({ right: 10 })
|
||||||
}
|
}
|
||||||
//科目三
|
//科目三
|
||||||
if (this.examSubject == 3) {
|
if (this.examSubject == '3') {
|
||||||
Column() {
|
Column() {
|
||||||
Flex({
|
Flex({
|
||||||
wrap: FlexWrap.Wrap,
|
wrap: FlexWrap.Wrap,
|
||||||
@ -863,11 +884,11 @@ struct Index {
|
|||||||
justifyContent: FlexAlign.SpaceBetween
|
justifyContent: FlexAlign.SpaceBetween
|
||||||
}) {
|
}) {
|
||||||
List({}) {
|
List({}) {
|
||||||
ForEach(this.projects, (project) => {
|
ForEach(this.projects, (project:ProjectInfo) => {
|
||||||
ListItem() {
|
ListItem() {
|
||||||
Text(project.name) {
|
Text(project.name) {
|
||||||
}
|
}
|
||||||
.fontColor(this.getProjectColor(this.projectsObj[project.projectCode].type))
|
.fontColor(this.getProjectColor(project))
|
||||||
.margin({ bottom: 2 })
|
.margin({ bottom: 2 })
|
||||||
.fontSize(24)
|
.fontSize(24)
|
||||||
}.margin({ bottom: 2 })
|
}.margin({ bottom: 2 })
|
||||||
@ -888,7 +909,7 @@ struct Index {
|
|||||||
justifyContent: FlexAlign.SpaceAround
|
justifyContent: FlexAlign.SpaceAround
|
||||||
}) {
|
}) {
|
||||||
List() {
|
List() {
|
||||||
ForEach(this.artSubject3Projects, (item, index) => {
|
ForEach(this.artSubject3Projects, (item:string, index) => {
|
||||||
ListItem() {
|
ListItem() {
|
||||||
}
|
}
|
||||||
.backgroundImage(
|
.backgroundImage(
|
||||||
@ -1042,11 +1063,11 @@ struct Index {
|
|||||||
|
|
||||||
|
|
||||||
//科目三人工扣分弹窗
|
//科目三人工扣分弹窗
|
||||||
if (this.isDeductedPopShow && this.examSubject == 3 && this.judgeConfigObj['342'] == '0') {
|
if (this.isDeductedPopShow && this.examSubject == '3' && 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 => {
|
||||||
const project = this.projectsObj[projectKey]
|
const project:ProjectInfo = Reflect.get(this.projectsObj,projectKey)
|
||||||
return project.type == '2' ? project.projectCode : undefined
|
return project.type == '2' ? project.projectCode : undefined
|
||||||
}).filter(project => project !== undefined),
|
}).filter(project => project !== undefined),
|
||||||
markRules: this.manualMarkRules,
|
markRules: this.manualMarkRules,
|
||||||
@ -1054,7 +1075,7 @@ struct Index {
|
|||||||
this.isDeductedPopShow = false;
|
this.isDeductedPopShow = false;
|
||||||
this.defaultTabIndex = 0;
|
this.defaultTabIndex = 0;
|
||||||
},
|
},
|
||||||
confirmMark: async (itemno, serial) => {
|
confirmMark: async (itemno:string, serial:string) => {
|
||||||
clearTimeout(this.popTimer)
|
clearTimeout(this.popTimer)
|
||||||
this.popTimer = null
|
this.popTimer = null
|
||||||
this.popTimer = setTimeout(async () => {
|
this.popTimer = setTimeout(async () => {
|
||||||
@ -1094,10 +1115,10 @@ struct Index {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//科目三人工项目确认框
|
//科目三人工项目确认框
|
||||||
if (this.isAmplifyPopShow && this.examSubject == 3) {
|
if (this.isAmplifyPopShow && this.examSubject == '3') {
|
||||||
AmplifyPopup({
|
AmplifyPopup({
|
||||||
amplifyImgIndex: this.amplifiedImgIndex,
|
amplifyImgIndex: this.amplifiedImgIndex,
|
||||||
confirmAmplify: async (amplify) => {
|
confirmAmplify: async (amplify:AmplifyItem) => {
|
||||||
clearTimeout(this.popTimer)
|
clearTimeout(this.popTimer)
|
||||||
this.popTimer = null
|
this.popTimer = null
|
||||||
this.popTimer = setTimeout(async () => {
|
this.popTimer = setTimeout(async () => {
|
||||||
@ -1191,7 +1212,8 @@ struct Index {
|
|||||||
.height('100%').backgroundColor('#000').justifyContent(FlexAlign.Start)
|
.height('100%').backgroundColor('#000').justifyContent(FlexAlign.Start)
|
||||||
}
|
}
|
||||||
|
|
||||||
getProjectColor(type: string) {
|
getProjectColor(project: ProjectInfo) {
|
||||||
|
const type = project.type;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case '1':
|
case '1':
|
||||||
return '#E6DECF';
|
return '#E6DECF';
|
||||||
@ -1213,22 +1235,23 @@ struct Index {
|
|||||||
|
|
||||||
//人工项目操作
|
//人工项目操作
|
||||||
async setManualProjectFn(index: number) {
|
async setManualProjectFn(index: number) {
|
||||||
const {
|
|
||||||
judgeConfigObj,
|
const judgeConfigObj = this.judgeConfigObj;
|
||||||
isManualProjectIn,
|
const isManualProjectIn = this.isManualProjectIn;
|
||||||
getIsExitManualProject,
|
const getIsExitManualProject = this.getIsExitManualProject;
|
||||||
artSubject3ProjectsCodesArr,
|
const artSubject3ProjectsCodesArr = this.artSubject3ProjectsCodesArr;
|
||||||
projectsObj
|
const projectsObj = this.projectsObj;
|
||||||
} = this;
|
|
||||||
const projectCode = artSubject3ProjectsCodesArr[index];
|
const projectCode = Reflect.get(artSubject3ProjectsCodesArr,index)
|
||||||
if (index === 5) {
|
if (index === 5) {
|
||||||
console.info('surenjun 靠边停车状态=> ', getIsExitManualProject(index))
|
console.info('surenjun 靠边停车状态=> ', getIsExitManualProject(index))
|
||||||
}
|
}
|
||||||
|
const currentProject:ProjectInfo = Reflect.get(projectsObj,projectCode)
|
||||||
if (getIsExitManualProject(index)) {
|
if (getIsExitManualProject(index)) {
|
||||||
// 正在进行的项目 取消项目
|
// 正在进行的项目 取消项目
|
||||||
if (isManualProjectIn && projectsObj[projectCode].type == '2') {
|
if (isManualProjectIn && currentProject.type == '2') {
|
||||||
//判断人工是否能取消项目 && 当前项目有扣分的不能取消
|
//判断人工是否能取消项目 && 当前项目有扣分的不能取消
|
||||||
if (judgeConfigObj['340'] == 1 && projectsObj[projectCode].type != '5') {
|
if (judgeConfigObj['340'] == 1) {
|
||||||
await this.judge.setJudgeItem(projectCode, 2);
|
await this.judge.setJudgeItem(projectCode, 2);
|
||||||
Prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '项目取消',
|
message: '项目取消',
|
||||||
@ -1243,7 +1266,7 @@ struct Index {
|
|||||||
const xmmcStr = this.xmmcStr;
|
const xmmcStr = this.xmmcStr;
|
||||||
if (xmmcStr == '无' || xmmcStr == '') {
|
if (xmmcStr == '无' || xmmcStr == '') {
|
||||||
//512[6] 人工项目按钮放大确认
|
//512[6] 人工项目按钮放大确认
|
||||||
const param512 = (judgeConfigObj['512'] || '').split(',');
|
const param512:string[] = (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;
|
||||||
@ -1269,33 +1292,34 @@ struct Index {
|
|||||||
|
|
||||||
// 获取是否能人工进项目
|
// 获取是否能人工进项目
|
||||||
getIsExitManualProject = (index: number) => {
|
getIsExitManualProject = (index: number) => {
|
||||||
const {
|
|
||||||
judgeConfigObj,
|
const judgeConfigObj = this.judgeConfigObj;
|
||||||
artSubject3ProjectsCodesArr,
|
const artSubject3ProjectsCodesArr = this.artSubject3ProjectsCodesArr;
|
||||||
projectsObj,
|
const projectsObj = this.projectsObj;
|
||||||
carztStr,
|
const carztStr = this.carztStr;
|
||||||
isManualProjectIn,
|
const isManualProjectIn = this.isManualProjectIn;
|
||||||
isProjectIn,
|
const isProjectIn = this.isProjectIn;
|
||||||
getProjectIsInRoad
|
const getProjectIsInRoad = this.getProjectIsInRoad;
|
||||||
} = this;
|
|
||||||
const projectCode = artSubject3ProjectsCodesArr[index];
|
const projectCode = artSubject3ProjectsCodesArr[index];
|
||||||
if (projectsObj[projectCode] === undefined) {
|
const currentProject:ProjectInfo = Reflect.get(projectsObj,projectCode)
|
||||||
|
if (currentProject === undefined) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
const projectType = projectsObj[projectCode].type;
|
const projectType = currentProject.type;
|
||||||
|
|
||||||
//不允许人工触发的项目列表,以","分隔
|
//不允许人工触发的项目列表,以","分隔
|
||||||
const unExitManualProjects = judgeConfigObj['332'].split(',') || [];
|
const unExitManualProjects:string[] = judgeConfigObj['332'].split(',') || [];
|
||||||
//直线行驶中不进其他考试项目(0-否 1-是)
|
//直线行驶中不进其他考试项目(0-否 1-是)
|
||||||
const param348 = judgeConfigObj['348'] || '0',
|
const param348:string = judgeConfigObj['348'] || '0',
|
||||||
//里程不够允许手工点靠边停车(0-否 1-是)
|
//里程不够允许手工点靠边停车(0-否 1-是)
|
||||||
param387 = judgeConfigObj['387'] || '0',
|
param387:string = judgeConfigObj['387'] || '0',
|
||||||
//里程不够不报靠边停车(0-否+1-是+2-必考项目未完成且里程不够不报项目)
|
//里程不够不报靠边停车(0-否+1-是+2-必考项目未完成且里程不够不报项目)
|
||||||
param319 = judgeConfigObj['319'] || '0',
|
param319:string = judgeConfigObj['319'] || '0',
|
||||||
//人工项目是否能取消 1:可取消;
|
//人工项目是否能取消 1:可取消;
|
||||||
param340 = judgeConfigObj['340'] || '0',
|
param340:string = judgeConfigObj['340'] || '0',
|
||||||
//307参数里设置的项目,项目已经做过,后续不能人工触发;
|
//307参数里设置的项目,项目已经做过,后续不能人工触发;
|
||||||
param307 = (judgeConfigObj['307'] || '').split(',');
|
param307:string[] = (judgeConfigObj['307'] || '').split(',');
|
||||||
|
|
||||||
//非行驶状态(没有速度),人工项目不能触发(按钮灰色)
|
//非行驶状态(没有速度),人工项目不能触发(按钮灰色)
|
||||||
if (carztStr === '停车') {
|
if (carztStr === '停车') {
|
||||||
@ -1314,8 +1338,8 @@ struct Index {
|
|||||||
|
|
||||||
//项目进行中不能人工触发
|
//项目进行中不能人工触发
|
||||||
if (isProjectIn) {
|
if (isProjectIn) {
|
||||||
if (param340 == 1) {
|
if (param340 == '1') {
|
||||||
if (isManualProjectIn && (projectsObj[projectCode].type == '2')) {
|
if (isManualProjectIn && (currentProject.type == '2')) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
return false
|
return false
|
||||||
@ -1329,8 +1353,9 @@ struct Index {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const project_9:ProjectInfo = Reflect.get(projectsObj,'9')
|
||||||
// 直线行驶中不进其他考试项目(0-否 1-是)
|
// 直线行驶中不进其他考试项目(0-否 1-是)
|
||||||
if (param348 == '0' && projectsObj['9']?.type == 2) {
|
if (param348 == '0' && project_9.type == '2') {
|
||||||
return index === 0 ? true : false
|
return index === 0 ? true : false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1341,7 +1366,9 @@ struct Index {
|
|||||||
|
|
||||||
//319不为0,或者387不为1,里程不够时,靠边停车项目不能触发
|
//319不为0,或者387不为1,里程不够时,靠边停车项目不能触发
|
||||||
if ((param387 != '1' || param319 != '0') && index === 5) {
|
if ((param387 != '1' || param319 != '0') && index === 5) {
|
||||||
const { examMileage, isRequiredProjectsEnd, jl } = this;
|
const examMileage = this.examMileage
|
||||||
|
const isRequiredProjectsEnd = this.isRequiredProjectsEnd
|
||||||
|
const jl = this.jl
|
||||||
//里程是否达标 && 必考项目是否全完成
|
//里程是否达标 && 必考项目是否全完成
|
||||||
return jl >= Number(examMileage) && isRequiredProjectsEnd
|
return jl >= Number(examMileage) && isRequiredProjectsEnd
|
||||||
}
|
}
|
||||||
@ -1349,37 +1376,46 @@ struct Index {
|
|||||||
}
|
}
|
||||||
// 判断项目是否在当前路段号
|
// 判断项目是否在当前路段号
|
||||||
getProjectIsInRoad = (projectCode: string,) => {
|
getProjectIsInRoad = (projectCode: string,) => {
|
||||||
const {
|
const judgeConfigObj = this.judgeConfigObj;
|
||||||
judgeConfigObj,
|
const lane = this.lane;
|
||||||
lane:{ road, num, count }
|
const road = lane.road;
|
||||||
} = this;
|
const num = lane.num;
|
||||||
|
const count = lane.count;
|
||||||
|
|
||||||
const projectRoads = {
|
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 = {
|
||||||
//直线行驶
|
//直线行驶
|
||||||
'3': (judgeConfigObj['514']?.split(',') || []),
|
param_3,
|
||||||
//变更车道
|
//变更车道
|
||||||
'4': judgeConfigObj['515']?.split(',') || [],
|
param_4,
|
||||||
//超车
|
//超车
|
||||||
'10': judgeConfigObj['516']?.split(',') || [],
|
param_10,
|
||||||
//靠边停车
|
//靠边停车
|
||||||
'11': judgeConfigObj['517']?.split(',') || [],
|
param_11,
|
||||||
//会车
|
//会车
|
||||||
'9': judgeConfigObj['518']?.split(',') || [],
|
param_9,
|
||||||
//掉头
|
//掉头
|
||||||
'12': judgeConfigObj['519']?.split(',') || [],
|
param_12,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//未测绘得道路上或者不在差分状态
|
//未测绘得道路上或者不在差分状态
|
||||||
if (road === '') {
|
if (road === '') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
const currentProjectRoad:string[] = Reflect.get(projectRoads,`param_${projectCode}`)
|
||||||
if (projectRoads[projectCode].length == 0) {
|
if (currentProjectRoad.length == 0) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置了514-519参数,只能在设置的路段触发对应项目
|
//设置了514-519参数,只能在设置的路段触发对应项目
|
||||||
if (projectRoads[projectCode].includes(road)) {
|
if (currentProjectRoad.includes(road)) {
|
||||||
//如果525为1,则514-519设置的路段不能触发对应项目
|
//如果525为1,则514-519设置的路段不能触发对应项目
|
||||||
if (judgeConfigObj['525'] == '1') {
|
if (judgeConfigObj['525'] == '1') {
|
||||||
return false
|
return false
|
||||||
@ -1410,7 +1446,8 @@ struct Index {
|
|||||||
getIsEndManualProject = (index: number) => {
|
getIsEndManualProject = (index: number) => {
|
||||||
const projectName = this.artSubject3Projects[index];
|
const projectName = this.artSubject3Projects[index];
|
||||||
const projectCode = this.artSubject3ProjectsCodesArr[index];
|
const projectCode = this.artSubject3ProjectsCodesArr[index];
|
||||||
const type = this.projectsObj[projectCode].type
|
const currentProject:ProjectInfo = Reflect.get(this.projectsObj,projectCode)
|
||||||
|
const type = currentProject.type
|
||||||
if (type == '2') {
|
if (type == '2') {
|
||||||
return projectName
|
return projectName
|
||||||
}
|
}
|
||||||
@ -1418,8 +1455,7 @@ struct Index {
|
|||||||
}
|
}
|
||||||
// 获取是否能进行人工评判
|
// 获取是否能进行人工评判
|
||||||
getIsManualKf = () => {
|
getIsManualKf = () => {
|
||||||
const { examSubject } = this;
|
if (this.examSubject == '3') {
|
||||||
if (examSubject == 3) {
|
|
||||||
//杭州训练模式不允许人工评判
|
//杭州训练模式不允许人工评判
|
||||||
if (this.singlePlay && this.judgeConfigObj['211'] == 'zjhz') {
|
if (this.singlePlay && this.judgeConfigObj['211'] == 'zjhz') {
|
||||||
return false
|
return false
|
||||||
|
|||||||
@ -23,9 +23,15 @@ export interface MarkRule {
|
|||||||
markreal?: number
|
markreal?: number
|
||||||
kfxh?: string
|
kfxh?: string
|
||||||
onlyoneid?: number
|
onlyoneid?: number
|
||||||
|
OnlyOneKind?: number
|
||||||
nocancelid?: number
|
nocancelid?: number
|
||||||
|
NoCancelId?: number
|
||||||
gps_sid?: number,
|
gps_sid?: number,
|
||||||
|
GPS_SID?:boolean
|
||||||
score?:number
|
score?:number
|
||||||
|
xmmcStr?: string
|
||||||
|
desc?: string
|
||||||
|
xmdm?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface KF{
|
export interface KF{
|
||||||
|
|||||||
@ -205,12 +205,12 @@ export default class Judge {
|
|||||||
console.info(judgeTag, `人工扣分-${itemno}-${serial}`)
|
console.info(judgeTag, `人工扣分-${itemno}-${serial}`)
|
||||||
}
|
}
|
||||||
//人工操作项目
|
//人工操作项目
|
||||||
public setJudgeItem = async (itemno: number, type: 1 | 2) => {
|
public setJudgeItem = async (itemno: string, type: 1 | 2) => {
|
||||||
// const { fileLog } = this;
|
// const { fileLog } = this;
|
||||||
await examJudgeArtificialItem(itemno * 1, type);
|
await examJudgeArtificialItem(Number(itemno), type);
|
||||||
await this.fileLog.setExamJudgeData({
|
await this.fileLog.setExamJudgeData({
|
||||||
method: 'examJudgeArtificialItem',
|
method: 'examJudgeArtificialItem',
|
||||||
itemno: itemno * 1,
|
itemno: Number(itemno),
|
||||||
type
|
type
|
||||||
})
|
})
|
||||||
console.info(judgeTag, `人工评判${type == 1 ? '进入' : '取消'}项目-${itemno}`)
|
console.info(judgeTag, `人工评判${type == 1 ? '进入' : '取消'}项目-${itemno}`)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user