Merge branch 'main' into lv

# Conflicts:
#	entry/src/main/ets/pages/Index.ets
#	entry/src/main/ets/pages/UserInfo.ets
This commit is contained in:
lvyuankang 2024-07-02 13:43:46 +08:00
commit 009bd53f46
436 changed files with 2072 additions and 1934 deletions

3
entry/.gitignore vendored
View File

@ -2,4 +2,5 @@
/.preview
/build
/.cxx
/.idea
/.idea
/oh_modules

View File

@ -0,0 +1,120 @@
// 导入USB接口api包。
import usb from '@ohos.usbManager';
const LOGTAG = 'USBSERVICES'
//字符串转字节
function stringToArr(str){
var arr = [];
for (var i = 0, j = str.length; i < j; ++i) {
arr.push(str.charCodeAt(i));
}
return arr
}
//plc数据转成无锡科研所usb字节数据
function plcStrToWXCodeArr(wuXiDataStr){
const arr = stringToArr(wuXiDataStr);
//数据包总长度 有效长度
let packetSize = 65,maxDataSize = 63;
let packetArr = []
const loop = Math.ceil(arr.length / maxDataSize)
for(let i = 0; i< loop; i++){
const thisPacket = arr.slice(i * maxDataSize,(i + 1) * maxDataSize)
const oSize = maxDataSize - thisPacket.length;
//补齐0x00
if(oSize > 0){
let oSizeArr = []
for(let j = 0;j < oSize;j++){oSizeArr.push(0x00)}
packetArr.push([thisPacket.length].concat(thisPacket).concat(oSizeArr));
}else{
packetArr.push([thisPacket.length].concat(thisPacket));
}
}
return packetArr
}
export default class UsbService{
private devicepipe : usb.USBDevicePipe
private outEndpoint: usb.USBEndpoint
public isWXUSBDevice:Boolean
constructor() {
//是否是无锡检测设备
this.isWXUSBDevice = false
this.devicepipe
this.init()
}
init = async()=>{
// 获取设备列表。
let deviceList : Array<usb.USBDevice> = usb.getDevices();
deviceList.forEach(async (device:usb.USBDevice) => {
const {vendorId,productId} = device;
console.log(LOGTAG,JSON.stringify(device));
//无锡所检测设备接入
if(vendorId === 6790 && productId === 58409){
// if(vendorId === 2385 && productId === 5734){
// 申请操作指定的device的操作权限。
try {
let bool = usb.hasRight(device.name);
console.info(LOGTAG,'bool =>' + bool)
const isExit = await usb.requestRight(device.name);
console.info(LOGTAG,'isExit =>' + isExit)
if(isExit){
let devicepipe : usb.USBDevicePipe = usb.connectDevice(device);
let interfaces = device.configs[0].interfaces[0];
let ret = usb.claimInterface(devicepipe, interfaces,true);
console.info(LOGTAG,'ret =>' + ret);
if(ret === 0 ){
let outEndpoint : usb.USBEndpoint = interfaces.endpoints[1];
let inEndpoint : usb.USBEndpoint = interfaces.endpoints[0];
this.isWXUSBDevice = true;
this.devicepipe = devicepipe
this.outEndpoint = outEndpoint
}else{
console.info(LOGTAG,'usb claimInterface failed')
}
}else{
console.info(LOGTAG,'isExit =>' +'false')
}
} catch (e) {
console.info(LOGTAG,'e=>' + JSON.stringify(e))
}
}
});
}
sendUSB =async (wuXiDataStr) => {
console.info(LOGTAG,'正在发送数据')
const {devicepipe,isWXUSBDevice,outEndpoint} = this;
console.info(LOGTAG,'正在发送数据')
if(isWXUSBDevice){
console.info(LOGTAG,wuXiDataStr)
const codeArr = plcStrToWXCodeArr(wuXiDataStr);
for(let i = 0; i < codeArr.length;i++){
try {
console.info(LOGTAG,'正在发送数据')
const f = await usb.bulkTransfer(devicepipe, outEndpoint, new Uint8Array(codeArr[i]))
console.info(LOGTAG,'发送成功数据长度为:' + f)
} catch (e) {
console.info(LOGTAG,JSON.stringify(e))
}
}
}else{
console.info(LOGTAG,'usb设备初始化失败')
}
}
}
// export default initUsbServicesFn

View File

@ -1,7 +1,7 @@
import systemTime from '@ohos.systemDateTime';
import { Array2Byte, fillZero, string2Bytes, stringToASC } from '../../common/utils/tools';
import { testKmItems } from '../../pages/judgeSDK/dataTest/index';
import { setJudgeUdp, setTopLineUdp } from './GlobleUdp';
import { setJudgeUdp, setTopLineUdp } from './GlobalUdp';
import { convertGpsCoord2 } from '../utils/tools';

View File

@ -0,0 +1,165 @@
export const WarnFlagData = {
1: '0',
2: '0',
3: '0',
4: '0',
5: '0',
6: '0',
7: '0',
8: '0',
9: '0',
10: '0',
11: '0',
12: '0',
13: '0',
14: '0',
15: '0',
16: '0',
17: '0',
18: '0',
19: '0',
20: '0',
21: '0',
22: '0',
23: '0',
24: '0',
25: '0',
26: '0',
27: '0',
28: '0',
29: '0',
}
export const PassData = {
1: false,
2: false,
3: false,
4: false,
5: false,
6: false,
7: false,
8: false,
9: false,
10: false,
11: false,
12: false,
13: false,
14: false,
15: false,
16: false,
17: false,
18: false,
19: false,
20: false,
21: false,
22: false,
23: false,
24: false,
25: false,
26: false,
27: false,
28: false,
29: false,
}
export const StackValueData = {
1: '',
2: "",
3: "",
4: "",
5: "",
6: "",
7: "",
8: "",
9: "",
10: "",
11: "",
12: "",
13: "",
14: "",
15: "",
16: "",
17: "",
18: "",
19: "",
20: "",
21: "",
22: "",
23: "",
24: "",
25: "",
26: "",
27: "",
28: "",
29: "",
}
export const WarnFlagTipData = {
0: [],
1: [],
2: [],
3: ['check1.wav', 'check2.wav'],
4: ['check3.wav', 'check4.wav'],
5: ['check5.wav', 'check6.wav'],
6: ['check7.wav', 'check8.wav'],
7: ['check9.wav', 'check10.wav'],
8: ['check26.wav', 'check27.wav'],
9: ['dianhuoVideo.wav', 'xihuoVideo.wav'],
10: ['check31.wav'],
11: ['check30.wav'],
12: ['check28.wav'],
13: ['check29.wav'],
14: ['check11.wav'],
15: ['check12.wav'],
16: ['check13.wav'],
17: ['check14.wav'],
18: ['check15.wav'],
19: ['check16.wav'],
20: ['check17.wav'],
21: ['check18.wav'],
22: ['check19.wav'],
23: ['check22.wav'],
24: ['check23.wav'],
25: ['check20.wav', 'check21.wav'],
26: ['check24.wav'],
// 27:[],
// 28:[],
// 29:[],
}
export const RealNumData = {
3: 19,
4: 17,
5: 13,
6: 12,
7: 14,
8: 18,
9: 5,
10: 29,
11: 30,
12: 31,
13: 32,
14: 28,
15: 28,
16: 28,
17: 28,
18: 28,
19: 28,
20: 28,
21: 2, //左方向灯,
22: 3,
23: 7,
24: 8,
25: 20,
26: ''
}
export const DwMapData={
14: '1',
15: '2',
16: '3',
17: '4',
18: '5',
19: '9',
20: '0'
}

View File

@ -0,0 +1,17 @@
export const AmplifyArr = [
{ name: '直线', projectCode: '3', projectCodeCenter: '40300' },
{ name: '会车', projectCode: '9', projectCodeCenter: '41300' },
{ name: '变道', projectCode: '4', projectCodeCenter: '40500' },
{ name: '超车', projectCode: '10', projectCodeCenter: '41400' },
{ name: '掉头', projectCode: '12', projectCodeCenter: '41500' },
{ name: '停车', projectCode: '11', projectCodeCenter: '40600' },
]
export const AmplifyImages = [
'km_zxB.png',
'km_hcB.png',
'km_bdB.png',
'km_ccB.png',
'km_dtB.png',
'km_tcB.png',
]

View File

@ -0,0 +1,67 @@
export const SignalData = [
{ 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' }
]
export const GPSData = [
{ 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: '速度', value: '0' },
]

View File

@ -1,3 +1,9 @@
export * from "./CandidateData"
export * from "./VideoData"
export * from "./VideoData"
export * from "./Judge"
export * from "./SignDisplay"
export * from "./CarCheck"

View File

@ -0,0 +1,4 @@
export type SignalDataType = {
key: string;
value: string;
};

View File

@ -0,0 +1 @@
export * from "./SignDisplay"

View File

@ -4,6 +4,7 @@ import { carConfigurationInfo, uploadExamCarCheckResult } from '../api/checkCar'
import TopLogo from './compontents/TopLogo';
import testNapi from '@ohos.hiserialsdk';
import { dateFormat } from '../common/utils/tools';
import { DwMapData, PassData, RealNumData, StackValueData, WarnFlagData, WarnFlagTipData } from '../mock';
@Entry
@Component
@ -24,167 +25,13 @@ export default struct Index {
@State subFlag: boolean = true
@State signArr: Array<any> = []
@State checkListCopy: Array<any> = []
@State warnFlag: object = {
1: '0',
2: '0',
3: '0',
4: '0',
5: '0',
6: '0',
7: '0',
8: '0',
9: '0',
10: '0',
11: '0',
12: '0',
13: '0',
14: '0',
15: '0',
16: '0',
17: '0',
18: '0',
19: '0',
20: '0',
21: '0',
22: '0',
23: '0',
24: '0',
25: '0',
26: '0',
27: '0',
28: '0',
29: '0',
}
@State warnFlag: object = WarnFlagData
@State @Watch('outClick') outFlag: boolean = false;
@State passArray: object = {
1: false,
2: false,
3: false,
4: false,
5: false,
6: false,
7: false,
8: false,
9: false,
10: false,
11: false,
12: false,
13: false,
14: false,
15: false,
16: false,
17: false,
18: false,
19: false,
20: false,
21: false,
22: false,
23: false,
24: false,
25: false,
26: false,
27: false,
28: false,
29: false,
}
@State stachValue: object = {
1: '',
2: "",
3: "",
4: "",
5: "",
6: "",
7: "",
8: "",
9: "",
10: "",
11: "",
12: "",
13: "",
14: "",
15: "",
16: "",
17: "",
18: "",
19: "",
20: "",
21: "",
22: "",
23: "",
24: "",
25: "",
26: "",
27: "",
28: "",
29: "",
}
@State warnFlagTip: object = {
0: [],
1: [],
2: [],
3: ['check1.wav', 'check2.wav'],
4: ['check3.wav', 'check4.wav'],
5: ['check5.wav', 'check6.wav'],
6: ['check7.wav', 'check8.wav'],
7: ['check9.wav', 'check10.wav'],
8: ['check26.wav', 'check27.wav'],
9: ['dianhuoVideo.wav', 'xihuoVideo.wav'],
10: ['check31.wav'],
11: ['check30.wav'],
12: ['check28.wav'],
13: ['check29.wav'],
14: ['check11.wav'],
15: ['check12.wav'],
16: ['check13.wav'],
17: ['check14.wav'],
18: ['check15.wav'],
19: ['check16.wav'],
20: ['check17.wav'],
21: ['check18.wav'],
22: ['check19.wav'],
23: ['check22.wav'],
24: ['check23.wav'],
25: ['check20.wav', 'check21.wav'],
26: ['check24.wav'],
// 27:[],
// 28:[],
// 29:[],
}
@State realNum: object = {
3: 19,
4: 17,
5: 13,
6: 12,
7: 14,
8: 18,
9: 5,
10: 29,
11: 30,
12: 31,
13: 32,
14: 28,
15: 28,
16: 28,
17: 28,
18: 28,
19: 28,
20: 28,
21: 2, //左方向灯,
22: 3,
23: 7,
24: 8,
25: 20,
26: ''
}
@State dwMap: object = {
14: '1',
15: '2',
16: '3',
17: '4',
18: '5',
19: '9',
20: '0'
}
@State passArray: object = PassData
@State stachValue: object = StackValueData
@State warnFlagTip: object = WarnFlagTipData
@State realNum: object = RealNumData
@State dwMap: object = DwMapData
@State fd: number = -1;
@State devPath: string = "/dev/ttyS3"
@State stopFlag: boolean = false
@ -262,143 +109,53 @@ export default struct Index {
//
carConfigurationInfoFn() {
if (globalThis.singlePlay) {
//
const str = "1:5;2:5;3:5;4:5;5:5;6:5;7:5;8:5;9:5;10:5;11:5;12:5;13:5;14:5;15:5;16:5;17:5;18:5;19:5;20:5;21:5;22:2;23:5;24:5;25:5;"
const data = str.split(';')
this.checkList = []
const list = data
list.map(res => {
const arr = res.split(':')
this.checkList.push({
'key': parseInt(arr[0]) + 2, 'time': arr[1]
if (globalThis.singlePlay) {
//
const str = "1:5;2:5;3:5;4:5;5:5;6:5;7:5;8:5;9:5;10:5;11:5;12:5;13:5;14:5;15:5;16:5;17:5;18:5;19:5;20:5;21:5;22:2;23:5;24:5;25:5;"
const data = str.split(';')
this.checkList = []
const list = data
list.map(res => {
const arr = res.split(':')
this.checkList.push({
'key': parseInt(arr[0]) + 2, 'time': arr[1]
})
})
})
this.checkListCopy = JSON.parse(JSON.stringify(this.checkList))
return
}
//模拟真实数据
const param = {
"body":
{
"carIdString": globalThis.carInfo.carId, //考车ID
"deviceNo": globalThis.deviceNo
this.checkListCopy = JSON.parse(JSON.stringify(this.checkList))
return
}
//模拟真实数据
const param = {
"body":
{
"carIdString": globalThis.carInfo.carId, //考车ID
"deviceNo": globalThis.deviceNo
}
}
}
carConfigurationInfo(param).then(res => {
const data = res.body.ES_CHECK_CAR_ITEM[0].ITEMS.split(';')
this.checkList = []
const list = data
list.map(res => {
const arr = res.split(':')
this.checkList.push({
'key': parseInt(arr[0]) + 2, 'time': arr[1]
carConfigurationInfo(param).then(res => {
const data = res.body.ES_CHECK_CAR_ITEM[0].ITEMS.split(';')
this.checkList = []
const list = data
list.map(res => {
const arr = res.split(':')
this.checkList.push({
'key': parseInt(arr[0]) + 2, 'time': arr[1]
})
})
this.checkListCopy = JSON.parse(JSON.stringify(this.checkList))
// this.checkList = JSON.parse(res).body.ES_CHECK_CAR_ITEM[0].split(';')
console.log('this.checkList' + this.checkList)
}).catch((error) => {
console.log('error12error' + error)
})
this.checkListCopy = JSON.parse(JSON.stringify(this.checkList))
// this.checkList = JSON.parse(res).body.ES_CHECK_CAR_ITEM[0].split(';')
console.log('this.checkList' + this.checkList)
}).catch((error) => {
console.log('error12error' + error)
})
}
}
async kszj() {
this.breakFlag = true
this.stachValue = {
1: '',
2: "",
3: "",
4: "",
5: "",
6: "",
7: "",
8: "",
9: "",
10: "",
11: "",
12: "",
13: "",
14: "",
15: "",
16: "",
17: "",
18: "",
19: "",
20: "",
21: "",
22: "",
23: "",
24: "",
25: "",
26: "",
27: "",
28: "",
29: "",
}
this.warnFlag = {
1: 0,
2: 0,
3: 0,
4: 0,
5: 0,
6: 0,
7: 0,
8: 0,
9: 0,
10: 0,
11: 0,
12: 0,
13: 0,
14: 0,
15: 0,
16: 0,
17: 0,
18: 0,
19: 0,
20: 0,
21: 0,
22: 0,
23: 0,
24: 0,
25: 0,
26: 0,
27: 0,
28: 0,
29: 0,
}
this.passArray = {
1: false,
2: false,
3: false,
4: false,
5: false,
6: false,
7: false,
8: false,
9: false,
10: false,
11: false,
12: false,
13: false,
14: false,
15: false,
16: false,
17: false,
18: false,
19: false,
20: false,
21: false,
22: false,
23: false,
24: false,
25: false,
26: false,
27: false,
28: false,
29: false,
}
this.stachValue = StackValueData
this.warnFlag = WarnFlagData
this.passArray = PassData
this.checkListCopy = JSON.parse(JSON.stringify(this.checkList))
this.index = this.checkListCopy[0].key
this.vocObj.playAudio({

View File

@ -1,75 +1,40 @@
// @ts-nocheck
import promptAction from '@ohos.promptAction'
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 {
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'
import { getEsCarModel, } from '../common/service/initable';
import FileUtil from '../common/utils/File';
import { getUDP, getUDP2 } from '../common/utils/GlobalUdp';
import { initJudgeUdp } from '../common/utils/UdpJudge';
import { getTCP } from '../common/utils/GlobalTcp';
import { getliushuiNum, setliushuiNum } from '../common/service/indexService';
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
import worker, { MessageEvents } from '@ohos.worker';
@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;
private workerInstance = null;
@State angle: number = 0
@State ratio: number = 1700 / 960
@State loading: boolean = true
@State fd: number = -1;
@State param: VideoConfig = VideoConfigData
fileHelper = null;
private fileUtil: FileUtil
private interval = null;
private workerInstance = null;
private context = getContext(this) as common.UIAbilityContext;
@State param: VideoConfig = {
videoNum:'1',
spls: '1',
wz: '0,0',
faceFlag: false,
shuiying: true,
pztd: '2',
ljlx: '',
ip: '192.168.36.94',
port: '554',
userName: 'admin',
pwd: '12345qwe',
td1: '1',
td2: '2',
td3: '3',
td4: '4',
videoRecord1: false,
videoRecord2: true,
videoRecord3: false,
videoRecord4: false,
text1: '',
text2: '',
text3: '',
dolt: '',
fontSize: '',
rlls: '1',
spzd4:false,
spzd3:false,
spzd2:false,
spzd1:false,
zdyz:'5',
}
fileHelper =null;
build() {
Column() {
Column() {
@ -119,7 +84,7 @@ struct Index {
Column() {
Row() {
if (!this.isSingle) {
Image($r('app.media.index_lw')).width('30.5%').height('74%').onClick(async() => {
Image($r('app.media.index_lw')).width('30.5%').height('74%').onClick(async () => {
if (this.loading) {
return
}
@ -133,7 +98,7 @@ struct Index {
message: `网络连接失败`,
duration: 3000
});
this.loading=false
this.loading = false
}
this.testXMLToJSONInWorker()
@ -193,39 +158,46 @@ struct Index {
)
)
Text('考车号:' + globalThis.deviceNo).fontColor('#CCAE7A').fontSize(22 * globalThis.ratio).margin({ right: 24 })
Text('考车号:' + globalThis.deviceNo)
.fontColor('#CCAE7A')
.fontSize(22 * globalThis.ratio)
.margin({ right: 24 })
}
.width('100%')
.justifyContent(FlexAlign.SpaceBetween)
.margin({ bottom: 10 })
}
//
if (this.loading) {
Column() {
Image($r('app.media.open_loading'))
.width(200 * globalThis.ratio)
.rotate({ angle: this.angle })
.height(200 * globalThis.ratio)
.animation({
duration: 5000, // 动画时长
curve: Curve.EaseOut, // 动画曲线
delay: 500, // 动画延迟
iterations: -1, // 播放次数
playMode: PlayMode.Normal, // 动画模式
})
.margin({ top: 30 * globalThis.ratio })
Image($r('app.media.car'))
.width(80 * globalThis.ratio)
.height(80 * globalThis.ratio)
.position({ x: 288 * globalThis.ratio, y: 89 * globalThis.ratio })
Text('获取考车信息,请稍候……').fontSize(24 * globalThis.ratio).margin({ top: 20 * globalThis.ratio }).fontWeight(400)
}
.visibility(this.loading ? Visibility.Visible: Visibility.Hidden)
.width(660 * globalThis.ratio)
.height(360 * globalThis.ratio)
.position({ x: 150 * globalThis.ratio, y: 98 * globalThis.ratio })
.backgroundColor('#E6E3DF')
.borderRadius(19 * globalThis.ratio)
Column() {
Image($r('app.media.open_loading'))
.width(200 * globalThis.ratio)
.rotate({ angle: this.angle })
.height(200 * globalThis.ratio)
.animation({
duration: 5000, // 动画时长
curve: Curve.EaseOut, // 动画曲线
delay: 500, // 动画延迟
iterations: -1, // 播放次数
playMode: PlayMode.Normal, // 动画模式
})
.margin({ top: 30 * globalThis.ratio })
Image($r('app.media.car'))
.width(80 * globalThis.ratio)
.height(80 * globalThis.ratio)
.position({ x: 288 * globalThis.ratio, y: 89 * globalThis.ratio })
Text('获取考车信息,请稍候……')
.fontSize(24 * globalThis.ratio)
.margin({ top: 20 * globalThis.ratio })
.fontWeight(400)
}
.visibility(this.loading ? Visibility.Visible : Visibility.Hidden)
.width(660 * globalThis.ratio)
.height(360 * globalThis.ratio)
.position({ x: 150 * globalThis.ratio, y: 98 * globalThis.ratio })
.backgroundColor('#E6E3DF')
.borderRadius(19 * globalThis.ratio)
}
}
.width('100%')
@ -237,27 +209,28 @@ struct Index {
}
aboutToAppear() {
globalThis.ratio= 1700 / 960
globalThis.ratio = 1700 / 960
this.angle = 0
this.loading = false
}
async testXMLToJSONInWorker(){
async testXMLToJSONInWorker() {
let workerInstance = new worker.ThreadWorker('entry/ets/workers/worker.ts', {
name: 'FriendsMoments Worker'
});
const param={
carId:globalThis.carInfo?.carId,
examinationRoomId:globalThis.carInfo?.examinationRoomId,
judgeVersion:globalThis.judgeVersion,
shellVersion:globalThis.version,
paraKdid:globalThis.timeInfo?.paraKdid,
const param = {
carId: globalThis.carInfo?.carId,
examinationRoomId: globalThis.carInfo?.examinationRoomId,
judgeVersion: globalThis.judgeVersion,
shellVersion: globalThis.version,
paraKdid: globalThis.timeInfo?.paraKdid,
mode: globalThis.timeInfo?.mode,
context:this.context
context: this.context
}
workerInstance.postMessage(param);
workerInstance.onmessage = (e: MessageEvents): void => {
console.log("baoyihu after postMessage :",JSON.stringify(e.data));
if(e.data.isComplete){
console.log("baoyihu after postMessage :", JSON.stringify(e.data));
if (e.data.isComplete) {
router.pushUrl({
url: 'pages/ExaminerLogin',
}, router.RouterMode.Single)
@ -265,18 +238,24 @@ struct Index {
this.loading=false
}
}
async heartMsg() {
const arr = [globalThis.signNum||0, globalThis.statue||1]
const arr = [globalThis.signNum || 0, globalThis.statue || 1]
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++) {
const str = globalThis.lsh || '0000000000000'
for (let i = 0; i < str.length; i++) {
tmpList.push(string2Bytes(str.charCodeAt(i), 1 * 8)[0])
}
console.log('globalThis.carInfo',JSON.stringify(globalThis.carInfo))
console.log('globalThis.carInfo', JSON.stringify(globalThis.carInfo))
const param= {id: 31,list:tmpList,carNo: globalThis.carInfo.carNo,placeId: globalThis.carInfo.examinationRoomId}
const param = {
id: 31,
list: tmpList,
carNo: globalThis.carInfo.carNo,
placeId: globalThis.carInfo.examinationRoomId
}
// globalThis.udpClient2.initHeartSendMsg(param,this.context)
if(!globalThis.closeHeartSocket){
globalThis.udpClient2.sendMsg(param, this.context)
@ -290,7 +269,7 @@ struct Index {
getUDP()
getUDP2()
clearInterval(this.interval)
this.interval=setInterval(() => {
this.interval = setInterval(() => {
setliushuiNum(this.context)
getliushuiNum(this.context)
this.heartMsg()
@ -339,8 +318,9 @@ struct Index {
console.error(`Failed to request permissions from user. Code is ${err.code}, message is ${err.message}`);
})
}
async initParams() {
this.loading=false
this.loading = false
await getDeviceInfo()
getCarInfo()
await setCurrentTime();
@ -352,8 +332,8 @@ struct Index {
// await this.getModel()
// 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;
//下载模型

File diff suppressed because it is too large Load Diff

View File

@ -1,145 +0,0 @@
import hilog from '@ohos.hilog';
import apiJudgeSdk from 'libJudgeSdk.so';
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';
@Entry
@Component
export default struct Index {
@State message: string = '开始绘制'
// 控制XComponent组件的创建和销毁
@State draw: boolean = false
//监管接口序列号
@State serialNumber: number = 0
//模拟考试项目
@State projects: Project[] = []
@State projectsObj: ProjectObj = {}
@State markRuleListObj: MarkRule = {}
private context = getContext(this) as common.UIAbilityContext;
// xcomponentController: XComponentController = new XComponentController()
build() {
Row() {
Column() {
if (this.draw) {
XComponent({
id: 'duolun_plugin_id_draw', //显示轨迹窗口id名称注意这个ID要和C++侧一致,不能变
type: 'surface',
libraryname: 'JudgeSdk'
})
.width(640)
.height(480)
.onLoad(() => {
apiJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹false:表示结束绘制
hilog.info(0x0000, 'sdk-tag-ets', 'onLoad');
})
.onDestroy(() => {
hilog.info(0x0000, 'sdk-tag-ets', 'onDestroy');
apiJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹false:表示结束绘制
})
} else {
Column() {
}
.width(640 / 2)
.height(480 / 2)
}
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
.fontColor('rgba(255,255,255,0)')
.onClick(() => {
hilog.info(0x0000, 'sdk-tag-ets', 'start render');
// 控制XComponent组件的创建和销毁创建XComponent组件时会调用libentry.so中的模块注册函数Init
this.draw = !this.draw;
clearInterval(globalThis.realTimer)
})
}
.width('100%')
.backgroundColor('#777777')
}
.height('100%')
}
async aboutToAppear() {
await this.initMarkRules();
//初始化项目
await this.initProjectInfo();
//初始化sysset表
await this.initSysset()
const judge = new Judge(this)
}
//获取项目信息
async initProjectInfo() {
const that = this;
const systemParamsArr = await getSyncData('MA_SYSTEMPARM')
const itemInfoArr = await getSyncData('MA_ITEMINFO')
//@ts-ignore
const filterProjectsArr = systemParamsArr.filter(item => item.no1 == 6)
that.projects = filterProjectsArr.map(project => {
//TODO 临时代码
const testType = {
0: 1,
2: 4,
3: 3,
5: 5,
6: 2
}
const currentProject = {
name: decodeURI(project.txt1),
abbreviation: decodeURI(project.txt3),
projectCode: decodeURI(project.no2),
projectCodeCenter: decodeURI(project.txt2),
//@ts-ignore
type: testType[decodeURI(project.no2)*1]
// type:'0' + (project.type || '1')
}
that.projectsObj[project.no2] = currentProject
return currentProject
});
}
//获取扣分代码信息
async initMarkRules() {
const that = this;
const markRuleParams = await getSyncData('MA_MARKRULE')
//@ts-ignore
markRuleParams.forEach(mark => {
that.markRuleListObj[`${mark.itemno}_${mark.markserial}`] = {
itemno: mark.itemno * 1,
markcatalog: mark.markcatalog,
markshow: decodeURI(mark.markshow),
markreal: mark.markreal * 1,
markserial: mark.markserial
};
})
}
// 获取sysset表信息
async initSysset() {
const that = this;
const db = new AccountTable(() => {
}, MA_SYSSET);
const syssetParams = await getSyncData('MA_SYSSET')
//@ts-ignore
const serialNumberArr = syssetParams.filter(sys => sys.v_no === '901');
that.serialNumber = serialNumberArr || '1234567'
}
aboutToDisappear() {
//apiJudgeSdk.stopRender();
}
}

View File

@ -1,75 +1,13 @@
import { GPSData, SignalData } from '../mock';
import { SignalDataType } from '../model';
import signDisplayCom from './compontents/signDisplayCom';
@Entry
@Component
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' }
];
@State GPSColum: Array<any> = [
{ 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: '速度', value: '0' },
]
@State sjxhColum: Array<SignalDataType> =SignalData;
@State GPSColum: Array<SignalDataType> = GPSData
@State ratio: number = 850 / 960
@State gpsActive: number = 1
@State active: number = 0

View File

@ -88,6 +88,7 @@ struct Index {
gateway: this.inputTextList1[5],//value.gateway网关
netMask: this.inputTextList1[4],//value.netMask网络掩码
dnsServers: this.inputTextList1[6],
// @ts-ignore
domain: ""
}, (error) => {
if (error) {

View File

@ -1,22 +1,21 @@
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/FaceCompare'
import FaceCompare from './compontents/FaceCompare';
// import { initJudgeUdp } from '../common/utils/UdpJudge'
import { writeObjectOut } from '../api/judge'
import testNapi from "@ohos.idcard";
import { writeObjectOut } from '../api/judge';
import testNapi from '@ohos.idcard';
import common from '@ohos.app.ability.common';
import { 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 } from './interfaces';
import WebRTCVoice from './webRTC/';
import promptAction from '@ohos.promptAction';
import { CandidateData, EmptyCandidateObject } from '../mock/CandidateData';
@Entry
@Component
struct UserInfo {
@ -38,9 +37,6 @@ struct UserInfo {
@State currentUser: User = EmptyCandidateObject
@State dataList: Array<User> = []
@State list: Array<User> = []
private AccountTable = new AccountTable(() => {
}, USER);
private context = getContext(this) as common.UIAbilityContext;
@State name: string = 'initName';
@State sex: string = '';
@State callBackFlag: boolean = false;
@ -57,9 +53,20 @@ struct UserInfo {
@State signNum: number = 0;
@State isCanClick: boolean = true;
@State faceFlag: string = '0';
@State FaceOpenStatue: string = '0';//是否开启人脸识别
@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() {
//语音功能
@ -75,8 +82,9 @@ struct UserInfo {
this.heartMsg()
}
//身份证读卡器初始化
openDeviceByIDCard(){
openDeviceByIDCard() {
globalThis.indexComponent = this;
// 应用启动时打开读卡设备
let ret = testNapi.OpenDevice();
@ -86,11 +94,13 @@ struct UserInfo {
console.error("zzctest Failed to Open Device");
}
}
stopDeviceById(){
if(this.faceFlag=='1'){
testNapi&&testNapi.StopReadCard()
stopDeviceById() {
if (this.faceFlag == '1') {
testNapi && testNapi.StopReadCard()
}
}
// 通过身份证获取当前学员
getCurrentStudent(id) {
let flag = false
@ -126,6 +136,7 @@ struct UserInfo {
});
}
}
onReadCard(ret) {
console.info(`zzctest xx Read Card ret =${ret.status}`)
let thisVar = globalThis.indexComponent;
@ -182,7 +193,8 @@ struct UserInfo {
changeQkfn() {
this.qkFn()
}
initData(){
initData() {
this.stepFlag = false
this.faceCompareSucess = 0
this.showFaceCompare = false
@ -207,21 +219,22 @@ struct UserInfo {
}
async heartMsg() {
globalThis.udpClient2&globalThis.udpClient2.setMsgCallBack((val)=>{
if(val.id=='32'){
globalThis.signNum=val.body[1]
if(val.body[0]=='7'){
globalThis.udpClient2 & globalThis.udpClient2.setMsgCallBack((val) => {
if (val.id == '32') {
globalThis.signNum = val.body[1]
if (val.body[0] == '7') {
//缺考处理
this.getqkFn()
this.signNum=val.body[1]
this.signNum = val.body[1]
}
}else if(val.id=='42'){
} else if (val.id == '42') {
//收到中心缺考确认消息
console.log('qkfnqkfn',val.body[0])
console.log('qkfnqkfn', val.body[0])
this.qkFn()
}
})
}
//考点端查询缺考指令内容消息请求
getqkFn() {
let tmpList = [];
@ -236,8 +249,6 @@ struct UserInfo {
globalThis.udpClient2.sendMsg(param, this.context)
}
async initSysset() {
const that = this;
const db = new AccountTable(() => {
@ -251,15 +262,15 @@ struct UserInfo {
const studentRefreshParam = syssetParams.filter(sys => sys.v_no === '452')
that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
const faceParam = syssetParams.filter(sys => sys.v_no === '2313')
that.FaceOpenStatue =faceParam?.[0]?.v_value=='3'? '1':'0'
that.FaceOpenStatue = faceParam?.[0]?.v_value == '3' ? '1' : '0'
that.FaceOpenStatue = '0'
console.log('that.FaceOpenStatue', that.FaceOpenStatue)
// faceParam?.[0]?.v_value ||
// 1身份证读卡器 2指纹 3人脸
this.faceFlag=faceParam?.[0]?.v_value ||'0'
if(faceParam?.[0]?.v_value=='1'){
this.faceFlag = faceParam?.[0]?.v_value || '0'
if (faceParam?.[0]?.v_value == '1') {
that.openDeviceByIDCard()
}
console.log('studentRefreshStatue',this.studentRefreshStatue)
//0不自动更新 1自动更新不限次数 2没有考生更新2次
if (that.studentRefreshStatue == '2') {
clearInterval(that.interval)
@ -276,18 +287,19 @@ struct UserInfo {
that.getExaminationStudentInfoFn()
}
}, 5000)
}else{
} else {
this.getExaminationItemFn()
}
})
})
}
//人脸比对窗口关闭
//人脸比对窗口关闭
changeFaceCompareSuccess() {
console.log('this.faceCompareSuces', this.faceCompareSucess, JSON.stringify(this.currentUser))
if (this.faceCompareSucess > 0) {
//人脸比对通过
//人脸比对通过
this.sfbdinterfaceFn()
}
}
@ -307,7 +319,8 @@ struct UserInfo {
this.pageIndex--;
this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4)
}
//获取下载考生
//获取下载考生
getExaminationStudentInfoFn() {
if (globalThis.singlePlay) {
return
@ -360,6 +373,7 @@ struct UserInfo {
console.log('error12error' + error)
})
}
qkFn() {
this.faceCompareSucess = 0
if (globalThis.singlePlay) {
@ -396,9 +410,10 @@ struct UserInfo {
})
}
async getExaminationItemFn(){
async getExaminationItemFn() {
console.info('surenjun', this.currentUser.lsh)
if(!this.currentUser.lsh||globalThis.singlePlay){
if (!this.currentUser.lsh || globalThis.singlePlay) {
return
}
const carInfo = globalThis.carInfo;
@ -409,14 +424,15 @@ struct UserInfo {
lsh: this.currentUser.lsh || '',
examinationRoomId
});
if(examItems?.getExaminationItemRsp?.body?.kssycs!=0){
if (examItems?.getExaminationItemRsp?.body?.kssycs != 0) {
this.getExaminationStudentInfoFn()
}else{
this.dataList=[]
} else {
this.dataList = []
this.currentUser = EmptyCandidateObject
}
}
//身份比对
async sfbdinterfaceFn() {
this.stepFlag = true
@ -441,7 +457,7 @@ struct UserInfo {
ksxtbh: this.ksxtbh || '222',
sfzmhm: this.currentUser.sfzmhm || '',
ksysfzmhm: this.currentUser.ksy1sfzmhm || '',
zp: encodeURIComponent((this.faceCatchImg||this.currentUser.kszp.substr(22)) || ''),
zp: encodeURIComponent((this.faceCatchImg || this.currentUser.kszp.substr(22)) || ''),
kssj: dateFormat(date) || '',
kchp: decodeURI(plateNo),
Ksy2sfzmhm: this.currentUser.ksy2sfzmhm || ''
@ -491,14 +507,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(){
@ -509,15 +529,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 })
@ -656,9 +667,9 @@ struct UserInfo {
})
return
}
if(this.FaceOpenStatue!='0'){
if (this.FaceOpenStatue != '0') {
this.showFaceCompare = true
}else{
} else {
this.sfbdinterfaceFn()
}
})

View File

@ -1,23 +1,16 @@
//@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';
import { VideoConfigData } from '../../mock';
@Component
export default struct FaceCompare {
constructor() {
super()
}
@State imageBase64: string = 'data:image/jpeg;base64,'
@Prop sfzh: string;
@Prop lsh: string;
@ -27,46 +20,26 @@ export default 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;
@State param: VideoConfig = VideoConfigData
private times = 1; //人脸比对失败次数, 超过3次将不会自动比对需要点击重新打开重新触发
private vocObj = null;
private controller: VideoController = new VideoController()
private fileUtil: FileUtil
private interval: any
@State param: VideoConfig = {
spls: '',
videoNum: '1',
faceFlag: false,
pztd: '1',
ljlx: '',
ip: '192.168.7.112',
port: '554',
userName: 'admin',
pwd: '12345qwe',
td1: '1',
td2: '2',
td3: '3',
td4: '4',
videoRecord1: false,
videoRecord2: false,
videoRecord3: false,
videoRecord4: false,
rlls: '1',
spzd4:false,
spzd3:false,
spzd2:false,
spzd1:false,
zdyz:'500',
}
private context = getContext(this) as common.UIAbilityContext;
constructor() {
super()
}
build() {
Column() {
Column() {
@ -162,7 +135,7 @@ export default struct FaceCompare {
this.controller.stop()
this.vocObj && this.vocObj.releasePlayer()
this.showFaceCompare = !this.showFaceCompare
this.showFaceCompareFlag=!this.showFaceCompareFlag
this.showFaceCompareFlag = !this.showFaceCompareFlag
this.faceCompareSucess = -1
globalThis.statue = 2
@ -203,9 +176,9 @@ export default struct FaceCompare {
}
async faceComparFn() {
console.log('mmmmm0',1)
console.log('mmmmm0', 1)
takePhoto(this.param, this.context, 'jt/',0,({base64})=>{
takePhoto(this.param, this.context, 'jt/', 0, ({base64}) => {
faceCompare({
sfzh: this.sfzh,
firstImage: this.firstImage.substr(22),
@ -213,12 +186,12 @@ export default struct FaceCompare {
type: 2,
verifyType: 1
}).then(res => {
console.log('mmmmm8',res)
console.log('mmmmm8', res)
if (res) {
this.controller.stop()
this.showFaceCompare = !this.showFaceCompare
this.showFaceCompareFlag=!this.showFaceCompareFlag
this.showFaceCompareFlag = !this.showFaceCompareFlag
this.faceCompareSucess = 1;
// this.faceCatchImg = result
this.vocObj.playAudio({
@ -236,9 +209,7 @@ export default struct FaceCompare {
}
})
})
console.log('mmmmm8',9)
console.log('mmmmm8', 9)
}
@ -246,7 +217,7 @@ export default struct FaceCompare {
async heartMsg(context) {
let tmpList = []
const str = this.lsh
for (let i = 0;i < str.length; i++) {
for (let i = 0; i < str.length; i++) {
tmpList.push(string2Bytes(str.charCodeAt(i), 1 * 8)[0])
}
const param = {
@ -274,7 +245,7 @@ export default struct FaceCompare {
globalThis.udpClient2.setMsgCallBack((val) => {
if (val.id == '48') {
if (val.body[13] == '1') {
this.showFaceCompareFlag=!this.showFaceCompareFlag
this.showFaceCompareFlag = !this.showFaceCompareFlag
this.showFaceCompare = !this.showFaceCompare
this.vocObj && this.vocObj.releasePlayer()
this.faceCompareSucess = 1
@ -311,7 +282,7 @@ export default struct FaceCompare {
}
} else if (val == 'yzcg.wav') {
this.showFaceCompare = !this.showFaceCompare
this.showFaceCompareFlag=!this.showFaceCompareFlag
this.showFaceCompareFlag = !this.showFaceCompareFlag
globalThis.statue = 4
this.faceCompareSucess = 1;
this.vocObj && this.vocObj.releasePlayer()
@ -320,13 +291,13 @@ export default struct FaceCompare {
this.vocObj && this.vocObj.releasePlayer()
this.faceCompareSucess = -1
this.showFaceCompare = !this.showFaceCompare
this.showFaceCompareFlag=!this.showFaceCompareFlag
this.showFaceCompareFlag = !this.showFaceCompareFlag
}
}
});
const data = await this.fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/config3.txt');
console.log('faceEnterIn,data',data)
console.log('faceEnterIn,data', data)
setTimeout(() => {
this.vocObj && this.vocObj.playAudio({
@ -343,8 +314,6 @@ export default struct FaceCompare {
this.controller.start()
}
async aboutToDisappear() {
}

View File

@ -1,95 +1,36 @@
import router from '@ohos.router'
import router from '@ohos.router';
import UdpClient from '../../common/utils/UdpClient';
import FileLog from '../judgeSDK/utils/file-log'
import { voiceService } from '../../common/service/voiceService'
import prompt from '@ohos.prompt'
import RealTime from '../compontents/judge/real-time'
import FileLog from '../judgeSDK/utils/file-log';
import RealTime from '../compontents/judge/RealTime';
import { GPSData, SignalData } from '../../mock';
import { SignalDataType } from '../../model';
@Component
export default struct SignDisplayCom {
constructor() {
super()
}
@State showBack: boolean = false
@State scaleNum: number = 1
@State msg: string = ''
@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'
}]
@State GPSColum:Array<any>=[
{ 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: '速度', value: '0' },
]
@State sjxhColum: Array<SignalDataType> = SignalData
@State GPSColum: Array<SignalDataType> = GPSData
@State ratio: number = 850 / 960
@State gpsActive: number = 1
@Prop active: number = 0
@State msgStr: string = ''
@State interval: any=''
@State interval: number = 0
@State @Watch('outClick') outFlag: boolean = false;
@State url: string = ''
private timer = null
private udpClient: UdpClient = null
private FileLog: FileLog
private vocObj = null;
@State url: string = ''
constructor() {
super()
}
build() {
Column(){
Column() {
Column() {
Flex({ justifyContent: FlexAlign.SpaceBetween }) {
Row() {
@ -137,7 +78,7 @@ export default struct SignDisplayCom {
}
Row() {
if(this.showBack){
if (this.showBack) {
Image($r('app.media.topB_back')).height('12.2%')
.onClick(() => {
router.back()
@ -259,8 +200,14 @@ export default struct SignDisplayCom {
Text('海拔高:' + this.signArr[85]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('高度差:' + this.signArr[86]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('龄期:' + this.signArr[87]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('维度因子:' + this.signArr[88]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('经度因子:' + this.signArr[89]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('维度因子:' + this.signArr[88])
.fontColor('#FFB433')
.fontSize(14 * this.ratio)
.height(18 * this.ratio)
Text('经度因子:' + this.signArr[89])
.fontColor('#FFB433')
.fontSize(14 * this.ratio)
.height(18 * this.ratio)
Text('航向角:' + this.signArr[90]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('俯仰角:' + this.signArr[91]).fontColor('#FFB433').fontSize(14 * this.ratio).height(18 * this.ratio)
Text('航向角状态-收星数:' + this.signArr[92])
@ -293,16 +240,17 @@ export default struct SignDisplayCom {
Row() {
Text('GPS').fontColor(this.gpsActive == 0 ? '#2D3C5A' : '#fff')
}
.width(316*this.ratio)
.height(24*this.ratio)
.width(316 * this.ratio)
.height(24 * this.ratio)
.backgroundColor(this.gpsActive == 0 ? '#fff' : '#1A1A1A')
.margin({ left: 10*this.ratio, right: 10*this.ratio })
.margin({ left: 10 * this.ratio, right: 10 * this.ratio })
.justifyContent(FlexAlign.Center)
.onClick(() => {
this.gpsActive = 0
})
}.margin({ top: 10*this.ratio })
}.margin({ top: 10 * this.ratio })
Flex({ direction: FlexDirection.Column }) {
ForEach(this.GPSColum, (item) => {
Column() {
@ -314,7 +262,7 @@ export default struct SignDisplayCom {
})
}
}
.width(168 *2* this.ratio)
.width(168 * 2 * this.ratio)
.height(380 * this.ratio)
.backgroundColor('#282828')
.margin({ top: 6 * this.ratio, left: 10 * this.ratio })
@ -325,8 +273,8 @@ export default struct SignDisplayCom {
Row() {
RealTime({
width:Math.floor(550 * this.ratio),
height:Math.floor(380 * this.ratio),
widthNumber: Math.floor(550 * this.ratio),
heightNumber: Math.floor(380 * this.ratio),
})
}
.width(550 * this.ratio)
@ -352,63 +300,64 @@ export default struct SignDisplayCom {
aboutToDisappear() {
clearInterval(this.interval)
}
aboutToAppear(){
aboutToAppear() {
this.ratio = this.ratio * (this.scaleNum || 1);
const that = this
const {showBack,getSignal} = this
if(showBack){
if (showBack) {
globalThis.udpClient.onMessage((msg) => {
console.log('msgmsg',msg)
if(msg){
console.log('msgmsg', msg)
if (msg) {
getSignal(msg)
}
})
}else{
} else {
clearInterval(globalThis.signalTimer)
globalThis.signalTimer = setInterval(()=>{
globalThis.signalTimer = setInterval(() => {
const msgStr = globalThis.msgStr
if(msgStr){
if (msgStr) {
getSignal(msgStr)
}
},200)
}, 200)
}
}
onPageShow() {
console.info('SURENJUN',123)
console.info('SURENJUN', 123)
const getSignal = this.getSignal;
const that = this
const showBack = this.showBack;
if(showBack){
if (showBack) {
globalThis.udpClient.onMessage((msg) => {
getSignal(msg)
})
}else{
} else {
clearInterval(globalThis.signalTimer)
globalThis.signalTimer = setInterval(()=>{
globalThis.signalTimer = setInterval(() => {
//TODO 临时方案
const msgStr = globalThis.msgStr
getSignal(msgStr)
},200)
}, 200)
}
}
getSignal= (msg)=> {
console.log('msgmsgmsg',msg)
getSignal = (msg) => {
console.log('msgmsgmsg', msg)
const that = this;
that.msg = msg
const strachArr=msg.split(',')
const strachArr = msg.split(',')
if (strachArr[0] != '#DN_GD') {
return
}
this.signArr = strachArr
for (let i = 0;i <= 12; i++) {
for (let i = 0; i <= 12; i++) {
this.sjxhColum[i].value = this.signArr[i+2]
}
@ -417,7 +366,7 @@ export default struct SignDisplayCom {
this.sjxhColum[15].value = this.signArr[19]
this.sjxhColum[16].value = this.signArr[20]
this.sjxhColum[17].value = this.signArr[23] //车速
this.sjxhColum[18].value=this.signArr[28]
this.sjxhColum[18].value = this.signArr[28]
this.sjxhColum[19].value = this.signArr[29]
this.sjxhColum[20].value = this.signArr[30]
this.sjxhColum[21].value = this.signArr[15] //NC
@ -433,11 +382,11 @@ export default struct SignDisplayCom {
this.sjxhColum[31].value = this.signArr[33]
this.sjxhColum[32].value = this.signArr[34]
this.sjxhColum[33].value = this.signArr[35]
for (let i = 34;i <= 46; i++) {
for (let i = 34; i <= 46; i++) {
this.sjxhColum[i].value = this.signArr[i+2]
}
let t=0
for (let i = 83;i <= 97; i++) {
let t = 0
for (let i = 83; i <= 97; i++) {
this.GPSColum[t].value = this.signArr[i]
t++
}
@ -445,11 +394,11 @@ export default struct SignDisplayCom {
that.signArr = JSON.parse(JSON.stringify((this.signArr)))
that.GPSColum = JSON.parse(JSON.stringify((this.GPSColum)))
}
outClick() {
}
saveLog() {
}
}

View File

@ -0,0 +1,43 @@
import { AmplifyArr, AmplifyImages } from '../../../mock'
const folder = 'judge/km3/amplify/'
@Component
export default struct EndPopup {
private amplifyImgIndex: number = 0
constructor() {
super()
}
build() {
Column() {
Column() {
}
.width(530)
.height(386)
.backgroundImage($rawfile(`${folder}${AmplifyImages[this.amplifyImgIndex]}`))
.backgroundImageSize({ width: '100%', height: '100%' })
.position({ y: '25%', x: '37%' })
.justifyContent(FlexAlign.Center)
.onClick((e: ClickEvent) => {
this.confirmAmplify(AmplifyArr[this.amplifyImgIndex])
})
}
.width('100%')
.height('100%')
.position({ y: 0 })
.backgroundColor('rgba(0,0,0,0.9)')
.onClick(() => {
this.closeAmplifyPop()
})
}
private closeAmplifyPop: Function = () => {
}
private confirmAmplify: Function = () => {
}
}

View File

@ -5,7 +5,7 @@ interface SEL{
}
@Component
struct DeductedPopup {
export default struct DeductedPopup {
constructor() {
super()
}
@ -149,6 +149,4 @@ struct DeductedPopup {
.onClick(()=>{this.closePopup()})
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
}
}
export default DeductedPopup
}

View File

@ -1,6 +1,6 @@
@Component
struct EndPopup {
export default struct EndPopup {
constructor() {
super()
}
@ -22,6 +22,4 @@ struct EndPopup {
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
}
}
export default EndPopup
}

View File

@ -1,6 +1,5 @@
@Component
struct LoadingPopup {
export default struct LoadingPopup {
constructor() {
super()
}
@ -17,5 +16,3 @@ struct LoadingPopup {
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
}
}
export default LoadingPopup

View File

@ -1,39 +1,27 @@
// @ts-nocheck
import hilog from '@ohos.hilog';
import apiJudgeSdk from 'libJudgeSdk.so';
// import apiJudgeSdk from '@ohos.judgesdk';
import Judge from '../../judgeSDK/utils/judge-real'
// import Judge from '../../judgeSDK/judge-track-playback'
import {Project,ProjectObj,MarkRule} from '../../judgeSDK/api/judgeSDK.d'
import AccountTable from '../../../common/database/tables/AccountTable';
import MA_SYSSET from '../../../common//constants/MA_SYSSET';
import Judge from '../../judgeSDK/utils/judge-real';
import { MarkRule, Project, ProjectObj } from '../../judgeSDK/api/judgeSDK.d';
import common from '@ohos.app.ability.common';
import { getSyncData } from '../../../common/service/initable'
import {testAllitems,testUIAllitems,testMarkRules} from '../../judgeSDK/dataTest/index'
@Component
struct RealTime {
constructor() {
super()
}
private height:number = 0
private width:number = 0
export default struct RealTime {
@State message: string = '开始绘制'
// 控制XComponent组件的创建和销毁
@State draw: boolean = false
//监管接口序列号
@State serialNumber:number = 0
@State serialNumber: number = 0
//模拟考试项目
@State projects:Project[] = []
@State projectsObj:ProjectObj = {}
@State markRuleListObj:MarkRule ={}
@State projects: Project[] = []
@State projectsObj: ProjectObj = {}
@State markRuleListObj: MarkRule = {}
private widthNumber: string | number | Resource = 0
private heightNumber: string | number | Resource = 0
private context = getContext(this) as common.UIAbilityContext;
constructor() {
super()
}
// xcomponentController: XComponentController = new XComponentController()
build() {
@ -46,8 +34,8 @@ struct RealTime {
libraryname: 'JudgeSdk'
// libraryname: 'judgesdk'
})
.width(this.width)
.height(this.height)
.width(this.widthNumber)
.height(this.heightNumber)
.onLoad(() => {
apiJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹false:表示结束绘制
})
@ -57,9 +45,10 @@ struct RealTime {
clearInterval(globalThis.realTimer)
})
} else {
Column() {}
.width(this.width)
.height(this.height)
Column() {
}
.width(this.widthNumber)
.height(this.heightNumber)
}
}
.width('100%')
@ -77,7 +66,5 @@ struct RealTime {
//apiJudgeSdk.stopRender();
}
}
export default RealTime

View File

@ -1,39 +0,0 @@
const folder = 'judge/km3/amplify/'
const amplifyImgs = [
'km_zxB.png','km_hcB.png',
'km_bdB.png',
'km_ccB.png','km_dtB.png','km_tcB.png',
]
const amplifyArrs = [
{name:'直线',projectCode:'3',projectCodeCenter:'40300'},
{name:'会车',projectCode:'9',projectCodeCenter:'41300'},
{name:'变道',projectCode:'4',projectCodeCenter:'40500'},
{name:'超车',projectCode:'10',projectCodeCenter:'41400'},
{name:'掉头',projectCode:'12',projectCodeCenter:'41500'},
{name:'停车',projectCode:'11',projectCodeCenter:'40600'},
]
@Component
struct EndPopup {
constructor() {
super()
}
private amplifyImgIndex:number = 0
private closeAmplifyPop:Function = ()=>{}
private confirmAmplify:Function = ()=>{}
build(){
Column(){
Column(){
}.width(530).height(386).backgroundImage($rawfile(`${folder}${amplifyImgs[this.amplifyImgIndex]}`)).backgroundImageSize({width:'100%',height:'100%'}).position({y:'25%',x:'37%'}).justifyContent(FlexAlign.Center)
.onClick((e:ClickEvent)=>{
this.confirmAmplify(amplifyArrs[this.amplifyImgIndex])
})
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.9)')
.onClick(()=>{this.closeAmplifyPop()})
}
}
export default EndPopup

View File

@ -1,25 +0,0 @@
@Component
export default struct EndPopup {
constructor() {
super()
}
private title:string = ''
private cancelFn:(event?: ClickEvent) => void
private confirmFn:(event?: ClickEvent) => void
build(){
Column(){
Column(){
Text(this.title).fontSize(38).margin({bottom:20})
Row(){}.height(50)
Row(){
Text('取消').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(250).height(100).fontSize(30).fontColor('#FFF').textAlign(TextAlign.Center).onClick(this.cancelFn)
Text('确定').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(250).height(100).fontSize(30).fontColor('#FFF').textAlign(TextAlign.Center).margin({left:45}).onClick(this.confirmFn)
}
}.width('80%').height('70%').backgroundColor('#E6E3DF').borderRadius(38).position({y:'12%',x:'10%'}).justifyContent(FlexAlign.Center)
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
}
}

View File

@ -3116,7 +3116,6 @@ export const testMarkRules = [{
}, {
"itemno": "41",
"markcatalog": "41603",
"markdepend": "通过急弯、坡路、拱桥、人行横道或者没有交通信号灯控制的路口时,不交替使用远近光灯示意",
"markreal": "-100",

File diff suppressed because it is too large Load Diff

View File

@ -301,6 +301,56 @@ export const plcStrToWXJson = async (plc:string) =>{
return wuXiDataStr
}
export const senorToWXDataStr= async (tempData) => {
const {sensor,gps} = tempData;
const timeStr = await getTimeStr()
const {mkg,aqd,dh1,dh2, zfxd, yfxd, jgd, ygd,ssc , jsc, lhq, fsc, lb, ygq,wd} = sensor
const judgeSignal = [
//车门 安全带 熄火 发动机启动 左转向 右转向 前照灯近灯 前照灯远灯
mkg, aqd, dh1, dh2, zfxd, yfxd, jgd, ygd,
// 注车制动 行车制动 离合器 副制动 喇叭 雨刷 危险报警灯 示廓灯 系统未涉及的传感器信号
ssc , jsc, lhq, fsc, lb, ygq, 0, 0, 0
]
const judgeAnotherSignal = [
// 低三挡位 左侧单边桥1 左侧单边桥2 右侧单边桥1 右侧单边桥2 雾灯
'000', '0', '0', '0', '0', '0',,'0',
// 桩杆全无信号 左后绕车 右后绕车 右前绕车 左前绕车
'000', '0', '0', '0', '0', '0','0'
]
//@ts-ignore
const str1 = (judgeSignal.join('')*1).toString(16);
//@ts-ignore
const str2 = (judgeAnotherSignal.join('')*1).toString(16);
const wuXiData = [
// 卫星时间 精度 纬度 高度 方位角 俯仰角 速度角 速度 横滚 卫星定位状态
'$KSXT', timeStr, gps.jd, gps.wd, gps.hbg, gps.hxj, gps.fyj, '0' , gps.sd, '0', gps.dwzt,
//前天线可用星数 后天线可用星数 东向坐标位置 北向位置坐标 天向位置坐标 东向速度 北向速度 天向速度
'0', '0', '0', '0', '0', '0', '0', '0','0',
//@ts-ignore 评判信号1 评判信号2 发动机转速
// (judgeSignal.join('')*1).toString(16), (judgeAnotherSignal.join('')*1).toString(16) , sensor.fdjzs,
'0006', '0001' , sensor.fdjzs,
'0xFFFFFFF'
]
return wuXiData.map(d => (d + '')).join(',');
// console.log('wuXiData',wuXiData.join(','));
}
export const getTimeStr = async () =>{
const date = await systemTime.getDate()
const timeStr = '';
const Y = date.getFullYear();
const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) ;
const D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
const h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours());
const m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes());
const s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds());
const ss = (date.getMilliseconds() +'').slice(0,2);
return timeStr + Y + M +D +h +m +s +'.' + ss
}
//蓝灯
export function sendBlue(){
const arrBlue = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00];

View File

@ -3,15 +3,14 @@
//考试回放开关
export const judgeConfig = {
//本地目录开关
isTrajectoryOpen: false,
isTrajectoryOpen: true,
//是否开启Udp
udpOpen:false,
// 本地模型地址
modelPath: 'models/model_enc',
// 轨迹回放地址
trajectoryPath: 'logs/2024_06_18/0000000000001_342323199501470011_测试学员1_2024_06_18_14_32_25/judge_exam_data.txt'
trajectoryPath: 'logs/2024_06_18/0000000000001_342323199501470011_测试学员1_2024_06_26_10_04_23/judge_exam_data.txt'
}
//0000000000001_342323199501470011_测试学员1_2024_04_28_10_59_44
// 模拟灯光轨迹
// test_sub3_car_test_jinan-32038219990808021X-20240417092356.txt

View File

@ -1,11 +1,5 @@
import {
examJudgeSetLogCallback,
examJudgeBeginExam,
examJudgeInit,
examJudgeRealExam,
examJudgeSetRealExamCallback,
examJudgeMapSetParam,
examJudgeMapSetDrawing,
examJudgeMapSetScaling
} from '../api/index'
import systemTime from '@ohos.systemDateTime';

View File

@ -1,4 +1,5 @@
import prompt from '@ohos.prompt'
import Prompt from '@system.prompt'
const TAG = 'SURENJUN_JUDGE'
export default class JudgeTask{
@ -17,8 +18,8 @@ export default class JudgeTask{
try {
await currentTask();
}catch (e){
console.info(TAG,'过程数据接口解析错误')
prompt.showToast({
// console.info(TAG,'过程数据接口解析错误')
Prompt.showToast({
message: '过程数据接口解析错误',
duration: 3000
});

View File

@ -1,5 +1,5 @@
import media from '@ohos.multimedia.media';
import prompt from '@ohos.prompt';
import Prompt from '@system.prompt';
const TAG = 'VoiceAnnounce'
@ -84,7 +84,7 @@ class AVPlayer {
url = await globalThis.context.resourceManager.getRawFd(name);
this.avPlayer.fdSrc = url;
} catch (e) {
prompt.showToast({
Prompt.showToast({
message: `${name}语音文件不存在`,
duration: 4000
});

View File

@ -9,7 +9,6 @@
"pages/TerminalInfos",
"pages/VideoConfig",
"pages/SignDisplay",
"pages/RealTime",
"pages/Roads",
"pages/Judge"
],

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More