Compare commits
4 Commits
d6f0543e9d
...
59b3c56392
| Author | SHA1 | Date | |
|---|---|---|---|
| 59b3c56392 | |||
|
|
e65c48f1eb | ||
|
|
da6a85f02a | ||
|
|
b9a69d2d84 |
@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2023 Hunan OpenValley Digital Industry Development Co., Ltd.
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file 日期工具
|
||||
*/
|
||||
|
||||
const NINE = 9; // 这是数字9
|
||||
|
||||
export default class DateTimeUtil {
|
||||
/**
|
||||
* 时分秒
|
||||
*/
|
||||
getTime(): string {
|
||||
const DATETIME = new Date();
|
||||
return this.concatTime(
|
||||
DATETIME.getHours(),
|
||||
DATETIME.getMinutes(),
|
||||
DATETIME.getSeconds()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 年月日
|
||||
*/
|
||||
getDate(): string {
|
||||
const DATETIME = new Date();
|
||||
return this.concatDate(
|
||||
DATETIME.getFullYear(),
|
||||
DATETIME.getMonth() + 1,
|
||||
DATETIME.getDate()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 日期不足两位补充0
|
||||
* @param value-数据值
|
||||
*/
|
||||
fill(value: number): string {
|
||||
return (value > NINE ? '' : '0') + value;
|
||||
}
|
||||
|
||||
/**
|
||||
* 年月日格式修饰
|
||||
* @param year
|
||||
* @param month
|
||||
* @param date
|
||||
*/
|
||||
concatDate(year: number, month: number, date: number): string {
|
||||
return `${year}${this.fill(month)}${this.fill(date)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* 时分秒格式修饰
|
||||
* @param hours
|
||||
* @param minutes
|
||||
* @param seconds
|
||||
*/
|
||||
concatTime(hours: number, minutes: number, seconds: number): string {
|
||||
return `${this.fill(hours)}${this.fill(minutes)}${this.fill(seconds)}`;
|
||||
}
|
||||
}
|
||||
@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
import mediaLibrary from '@ohos.multimedia.mediaLibrary';
|
||||
import DateTimeUtil from './DateTimeUtil2';
|
||||
import DateTimeUtil from './DateTimeUtil';
|
||||
|
||||
|
||||
type FileInfo = {
|
||||
@ -24,8 +24,8 @@ type FileInfo = {
|
||||
};
|
||||
|
||||
export default class MediaModel {
|
||||
private mediaLibraryTest: mediaLibrary.MediaLibrary = undefined;
|
||||
private static mediaInstance: MediaModel = undefined;
|
||||
private mediaLibraryTest: mediaLibrary.MediaLibrary = undefined;
|
||||
|
||||
constructor() {
|
||||
this.mediaLibraryTest = mediaLibrary.getMediaLibrary(globalThis.cameraContext);
|
||||
@ -1,8 +1,8 @@
|
||||
import systemTime from '@ohos.systemDateTime';
|
||||
import {deepClone,getCurrentTime,stringToASC,string2Bytes,fillZero,Array2Byte} from '../../common/utils/tools'
|
||||
import {testMarkRules,testAllitems,testRealExam,testUIAllitems,testKmItems} from '../../pages/judgeSDK/dataTest/index'
|
||||
import {setJudgeUdp,setTopLineUdp} from './GlobleUdp'
|
||||
import {convertGpsCoord2} from '../utils/tools'
|
||||
import { Array2Byte, fillZero, string2Bytes, stringToASC } from '../../common/utils/tools';
|
||||
import { testKmItems } from '../../pages/judgeSDK/dataTest/index';
|
||||
import { setJudgeUdp, setTopLineUdp } from './GlobalUdp';
|
||||
import { convertGpsCoord2 } from '../utils/tools';
|
||||
|
||||
|
||||
export const initJudgeUdp = async () => {
|
||||
@ -92,7 +92,9 @@ export const getMessageHeartbeat = async (msg) => {
|
||||
[].map(kf => string2Bytes(kf.markcatalog, 8))
|
||||
]
|
||||
let tempArr = [];
|
||||
arr.forEach(itemArr =>{ tempArr = tempArr.concat(itemArr)})
|
||||
arr.forEach(itemArr => {
|
||||
tempArr = tempArr.concat(itemArr)
|
||||
})
|
||||
globalThis.serialIndex = 0;
|
||||
return Array2Byte(tempArr)
|
||||
}
|
||||
@ -140,11 +142,14 @@ const getTranslateProject = () => {
|
||||
const getCenterProjectStatus = (status) => {
|
||||
switch (status) {
|
||||
//不考
|
||||
case 0:return '00'
|
||||
case 0:
|
||||
return '00'
|
||||
//未考
|
||||
case 1:return '01'
|
||||
case 1:
|
||||
return '01'
|
||||
//已考
|
||||
case 2:return '10'
|
||||
case 2:
|
||||
return '10'
|
||||
}
|
||||
}
|
||||
|
||||
@ -163,24 +168,64 @@ const getPlcData = async (plc:string) => {
|
||||
const tempData = {
|
||||
sensor: {
|
||||
//安全带 车门门开关 手刹 脚刹 副刹 离合器 喇叭 示宽灯 近光灯 远光灯
|
||||
aqd:p[19], mkg:p[14], ssc:p[13], jsc:p[12], fsc:p[18], lhq:p[17], lb:p[4], skd:p[9], jgd:p[7], ygd:p[8],
|
||||
aqd: p[19],
|
||||
mkg: p[14],
|
||||
ssc: p[13],
|
||||
jsc: p[12],
|
||||
fsc: p[18],
|
||||
lhq: p[17],
|
||||
lb: p[4],
|
||||
skd: p[9],
|
||||
jgd: p[7],
|
||||
ygd: p[8],
|
||||
//左方向灯 右方向灯 双跳灯 雾灯 雨刮器 点火1 点火2 发动机转速 档位 车速
|
||||
zfxd:p[2], yfxd:p[3], shtd:p[20],wd:p[10], ygq:p[11], dh1:p[5], dh2:p[6], fdjzs:p[25], dw:p[28], cs:p[23],
|
||||
zfxd: p[2],
|
||||
yfxd: p[3],
|
||||
shtd: p[20],
|
||||
wd: p[10],
|
||||
ygq: p[11],
|
||||
dh1: p[5],
|
||||
dh2: p[6],
|
||||
fdjzs: p[25],
|
||||
dw: p[28],
|
||||
cs: p[23],
|
||||
//@ts-ignore 方向盘
|
||||
fxp: p[27].split('_')[0] * 1,
|
||||
//累计脉冲 溜车脉冲 超声波左后 超声波右后 超声波右前 超声波左前 座椅 仪表盘 后视镜 倒车镜 光照 雨量
|
||||
ljmc:p[24], lcmc:0, csbzh:p[32], csbyh:p[30], csbyq:p[31], csbzq:p[29], zy:0, tbp:0, hsj:0, dcj:0, gx:0, yl:0
|
||||
ljmc: p[24],
|
||||
lcmc: 0,
|
||||
csbzh: p[32],
|
||||
csbyh: p[30],
|
||||
csbyq: p[31],
|
||||
csbzq: p[29],
|
||||
zy: 0,
|
||||
tbp: 0,
|
||||
hsj: 0,
|
||||
dcj: 0,
|
||||
gx: 0,
|
||||
yl: 0
|
||||
},
|
||||
gps: {
|
||||
//TODO 办卡类型 定位差分状态
|
||||
bklx:p[56], dwzt:p[83],
|
||||
bklx: p[56],
|
||||
dwzt: p[83],
|
||||
//@ts-ignore 角度差分状态
|
||||
jdzt: p[92].split('-')[0] * 1,
|
||||
//TODO gps数据
|
||||
//gps时间 经度 纬度 航向角 俯仰角 海拔高 高度差 速度
|
||||
sj:time, jd:p[96], wd:p[95], hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97],
|
||||
sj: time,
|
||||
jd: p[96],
|
||||
wd: p[95],
|
||||
hxj: p[90],
|
||||
fyj: p[91],
|
||||
hbg: p[85],
|
||||
gdc: p[86],
|
||||
sd: p[97],
|
||||
//龄期 经度因子 纬度因子 定位搜星数
|
||||
age:p[87], jdyz:p[89], wdyz:p[88], dwsxs:p[84],
|
||||
age: p[87],
|
||||
jdyz: p[89],
|
||||
wdyz: p[88],
|
||||
dwsxs: p[84],
|
||||
//@ts-ignore 角度搜星数
|
||||
jdsxs: p[92].split('-')[1] * 1
|
||||
},
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
import UdpClient from '../common/utils/UdpClient';
|
||||
import { voiceService } from '../common/service/voiceService'
|
||||
import router from '@ohos.router'
|
||||
import { carConfigurationInfo, uploadExamCarCheckResult } from '../api/checkCar'
|
||||
import TopLogo from './compontents/topLogo'
|
||||
import testNapi from '@ohos.hiserialsdk'
|
||||
import { voiceService } from '../common/service/voiceService';
|
||||
import router from '@ohos.router';
|
||||
import { carConfigurationInfo, uploadExamCarCheckResult } from '../api/checkCar';
|
||||
import TopLogo from './compontents/topLogo';
|
||||
import testNapi from '@ohos.hiserialsdk';
|
||||
import { dateFormat } from '../common/utils/tools';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
export default struct Index {
|
||||
@State angle: number = 0
|
||||
@State ratio: number = 1700 / 960
|
||||
@State index: number = -1
|
||||
@ -20,8 +19,7 @@ struct Index {
|
||||
@State breakFlag: boolean = false
|
||||
@State checkFlag: boolean = false
|
||||
@State msgFlag: boolean = false
|
||||
@State confimDialogFlag: boolean = false
|
||||
private vocObj = null;
|
||||
@State confirmDialogFlag: boolean = false
|
||||
@State checkList: Array<any> = []
|
||||
@State subFlag: boolean = true
|
||||
@State signArr: Array<any> = []
|
||||
@ -187,12 +185,11 @@ struct Index {
|
||||
19: '9',
|
||||
20: '0'
|
||||
}
|
||||
@State len: any = ''
|
||||
@State fd: number = -1;
|
||||
@State devPath: string = "/dev/ttyS3"
|
||||
@State interval: any=""
|
||||
@State chuankouFlag: any=""
|
||||
@State stopFlag: boolean = false
|
||||
private vocObj = null;
|
||||
|
||||
// private AccountTable = new AccountTable(()=>{},CommonConstants);
|
||||
onPageShow() {
|
||||
const that = this
|
||||
@ -263,7 +260,6 @@ struct Index {
|
||||
|
||||
}
|
||||
|
||||
|
||||
async xhxs() {
|
||||
this.vocObj.avPlayerStop()
|
||||
this.vocObj.releasePlayer()
|
||||
@ -273,6 +269,7 @@ struct Index {
|
||||
// clearInterval(this.interval)
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
carConfigurationInfoFn() {
|
||||
if (globalThis.singlePlay) {
|
||||
@ -419,6 +416,7 @@ struct Index {
|
||||
name: 'kszj.wav'
|
||||
})
|
||||
}
|
||||
|
||||
getPLCInfo() {
|
||||
const that = this
|
||||
globalThis.udpClient && globalThis.udpClient.onMessage((msg) => {
|
||||
@ -660,6 +658,7 @@ struct Index {
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
.width(206 * this.ratio)
|
||||
.height(235.5 * this.ratio)
|
||||
|
||||
//档位
|
||||
Column() {
|
||||
Image(this.warnFlag[14] == '1' ? $r('app.media.1_r') : this.warnFlag[14] == '2' ? $r('app.media.1') : '')
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import router from '@ohos.router'
|
||||
import TopLogo from './compontents/topLogo'
|
||||
import { examinerLoginService } from '../common/service/ExaminerService'
|
||||
import router from '@ohos.router';
|
||||
import TopLogo from './compontents/topLogo';
|
||||
import { examinerLoginService } from '../common/service/ExaminerService';
|
||||
import Md5 from '../common/utils/md5';
|
||||
import promptAction from '@ohos.promptAction'
|
||||
import promptAction from '@ohos.promptAction';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
export default struct Index {
|
||||
@State ratio: number = 1700 / 960
|
||||
@State url: string = ''
|
||||
@State inputPlaceholderArr: string[] = ['用户账户', '密码'];
|
||||
@ -15,6 +15,7 @@ struct Index {
|
||||
@State currentInputIndex: number = 0
|
||||
@State @Watch('outClick') outFlag: boolean = false;
|
||||
private vocObj = null;
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
TopLogo({ outFlag: $outFlag })
|
||||
@ -47,6 +48,7 @@ struct Index {
|
||||
.width('90%')
|
||||
.margin({ top: 25 * this.ratio }) //20
|
||||
.justifyContent(FlexAlign.SpaceBetween)
|
||||
|
||||
Column() {
|
||||
Flex({ wrap: FlexWrap.Wrap,
|
||||
justifyContent: FlexAlign.SpaceAround,
|
||||
@ -95,11 +97,13 @@ struct Index {
|
||||
} else {
|
||||
if (index === 9) {
|
||||
this.inputTextArr[this.currentInputIndex] += (0).toString()
|
||||
} if(index === 10) {
|
||||
}
|
||||
if (index === 10) {
|
||||
this.inputTextArr[this.currentInputIndex] += 'X';
|
||||
} else if (index === 11) {
|
||||
this.inputTextArr[this.currentInputIndex] = '';
|
||||
} if(index === 12) {
|
||||
}
|
||||
if (index === 12) {
|
||||
this.inputTextArr[this.currentInputIndex] = this.inputTextArr[this.currentInputIndex].slice(0, -1)
|
||||
}
|
||||
}
|
||||
@ -126,12 +130,15 @@ struct Index {
|
||||
.backgroundImage($r('app.media.index_bg'))
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
}
|
||||
|
||||
aboutToAppear() {
|
||||
this.url = ''
|
||||
console.info('ExmainerLogin aboutToAppear');
|
||||
}
|
||||
|
||||
onPageShow() {
|
||||
}
|
||||
|
||||
outClick() {
|
||||
}
|
||||
}
|
||||
@ -1,38 +1,36 @@
|
||||
// @ts-nocheck
|
||||
import { VideoConfig } from './interfaces'
|
||||
import { VideoConfig } from './interfaces';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import router from '@ohos.router'
|
||||
import { getDeviceInfo ,getCarInfo} from '../common/service/terminalService'
|
||||
import { setCurrentTime } from '../common/service/timeService'
|
||||
import {string2Bytes} from '../common/utils/tools'
|
||||
import router from '@ohos.router';
|
||||
import { getCarInfo, getDeviceInfo } from '../common/service/terminalService';
|
||||
import { setCurrentTime } from '../common/service/timeService';
|
||||
import { string2Bytes } from '../common/utils/tools';
|
||||
import { FileHelper } from '../common/service/FileHelper';
|
||||
import { getUDP, getUDP2 } from '../common/utils/GlobalUdp';
|
||||
import { initJudgeUdp } from '../common/utils/UdpJudge';
|
||||
import { getTCP } from '../common/utils/GlobalTcp';
|
||||
import testNapi from '@ohos.hiserialsdk';
|
||||
import {
|
||||
getEsCarModel,
|
||||
} from '../common/service/initable'
|
||||
import FileUtil from '../common/utils/File'
|
||||
import { getUDP, getUDP2 } from '../common/utils/GlobleUdp'
|
||||
import {initJudgeUdp} from '../common/utils/UdpJudge'
|
||||
import { getTCP } from '../common/utils/GlobleTcp'
|
||||
import TcpClient from '../common/utils/TcpClient';
|
||||
import testNapi from '@ohos.hiserialsdk'
|
||||
import {setliushuiNum,getliushuiNum,getSingleCenterTable,getDoubleCeneterTable,takePhotoFn} from '../common/service/indexService'
|
||||
getDoubleCeneterTable,
|
||||
getliushuiNum,
|
||||
getSingleCenterTable,
|
||||
takePhotoFn
|
||||
} from '../common/service/indexService';
|
||||
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
|
||||
import promptAction from '@ohos.promptAction';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
private fileUtil: FileUtil
|
||||
@State carNum: string = ''
|
||||
@State version: string = ''
|
||||
@State url: string = ''
|
||||
@State hasAuth: boolean = false;
|
||||
@State isSingle: boolean = false;
|
||||
@State deviceId: string = '';
|
||||
private interval = null;
|
||||
@State angle: number = 0
|
||||
@State ratio: number = 1700 / 960
|
||||
@State loading: boolean = true
|
||||
@State fd: number = -1;
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
@State param: VideoConfig = {
|
||||
videoNum: '1',
|
||||
spls: '1',
|
||||
@ -66,6 +64,9 @@ struct Index {
|
||||
zdyz: '5',
|
||||
}
|
||||
fileHelper = null;
|
||||
private interval = null;
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Column() {
|
||||
@ -182,6 +183,7 @@ struct Index {
|
||||
.justifyContent(FlexAlign.SpaceBetween)
|
||||
.margin({ bottom: 10 })
|
||||
}
|
||||
|
||||
//
|
||||
if (this.loading) {
|
||||
Column() {
|
||||
@ -225,14 +227,19 @@ struct Index {
|
||||
|
||||
async heartMsg() {
|
||||
const arr = [globalThis.signNum || 0, globalThis.statue || 1]
|
||||
let tmpList = [];j
|
||||
let tmpList = [];
|
||||
tmpList.push(string2Bytes(arr[0], 1 * 8)[0])
|
||||
tmpList.push(string2Bytes(arr[1], 1 * 8)[0])
|
||||
const str = globalThis.lsh || '0000000000000'
|
||||
for (let i = 0; i < str.length; i++) {
|
||||
tmpList.push(string2Bytes(str.charCodeAt(i), 1 * 8)[0])
|
||||
}
|
||||
const param= {id: 31,list:tmpList,carNo: globalThis.carInfo.carNo,placeId: globalThis.carInfo.examinationRomId}
|
||||
const param = {
|
||||
id: 31,
|
||||
list: tmpList,
|
||||
carNo: globalThis.carInfo.carNo,
|
||||
placeId: globalThis.carInfo.examinationRomId
|
||||
}
|
||||
// globalThis.udpClient2.initHeartSendMsg(param,this.context)
|
||||
globalThis.udpClient2.sendMsg(param, this.context)
|
||||
}
|
||||
@ -270,6 +277,7 @@ struct Index {
|
||||
this.fileHelper.createAlbum('pz');
|
||||
|
||||
}
|
||||
|
||||
userAuth() {
|
||||
const permissions: Array<Permissions> = ["ohos.permission.READ_IMAGEVIDEO", "ohos.permission.DISTRIBUTED_DATASYNC", 'ohos.permission.CONNECTIVITY_INTERNAL', 'ohos.permission.CAMERA', 'ohos.permission.READ_MEDIA', 'ohos.permission.WRITE_MEDIA', 'ohos.permission.FILE_ACCESS_MANAGER'];
|
||||
let context = this.context;
|
||||
@ -293,6 +301,7 @@ struct Index {
|
||||
console.error(`Failed to request permissions from user. Code is ${err.code}, message is ${err.message}`);
|
||||
})
|
||||
}
|
||||
|
||||
async initParams() {
|
||||
this.loading = false
|
||||
await getDeviceInfo()
|
||||
@ -303,14 +312,9 @@ struct Index {
|
||||
this.hasAuth = globalThis.hasAuth;
|
||||
initJudgeUdp()
|
||||
//下载模型
|
||||
// await this.getModel()
|
||||
// await this.getEsCarModel(this.context)
|
||||
// const arr = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00]
|
||||
// globalThis.udpClientByTopLine.sendMsg(Array2Byte(arr).buffer)
|
||||
console.info(testNapi)
|
||||
}
|
||||
async getModel() {
|
||||
const context = this.context;
|
||||
//下载模型
|
||||
await getEsCarModel(context)
|
||||
console.info(testNapi.toString())
|
||||
}
|
||||
}
|
||||
@ -1,30 +1,105 @@
|
||||
import router from '@ohos.router'
|
||||
import prompt from '@ohos.prompt'
|
||||
import router from '@ohos.router';
|
||||
import prompt from '@ohos.prompt';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import EndPoPup from './compontents/judge/end-popup'
|
||||
import LoadingPopup from './compontents/judge/loading-popup'
|
||||
import DeductedPopup from './compontents/judge/deduction-popup'
|
||||
import AmplifyPopup from './compontents/judge/amplify-popup'
|
||||
import Judge from './judgeSDK/judge'
|
||||
import {defaultJudgeConfigObj} from './judgeSDK/utils//judge-common'
|
||||
import EndPoPup from './compontents/judge/end-popup';
|
||||
import LoadingPopup from './compontents/judge/loading-popup';
|
||||
import DeductedPopup from './compontents/judge/deduction-popup';
|
||||
import AmplifyPopup from './compontents/judge/amplify-popup';
|
||||
import Judge from './judgeSDK/judge';
|
||||
import { defaultJudgeConfigObj } from './judgeSDK/utils//judge-common';
|
||||
import {
|
||||
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'
|
||||
import { getSyncData } from '../common/service/initable'
|
||||
import { judgeConfig } from './judgeSDK/utils/judge-config'
|
||||
CARINFO,
|
||||
CDSBInfo,
|
||||
MAPITEMPOINTITEM,
|
||||
MAPPOINT,
|
||||
MarkRule,
|
||||
Project,
|
||||
ProjectObj,
|
||||
SYSTEMPARMARR
|
||||
} from './judgeSDK/api/judgeSDK.d';
|
||||
import { chunkArr, formatTime, getCurrentHourTime, getCurrentTime } from '../common/utils/tools';
|
||||
import { examJudgeEndExam } from './judgeSDK/api/index';
|
||||
import { getSyncData } from '../common/service/initable';
|
||||
import { judgeConfig } from './judgeSDK/utils/judge-config';
|
||||
import FileUtil from '../common/utils/File';
|
||||
import SignDisplayCom from './compontents/signDisplayCom'
|
||||
import {testMarkRules} from './judgeSDK/dataTest/index'
|
||||
import SignDisplayCom from './compontents/signDisplayCom';
|
||||
import { testMarkRules } from './judgeSDK/dataTest/index';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
export default struct Index {
|
||||
scroller: Scroller = new Scroller()
|
||||
//页面通用字体大小
|
||||
@State FONTSIZE: number = 28
|
||||
@State BIGFONTSIZE: number = 28
|
||||
//结束考试弹窗
|
||||
@State endPopupVisible: boolean = false
|
||||
//等待弹窗(考试及格,考试不及格使用)
|
||||
@State loadingPopupVisible: boolean = false
|
||||
//实时轨迹弹窗
|
||||
@State signDisplayComVisible: boolean = false
|
||||
@State isDdxk: boolean = false;
|
||||
@State time: string = ''
|
||||
//考试用时
|
||||
@State examTime: number = 0
|
||||
//开始时间
|
||||
@State startTime: string = '00:00:00'
|
||||
@State startFullTime: string = ''
|
||||
@State startHourTime: string = ''
|
||||
//科目类型
|
||||
@State examSubject: 2 | 3 = 2;
|
||||
@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
|
||||
//模拟考试项目
|
||||
@State projects: Project[] = []
|
||||
@State projectsObj: ProjectObj = {}
|
||||
@State projectsCenterObj: ProjectObj = {}
|
||||
@State markRuleListObj: MarkRule = {}
|
||||
@State cdsbInfoObj: CDSBInfo = {}
|
||||
@State timer: number = 0
|
||||
@State judgeConfig: { [k: string]: string }[] = []
|
||||
@State judgeConfigObj: { [k: string]: any } = defaultJudgeConfigObj
|
||||
//流水号
|
||||
@State lsh: string = ''
|
||||
@State kszp: string = ''
|
||||
@State ksdd: string = ''
|
||||
@State kssycs: string = ''
|
||||
@State kslx: string = ''
|
||||
//监管接口序列号
|
||||
@State serialNumber: number = 0
|
||||
@State carType: string = ''
|
||||
@State carName: string = ''
|
||||
@State isDeductedPopShow: boolean = false
|
||||
@State isAmplifyPopShow: boolean = false
|
||||
@State amplifiedImgIndex: number = 0
|
||||
@State judge: any = {}
|
||||
//行驶距离
|
||||
@State jl: number = 0
|
||||
//应考里程
|
||||
@State examMileage: string = '0'
|
||||
@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[] = []
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
private img: ImageBitmap = new ImageBitmap("/resources/base/media/1.png")
|
||||
//已考的考试项目
|
||||
private wantInfos = []
|
||||
|
||||
async aboutToAppear() {
|
||||
globalThis.windowClass.setWindowSystemBarEnable([''])
|
||||
@ -78,6 +153,7 @@ struct Index {
|
||||
await this.initMapPointItem()
|
||||
}
|
||||
}
|
||||
|
||||
// 查询考车信息
|
||||
async initCar() {
|
||||
const result = await getSyncData('ES_CARINFO')
|
||||
@ -234,7 +310,9 @@ struct Index {
|
||||
const {no1,no2,no3,} = systemParm;
|
||||
|
||||
this.systemparmArr.push({
|
||||
'NO1':no1*1,'NO2':no2*1,'NO3':no3*1,
|
||||
'NO1': no1 * 1,
|
||||
'NO2': no2 * 1,
|
||||
'NO3': no3 * 1,
|
||||
'TXT1': decodeURIComponent(systemParm.txt1),
|
||||
'TXT2': decodeURIComponent(systemParm.txt2),
|
||||
'TXT3': decodeURIComponent(systemParm.txt3),
|
||||
@ -352,7 +430,19 @@ struct Index {
|
||||
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;
|
||||
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,
|
||||
@ -384,7 +474,6 @@ struct Index {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 初始化本地systemparam表、markrule表
|
||||
async initTrajectoryParam(trajectoryPath: string) {
|
||||
const examSubject = globalThis.carInfo.examSubject;
|
||||
@ -404,7 +493,6 @@ struct Index {
|
||||
await this.initMarkRules(testMarkRules);
|
||||
}
|
||||
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Row() {
|
||||
@ -463,7 +551,10 @@ struct Index {
|
||||
if (this.examSubject == 3) {
|
||||
Row() {
|
||||
if (this.judgeConfigObj['375'] == '0') {
|
||||
Text(`应行驶:${this.examMileage}m`).fontColor('#E5CCA1').fontSize(this.FONTSIZE).padding({right:20})
|
||||
Text(`应行驶:${this.examMileage}m`)
|
||||
.fontColor('#E5CCA1')
|
||||
.fontSize(this.FONTSIZE)
|
||||
.padding({ right: 20 })
|
||||
}
|
||||
Text(`已行驶:${this.jl}m`).fontColor('#FFAD33').fontSize(this.FONTSIZE)
|
||||
}
|
||||
@ -477,6 +568,7 @@ struct Index {
|
||||
Row() {
|
||||
Text(this.carztStr).fontColor('#FFA500').fontSize(this.FONTSIZE)
|
||||
}.height(40)
|
||||
|
||||
Row() {
|
||||
Flex({ direction: FlexDirection.Column }) {
|
||||
List({}) {
|
||||
@ -518,51 +610,93 @@ struct Index {
|
||||
Row() {
|
||||
//#FF7566 #00FFD5 #E6DECF
|
||||
// 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)
|
||||
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)
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}.backgroundImage($rawfile('judge/project_bg.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width('57%').height('100%').padding(30).margin({right:10})
|
||||
}
|
||||
.backgroundImage($rawfile('judge/project_bg.png'), ImageRepeat.NoRepeat)
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
.width('57%')
|
||||
.height('100%')
|
||||
.padding(30)
|
||||
.margin({ right: 10 })
|
||||
}
|
||||
|
||||
//科目三
|
||||
if (this.examSubject == 3) {
|
||||
Column() {
|
||||
Flex({wrap:FlexWrap.Wrap,direction:FlexDirection.Row,justifyContent:FlexAlign.SpaceBetween}){
|
||||
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)
|
||||
}
|
||||
.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})
|
||||
}
|
||||
.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(
|
||||
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})
|
||||
.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
|
||||
this.amplifiedImgIndex = index;
|
||||
this.isAmplifyPopShow = true
|
||||
} else {
|
||||
if (index === 5) {
|
||||
prompt.showToast({
|
||||
@ -573,14 +707,21 @@ struct Index {
|
||||
|
||||
}
|
||||
} else {
|
||||
this.amplifiedImgIndex = index;this.isAmplifyPopShow = true
|
||||
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})
|
||||
}
|
||||
.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 })
|
||||
@ -617,9 +758,19 @@ struct Index {
|
||||
Column() {
|
||||
if (this.examSubject == 3) {
|
||||
Row() {
|
||||
Row(){}.width(60).height(60).backgroundImage($rawfile('judge/manual_judge.png'), ImageRepeat.NoRepeat).backgroundImageSize({ width: '100%', height: '100%' })
|
||||
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)
|
||||
}
|
||||
.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 })
|
||||
@ -637,14 +788,25 @@ struct Index {
|
||||
|
||||
|
||||
Row() {
|
||||
Row(){}.width(60).height(60).backgroundImage($rawfile('judge/phone.png'), ImageRepeat.NoRepeat).backgroundImageSize({ width: '100%', height: '100%' })
|
||||
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)
|
||||
}
|
||||
.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() {}
|
||||
Row() {
|
||||
}
|
||||
.width(334)
|
||||
.height(100)
|
||||
.backgroundImage($rawfile('judge/anniu_nor.png'), ImageRepeat.NoRepeat)
|
||||
@ -705,7 +867,8 @@ struct Index {
|
||||
msgStr: this.judge.plcStr || ''
|
||||
}).margin({ top: 100 })
|
||||
|
||||
Row() {}
|
||||
Row() {
|
||||
}
|
||||
.width(240)
|
||||
.height(240)
|
||||
.position({ x: '81%', y: 80 })
|
||||
@ -725,7 +888,9 @@ struct Index {
|
||||
return project.type == '2' ? project.projectCode : ''
|
||||
}).filter(project => project !== ''),
|
||||
markRules: this.manualMarkRules,
|
||||
closePopup:()=>{this.isDeductedPopShow = false},
|
||||
closePopup: () => {
|
||||
this.isDeductedPopShow = false
|
||||
},
|
||||
confirmMark: async (itemno, serial) => {
|
||||
const judge = this.judge
|
||||
await judge.setJudgeMark(itemno, serial);
|
||||
@ -799,82 +964,4 @@ struct Index {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
//页面通用字体大小
|
||||
@State FONTSIZE: number = 28
|
||||
@State BIGFONTSIZE: number = 28
|
||||
//结束考试弹窗
|
||||
@State endPopupVisible: boolean = false
|
||||
//等待弹窗(考试及格,考试不及格使用)
|
||||
@State loadingPopupVisible: boolean = false
|
||||
//实时轨迹弹窗
|
||||
@State signDisplayComVisible: boolean = false
|
||||
@State isDdxk: boolean = false;
|
||||
@State time: string = ''
|
||||
//考试用时
|
||||
@State examTime: number = 0
|
||||
//开始时间
|
||||
@State startTime: string = '00:00:00'
|
||||
@State startFullTime: string = ''
|
||||
@State startHourTime: string = ''
|
||||
//科目类型
|
||||
@State examSubject: 2 | 3 = 2;
|
||||
@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
|
||||
//模拟考试项目
|
||||
@State projects: Project[] = []
|
||||
@State projectsObj: ProjectObj = {}
|
||||
@State projectsCenterObj: ProjectObj = {}
|
||||
@State markRuleListObj: MarkRule = {}
|
||||
@State cdsbInfoObj: CDSBInfo = {}
|
||||
@State timer: number = 0
|
||||
@State judgeConfig: {[k:string]:string}[] = []
|
||||
@State judgeConfigObj: {[k:string]:any} = defaultJudgeConfigObj
|
||||
|
||||
//流水号
|
||||
@State lsh: string = ''
|
||||
@State kszp: string = ''
|
||||
@State ksdd: string = ''
|
||||
@State kssycs: string = ''
|
||||
@State kslx: string = ''
|
||||
|
||||
//监管接口序列号
|
||||
@State serialNumber: number = 0
|
||||
@State carType: string = ''
|
||||
@State carName: string = ''
|
||||
@State isDeductedPopShow: boolean = false
|
||||
@State isAmplifyPopShow: boolean = false
|
||||
@State amplifiedImgIndex: number = 0
|
||||
@State judge:any = {}
|
||||
|
||||
//行驶距离
|
||||
@State jl:number =0
|
||||
//应考里程
|
||||
@State examMileage:string = '0'
|
||||
//已考的考试项目
|
||||
private wantInfos = []
|
||||
|
||||
@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[] = []
|
||||
|
||||
}
|
||||
|
||||
@ -1,22 +1,20 @@
|
||||
import hilog from '@ohos.hilog';
|
||||
import apiJudgeSdk from 'libJudgeSdk.so';
|
||||
import Judge from './judgeSDK/utils/judge-real'
|
||||
import {Project,ProjectObj,MarkRule} from './judgeSDK/api/judgeSDK.d'
|
||||
import Judge from './judgeSDK/utils/judge-real';
|
||||
import { MarkRule, Project, ProjectObj } from './judgeSDK/api/judgeSDK.d';
|
||||
import AccountTable from '../common/database/tables/AccountTable';
|
||||
import MA_SYSSET from '../common//constants/MA_SYSSET';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { getSyncData } from '../common/service/initable'
|
||||
import { getSyncData } from '../common/service/initable';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
export default struct Index {
|
||||
@State message: string = '开始绘制'
|
||||
|
||||
// 控制XComponent组件的创建和销毁
|
||||
@State draw: boolean = false
|
||||
//监管接口序列号
|
||||
@State serialNumber: number = 0
|
||||
|
||||
//模拟考试项目
|
||||
@State projects: Project[] = []
|
||||
@State projectsObj: ProjectObj = {}
|
||||
@ -46,7 +44,8 @@ struct Index {
|
||||
apiJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹,false:表示结束绘制
|
||||
})
|
||||
} else {
|
||||
Column() {}
|
||||
Column() {
|
||||
}
|
||||
.width(640 / 2)
|
||||
.height(480 / 2)
|
||||
}
|
||||
@ -131,7 +130,8 @@ struct Index {
|
||||
// 获取sysset表信息
|
||||
async initSysset() {
|
||||
const that = this;
|
||||
const db = new AccountTable(()=>{},MA_SYSSET);
|
||||
const db = new AccountTable(() => {
|
||||
}, MA_SYSSET);
|
||||
const syssetParams = await getSyncData('MA_SYSSET')
|
||||
//@ts-ignore
|
||||
const serialNumberArr = syssetParams.filter(sys => sys.v_no === '901');
|
||||
@ -142,5 +142,4 @@ struct Index {
|
||||
//apiJudgeSdk.stopRender();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
import TopLogo from './compontents/topLogo'
|
||||
import { getDeviceInfo} from '../common/service/terminalService'
|
||||
import { registrationDeviceNo } from '../api/checkCar'
|
||||
import { dateFormat } from '../common/utils/tools'
|
||||
import deviceManager from '@ohos.distributedHardware.deviceManager'
|
||||
import { upDateTableByArray } from '../common/service/initable'
|
||||
import { voiceService } from '../common/service/voiceService'
|
||||
import promptAction from '@ohos.promptAction'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
export default struct Index {
|
||||
@State ratio: number = 1700 / 960
|
||||
@State ip: string = ''
|
||||
@State deviceNo: string = ''
|
||||
@ -18,6 +17,7 @@ struct Index {
|
||||
@State plateNo: string = ''
|
||||
@State @Watch('outClick') outFlag: boolean = false;
|
||||
@State subType: string = '2';
|
||||
|
||||
onPageShow() {
|
||||
// this.plateNo=globalThis.carInfo.plateNo
|
||||
deviceManager.createDeviceManager('com.oh.dts', (error, value) => {
|
||||
@ -88,7 +88,11 @@ struct Index {
|
||||
.margin({ top: 37 * this.ratio })
|
||||
.borderRadius(19 * this.ratio)
|
||||
|
||||
Image($r('app.media.zhuce_nor')).width(320 * this.ratio).height(92 * this.ratio).margin({ top: 30 * this.ratio }).onClick(()=>{
|
||||
Image($r('app.media.zhuce_nor'))
|
||||
.width(320 * this.ratio)
|
||||
.height(92 * this.ratio)
|
||||
.margin({ top: 30 * this.ratio })
|
||||
.onClick(() => {
|
||||
this.registrationDeviceNoFn()
|
||||
})
|
||||
}
|
||||
@ -97,8 +101,10 @@ struct Index {
|
||||
.backgroundImage($r('app.media.bg'))
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
}
|
||||
|
||||
outClick() {
|
||||
}
|
||||
|
||||
registrationDeviceNoFn() {
|
||||
const date = new Date()
|
||||
const param = {
|
||||
@ -1,24 +1,24 @@
|
||||
import TopLogo from './compontents/topLogo'
|
||||
import TopLogo from './compontents/topLogo';
|
||||
import MA_SYSTEMPARM from '../common/constants/MA_SYSTEMPARM';
|
||||
import AccountTable from '../common/database/tables/AccountTable';
|
||||
import { getSyncData } from '../common/service/initable';
|
||||
|
||||
const cBg = $rawfile('judge/km3/road/luxian_pre.png');
|
||||
const lBg = $rawfile('judge/km3/road/luxian_nor.png');
|
||||
const ctBg = $rawfile('judge/km3/road/luxian_pre.png');
|
||||
const ltBg = $rawfile('judge/km3/road/luxian_nor.png');
|
||||
import MA_SYSTEMPARM from '../common/constants/MA_SYSTEMPARM';
|
||||
import AccountTable from '../common/database/tables/AccountTable';
|
||||
import { getSyncData } from '../common/service/initable'
|
||||
|
||||
//单机模式才选线路
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
|
||||
export default struct Index {
|
||||
@State @Watch('outClick') outFlag: boolean = false;
|
||||
@State roadObj: any = {}
|
||||
|
||||
async aboutToAppear() {
|
||||
//读取systemparam表的no1等于4的
|
||||
const db = new AccountTable(()=>{},MA_SYSTEMPARM);
|
||||
const db = new AccountTable(() => {
|
||||
}, MA_SYSTEMPARM);
|
||||
const systemParms: any = await getSyncData('MA_SYSTEMPARM')
|
||||
systemParms.forEach((systemParm) => {
|
||||
|
||||
@ -34,6 +34,7 @@ struct Index {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
TopLogo({ outFlag: $outFlag })
|
||||
@ -41,10 +42,22 @@ struct Index {
|
||||
ForEach(Reflect.ownKeys(this.roadObj), (roadIndex, index) => {
|
||||
ListItem() {
|
||||
Column() {
|
||||
Row(){}.backgroundImage(lBg,ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(90).height(80)
|
||||
Text(`线路${index + 1 + ''}`){}.fontColor('#FFF2D9').fontSize(24).padding({top:10})
|
||||
Row() {
|
||||
}
|
||||
}.backgroundImage(cBg,ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(180).height(220).margin({left:5,bottom:10})
|
||||
.backgroundImage(lBg, ImageRepeat.NoRepeat)
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
.width(90)
|
||||
.height(80)
|
||||
|
||||
Text(`线路${index + 1 + ''}`) {
|
||||
}.fontColor('#FFF2D9').fontSize(24).padding({ top: 10 })
|
||||
}
|
||||
}
|
||||
.backgroundImage(cBg, ImageRepeat.NoRepeat)
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
.width(180)
|
||||
.height(220)
|
||||
.margin({ left: 5, bottom: 10 })
|
||||
.onClick(async () => {
|
||||
console.info(this.roadObj[roadIndex])
|
||||
})
|
||||
@ -56,5 +69,7 @@ struct Index {
|
||||
.backgroundColor('#1A1A1A')
|
||||
|
||||
}
|
||||
outClick(){}
|
||||
|
||||
outClick() {
|
||||
}
|
||||
}
|
||||
@ -1,17 +1,17 @@
|
||||
import router from '@ohos.router'
|
||||
import TopLogo from './compontents/topLogo'
|
||||
import { voiceService } from '../common/service/voiceService'
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
export default struct Index {
|
||||
@State ratio: number = 1280 / 960
|
||||
@State carNum: string = ''
|
||||
@State version: string = ''
|
||||
@State hasAuth: boolean = false;
|
||||
private vocObj = null;
|
||||
@State url: string = ''
|
||||
@State @Watch('outClick') outFlag: boolean = false;
|
||||
private vocObj = null;
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
TopLogo({ outFlag: $outFlag })
|
||||
@ -39,14 +39,26 @@ struct Index {
|
||||
.width('100%')
|
||||
.justifyContent(FlexAlign.SpaceAround)
|
||||
}
|
||||
|
||||
Column() {
|
||||
Row() {
|
||||
Column() {
|
||||
Text('V ' + this.version).fontColor('#CCAE7A').fontSize(22*this.ratio).width('30%').margin({bottom:10*this.ratio})
|
||||
Text('授权信息:' + (this.hasAuth?'已授权':'未授权')).fontColor('#CCAE7A').fontSize(22*this.ratio).width('30%')
|
||||
Text('V ' + this.version)
|
||||
.fontColor('#CCAE7A')
|
||||
.fontSize(22 * this.ratio)
|
||||
.width('30%')
|
||||
.margin({ bottom: 10 * this.ratio })
|
||||
Text('授权信息:' + (this.hasAuth ? '已授权' : '未授权'))
|
||||
.fontColor('#CCAE7A')
|
||||
.fontSize(22 * this.ratio)
|
||||
.width('30%')
|
||||
}
|
||||
.margin({ left: 24 * this.ratio })
|
||||
Text('考车号:' + globalThis.deviceNo).fontColor('#CCAE7A').fontSize(22*this.ratio).margin({right: 24*this.ratio})
|
||||
|
||||
Text('考车号:' + globalThis.deviceNo)
|
||||
.fontColor('#CCAE7A')
|
||||
.fontSize(22 * this.ratio)
|
||||
.margin({ right: 24 * this.ratio })
|
||||
}
|
||||
.width('100%')
|
||||
.justifyContent(FlexAlign.SpaceBetween)
|
||||
@ -60,6 +72,7 @@ struct Index {
|
||||
.backgroundImage($r('app.media.index_bg'))
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
}
|
||||
|
||||
aboutToAppear() {
|
||||
this.carNum = globalThis.carInfo.plateNo;
|
||||
this.version = globalThis.version;
|
||||
|
||||
@ -1,56 +1,58 @@
|
||||
import router from '@ohos.router'
|
||||
import UdpClient from '../common/utils/UdpClient';
|
||||
import FileLog from './judgeSDK/utils/file-log'
|
||||
import signDisplayCom from './compontents/signDisplayCom'
|
||||
import signDisplayCom from './compontents/signDisplayCom';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
export default struct Index {
|
||||
@State signArr: Array<any> = []
|
||||
@State sjxhColum: Array<any> = [
|
||||
{ key: '左方向灯', value: '0' }, { key: '右方向灯', value: '0' }, {
|
||||
key: '喇叭',
|
||||
value: '0'
|
||||
}, { key: '点火1', value: '0' }, { key: '点火2', value: '0' }, { key: '近光灯', value: '0' }, {
|
||||
key: '远光灯',
|
||||
value: '0'
|
||||
}, { key: '示廓灯', value: '0' }, { key: '雾灯', value: '0' }, { key: '雨刮器', value: '0' }, {
|
||||
key: '脚刹',
|
||||
value: '0'
|
||||
}, { key: '手刹', value: '0' }, { key: '主驾驶门', value: '0' }, { key: '离合', value: '0' }, {
|
||||
key: '副刹车',
|
||||
value: '0'
|
||||
}, {
|
||||
key: '安全带',
|
||||
value: '0'
|
||||
}, { key: '双跳灯', value: '0' }, { key: '车速', value: '0' }, { key: '档位', value: '0' }, {
|
||||
key: '超声波1',
|
||||
value: '0'
|
||||
}, {
|
||||
key: '超声波2',
|
||||
value: '0'
|
||||
}, {
|
||||
key: 'NC',
|
||||
value: '0'
|
||||
}, { key: 'SA15', value: '0' }, { key: '其他门', value: '0' }, { key: '转速过高', value: '0' }, {
|
||||
key: '累计脉冲',
|
||||
value: '0'
|
||||
}, { key: '熄火次数', value: '0' }, { key: '发动机转速', value: '0' }, { key: '方向盘角度', value: '0' }, {
|
||||
key: '超声波3',
|
||||
value: '0'
|
||||
}, { key: '超声波4', value: '0' }, { key: '触摸1', value: '0' }, { key: '触摸2', value: '0' }, {
|
||||
key: '触摸3',
|
||||
value: '0'
|
||||
}, { key: 'SCIO', value: '0' }
|
||||
, { key: 'SC1A_C', value: '0' }, { key: 'SC1B_C', value: '0' }, { key: 'SC2A_C', value: '0' }, {
|
||||
key: 'SC2B_C',
|
||||
value: '0'
|
||||
}, { key: 'SC3A_C', value: '0' }, { key: 'SC3B_C', value: '0' }, { key: 'SC4A_C', value: '0' }, {
|
||||
key: 'SC4B_C',
|
||||
value: '0'
|
||||
}, { key: 'SC5A_C', value: '0' }, { key: 'SC5B_C', value: '0' }, { key: 'SC6A_C', value: '0' }, {
|
||||
key: 'SC6B_C',
|
||||
value: '0'
|
||||
}]
|
||||
{ key: '左方向灯', value: '0' },
|
||||
{ key: '右方向灯', value: '0' },
|
||||
{ key: '喇叭', value: '0' },
|
||||
{ key: '点火1', value: '0' },
|
||||
{ key: '点火2', value: '0' },
|
||||
{ key: '近光灯', value: '0' },
|
||||
{ key: '远光灯', value: '0' },
|
||||
{ key: '示廓灯', value: '0' },
|
||||
{ key: '雾灯', value: '0' },
|
||||
{ key: '雨刮器', value: '0' },
|
||||
{ key: '脚刹', value: '0' },
|
||||
{ key: '手刹', value: '0' },
|
||||
{ key: '主驾驶门', value: '0' },
|
||||
{ key: '离合', value: '0' },
|
||||
{ key: '副刹车', value: '0' },
|
||||
{ key: '安全带', value: '0' },
|
||||
{ key: '双跳灯', value: '0' },
|
||||
{ key: '车速', value: '0' },
|
||||
{ key: '档位', value: '0' },
|
||||
{ key: '超声波1', value: '0' },
|
||||
{ key: '超声波2', value: '0' },
|
||||
{ key: 'NC', value: '0' },
|
||||
{ key: 'SA15', value: '0' },
|
||||
{ key: '其他门', value: '0' },
|
||||
{ key: '转速过高', value: '0' },
|
||||
{ key: '累计脉冲', value: '0' },
|
||||
{ key: '熄火次数', value: '0' },
|
||||
{ key: '发动机转速', value: '0' },
|
||||
{ key: '方向盘角度', value: '0' },
|
||||
{ key: '超声波3', value: '0' },
|
||||
{ key: '超声波4', value: '0' },
|
||||
{ key: '触摸1', value: '0' },
|
||||
{ key: '触摸2', value: '0' },
|
||||
{ key: '触摸3', value: '0' },
|
||||
{ key: 'SCIO', value: '0' },
|
||||
{ key: 'SC1A_C', value: '0' },
|
||||
{ key: 'SC1B_C', value: '0' },
|
||||
{ key: 'SC2A_C', value: '0' },
|
||||
{ key: 'SC2B_C', value: '0' },
|
||||
{ key: 'SC3A_C', value: '0' },
|
||||
{ key: 'SC3B_C', value: '0' },
|
||||
{ key: 'SC4A_C', value: '0' },
|
||||
{ key: 'SC4B_C', value: '0' },
|
||||
{ key: 'SC5A_C', value: '0' },
|
||||
{ key: 'SC5B_C', value: '0' },
|
||||
{ key: 'SC6A_C', value: '0' },
|
||||
{ key: 'SC6B_C', value: '0' }
|
||||
];
|
||||
@State GPSColum: Array<any> = [
|
||||
{ key: '状态', value: '0' },
|
||||
{ key: '收星数', value: '0' },
|
||||
@ -73,11 +75,8 @@ struct Index {
|
||||
@State active: number = 0
|
||||
@State msg: string = ''
|
||||
@State @Watch('outClick') outFlag: boolean = false;
|
||||
private timer = null
|
||||
private udpClient: UdpClient = null
|
||||
private FileLog: FileLog
|
||||
private vocObj = null;
|
||||
@State url: string = ''
|
||||
|
||||
// @State gpsList: Array<any> = []
|
||||
build() {
|
||||
Column() {
|
||||
@ -91,7 +90,6 @@ struct Index {
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
}
|
||||
|
||||
|
||||
outClick() {
|
||||
}
|
||||
|
||||
|
||||
@ -1,14 +1,10 @@
|
||||
|
||||
import router from '@ohos.router'
|
||||
import TopLogo from './compontents/topLogo'
|
||||
import TopLogo from './compontents/topLogo';
|
||||
import ethernet from '@ohos.net.ethernet';
|
||||
import prompt from '@ohos.prompt'
|
||||
import { upDateTableByArray} from '../common/service/initable'
|
||||
import { getSyncData} from '../common/service/initable'
|
||||
import { voiceService } from '../common/service/voiceService'
|
||||
import { GlobalConfig } from '../config/index'
|
||||
import { getUDP, getUDP2 } from '../common/utils/GlobleUdp';
|
||||
import { getTCP } from '../common/utils/GlobleTcp';
|
||||
import prompt from '@ohos.prompt';
|
||||
import { getSyncData, upDateTableByArray } from '../common/service/initable';
|
||||
import { getUDP, getUDP2 } from '../common/utils/GlobalUdp';
|
||||
import { getTCP } from '../common/utils/GlobalTcp';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct Index {
|
||||
@ -29,11 +25,10 @@ struct Index {
|
||||
// @State inputTextList2: string[] = ['192.168.36.139','20022']
|
||||
|
||||
|
||||
|
||||
|
||||
@State @Watch('outClick') outFlag: boolean = false;
|
||||
private vocObj = null;
|
||||
scroller: Scroller = new Scroller()
|
||||
private vocObj = null;
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
TopLogo({ outFlag: $outFlag })
|
||||
@ -61,7 +56,8 @@ struct Index {
|
||||
.linearGradient({
|
||||
angle: 0,
|
||||
colors: [[0x403C36, 0.0], [0x4D473D, 0.34], [0x3D3A34, 1.0]]
|
||||
}).onChange((value: string) => {
|
||||
})
|
||||
.onChange((value: string) => {
|
||||
this.inputTextList1[index] = value
|
||||
|
||||
})
|
||||
@ -81,9 +77,24 @@ struct Index {
|
||||
.width('100%')
|
||||
.height('80%')
|
||||
.borderRadius('25px')
|
||||
|
||||
Column() {
|
||||
Image($r('app.media.terminal_save')).width('20.5%').height('74%').onClick(() => {
|
||||
upDateTableByArray('IpConfigTable',[{udplocalIp:this.inputTextList1[9],udplocalIpPort:this.inputTextList1[10],udpOppositeIp:this.inputTextList1[7],udpOppositeIpPort:this.inputTextList1[8],tcplocalIp:this.inputTextList1[9],tcplocalIpPort:'8088',tcpOppositeIp:this.inputTextList1[0],tcpOppositePort:this.inputTextList1[1],netMask:this.inputTextList1[4],gateway:this.inputTextList1[5],dnsServers:this.inputTextList1[6],centerIp:this.inputTextList1[2],centerPort:this.inputTextList1[3]}])
|
||||
upDateTableByArray('IpConfigTable', [{
|
||||
udplocalIp: this.inputTextList1[9],
|
||||
udplocalIpPort: this.inputTextList1[10],
|
||||
udpOppositeIp: this.inputTextList1[7],
|
||||
udpOppositeIpPort: this.inputTextList1[8],
|
||||
tcplocalIp: this.inputTextList1[9],
|
||||
tcplocalIpPort: '8088',
|
||||
tcpOppositeIp: this.inputTextList1[0],
|
||||
tcpOppositePort: this.inputTextList1[1],
|
||||
netMask: this.inputTextList1[4],
|
||||
gateway: this.inputTextList1[5],
|
||||
dnsServers: this.inputTextList1[6],
|
||||
centerIp: this.inputTextList1[2],
|
||||
centerPort: this.inputTextList1[3]
|
||||
}])
|
||||
ethernet.setIfaceConfig("eth0", {
|
||||
mode: 0,
|
||||
ipAddr: this.inputTextList1[9],
|
||||
@ -130,6 +141,7 @@ struct Index {
|
||||
.backgroundImage($r('app.media.index_bg'))
|
||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||
}
|
||||
|
||||
aboutToAppear() {
|
||||
getSyncData('IpConfigTable').then((result: Array<any>) => {
|
||||
console.log('result222', JSON.stringify(result))
|
||||
@ -166,9 +178,11 @@ struct Index {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
onPageShow() {
|
||||
console.info('Index onPageShow');
|
||||
}
|
||||
|
||||
outClick() {
|
||||
|
||||
}
|
||||
|
||||
@ -1,25 +1,24 @@
|
||||
import { getExaminationItem, getExaminationStudentInfo, examinationStuAbsent, getPhotosForOther } from '../api/userInfo'
|
||||
import router from '@ohos.router'
|
||||
import TopLogo from './compontents/topLogo'
|
||||
import { examinationStuAbsent, getExaminationItem, getExaminationStudentInfo } from '../api/userInfo';
|
||||
import router from '@ohos.router';
|
||||
import TopLogo from './compontents/topLogo';
|
||||
import Md5 from '../common/utils/md5';
|
||||
import AccountTable from '../common/database/tables/AccountTable';
|
||||
import USER from '../common/constants/USER';
|
||||
import { dateFormat, getCurrentTime } from '../common/utils/tools';
|
||||
import { dateFormat, getCurrentTime, string2Bytes } from '../common/utils/tools';
|
||||
import MA_SYSSET from '../common//constants/MA_SYSSET';
|
||||
import FaceCompare from './compontents/faceCompareByhaikang'
|
||||
// import { initJudgeUdp } from '../common/utils/UdpJudge'
|
||||
import { writeObjectOut } from '../api/judge'
|
||||
import testNapi from "@ohos.idcard";
|
||||
import FaceCompare from './compontents/FaceCompareByhaikang';
|
||||
import { writeObjectOut } from '../api/judge';
|
||||
import testNapi from '@ohos.idcard';
|
||||
import common from '@ohos.app.ability.common';
|
||||
import { VideoConfig, User } from './interfaces'
|
||||
import WebRTCVoice from './webRTC/'
|
||||
import promptAction from '@ohos.promptAction'
|
||||
import { CandidateData, EmptyCandidateObject } from "../mock/CandidateData"
|
||||
import {string2Bytes} from '../common/utils/tools'
|
||||
import { getSyncData } from '../common/service/initable'
|
||||
import { User, VideoConfig } from './interfaces';
|
||||
import WebRTCVoice from './webRTC/';
|
||||
import promptAction from '@ohos.promptAction';
|
||||
import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData';
|
||||
import { getSyncData } from '../common/service/initable';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
struct UserInfo {
|
||||
export default struct UserInfo {
|
||||
@State pageIndex: number = 0
|
||||
@State ratio: number = 1700 / 960
|
||||
@State index: number = 0
|
||||
@ -62,9 +61,6 @@ struct UserInfo {
|
||||
spzd1: false,
|
||||
zdyz: '500'
|
||||
}
|
||||
private AccountTable = new AccountTable(() => {
|
||||
}, USER);
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
@State name: string = 'initName';
|
||||
@State sex: string = '';
|
||||
@State callBackFlag: boolean = false;
|
||||
@ -84,6 +80,17 @@ struct UserInfo {
|
||||
@State FaceOpenStatue: string = '0'; //是否开启人脸识别
|
||||
subscriber;
|
||||
@State faceCatchImg: string = ''
|
||||
private AccountTable = new AccountTable(() => {
|
||||
}, USER);
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
private labelBlocks = [
|
||||
{ label: '考生姓名', key: 'xm' },
|
||||
{ label: '身份证号', key: 'sfzmhm' },
|
||||
{ label: ' 流 水 号 ', key: 'lsh' },
|
||||
{ label: '考试路线', key: 'kslx' },
|
||||
{ label: '待考次数', key: 'kssycs' },
|
||||
{ label: '考官姓名', key: 'ksy1' },
|
||||
]
|
||||
|
||||
async onPageShow() {
|
||||
|
||||
@ -102,6 +109,7 @@ struct UserInfo {
|
||||
this.heartMsg()
|
||||
|
||||
}
|
||||
|
||||
//身份证读卡器初始化
|
||||
openDeviceByIDCard() {
|
||||
globalThis.indexComponent = this;
|
||||
@ -113,11 +121,13 @@ struct UserInfo {
|
||||
console.error("zzctest Failed to Open Device");
|
||||
}
|
||||
}
|
||||
|
||||
stopDeviceById() {
|
||||
if (this.faceFlag == '1') {
|
||||
testNapi && testNapi.StopReadCard()
|
||||
}
|
||||
}
|
||||
|
||||
// 通过身份证获取当前学员
|
||||
getCurrentStudent(id) {
|
||||
let flag = false
|
||||
@ -153,6 +163,7 @@ struct UserInfo {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onReadCard(ret) {
|
||||
console.info(`zzctest xx Read Card ret =${ret.status}`)
|
||||
let thisVar = globalThis.indexComponent;
|
||||
@ -209,6 +220,7 @@ struct UserInfo {
|
||||
changeQkfn() {
|
||||
this.qkFn()
|
||||
}
|
||||
|
||||
initData() {
|
||||
this.stepFlag = false
|
||||
this.faceCompareSucess = 0
|
||||
@ -247,6 +259,7 @@ struct UserInfo {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
getqkFn() {
|
||||
let tmpList = [];
|
||||
tmpList.push(string2Bytes(globalThis.signNum, 1 * 8)[0])
|
||||
@ -387,6 +400,7 @@ struct UserInfo {
|
||||
console.log('error12error' + error)
|
||||
})
|
||||
}
|
||||
|
||||
qkFn() {
|
||||
this.faceCompareSucess = 0
|
||||
if (globalThis.singlePlay) {
|
||||
@ -423,6 +437,7 @@ struct UserInfo {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
async getExaminationItemFn() {
|
||||
console.info('surenjun', this.currentUser.lsh)
|
||||
if (!this.currentUser.lsh || globalThis.singlePlay) {
|
||||
@ -444,6 +459,7 @@ struct UserInfo {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//身份比对
|
||||
async sfbdinterfaceFn() {
|
||||
this.stepFlag = true
|
||||
@ -518,14 +534,18 @@ struct UserInfo {
|
||||
this.stepFlag = false
|
||||
}
|
||||
}
|
||||
|
||||
aboutToDisappear() {
|
||||
this.outClick()
|
||||
}
|
||||
|
||||
outClick() {
|
||||
clearInterval(this.interval)
|
||||
this.stopDeviceById()
|
||||
globalThis.udpClient2&&globalThis.udpClient2?.setMsgCallBack(()=>{})
|
||||
globalThis.udpClient2 && globalThis.udpClient2?.setMsgCallBack(() => {
|
||||
})
|
||||
}
|
||||
|
||||
// 几个按钮公共样式
|
||||
@Styles
|
||||
commStyle(){
|
||||
@ -536,15 +556,6 @@ struct UserInfo {
|
||||
.margin({ bottom: 12 * this.ratio })
|
||||
}
|
||||
|
||||
private labelBlocks = [
|
||||
{ label: '考生姓名', key: 'xm' },
|
||||
{ label: '身份证号', key: 'sfzmhm' },
|
||||
{ label: ' 流 水 号 ', key: 'lsh' },
|
||||
{ label: '考试路线', key: 'kslx' },
|
||||
{ label: '待考次数', key: 'kssycs' },
|
||||
{ label: '考官姓名', key: 'ksy1' },
|
||||
]
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
TopLogo({ outFlag: $outFlag }).margin({ bottom: 10 })
|
||||
|
||||
@ -1,13 +1,8 @@
|
||||
//@ts-ignore
|
||||
import camera from '@ohos.multimedia.camera';
|
||||
import image from '@ohos.multimedia.image'
|
||||
import util from '@ohos.util';
|
||||
import { writeFile } from '../../common/service/fileService'
|
||||
import TopLogo from '../compontents/topLogo'
|
||||
import { cameraService } from '../../common/service/cameraService'
|
||||
import { voiceService } from '../../common/service/voiceService'
|
||||
import { faceCompare } from '../../api/userInfo'
|
||||
import prompt from '@ohos.prompt'
|
||||
import { cameraService } from '../../common/service/cameraService';
|
||||
import { voiceService } from '../../common/service/voiceService';
|
||||
import { faceCompare } from '../../api/userInfo';
|
||||
import prompt from '@ohos.prompt';
|
||||
import grantPermission from '../../common/utils/PermissionUtils';
|
||||
import CameraModel from '../../common/service/CameraModel';
|
||||
|
||||
@ -19,25 +14,25 @@ const PERMISSIONS: Array<string> = [
|
||||
|
||||
@Component
|
||||
export default struct FaceCompare {
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
private mXComponentController: XComponentController = new XComponentController();
|
||||
@State imageBase64: string = 'data:image/jpeg;base64,'
|
||||
private cameraModel: CameraModel = new CameraModel();
|
||||
@Prop sfzh: string;
|
||||
@Prop firstImage: string;
|
||||
@Link showFaceCompare: boolean;
|
||||
@Link faceCompareSucess: boolean;
|
||||
private cameraObj = null;
|
||||
@State imageThumbnail: string = '';
|
||||
private mXComponentController: XComponentController = new XComponentController();
|
||||
private cameraModel: CameraModel = new CameraModel();
|
||||
private cameraObj = null;
|
||||
private timer = null; //人脸比对执行任务定时器
|
||||
private stopClose = false; // 阻止用户关闭此组件
|
||||
private times = 1; //人脸比对失败次数, 超过3次将不会自动比对,需要点击重新打开重新触发
|
||||
private vocObj = null;
|
||||
private surfaceId: string = '';
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Column() {
|
||||
@ -1,23 +1,15 @@
|
||||
//@ts-ignore
|
||||
|
||||
import util from '@ohos.util';
|
||||
|
||||
import { voiceService } from '../../common/service/voiceService'
|
||||
import { faceCompare } from '../../api/userInfo'
|
||||
import FileUtil from '../../common/utils/File'
|
||||
import { VideoConfig } from '../interfaces'
|
||||
import { voiceService } from '../../common/service/voiceService';
|
||||
import { faceCompare } from '../../api/userInfo';
|
||||
import FileUtil from '../../common/utils/File';
|
||||
import { VideoConfig } from '../interfaces';
|
||||
import common from '@ohos.app.ability.common';
|
||||
|
||||
import { string2Bytes } from '../../common/utils/tools'
|
||||
import { takePhoto } from '../../common/service/videoService'
|
||||
import { GlobalConfig } from '../../config/index'
|
||||
import { string2Bytes } from '../../common/utils/tools';
|
||||
import { takePhoto } from '../../common/service/videoService';
|
||||
import { GlobalConfig } from '../../config/index';
|
||||
|
||||
@Component
|
||||
struct FaceCompare {
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
export default struct FaceCompare {
|
||||
@State imageBase64: string = 'data:image/jpeg;base64,'
|
||||
@Prop sfzh: string;
|
||||
@Prop lsh: string;
|
||||
@ -27,19 +19,14 @@ struct FaceCompare {
|
||||
@Link getqkFlag: boolean;
|
||||
@Link faceCatchImg: string;
|
||||
@State imageThumbnail: string = '';
|
||||
private times = 1; //人脸比对失败次数, 超过3次将不会自动比对,需要点击重新打开重新触发
|
||||
private vocObj = null;
|
||||
@State callBackFlag: boolean = false;
|
||||
@State @Watch('clearIntervalFn') showFaceCompareFlag: Boolean = false;
|
||||
@State video_url: string = 'rtsp://admin:12345qwe@192.168.5.41:8000/h264/ch2/main/av_stream'
|
||||
@State previewUri: Resource = $r('app.media.2_nor')
|
||||
@State curRate: PlaybackSpeed = PlaybackSpeed.Speed_Forward_1_00_X
|
||||
@State showControls: boolean = false
|
||||
private controller: VideoController = new VideoController()
|
||||
@State isAutoPlay: boolean = true
|
||||
@State signNum: number = 0;
|
||||
private fileUtil: FileUtil
|
||||
private interval: any
|
||||
@State param: VideoConfig = {
|
||||
spls: '',
|
||||
videoNum: '1',
|
||||
@ -65,8 +52,17 @@ struct FaceCompare {
|
||||
spzd1: false,
|
||||
zdyz: '500',
|
||||
}
|
||||
private times = 1; //人脸比对失败次数, 超过3次将不会自动比对,需要点击重新打开重新触发
|
||||
private vocObj = null;
|
||||
private controller: VideoController = new VideoController()
|
||||
private fileUtil: FileUtil
|
||||
private interval: any
|
||||
private context = getContext(this) as common.UIAbilityContext;
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Column() {
|
||||
@ -239,8 +235,6 @@ struct FaceCompare {
|
||||
console.log('mmmmm8', 9)
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
async heartMsg(context) {
|
||||
@ -343,11 +337,7 @@ struct FaceCompare {
|
||||
this.controller.start()
|
||||
}
|
||||
|
||||
|
||||
|
||||
async aboutToDisappear() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export default FaceCompare
|
||||
@ -1,17 +1,12 @@
|
||||
import camera from '@ohos.multimedia.camera';
|
||||
import image from '@ohos.multimedia.image'
|
||||
import util from '@ohos.util';
|
||||
import { writeFile } from '../../common/service/fileService'
|
||||
import TopLogo from '../compontents/topLogo'
|
||||
import image from '@ohos.multimedia.image';
|
||||
import TopLogo from '../compontents/topLogo';
|
||||
|
||||
import buffer from '@ohos.buffer';
|
||||
|
||||
@Component
|
||||
struct FaceCompare {
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
export default struct FaceCompare {
|
||||
@State imageBase64: string = 'data:image/jpeg;base64,'
|
||||
private cameraObj: any = null;
|
||||
private cameraManager: any = null;
|
||||
private surfaceId: string = '';
|
||||
@ -26,16 +21,18 @@ struct FaceCompare {
|
||||
private photoOutput: any = null;
|
||||
// 照片接收对象
|
||||
private imageRecever: any = null;
|
||||
|
||||
@State imageBase64: string = 'data:image/jpeg;base64,'
|
||||
|
||||
|
||||
private timeSetTimeout: number = 0; //定时器执行次数
|
||||
private timer: any = 0; //定时器
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
TopLogo()
|
||||
TopLogo({
|
||||
outFlag: false
|
||||
})
|
||||
Row() {
|
||||
XComponent({
|
||||
id: 'xcomponent',
|
||||
@ -63,6 +60,7 @@ struct FaceCompare {
|
||||
this.takePhoto()
|
||||
})
|
||||
}
|
||||
|
||||
Row() {
|
||||
Image(this.imageBase64)
|
||||
.width(420).height(240).border({ width: 1 })
|
||||
@ -73,6 +71,7 @@ struct FaceCompare {
|
||||
|
||||
async aboutToAppear() {
|
||||
}
|
||||
|
||||
async aboutToDisappear() {
|
||||
// 停止当前会话
|
||||
this.captureSession.stop()
|
||||
@ -325,5 +324,3 @@ struct FaceCompare {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default FaceCompare
|
||||
@ -1,26 +1,35 @@
|
||||
import router from '@ohos.router'
|
||||
import { getCurrentTime } from '../../common/service/timeService'
|
||||
import { voiceService } from '../../common/service/voiceService'
|
||||
import router from '@ohos.router';
|
||||
import { getCurrentTime } from '../../common/service/timeService';
|
||||
|
||||
@Component
|
||||
struct TopLogo {
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
export default struct TopLogo {
|
||||
@State ratio: number = 850 / 960
|
||||
@State timeText: string = '';
|
||||
@Link outFlag: boolean; //返回按钮触发
|
||||
private timer: any = null;
|
||||
// private vocObj = null;
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
Column() {}
|
||||
Column() {
|
||||
}
|
||||
.backgroundColor('#333230')
|
||||
.width('100%')
|
||||
.height('10%')
|
||||
|
||||
Row() {
|
||||
Row() {
|
||||
Image($r('app.media.shortLogo')).width('10.2%').height('5.7%').margin({left: 30*this.ratio,top: -15*this.ratio})
|
||||
Text(this.timeText).fontSize(30*this.ratio).fontColor('#CCB48F').margin({top: -15*this.ratio,left:14*this.ratio}) //fontsize40
|
||||
Image($r('app.media.shortLogo'))
|
||||
.width('10.2%')
|
||||
.height('5.7%')
|
||||
.margin({ left: 30 * this.ratio, top: -15 * this.ratio })
|
||||
Text(this.timeText)
|
||||
.fontSize(30 * this.ratio)
|
||||
.fontColor('#CCB48F')
|
||||
.margin({ top: -15 * this.ratio, left: 14 * this.ratio }) //fontsize40
|
||||
}
|
||||
|
||||
Image($r('app.media.topB_back')).width('16.7%').height('12.2%')
|
||||
@ -48,10 +57,9 @@ struct TopLogo {
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
aboutToDisappear() {
|
||||
clearInterval(this.timer)
|
||||
console.log('jiangsong: topLogo aboutToDisappear222222222')
|
||||
}
|
||||
}
|
||||
|
||||
export default TopLogo
|
||||
@ -4,7 +4,7 @@
|
||||
"pages/Index",
|
||||
"pages/ExaminerLogin",
|
||||
"pages/UserInfo",
|
||||
"pages/register",
|
||||
"pages/Register",
|
||||
"pages/Settings",
|
||||
"pages/TerminalInfos",
|
||||
"pages/VideoConfig",
|
||||
@ -12,7 +12,6 @@
|
||||
"pages/RealTime",
|
||||
"pages/Roads",
|
||||
"pages/Judge"
|
||||
|
||||
],
|
||||
"window": {
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user