2024-01-05 11:11:15 +08:00
|
|
|
import router from '@ohos.router'
|
2024-02-21 14:53:53 +08:00
|
|
|
import prompt from '@ohos.prompt'
|
|
|
|
|
import common from '@ohos.app.ability.common';
|
2024-01-05 11:11:15 +08:00
|
|
|
import EndPoPup from './compontents/judge/end-popup'
|
|
|
|
|
import LoadingPopup from './compontents/judge/loading-popup'
|
2024-05-15 16:22:48 +08:00
|
|
|
import DeductedPopup from './compontents/judge/deduction-popup'
|
|
|
|
|
import AmplifyPopup from './compontents/judge/amplify-popup'
|
2024-01-05 11:11:15 +08:00
|
|
|
import Judge from './judgeSDK/judge'
|
2024-05-15 16:22:48 +08:00
|
|
|
import {defaultJudgeConfigObj} from './judgeSDK/utils//judge-common'
|
2024-01-05 11:11:15 +08:00
|
|
|
import {
|
2024-05-15 16:22:48 +08:00
|
|
|
Project, ProjectObj, MarkRule, CDSBInfo,
|
|
|
|
|
SYSTEMPARMARR,CARINFO ,MAPPOINT ,MAPITEMPOINTITEM
|
|
|
|
|
} from './judgeSDK/api/judgeSDK.d'
|
|
|
|
|
import { getCurrentTime, formatTime, getCurrentHourTime,chunkArr } from '../common/utils/tools'
|
|
|
|
|
import { examJudgeEndExam } from './judgeSDK/api/index'
|
2024-01-05 11:11:15 +08:00
|
|
|
import { getSyncData } from '../common/service/initable'
|
2024-05-15 16:22:48 +08:00
|
|
|
import { judgeConfig } from './judgeSDK/utils/judge-config'
|
|
|
|
|
import FileUtil from '../common/utils/File';
|
2024-01-31 14:35:16 +08:00
|
|
|
import SignDisplayCom from './compontents/signDisplayCom'
|
2024-05-15 16:22:48 +08:00
|
|
|
import {testMarkRules} from './judgeSDK/dataTest/index'
|
2024-01-05 11:11:15 +08:00
|
|
|
|
|
|
|
|
@Entry
|
|
|
|
|
@Component
|
|
|
|
|
struct Index {
|
|
|
|
|
scroller: Scroller = new Scroller()
|
|
|
|
|
private context = getContext(this) as common.UIAbilityContext;
|
2024-05-15 16:22:48 +08:00
|
|
|
private img: ImageBitmap = new ImageBitmap("/resources/base/media/1.png")
|
2024-01-05 11:11:15 +08:00
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
async aboutToAppear() {
|
|
|
|
|
globalThis.windowClass.setWindowSystemBarEnable([''])
|
2024-01-05 11:11:15 +08:00
|
|
|
const time = await getCurrentTime()
|
2024-05-15 16:22:48 +08:00
|
|
|
const examSubject = globalThis.carInfo.examSubject
|
|
|
|
|
|
|
|
|
|
this.examSubject = examSubject
|
2024-01-05 11:11:15 +08:00
|
|
|
this.startTime = time.split(' ')[1]
|
|
|
|
|
this.startFullTime = await getCurrentTime(1);
|
|
|
|
|
this.startHourTime = await getCurrentHourTime()
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
setInterval(async () => {
|
2024-01-05 11:11:15 +08:00
|
|
|
this.time = await getCurrentTime();
|
|
|
|
|
this.examTime += 1;
|
2024-05-15 16:22:48 +08:00
|
|
|
}, 1000);
|
2024-01-05 11:11:15 +08:00
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
//初始化数据库表
|
|
|
|
|
await this.initDb()
|
2024-01-31 14:35:16 +08:00
|
|
|
|
|
|
|
|
//断点续考
|
|
|
|
|
await this.goDdxkItems()
|
2024-01-31 14:42:14 +08:00
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
//初始化评判
|
|
|
|
|
const judge = await this.initJudge();
|
2024-01-05 11:11:15 +08:00
|
|
|
this.judge = judge
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
//初始化相关数据库表
|
|
|
|
|
async initDb(){
|
|
|
|
|
const examSubject = globalThis.carInfo.examSubject;
|
|
|
|
|
const {isTrajectoryOpen,trajectoryPath} = judgeConfig
|
|
|
|
|
await this.initStudent();
|
|
|
|
|
await this.initCar();
|
|
|
|
|
|
|
|
|
|
//是否开启轨迹回放模式
|
|
|
|
|
if(isTrajectoryOpen){
|
|
|
|
|
this.initTrajectoryParam(trajectoryPath)
|
|
|
|
|
}else{
|
|
|
|
|
examSubject == 2
|
|
|
|
|
? await this.initSystemKm2Param()
|
|
|
|
|
: await this.initSystemKm3Param()
|
|
|
|
|
await this.initMarkRules();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
await this.initSysset();
|
|
|
|
|
await this.initCDSBInfo()
|
|
|
|
|
|
|
|
|
|
// 科目三新增读取表数据
|
|
|
|
|
if(examSubject == 3){
|
|
|
|
|
await this.initMapPoint()
|
|
|
|
|
await this.initMapPointItem()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// 查询考车信息
|
|
|
|
|
async initCar() {
|
2024-01-31 14:35:16 +08:00
|
|
|
const result = await getSyncData('ES_CARINFO')
|
|
|
|
|
const carInfo = result[0] || {};
|
2024-02-21 14:53:53 +08:00
|
|
|
this.carName = decodeURI(carInfo.carclass)
|
|
|
|
|
this.carType = carInfo.kscx
|
2024-05-15 16:22:48 +08:00
|
|
|
this.carinfoArrr.push({
|
|
|
|
|
CARID:carInfo.carid,
|
|
|
|
|
IPADDR:'',
|
|
|
|
|
CARCLASS:decodeURI(carInfo.carclass),
|
|
|
|
|
KSCX:carInfo.kscx,
|
|
|
|
|
CARNAME:decodeURI(carInfo.carclass),
|
|
|
|
|
FLAG:carInfo.flag,
|
|
|
|
|
BK1:carInfo.bk1,
|
|
|
|
|
BK2:carInfo.bk2,
|
|
|
|
|
})
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
// 获取考生信息
|
|
|
|
|
async initStudent() {
|
2024-01-31 14:35:16 +08:00
|
|
|
const students = await getSyncData('USER')
|
|
|
|
|
const stuInfo = students[0] || {};
|
|
|
|
|
const {xm,sfzmhm,lsh,kszp,ksdd,kssycs,kslx} = stuInfo;
|
|
|
|
|
this.name = xm;
|
|
|
|
|
this.idCard = sfzmhm;
|
|
|
|
|
this.lsh = lsh;
|
|
|
|
|
this.kszp = kszp;
|
|
|
|
|
this.ksdd = ksdd;
|
|
|
|
|
this.kssycs = kssycs;
|
|
|
|
|
this.kslx = kslx;
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
// 获取扣分代码信息
|
|
|
|
|
async initMarkRules(markRules ?: MarkRule[]) {
|
|
|
|
|
const markRuleParams = markRules ||( await getSyncData('MA_MARKRULE') as MarkRule[])
|
|
|
|
|
|
|
|
|
|
markRuleParams .forEach(mark => {
|
|
|
|
|
const tempObj = {
|
|
|
|
|
itemno:mark.itemno * 1,
|
2024-01-05 11:11:15 +08:00
|
|
|
markcatalog:mark.markcatalog,
|
|
|
|
|
markshow:decodeURI(mark.markshow),
|
2024-05-15 16:22:48 +08:00
|
|
|
markreal:mark.markreal * 1,
|
2024-01-05 11:11:15 +08:00
|
|
|
markserial:mark.markserial,
|
2024-05-15 16:22:48 +08:00
|
|
|
kfxh:mark.kfxh,
|
|
|
|
|
OnlyOneKind:mark.onlyoneid * 1,
|
|
|
|
|
NoCancelId:mark.nocancelid * 1,
|
|
|
|
|
GPS_SID:mark.gps_sid == 0 ? false : true
|
|
|
|
|
}
|
|
|
|
|
const markserial = mark.markserial * 1;
|
|
|
|
|
|
|
|
|
|
//筛选出人工评判的扣分
|
|
|
|
|
if(markserial > 100 && markserial < 200){
|
|
|
|
|
this.manualMarkRules.push(tempObj)
|
|
|
|
|
}
|
|
|
|
|
this.markRuleListObj[`${mark.itemno}_${mark.markserial}`] = {
|
|
|
|
|
...tempObj,
|
|
|
|
|
markserial: mark.markserial,
|
2024-01-05 11:11:15 +08:00
|
|
|
};
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取sysset表信息
|
2024-05-15 16:22:48 +08:00
|
|
|
async initSysset() {
|
2024-01-05 11:11:15 +08:00
|
|
|
const syssetParams = await getSyncData('MA_SYSSET')
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
const serialNumberArr = syssetParams.filter(sys => sys.v_no === '901');
|
2024-01-31 14:35:16 +08:00
|
|
|
this.serialNumber = (serialNumberArr[0] && serialNumberArr[0].v_value) || '123456'
|
2024-01-31 14:42:14 +08:00
|
|
|
|
2024-01-31 14:35:16 +08:00
|
|
|
const judgeConfig = []
|
2024-01-31 14:42:14 +08:00
|
|
|
|
2024-01-31 14:35:16 +08:00
|
|
|
//@ts-ignore
|
2024-05-15 16:22:48 +08:00
|
|
|
syssetParams.forEach((sys) => {
|
|
|
|
|
const {v_no,v_value} = sys;
|
|
|
|
|
const v_no_num = v_no * 1;
|
|
|
|
|
const value = decodeURIComponent(v_value)
|
|
|
|
|
if(v_no_num >= 10 &&v_no_num <= 900){
|
2024-01-31 14:35:16 +08:00
|
|
|
judgeConfig.push({
|
2024-05-15 16:22:48 +08:00
|
|
|
key: v_no_num,value: value,
|
|
|
|
|
name: decodeURI(sys.v_name)
|
2024-01-31 14:35:16 +08:00
|
|
|
})
|
|
|
|
|
}
|
2024-05-15 16:22:48 +08:00
|
|
|
this.judgeConfigObj[sys.v_no] = value
|
2024-01-31 14:35:16 +08:00
|
|
|
});
|
|
|
|
|
this.judgeConfig = judgeConfig;
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
// 初始化systemParam表
|
|
|
|
|
async initSystemKm2Param(){
|
2024-01-31 14:35:16 +08:00
|
|
|
const systemParms:any = await getSyncData('MA_SYSTEMPARM')
|
|
|
|
|
const carName = this.carName;
|
|
|
|
|
|
|
|
|
|
let carNo2 = '',allItems = [];
|
|
|
|
|
systemParms.forEach((systemParm)=>{
|
|
|
|
|
const {no1,no2,no3} = systemParm;
|
|
|
|
|
|
|
|
|
|
//获取当前考车的no2
|
|
|
|
|
if(no1 == 3 && no3 == 1){
|
2024-05-15 16:22:48 +08:00
|
|
|
const txt1 = decodeURI(systemParm.txt1)
|
|
|
|
|
if(txt1 === carName){
|
|
|
|
|
carNo2 = no2;
|
|
|
|
|
}
|
2024-01-31 14:35:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取当前考车的考试项目
|
|
|
|
|
if(carNo2 !== '' && no2 == carNo2 && no3 == 10){
|
|
|
|
|
allItems = decodeURIComponent(systemParm.txt1).split(',')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 存储当前考车考试项目
|
|
|
|
|
if(allItems.length && no1 == 6 && allItems.includes(no2)){
|
|
|
|
|
const txt2 = decodeURIComponent(systemParm.txt2)
|
|
|
|
|
const currentProject = {
|
|
|
|
|
name:decodeURI(systemParm.txt1),
|
|
|
|
|
abbreviation:decodeURI(systemParm.txt3),
|
|
|
|
|
projectCode:no2,
|
|
|
|
|
projectCodeCenter:txt2
|
|
|
|
|
// sbxh:project.type
|
|
|
|
|
}
|
|
|
|
|
this.projectsObj[no2] = currentProject
|
|
|
|
|
this.projectsCenterObj[txt2] = currentProject
|
|
|
|
|
this.projects.push(currentProject)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const projects = this.projects;
|
|
|
|
|
if(!projects.length){
|
|
|
|
|
prompt.showToast({
|
|
|
|
|
message: '读取数据库信息失败,请重新考试!',
|
|
|
|
|
duration: 8000
|
|
|
|
|
});
|
|
|
|
|
router.back();
|
|
|
|
|
}
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
//初始化systemParam表
|
|
|
|
|
async initSystemKm3Param(sysParam?:SYSTEMPARMARR[]) {
|
|
|
|
|
const systemParms: any = sysParam || await getSyncData('MA_SYSTEMPARM')
|
|
|
|
|
|
|
|
|
|
const {isTrajectoryOpen} = judgeConfig
|
|
|
|
|
|
|
|
|
|
systemParms.forEach((systemParm) => {
|
|
|
|
|
|
|
|
|
|
if(isTrajectoryOpen){
|
|
|
|
|
systemParm.no1 = systemParm.NO1;
|
|
|
|
|
systemParm.no2 = systemParm.NO2;
|
|
|
|
|
systemParm.no3 = systemParm.NO3;
|
|
|
|
|
systemParm.txt1 = systemParm.TXT1;
|
|
|
|
|
systemParm.txt2 = systemParm.TXT2;
|
|
|
|
|
systemParm.txt3 = systemParm.TXT3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {no1,no2,no3,} = systemParm;
|
|
|
|
|
this.systemparmArr.push({
|
|
|
|
|
'NO1':no1*1,'NO2':no2*1,'NO3':no3*1,
|
|
|
|
|
'TXT1':decodeURIComponent(systemParm.txt1),
|
|
|
|
|
'TXT2':decodeURIComponent(systemParm.txt2),
|
|
|
|
|
'TXT3':decodeURIComponent(systemParm.txt3),
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const txt2 = decodeURIComponent(systemParm.txt2)
|
|
|
|
|
|
|
|
|
|
if (no1 == 6) {
|
|
|
|
|
const currentProject = {
|
|
|
|
|
name: decodeURI(systemParm.txt1),
|
|
|
|
|
abbreviation: decodeURI(systemParm.txt3),
|
|
|
|
|
projectCode: no2,
|
|
|
|
|
projectCodeCenter: txt2
|
|
|
|
|
}
|
|
|
|
|
this.projectsObj[no2] = currentProject
|
|
|
|
|
this.projectsCenterObj[txt2] = currentProject
|
|
|
|
|
this.projects.push(currentProject)
|
|
|
|
|
}
|
|
|
|
|
if(no1 == 3 && no2 == 1 && no3 == 15){
|
|
|
|
|
this.examMileage = decodeURI(systemParm.txt1)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const projects = this.projects;
|
|
|
|
|
if (!projects.length) {
|
|
|
|
|
prompt.showToast({
|
|
|
|
|
message: '读取数据库信息失败,请重新考试!',
|
|
|
|
|
duration: 8000
|
|
|
|
|
});
|
|
|
|
|
router.back();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
// 获取场地设备信息
|
2024-05-15 16:22:48 +08:00
|
|
|
async initCDSBInfo() {
|
2024-01-05 11:11:15 +08:00
|
|
|
const cdsbParams = await getSyncData('MA_CDSBINFO')
|
|
|
|
|
//@ts-ignore
|
2024-05-15 16:22:48 +08:00
|
|
|
cdsbParams.forEach((cdsb) => {
|
2024-01-05 11:11:15 +08:00
|
|
|
const key = decodeURI(cdsb.itemsno);
|
|
|
|
|
const newKey = key.split('~').join('_')
|
2024-01-31 14:35:16 +08:00
|
|
|
this.cdsbInfoObj[newKey] = {
|
2024-05-15 16:22:48 +08:00
|
|
|
kdid: cdsb.kdid,
|
|
|
|
|
sbbh: cdsb.sbbh,
|
|
|
|
|
sbbm: cdsb.sbbm,
|
|
|
|
|
itemsno: key,
|
|
|
|
|
modelKey: newKey,
|
2024-01-31 14:35:16 +08:00
|
|
|
//@ts-ignore
|
2024-05-15 16:22:48 +08:00
|
|
|
xmdm: key.split('~')[0] * 1,
|
|
|
|
|
xmxh: key.split('~')[1],
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 评判相关初始化
|
2024-05-15 16:22:48 +08:00
|
|
|
async initJudge() {
|
|
|
|
|
const judge = new Judge(this);
|
|
|
|
|
await judge.onJudgeFn(async (judgeData) => {
|
2024-01-05 11:11:15 +08:00
|
|
|
const {xmmcStr,carztStr,kfArr} = judgeData;
|
|
|
|
|
this.xmmcStr = xmmcStr;
|
|
|
|
|
this.carztStr = carztStr;
|
|
|
|
|
this.kfArr = kfArr;
|
|
|
|
|
});
|
|
|
|
|
return judge
|
|
|
|
|
}
|
2024-01-31 14:42:14 +08:00
|
|
|
|
2024-01-31 14:35:16 +08:00
|
|
|
// 断点续考判断
|
2024-05-15 16:22:48 +08:00
|
|
|
async goDdxkItems() {
|
|
|
|
|
const judgeConfigObj = this.judgeConfigObj
|
|
|
|
|
if(judgeConfigObj['369'] != 1 || judgeConfigObj['432'] != 1){
|
|
|
|
|
return
|
|
|
|
|
}
|
2024-01-31 14:35:16 +08:00
|
|
|
//断点续考判断
|
2024-05-15 16:22:48 +08:00
|
|
|
let currentParams: any = router.getParams();
|
|
|
|
|
const examItems: string = currentParams?.examItems;
|
2024-02-21 14:53:53 +08:00
|
|
|
|
|
|
|
|
// 2024-01-03 16:29:26;0;20300,;2,4^2,4;null;
|
2024-05-15 16:22:48 +08:00
|
|
|
if (examItems !== '' && examItems !== undefined) {
|
2024-01-31 14:35:16 +08:00
|
|
|
const examItemsArrs = examItems.split(';');
|
|
|
|
|
const startTime = examItemsArrs[0]
|
|
|
|
|
const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
|
|
|
|
|
const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || []
|
2024-05-15 16:22:48 +08:00
|
|
|
if (ddxkKsxmArr?.length) {
|
2024-01-31 14:35:16 +08:00
|
|
|
this.isDdxk = true
|
|
|
|
|
ddxkKsxmArr.forEach(xmdm => {
|
|
|
|
|
const projectCode = this.projectsCenterObj[xmdm].projectCode
|
|
|
|
|
this.projectsObj[projectCode].type = '3'
|
|
|
|
|
})
|
2024-05-15 16:22:48 +08:00
|
|
|
ddxkKfArr.forEach((kf) => {
|
|
|
|
|
const [xmdm, kfdm] = kf.split(',')
|
2024-01-31 14:35:16 +08:00
|
|
|
const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`]
|
|
|
|
|
const currentProject = this.projectsObj[xmdm]
|
|
|
|
|
this.projectsObj[xmdm].type = '4'
|
|
|
|
|
this.kfArr.push({
|
|
|
|
|
//扣分项目名称
|
2024-05-15 16:22:48 +08:00
|
|
|
xmmcStr: currentProject.name,
|
2024-01-31 14:35:16 +08:00
|
|
|
//@ts-ignore
|
|
|
|
|
xmdm,
|
2024-05-15 16:22:48 +08:00
|
|
|
desc: currentKf.markshow,
|
|
|
|
|
score: currentKf.markreal,
|
|
|
|
|
markcatalog: currentKf.markcatalog,
|
|
|
|
|
markserial: currentKf.markserial,
|
|
|
|
|
kfxh: currentKf.kfxh
|
2024-01-31 14:35:16 +08:00
|
|
|
})
|
2024-05-15 16:22:48 +08:00
|
|
|
this.totalScore += currentKf.markreal * 1;
|
2024-01-31 14:35:16 +08:00
|
|
|
})
|
|
|
|
|
this.ddxkKsxmArr = ddxkKsxmArr
|
|
|
|
|
this.ddxkKfArr = ddxkKfArr
|
|
|
|
|
this.ddxkTime = Date.parse(startTime);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-01-05 11:11:15 +08:00
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
// 初始化mapPoint表
|
|
|
|
|
async initMapPoint(){
|
|
|
|
|
const pointParams = await getSyncData('MA_MAP_POINT')
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
pointParams.forEach(point=>{
|
|
|
|
|
const {point_no,gps_e,gps_n,point_no_f,point_type,road_code,gps_e_Location,gps_n_Location,f_gps_e,f_gps_n,passed} = point;
|
|
|
|
|
this.mapPointArr.push({
|
|
|
|
|
point_no:point_no * 1,
|
|
|
|
|
gps_e:gps_e * 1,
|
|
|
|
|
gps_n:gps_n * 1,
|
|
|
|
|
point_no_f:point_no_f * 1,
|
|
|
|
|
point_type:point_type * 1,
|
|
|
|
|
road_code,
|
|
|
|
|
gps_e_Location:(gps_e_Location || 0 ) * 1,
|
|
|
|
|
gps_n_Location:(gps_n_Location || 0 ) * 1,
|
|
|
|
|
f_gps_e:f_gps_e * 1,
|
|
|
|
|
f_gps_n:f_gps_n * 1,
|
|
|
|
|
passed:passed * 1
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 初始化mapPointItem表
|
|
|
|
|
async initMapPointItem(){
|
|
|
|
|
const pointItemPoints = await getSyncData('MA_MAP_POINT_ITEM');
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
pointItemPoints.forEach(itemPoint => {
|
|
|
|
|
const {point_no,itemno,itemno1,subname} = itemPoint
|
|
|
|
|
this.mapPointItemArr.push({
|
|
|
|
|
point_no:point_no * 1,
|
|
|
|
|
itemno:itemno * 1,
|
|
|
|
|
itemno1:itemno1 * 1,
|
|
|
|
|
subname
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化本地systemparam表、markrule表
|
|
|
|
|
async initTrajectoryParam(trajectoryPath:string){
|
|
|
|
|
const examSubject = globalThis.carInfo.examSubject;
|
|
|
|
|
|
|
|
|
|
//轨迹回放读取 systemparam表、markrule表
|
|
|
|
|
const fileUtil = new FileUtil(this.context);
|
|
|
|
|
const folderPath = await fileUtil.initFolder(trajectoryPath);
|
|
|
|
|
const str = await fileUtil.readFile(folderPath);
|
|
|
|
|
const strArr = str.split('\n');
|
|
|
|
|
const [initData,beginData] = [strArr[0],strArr[1]];
|
|
|
|
|
const initDataObj = JSON.parse(initData)
|
|
|
|
|
examSubject == 2
|
|
|
|
|
? await this.initSystemKm2Param()
|
|
|
|
|
: await this.initSystemKm3Param(initDataObj.systemparm)
|
|
|
|
|
//@ts-ignore
|
|
|
|
|
await this.initMarkRules(testMarkRules);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
build() {
|
|
|
|
|
Column() {
|
|
|
|
|
Row() {
|
2024-05-15 16:22:48 +08:00
|
|
|
Row() {
|
|
|
|
|
Image($rawfile('judge/signal_logoS.png')).width(120)
|
|
|
|
|
Text(this.time).fontColor('#CCB48F').fontSize(32).padding({ left: 10, right: 5 })
|
|
|
|
|
Image($rawfile('judge/xh_green.png')).width(50)
|
|
|
|
|
}.padding({left:20})
|
|
|
|
|
|
|
|
|
|
Row() {
|
|
|
|
|
Text(`当前项目:${this.xmmcStr || '无'} `).fontColor('#E5CCA1').fontSize(32)
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-05-15 16:22:48 +08:00
|
|
|
.width('100%')
|
|
|
|
|
.height('96')
|
|
|
|
|
.backgroundColor('#001A33')
|
|
|
|
|
.padding({ left: 15, right: 15 })
|
|
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
|
|
.alignItems(VerticalAlign.Center)
|
2024-01-05 11:11:15 +08:00
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
Row() {
|
|
|
|
|
Row() {
|
|
|
|
|
Column() {
|
|
|
|
|
Row() {
|
|
|
|
|
Column() {
|
|
|
|
|
Row() {
|
2024-01-05 11:11:15 +08:00
|
|
|
Text('考生姓名:').fontColor('#E5CCA1').fontSize(this.FONTSIZE)
|
|
|
|
|
Text(this.name).fontColor('#FFF').fontSize(this.FONTSIZE)
|
2024-05-15 16:22:48 +08:00
|
|
|
}.margin({ bottom: 10 })
|
|
|
|
|
|
|
|
|
|
Row() {
|
2024-01-05 11:11:15 +08:00
|
|
|
Text('开始时间:').fontColor('#E5CCA1').fontSize(this.FONTSIZE)
|
|
|
|
|
Text(this.startTime).fontColor('#FFF').fontSize(this.FONTSIZE)
|
2024-05-15 16:22:48 +08:00
|
|
|
}.margin({ bottom: 10 })
|
|
|
|
|
|
|
|
|
|
if(this.examSubject == 3){
|
|
|
|
|
Row() {
|
|
|
|
|
Text('考试路线:').fontColor('#E5CCA1').fontSize(this.FONTSIZE)
|
|
|
|
|
Text('线路6').fontColor('#FFAD33').fontSize(this.FONTSIZE)
|
|
|
|
|
}
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
2024-05-15 16:22:48 +08:00
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
}.width('45%').alignItems(HorizontalAlign.Start)
|
2024-05-15 16:22:48 +08:00
|
|
|
|
|
|
|
|
Column() {
|
|
|
|
|
Row() {
|
2024-01-05 11:11:15 +08:00
|
|
|
Text('身份证号:').fontColor('#E5CCA1').fontSize(this.FONTSIZE)
|
|
|
|
|
Text(this.idCard).fontColor('#FFF').fontSize(this.FONTSIZE)
|
2024-05-15 16:22:48 +08:00
|
|
|
}.margin({ bottom: 10 })
|
|
|
|
|
|
|
|
|
|
Row() {
|
2024-01-05 11:11:15 +08:00
|
|
|
Text('考试用时:').fontColor('#E5CCA1').fontSize(this.FONTSIZE)
|
|
|
|
|
Text(formatTime(this.examTime)).fontColor('#FFF').fontSize(this.FONTSIZE)
|
2024-05-15 16:22:48 +08:00
|
|
|
}.margin({ bottom: 10 })
|
|
|
|
|
|
|
|
|
|
if(this.examSubject == 3){
|
|
|
|
|
Row() {
|
|
|
|
|
if(this.judgeConfigObj['375'] == '0'){
|
|
|
|
|
Text(`应行驶:${this.examMileage}m`).fontColor('#E5CCA1').fontSize(this.FONTSIZE).padding({right:20})
|
|
|
|
|
}
|
|
|
|
|
Text(`已行驶:${this.jl}m`).fontColor('#FFAD33').fontSize(this.FONTSIZE)
|
|
|
|
|
}
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
2024-05-15 16:22:48 +08:00
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
}.alignItems(HorizontalAlign.Start)
|
2024-05-15 16:22:48 +08:00
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
}.width('100%')
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
Column() {
|
2024-01-05 11:11:15 +08:00
|
|
|
Row(){
|
2024-05-15 16:22:48 +08:00
|
|
|
Text(this.carztStr).fontColor('#FFA500').fontSize(this.FONTSIZE)
|
|
|
|
|
}.height(40)
|
|
|
|
|
Row() {
|
|
|
|
|
Flex({ direction: FlexDirection.Column }) {
|
|
|
|
|
List({}) {
|
|
|
|
|
ForEach(this.kfArr, (item) => {
|
|
|
|
|
ListItem() {
|
|
|
|
|
Column() {
|
|
|
|
|
Row() {
|
2024-01-05 11:11:15 +08:00
|
|
|
Text(item.xmmcStr).fontSize(this.BIGFONTSIZE).fontColor('#FFF')
|
|
|
|
|
Text(`${item.score}分`).fontSize(this.BIGFONTSIZE).fontColor('#FFF')
|
2024-05-15 16:22:48 +08:00
|
|
|
}
|
|
|
|
|
.width('100%')
|
|
|
|
|
.backgroundColor('#38260B')
|
|
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
|
|
.padding({ top: 12, bottom: 12, left: 8, right: 5 })
|
|
|
|
|
|
|
|
|
|
Text(item.desc)
|
|
|
|
|
.fontSize(this.BIGFONTSIZE)
|
|
|
|
|
.fontColor('#E5CBA1')
|
|
|
|
|
.margin({ top: 10, bottom: 8, left: 5, right: 5 })
|
|
|
|
|
}.margin({ top: 15 }).alignItems(HorizontalAlign.Start)
|
|
|
|
|
|
|
|
|
|
}.margin({bottom:25})
|
2024-01-05 11:11:15 +08:00
|
|
|
})
|
2024-05-15 16:22:48 +08:00
|
|
|
}.padding({left:15,right:15,top:30,bottom:5})
|
|
|
|
|
}
|
|
|
|
|
.backgroundImage($rawfile('judge/score_bg.png'), ImageRepeat.NoRepeat)
|
|
|
|
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
|
|
|
|
.width(514)
|
|
|
|
|
.height(618)
|
|
|
|
|
.padding({ top: 18, bottom: 15, left: 13, right: 14 })
|
|
|
|
|
|
|
|
|
|
//科目二
|
|
|
|
|
if(this.examSubject == 2){
|
|
|
|
|
Flex({wrap:FlexWrap.Wrap,direction:FlexDirection.Row,justifyContent:FlexAlign.SpaceBetween}){
|
|
|
|
|
List({}){
|
|
|
|
|
ForEach(chunkArr(this.projects,2),(item)=>{
|
|
|
|
|
ListItem(){
|
2024-01-05 11:11:15 +08:00
|
|
|
Row(){
|
|
|
|
|
Row(){
|
|
|
|
|
//#FF7566 #00FFD5 #E6DECF
|
2024-05-15 16:22:48 +08:00
|
|
|
// Text(this.projectsObj[item[0].projectCode])
|
|
|
|
|
Text(item[0].abbreviation).fontSize(item[0].abbreviation.length > 5?28:32).fontColor(this.getProjectColor(this.projectsObj[item[0].projectCode].type))
|
|
|
|
|
}.backgroundImage($rawfile('judge/project_item.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width('48.5%').height(115).margin({bottom:5}).justifyContent(FlexAlign.Center)
|
|
|
|
|
if(item[1]){
|
|
|
|
|
Row(){
|
|
|
|
|
//#FF7566 #00FFD5 #E6DECF
|
|
|
|
|
Text(item[1].abbreviation).fontSize(item[1].abbreviation.length > 5?28:32).fontColor(this.getProjectColor(this.projectsObj[item[1].projectCode].type))
|
|
|
|
|
}.backgroundImage($rawfile('judge/project_item.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width('48.5%').height(115).margin({left:5,bottom:5}).justifyContent(FlexAlign.Center)
|
|
|
|
|
}
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-05-15 16:22:48 +08:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}.backgroundImage($rawfile('judge/project_bg.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width('57%').height('100%').padding(30).margin({right:10})
|
|
|
|
|
}
|
2024-01-05 11:11:15 +08:00
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
//科目三
|
|
|
|
|
if(this.examSubject == 3){
|
|
|
|
|
Column(){
|
|
|
|
|
Flex({wrap:FlexWrap.Wrap,direction:FlexDirection.Row,justifyContent:FlexAlign.SpaceBetween}){
|
|
|
|
|
List({}){
|
|
|
|
|
ForEach(this.projects,(project)=>{
|
|
|
|
|
ListItem(){
|
|
|
|
|
Text(project.name){
|
|
|
|
|
|
|
|
|
|
}.fontColor(this.getProjectColor(this.projectsObj[project.projectCode].type)).margin({bottom:5}).fontSize(26)
|
|
|
|
|
}.margin({bottom:8})
|
|
|
|
|
})
|
|
|
|
|
}.lanes(2).margin({left:25})
|
|
|
|
|
}.width('100%').height('50%').backgroundImage($rawfile('judge/project_km3_bg.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).padding(30).margin({right:5})
|
|
|
|
|
|
|
|
|
|
Flex({wrap:FlexWrap.Wrap,direction:FlexDirection.Row,justifyContent:FlexAlign.SpaceAround}){
|
|
|
|
|
List(){
|
|
|
|
|
ForEach(this.artSubject3Projects,(item,index)=>{
|
|
|
|
|
ListItem(){}.backgroundImage(
|
|
|
|
|
$rawfile(
|
|
|
|
|
`judge/km3/${this.getIsExitManualProject(index) ? item : (item+'_gray')}.png`
|
|
|
|
|
),ImageRepeat.NoRepeat)
|
|
|
|
|
.backgroundImageSize({width:'100%',height:'100%'}).width(174).height(118).margin({bottom:15})
|
|
|
|
|
.onClick(()=>{
|
|
|
|
|
if(this.getIsExitManualProject(index)){
|
|
|
|
|
// 靠边停车时候可以触发
|
|
|
|
|
if(this.judgeConfigObj['343'] == 0 ){
|
|
|
|
|
const xmmcStr = this.xmmcStr;
|
|
|
|
|
if(xmmcStr == '无' || xmmcStr == ''){
|
|
|
|
|
this.amplifiedImgIndex = index;this.isAmplifyPopShow = true
|
|
|
|
|
} else{
|
|
|
|
|
if(index === 5){
|
|
|
|
|
prompt.showToast({
|
|
|
|
|
message: `${xmmcStr}未结束,不允许靠边停车`,
|
|
|
|
|
duration: 8000
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.amplifiedImgIndex = index;this.isAmplifyPopShow = true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}.lanes(3).margin({left:5,top:18})
|
|
|
|
|
}
|
|
|
|
|
}.backgroundImage($rawfile('judge/project_bg.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(660).height(640).padding(44).margin({right:10})
|
|
|
|
|
}
|
|
|
|
|
}.margin({ top: 15 }).height('80%').justifyContent(FlexAlign.SpaceBetween)
|
|
|
|
|
}.width('100%').height('100%').alignItems(HorizontalAlign.Start).margin({ top: 10 })
|
2024-01-05 11:11:15 +08:00
|
|
|
}.height('100%').alignItems(HorizontalAlign.Start)
|
|
|
|
|
}.width('75%').height('100%')
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
Column() {
|
|
|
|
|
Column() {
|
|
|
|
|
Row() {
|
|
|
|
|
Text(this.totalScore + '').fontColor('#FFEECC').fontSize(55)
|
|
|
|
|
Text('分').fontColor('#FFEECC').fontSize(30).padding({ top: 5 })
|
|
|
|
|
}
|
|
|
|
|
.width(334)
|
|
|
|
|
.height(120)
|
|
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
|
|
.alignItems(VerticalAlign.Center)
|
|
|
|
|
.border({ width: 5, color: '#4D4136', radius: 30 })
|
|
|
|
|
.onClick(() => {
|
|
|
|
|
this.signDisplayComVisible = true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
Row() {
|
|
|
|
|
Image(this.kszp).width('85%').height('85%')
|
|
|
|
|
}
|
|
|
|
|
.width(226)
|
|
|
|
|
.height(312)
|
|
|
|
|
.backgroundImage($rawfile('judge/photo_bg.png'), ImageRepeat.NoRepeat)
|
|
|
|
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
|
|
|
|
.justifyContent(FlexAlign.Center)
|
|
|
|
|
.alignItems(VerticalAlign.Center)
|
|
|
|
|
.margin({ top: 30 ,bottom:15})
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
Column(){
|
2024-05-15 16:22:48 +08:00
|
|
|
if(this.examSubject == 3){
|
|
|
|
|
Row(){
|
|
|
|
|
Row(){}.width(60).height(60).backgroundImage($rawfile('judge/manual_judge.png'), ImageRepeat.NoRepeat).backgroundImageSize({ width: '100%', height: '100%' })
|
|
|
|
|
Text('人工评判').fontColor('#FFF').fontSize(32).padding({right:12})
|
|
|
|
|
}.width(334).height(110).justifyContent(FlexAlign.Center).alignItems(VerticalAlign.Center)
|
|
|
|
|
.backgroundImage($rawfile('judge/button_nor.png'), ImageRepeat.NoRepeat)
|
|
|
|
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
|
|
|
|
.margin({bottom:10})
|
|
|
|
|
.onClick(()=>{
|
|
|
|
|
if(this.judgeConfigObj['342'] == 0){
|
|
|
|
|
this.isDeductedPopShow = true
|
|
|
|
|
}else{
|
|
|
|
|
prompt.showToast({
|
|
|
|
|
message: '平台配置不允许人工评判!',
|
|
|
|
|
duration: 4000
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
|
|
|
|
|
Row(){
|
2024-05-15 16:22:48 +08:00
|
|
|
Row(){}.width(60).height(60).backgroundImage($rawfile('judge/phone.png'), ImageRepeat.NoRepeat).backgroundImageSize({ width: '100%', height: '100%' })
|
|
|
|
|
Text('呼叫请求').fontColor('#FFF').fontSize(32).padding({right:12})
|
|
|
|
|
}.width(334).height(110).justifyContent(FlexAlign.Center).alignItems(VerticalAlign.Center)
|
|
|
|
|
.backgroundImage($rawfile('judge/button_nor.png'), ImageRepeat.NoRepeat)
|
|
|
|
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
|
|
|
|
.margin({bottom:10})
|
|
|
|
|
|
|
|
|
|
Row() {}
|
|
|
|
|
.width(334)
|
|
|
|
|
.height(100)
|
|
|
|
|
.backgroundImage($rawfile('judge/anniu_nor.png'), ImageRepeat.NoRepeat)
|
|
|
|
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
|
|
|
|
.onClick(() => {
|
|
|
|
|
if(this.judgeConfigObj['353'] == '0' ){
|
|
|
|
|
this.endPopupVisible = true
|
|
|
|
|
}else{
|
|
|
|
|
prompt.showToast({
|
|
|
|
|
message: '车上不允许手动结束考试!',
|
|
|
|
|
duration: 4000
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}.margin({bottom:30})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.width('25%')
|
|
|
|
|
.height('100%')
|
|
|
|
|
.justifyContent(FlexAlign.SpaceBetween)
|
|
|
|
|
.alignItems(HorizontalAlign.Center)
|
|
|
|
|
.margin({ bottom: 20 })
|
|
|
|
|
}.height('90%').justifyContent(FlexAlign.Start).padding({ top: 37, left: 60, bottom: 35, right: 60 })
|
2024-01-05 11:11:15 +08:00
|
|
|
|
|
|
|
|
//结束考试弹窗
|
2024-05-15 16:22:48 +08:00
|
|
|
if (this.endPopupVisible) {
|
2024-01-05 11:11:15 +08:00
|
|
|
EndPoPup({
|
2024-05-15 16:22:48 +08:00
|
|
|
title: '确定结束考试吗?',
|
|
|
|
|
cancelFn: () => {
|
2024-01-05 11:11:15 +08:00
|
|
|
this.endPopupVisible = false;
|
|
|
|
|
},
|
2024-05-15 16:22:48 +08:00
|
|
|
confirmFn: async () => {
|
2024-01-05 11:11:15 +08:00
|
|
|
this.endPopupVisible = false;
|
2024-01-31 14:35:16 +08:00
|
|
|
this.loadingPopupVisible = true
|
2024-01-05 11:11:15 +08:00
|
|
|
globalThis.isJudge = false
|
|
|
|
|
examJudgeEndExam();
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
clearInterval(globalThis.judgeTimer)
|
|
|
|
|
globalThis.windowClass.setWindowSystemBarEnable(['navigation'])
|
2024-05-15 16:22:48 +08:00
|
|
|
const judge = this.judge
|
|
|
|
|
await judge.handEndExam(true);
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
//loading 弹窗
|
|
|
|
|
if (this.loadingPopupVisible) {
|
2024-01-05 11:11:15 +08:00
|
|
|
LoadingPopup({
|
2024-05-15 16:22:48 +08:00
|
|
|
title: '正在生成考试记录,请稍后...',
|
2024-01-05 11:11:15 +08:00
|
|
|
})
|
|
|
|
|
}
|
2024-01-31 14:35:16 +08:00
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
if (this.signDisplayComVisible) {
|
2024-01-31 14:35:16 +08:00
|
|
|
Column() {
|
|
|
|
|
SignDisplayCom({
|
2024-05-15 16:22:48 +08:00
|
|
|
showBack: false,
|
|
|
|
|
scaleNum: 1.5,
|
|
|
|
|
msgStr: this.judge.plcStr || ''
|
|
|
|
|
}).margin({ top: 100 })
|
|
|
|
|
|
|
|
|
|
Row() {}
|
|
|
|
|
.width(240)
|
|
|
|
|
.height(240)
|
|
|
|
|
.position({ x: '81%', y: 80 })
|
|
|
|
|
.backgroundImage($rawfile('judge/close.png'), ImageRepeat.NoRepeat)
|
|
|
|
|
.backgroundImageSize({ width: '33.33%', height: '33.33%' })
|
|
|
|
|
.onClick(() => {
|
|
|
|
|
this.signDisplayComVisible = false
|
|
|
|
|
})
|
|
|
|
|
}.width('100%').height('100%').position({ y: 0 }).backgroundColor('rgba(0,0,0,0.6)')
|
2024-01-31 14:35:16 +08:00
|
|
|
}
|
2024-05-15 16:22:48 +08:00
|
|
|
|
|
|
|
|
//科目三人工扣分弹窗
|
|
|
|
|
if (this.isDeductedPopShow) {
|
|
|
|
|
DeductedPopup({
|
|
|
|
|
currentItems:Reflect.ownKeys(this.projectsObj).map(projectKey => {
|
|
|
|
|
const project = this.projectsObj[projectKey]
|
|
|
|
|
return project.type == '2'?project.projectCode:''
|
|
|
|
|
}).filter(project => project !== ''),
|
|
|
|
|
markRules:this.manualMarkRules,
|
|
|
|
|
closePopup:()=>{this.isDeductedPopShow = false},
|
|
|
|
|
confirmMark:async (itemno,serial) => {
|
|
|
|
|
const judge = this.judge
|
|
|
|
|
await judge.setJudgeMark(itemno,serial);
|
|
|
|
|
this.isDeductedPopShow = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//科目三人工项目确认框
|
|
|
|
|
if(this.isAmplifyPopShow){
|
|
|
|
|
AmplifyPopup({
|
|
|
|
|
amplifyImgIndex:this.amplifiedImgIndex,
|
|
|
|
|
confirmAmplify:async (amplify)=>{
|
|
|
|
|
const judge = this.judge
|
|
|
|
|
await judge.setJudgeItem(amplify.projectCode);
|
|
|
|
|
this.isAmplifyPopShow = false
|
|
|
|
|
},
|
|
|
|
|
closeAmplifyPop:()=>{
|
|
|
|
|
this.isAmplifyPopShow = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
.height('100%').backgroundColor('#000').justifyContent(FlexAlign.Start)
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
getProjectColor(type: string) {
|
|
|
|
|
switch (type) {
|
|
|
|
|
case '1':
|
|
|
|
|
return '#E6DECF';
|
|
|
|
|
break;
|
|
|
|
|
case '2':
|
|
|
|
|
return '#FFAD33';
|
|
|
|
|
break;
|
|
|
|
|
case '3':
|
|
|
|
|
return '#00FFD5';
|
|
|
|
|
break;
|
|
|
|
|
case '4':
|
|
|
|
|
return '#FF7566';
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return '#E6DECF';break;
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|
|
|
|
|
}
|
2024-01-31 14:35:16 +08:00
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
// 获取是否能人工进项目
|
|
|
|
|
getIsExitManualProject = (index:number)=>{
|
|
|
|
|
const {judgeConfigObj,artSubject3ProjectsCodesArr,projectsObj} = this;
|
|
|
|
|
|
|
|
|
|
const unExitManualProjects = judgeConfigObj['332'].split(',') || [];
|
|
|
|
|
const param348 = judgeConfigObj['348'] || '0';
|
|
|
|
|
const param387 = judgeConfigObj['348'] || '0';
|
|
|
|
|
|
|
|
|
|
if(judgeConfigObj['342'] === '3' || judgeConfigObj['342'] === '2'){
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(unExitManualProjects.includes(artSubject3ProjectsCodesArr[index])){
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(param348 == '0' && projectsObj['9']?.type == 2){
|
|
|
|
|
return index === 0 ? true : false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(param387 === '0' && index === 5){
|
|
|
|
|
const {examMileage,jl} = this
|
|
|
|
|
return jl >= Number(examMileage)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-31 14:35:16 +08:00
|
|
|
//页面通用字体大小
|
2024-05-15 16:22:48 +08:00
|
|
|
@State FONTSIZE: number = 28
|
|
|
|
|
@State BIGFONTSIZE: number = 28
|
2024-01-31 14:35:16 +08:00
|
|
|
//结束考试弹窗
|
2024-05-15 16:22:48 +08:00
|
|
|
@State endPopupVisible: boolean = false
|
2024-01-31 14:35:16 +08:00
|
|
|
//等待弹窗(考试及格,考试不及格使用)
|
2024-05-15 16:22:48 +08:00
|
|
|
@State loadingPopupVisible: boolean = false
|
2024-01-31 14:35:16 +08:00
|
|
|
//实时轨迹弹窗
|
2024-05-15 16:22:48 +08:00
|
|
|
@State signDisplayComVisible: boolean = false
|
|
|
|
|
@State isDdxk: boolean = false;
|
|
|
|
|
@State time: string = ''
|
2024-01-31 14:35:16 +08:00
|
|
|
//考试用时
|
2024-05-15 16:22:48 +08:00
|
|
|
@State examTime: number = 0
|
2024-01-31 14:35:16 +08:00
|
|
|
//开始时间
|
2024-05-15 16:22:48 +08:00
|
|
|
@State startTime: string = '00:00:00'
|
|
|
|
|
@State startFullTime: string = ''
|
|
|
|
|
@State startHourTime: string = ''
|
|
|
|
|
//科目类型
|
2024-05-17 16:34:52 +08:00
|
|
|
@State examSubject: 2 | 3 = 3;
|
2024-05-15 16:22:48 +08:00
|
|
|
@State ddxkTime: number = 0;
|
|
|
|
|
@State ddxkKsxmArr: string[] = ['']
|
|
|
|
|
@State ddxkKfArr: string[] = ['']
|
|
|
|
|
@State xmmcStr: string = ''
|
|
|
|
|
@State carztStr: string = ''
|
|
|
|
|
@State kfArr: {
|
|
|
|
|
xmmcStr?: string,
|
|
|
|
|
score: string,
|
|
|
|
|
desc: string
|
|
|
|
|
}[] = []
|
|
|
|
|
|
|
|
|
|
@State name: string = ''
|
|
|
|
|
@State idCard: string = ''
|
|
|
|
|
@State totalScore: number = 100
|
2024-01-31 14:35:16 +08:00
|
|
|
//模拟考试项目
|
2024-05-15 16:22:48 +08:00
|
|
|
@State projects: Project[] = []
|
|
|
|
|
@State projectsObj: ProjectObj = {}
|
|
|
|
|
@State projectsCenterObj: ProjectObj = {}
|
|
|
|
|
@State markRuleListObj: MarkRule = {}
|
|
|
|
|
@State cdsbInfoObj: CDSBInfo = {}
|
|
|
|
|
@State timer: number = 0
|
|
|
|
|
@State judgeConfig: {[k:string]:string}[] = []
|
2024-05-16 11:19:10 +08:00
|
|
|
@State judgeConfigObj: {[k:string]:any} = defaultJudgeConfigObj
|
2024-05-15 16:22:48 +08:00
|
|
|
|
2024-01-31 14:35:16 +08:00
|
|
|
//流水号
|
2024-05-15 16:22:48 +08:00
|
|
|
@State lsh: string = ''
|
|
|
|
|
@State kszp: string = ''
|
|
|
|
|
@State ksdd: string = ''
|
|
|
|
|
@State kssycs: string = ''
|
|
|
|
|
@State kslx: string = ''
|
|
|
|
|
|
2024-01-31 14:35:16 +08:00
|
|
|
//监管接口序列号
|
2024-05-15 16:22:48 +08:00
|
|
|
@State serialNumber: number = 0
|
|
|
|
|
@State carType: string = ''
|
|
|
|
|
@State carName: string = ''
|
|
|
|
|
@State isDeductedPopShow: boolean = false
|
|
|
|
|
@State isAmplifyPopShow: boolean = false
|
|
|
|
|
@State amplifiedImgIndex: number = 0
|
2024-01-31 14:35:16 +08:00
|
|
|
@State judge:any = {}
|
2024-05-15 16:22:48 +08:00
|
|
|
|
|
|
|
|
//行驶距离
|
|
|
|
|
@State jl:number =0
|
|
|
|
|
//应考里程
|
|
|
|
|
@State examMileage:string = '0'
|
2024-01-31 14:35:16 +08:00
|
|
|
//已考的考试项目
|
|
|
|
|
private wantInfos = []
|
|
|
|
|
|
2024-05-15 16:22:48 +08:00
|
|
|
@State artSubject3Projects: string[] = ['直线', '会车', '变道','超车', '掉头', '停车']
|
|
|
|
|
@State artSubject3ProjectsCodesArr: string[] = ['3', '9', '4','10', '12', '11']
|
|
|
|
|
|
|
|
|
|
@State manualMarkRules:MarkRule[] = []
|
|
|
|
|
|
|
|
|
|
//科目三评判初始化数据
|
|
|
|
|
@State systemparmArr:SYSTEMPARMARR[] = []
|
|
|
|
|
@State mapPointItemArr:MAPITEMPOINTITEM[] = []
|
|
|
|
|
@State carinfoArrr:CARINFO[] = []
|
|
|
|
|
@State mapPointArr:MAPPOINT[] = []
|
|
|
|
|
|
2024-01-05 11:11:15 +08:00
|
|
|
}
|