feat_surenjun #20
1
entry/.gitignore
vendored
1
entry/.gitignore
vendored
@ -3,3 +3,4 @@
|
|||||||
/build
|
/build
|
||||||
/.cxx
|
/.cxx
|
||||||
/.idea
|
/.idea
|
||||||
|
/oh_modules
|
||||||
120
entry/src/main/ets/common/service/usbService.ts
Normal file
120
entry/src/main/ets/common/service/usbService.ts
Normal 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
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import systemTime from '@ohos.systemDateTime';
|
import systemTime from '@ohos.systemDateTime';
|
||||||
import { Array2Byte, fillZero, string2Bytes, stringToASC } from '../../common/utils/tools';
|
import { Array2Byte, fillZero, string2Bytes, stringToASC } from '../../common/utils/tools';
|
||||||
import { testKmItems } from '../../pages/judgeSDK/dataTest/index';
|
import { testKmItems } from '../../pages/judgeSDK/dataTest/index';
|
||||||
import { setJudgeUdp, setTopLineUdp } from './GlobleUdp';
|
import { setJudgeUdp, setTopLineUdp } from './GlobalUdp';
|
||||||
import { convertGpsCoord2 } from '../utils/tools';
|
import { convertGpsCoord2 } from '../utils/tools';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
// @ts-nocheck
|
|
||||||
import { VideoConfig } from './interfaces'
|
import { VideoConfig } from './interfaces'
|
||||||
import common from '@ohos.app.ability.common';
|
import common from '@ohos.app.ability.common';
|
||||||
import router from '@ohos.router'
|
import router from '@ohos.router'
|
||||||
@ -10,14 +9,15 @@ import {
|
|||||||
getEsCarModel,
|
getEsCarModel,
|
||||||
} from '../common/service/initable'
|
} from '../common/service/initable'
|
||||||
import FileUtil from '../common/utils/File'
|
import FileUtil from '../common/utils/File'
|
||||||
import { getUDP, getUDP2 } from '../common/utils/GlobleUdp'
|
import { getUDP, getUDP2 } from '../common/utils/GlobalUdp'
|
||||||
import {initJudgeUdp} from '../common/utils/UdpJudge'
|
import {initJudgeUdp} from '../common/utils/UdpJudge'
|
||||||
import { getTCP } from '../common/utils/GlobleTcp'
|
import { getTCP } from '../common/utils/GlobalTcp'
|
||||||
import TcpClient from '../common/utils/TcpClient';
|
import TcpClient from '../common/utils/TcpClient';
|
||||||
import testNapi from '@ohos.hiserialsdk'
|
import testNapi from '@ohos.hiserialsdk'
|
||||||
import {setliushuiNum,getliushuiNum,getSingleCenterTable,getDoubleCeneterTable,takePhotoFn} from '../common/service/indexService'
|
import {setliushuiNum,getliushuiNum,getSingleCenterTable,getDoubleCeneterTable,takePhotoFn} from '../common/service/indexService'
|
||||||
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
|
import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
|
||||||
import worker, { MessageEvents } from '@ohos.worker';
|
import worker, { MessageEvents } from '@ohos.worker';
|
||||||
|
import Prompt from '@system.prompt';
|
||||||
|
|
||||||
@Entry
|
@Entry
|
||||||
@Component
|
@Component
|
||||||
@ -110,7 +110,7 @@ struct Index {
|
|||||||
}, 1000)
|
}, 1000)
|
||||||
this.angle = 0
|
this.angle = 0
|
||||||
if(!globalThis.timeInfo){
|
if(!globalThis.timeInfo){
|
||||||
promptAction.showToast({
|
Prompt.showToast({
|
||||||
message: `网络连接失败`,
|
message: `网络连接失败`,
|
||||||
duration: 3000
|
duration: 3000
|
||||||
});
|
});
|
||||||
@ -338,7 +338,6 @@ struct Index {
|
|||||||
// await this.getModel()
|
// await this.getModel()
|
||||||
// const arr = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00]
|
// const arr = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00]
|
||||||
// globalThis.udpClientByTopLine.sendMsg(Array2Byte(arr).buffer)
|
// globalThis.udpClientByTopLine.sendMsg(Array2Byte(arr).buffer)
|
||||||
console.info(testNapi)
|
|
||||||
}
|
}
|
||||||
async getModel() {
|
async getModel() {
|
||||||
const context = this.context;
|
const context = this.context;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import router from '@ohos.router'
|
import router from '@ohos.router'
|
||||||
import prompt from '@ohos.prompt'
|
import Prompt from '@system.prompt';
|
||||||
import common from '@ohos.app.ability.common';
|
import common from '@ohos.app.ability.common';
|
||||||
import EndPoPup from './compontents/judge/end-popup'
|
import EndPoPup from './compontents/judge/end-popup'
|
||||||
import LoadingPopup from './compontents/judge/loading-popup'
|
import LoadingPopup from './compontents/judge/loading-popup'
|
||||||
@ -98,8 +98,8 @@ struct Index {
|
|||||||
const students = await getSyncData('USER')
|
const students = await getSyncData('USER')
|
||||||
const stuInfo = students[0] || {};
|
const stuInfo = students[0] || {};
|
||||||
const {xm,sfzmhm,lsh,kszp,ksdd,kssycs,kslx} = stuInfo;
|
const {xm,sfzmhm,lsh,kszp,ksdd,kssycs,kslx} = stuInfo;
|
||||||
this.name = xm;
|
this.name = xm || '测试考生';
|
||||||
this.idCard = sfzmhm;
|
this.idCard = sfzmhm || '01234567891010';
|
||||||
this.lsh = lsh;
|
this.lsh = lsh;
|
||||||
this.kszp = kszp;
|
this.kszp = kszp;
|
||||||
this.ksdd = ksdd;
|
this.ksdd = ksdd;
|
||||||
@ -212,7 +212,7 @@ struct Index {
|
|||||||
|
|
||||||
const projects = this.projects;
|
const projects = this.projects;
|
||||||
if(!projects.length){
|
if(!projects.length){
|
||||||
prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '读取数据库信息失败,请重新考试!',
|
message: '读取数据库信息失败,请重新考试!',
|
||||||
duration: 8000
|
duration: 8000
|
||||||
});
|
});
|
||||||
@ -223,7 +223,7 @@ struct Index {
|
|||||||
//初始化systemParam表
|
//初始化systemParam表
|
||||||
async initSystemKm3Param(sysParam?:SYSTEMPARMARR[]) {
|
async initSystemKm3Param(sysParam?:SYSTEMPARMARR[]) {
|
||||||
const systemParms: any = sysParam || await getSyncData('MA_SYSTEMPARM')
|
const systemParms: any = sysParam || await getSyncData('MA_SYSTEMPARM')
|
||||||
console.log('systemParms',JSON.stringify(systemParms))
|
|
||||||
const {isTrajectoryOpen} = judgeConfig
|
const {isTrajectoryOpen} = judgeConfig
|
||||||
|
|
||||||
systemParms.forEach((systemParm) => {
|
systemParms.forEach((systemParm) => {
|
||||||
@ -263,7 +263,7 @@ struct Index {
|
|||||||
})
|
})
|
||||||
const projects = this.projects;
|
const projects = this.projects;
|
||||||
if (!projects.length) {
|
if (!projects.length) {
|
||||||
prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '读取数据库信息失败,请重新考试!',
|
message: '读取数据库信息失败,请重新考试!',
|
||||||
duration: 8000
|
duration: 8000
|
||||||
});
|
});
|
||||||
@ -405,7 +405,7 @@ struct Index {
|
|||||||
? await this.initSystemKm2Param(systemparm)
|
? await this.initSystemKm2Param(systemparm)
|
||||||
: await this.initSystemKm3Param(systemparm)
|
: await this.initSystemKm3Param(systemparm)
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
await this.initMarkRules(testMarkRules);
|
await this.initMarkRules(initDataObj.mark);
|
||||||
await this.initSysset(initDataObj.sysset);
|
await this.initSysset(initDataObj.sysset);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -484,28 +484,43 @@ struct Index {
|
|||||||
}.height(40)
|
}.height(40)
|
||||||
Row() {
|
Row() {
|
||||||
Flex({ direction: FlexDirection.Column }) {
|
Flex({ direction: FlexDirection.Column }) {
|
||||||
List({}) {
|
|
||||||
ForEach(this.kfArr, (item) => {
|
|
||||||
ListItem() {
|
|
||||||
Column() {
|
|
||||||
Row() {
|
|
||||||
Text(item.xmmcStr).fontSize(this.BIGFONTSIZE).fontColor('#FFF')
|
|
||||||
Text(`${item.score}分`).fontSize(this.BIGFONTSIZE).fontColor('#FFF')
|
|
||||||
}
|
|
||||||
.width('100%')
|
|
||||||
.backgroundColor('#38260B')
|
|
||||||
.justifyContent(FlexAlign.SpaceBetween)
|
|
||||||
.padding({ top: 12, bottom: 12, left: 8, right: 5 })
|
|
||||||
|
|
||||||
Text(item.desc)
|
if(this.kfArr.length){
|
||||||
.fontSize(this.BIGFONTSIZE)
|
List({}) {
|
||||||
.fontColor('#E5CBA1')
|
ForEach(this.kfArr, (item) => {
|
||||||
.margin({ top: 10, bottom: 8, left: 5, right: 5 })
|
ListItem() {
|
||||||
}.margin({ top: 15 }).alignItems(HorizontalAlign.Start)
|
Column() {
|
||||||
|
Row() {
|
||||||
|
Text(item.xmmcStr).fontSize(this.BIGFONTSIZE).fontColor('#FFF')
|
||||||
|
Text(`${item.score}分`).fontSize(this.BIGFONTSIZE).fontColor('#FFF')
|
||||||
|
}
|
||||||
|
.width('100%')
|
||||||
|
.backgroundColor('#38260B')
|
||||||
|
.justifyContent(FlexAlign.SpaceBetween)
|
||||||
|
.padding({ top: 12, bottom: 12, left: 8, right: 5 })
|
||||||
|
|
||||||
|
Text(item.desc)
|
||||||
|
.fontSize(this.BIGFONTSIZE)
|
||||||
|
.fontColor('#E5CBA1')
|
||||||
|
.margin({ top: 10, bottom: 8, left: 5, right: 5 })
|
||||||
|
}.margin({ top: 15 }).alignItems(HorizontalAlign.Start)
|
||||||
|
|
||||||
|
}.margin({bottom:25})
|
||||||
|
})
|
||||||
|
}.padding({left:15,right:15,top:30,bottom:5})
|
||||||
|
}else{
|
||||||
|
Column() {
|
||||||
|
Row() {
|
||||||
|
Text('暂无扣分项').fontSize(this.BIGFONTSIZE).fontColor('#FFF')
|
||||||
|
}
|
||||||
|
.width('100%')
|
||||||
|
.backgroundColor('#38260B')
|
||||||
|
.justifyContent(FlexAlign.SpaceBetween)
|
||||||
|
.padding({ top: 12, bottom: 12, left: 8, right: 3 })
|
||||||
|
|
||||||
|
}.margin({ top: 35 }).padding({left:20,right:20}).alignItems(HorizontalAlign.Start)
|
||||||
|
}
|
||||||
|
|
||||||
}.margin({bottom:25})
|
|
||||||
})
|
|
||||||
}.padding({left:15,right:15,top:30,bottom:5})
|
|
||||||
}
|
}
|
||||||
.backgroundImage($rawfile('judge/score_bg.png'), ImageRepeat.NoRepeat)
|
.backgroundImage($rawfile('judge/score_bg.png'), ImageRepeat.NoRepeat)
|
||||||
.backgroundImageSize({ width: '100%', height: '100%' })
|
.backgroundImageSize({ width: '100%', height: '100%' })
|
||||||
@ -570,7 +585,7 @@ struct Index {
|
|||||||
this.amplifiedImgIndex = index;this.isAmplifyPopShow = true
|
this.amplifiedImgIndex = index;this.isAmplifyPopShow = true
|
||||||
} else{
|
} else{
|
||||||
if(index === 5){
|
if(index === 5){
|
||||||
prompt.showToast({
|
Prompt.showToast({
|
||||||
message: `${xmmcStr}未结束,不允许靠边停车`,
|
message: `${xmmcStr}未结束,不允许靠边停车`,
|
||||||
duration: 8000
|
duration: 8000
|
||||||
});
|
});
|
||||||
@ -632,7 +647,7 @@ struct Index {
|
|||||||
if(this.judgeConfigObj['342'] == 0){
|
if(this.judgeConfigObj['342'] == 0){
|
||||||
this.isDeductedPopShow = true
|
this.isDeductedPopShow = true
|
||||||
}else{
|
}else{
|
||||||
prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '平台配置不允许人工评判!',
|
message: '平台配置不允许人工评判!',
|
||||||
duration: 4000
|
duration: 4000
|
||||||
});
|
});
|
||||||
@ -640,7 +655,6 @@ struct Index {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Row(){
|
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})
|
Text('呼叫请求').fontColor('#FFF').fontSize(32).padding({right:12})
|
||||||
@ -658,7 +672,7 @@ struct Index {
|
|||||||
if(this.judgeConfigObj['353'] == '0' ){
|
if(this.judgeConfigObj['353'] == '0' ){
|
||||||
this.endPopupVisible = true
|
this.endPopupVisible = true
|
||||||
}else{
|
}else{
|
||||||
prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '车上不允许手动结束考试!',
|
message: '车上不允许手动结束考试!',
|
||||||
duration: 4000
|
duration: 4000
|
||||||
});
|
});
|
||||||
|
|||||||
@ -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();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -88,6 +88,7 @@ struct Index {
|
|||||||
gateway: this.inputTextList1[5],//value.gateway网关
|
gateway: this.inputTextList1[5],//value.gateway网关
|
||||||
netMask: this.inputTextList1[4],//value.netMask网络掩码
|
netMask: this.inputTextList1[4],//value.netMask网络掩码
|
||||||
dnsServers: this.inputTextList1[6],
|
dnsServers: this.inputTextList1[6],
|
||||||
|
// @ts-ignore
|
||||||
domain: ""
|
domain: ""
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
|
|||||||
@ -80,7 +80,7 @@ export default struct SignDisplayCom {
|
|||||||
@State gpsActive: number = 1
|
@State gpsActive: number = 1
|
||||||
@Prop active: number = 0
|
@Prop active: number = 0
|
||||||
@State msgStr: string = ''
|
@State msgStr: string = ''
|
||||||
@State interval: any=''
|
@State interval: number=0
|
||||||
|
|
||||||
@State @Watch('outClick') outFlag: boolean = false;
|
@State @Watch('outClick') outFlag: boolean = false;
|
||||||
private timer = null
|
private timer = null
|
||||||
|
|||||||
@ -14,7 +14,7 @@ const amplifyArrs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
struct EndPopup {
|
export default struct EndPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
@ -35,5 +35,3 @@ struct EndPopup {
|
|||||||
.onClick(()=>{this.closeAmplifyPop()})
|
.onClick(()=>{this.closeAmplifyPop()})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default EndPopup
|
|
||||||
@ -5,7 +5,7 @@ interface SEL{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
struct DeductedPopup {
|
export default struct DeductedPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
@ -150,5 +150,3 @@ struct DeductedPopup {
|
|||||||
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
|
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default DeductedPopup
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
struct EndPopup {
|
export default struct EndPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
@ -23,5 +23,3 @@ struct EndPopup {
|
|||||||
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
|
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default EndPopup
|
|
||||||
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
@Component
|
@Component
|
||||||
struct LoadingPopup {
|
export default struct LoadingPopup {
|
||||||
constructor() {
|
constructor() {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
@ -17,5 +16,3 @@ struct LoadingPopup {
|
|||||||
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
|
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default LoadingPopup
|
|
||||||
|
|||||||
@ -4,13 +4,8 @@ import apiJudgeSdk from 'libJudgeSdk.so';
|
|||||||
// import apiJudgeSdk from '@ohos.judgesdk';
|
// import apiJudgeSdk from '@ohos.judgesdk';
|
||||||
|
|
||||||
import Judge from '../../judgeSDK/utils/judge-real'
|
import Judge from '../../judgeSDK/utils/judge-real'
|
||||||
// import Judge from '../../judgeSDK/judge-track-playback'
|
|
||||||
import {Project,ProjectObj,MarkRule} from '../../judgeSDK/api/judgeSDK.d'
|
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 common from '@ohos.app.ability.common';
|
import common from '@ohos.app.ability.common';
|
||||||
import { getSyncData } from '../../../common/service/initable'
|
|
||||||
import {testAllitems,testUIAllitems,testMarkRules} from '../../judgeSDK/dataTest/index'
|
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
struct RealTime {
|
struct RealTime {
|
||||||
|
|||||||
@ -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)')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -3116,7 +3116,6 @@ export const testMarkRules = [{
|
|||||||
}, {
|
}, {
|
||||||
|
|
||||||
"itemno": "41",
|
"itemno": "41",
|
||||||
|
|
||||||
"markcatalog": "41603",
|
"markcatalog": "41603",
|
||||||
"markdepend": "通过急弯、坡路、拱桥、人行横道或者没有交通信号灯控制的路口时,不交替使用远近光灯示意",
|
"markdepend": "通过急弯、坡路、拱桥、人行横道或者没有交通信号灯控制的路口时,不交替使用远近光灯示意",
|
||||||
"markreal": "-100",
|
"markreal": "-100",
|
||||||
|
|||||||
@ -18,11 +18,22 @@ import { judgeConfig } from './utils/judge-config'
|
|||||||
|
|
||||||
import {writeObjectOut,uploadExamProgressData} from '../../api/judge'
|
import {writeObjectOut,uploadExamProgressData} from '../../api/judge'
|
||||||
import {deepClone,getCurrentTime,stringToASC,string2Bytes,fillZero,Array2Byte,convertGpsCoord2} from '../../common/utils/tools'
|
import {deepClone,getCurrentTime,stringToASC,string2Bytes,fillZero,Array2Byte,convertGpsCoord2} from '../../common/utils/tools'
|
||||||
import {getTranslateSignals,getCarStatus,getCarStatusType,getCenterProjectStatus,plcStrToJson,plcStrToWXJson,promptWxCode,getKmProjectVoice} from './utils//judge-common'
|
import {getTranslateSignals,getCarStatus,getCarStatusType,getCenterProjectStatus,plcStrToJson,plcStrToWXJson,promptWxCode,getKmProjectVoice,senorToWXDataStr} from './utils/judge-common'
|
||||||
import {examJudgeSetLogCallback,examJudgeBeginExam,examJudgeInit,examJudgeRealExam,examJudgeSetRealExamCallback,examJudgeSetPerformCallback,examJudgeEndExam,examJudgeArtificialMark,examJudgeArtificialItem} from './api/index'
|
import {
|
||||||
|
examJudgeSetLogCallback,
|
||||||
import prompt from '@ohos.prompt';
|
examJudgeBeginExam,
|
||||||
|
examJudgeInit,
|
||||||
|
examJudgeRealExam,
|
||||||
|
examJudgeSetRealExamCallback,
|
||||||
|
examJudgeSetPerformCallback,
|
||||||
|
examJudgeEndExam,
|
||||||
|
examJudgeArtificialMark,
|
||||||
|
examJudgeArtificialItem,
|
||||||
|
examJudgeMapSetScaling,
|
||||||
|
examJudgeMapSetParam
|
||||||
|
} from './api/index'
|
||||||
|
import UsbService from '../../common/service/usbService'
|
||||||
|
import Prompt from '@system.prompt';
|
||||||
const judgeTag = 'SURENJUN_JUDGE'
|
const judgeTag = 'SURENJUN_JUDGE'
|
||||||
|
|
||||||
export default class Judge{
|
export default class Judge{
|
||||||
@ -40,6 +51,8 @@ export default class Judge{
|
|||||||
this.fileUtil = new FileUtil(judgeUI.context)
|
this.fileUtil = new FileUtil(judgeUI.context)
|
||||||
this.judgeTask = new JudgeTask()
|
this.judgeTask = new JudgeTask()
|
||||||
const mediaTest= new FilePhoto(judgeUI.context);
|
const mediaTest= new FilePhoto(judgeUI.context);
|
||||||
|
const usbService = new UsbService();
|
||||||
|
this.usbService = usbService
|
||||||
this.filePhoto = mediaTest
|
this.filePhoto = mediaTest
|
||||||
this.kfArr = judgeUI.kfArr
|
this.kfArr = judgeUI.kfArr
|
||||||
this.xmmcStr = '';this.xmmcCode = '';this.carztStr = '';
|
this.xmmcStr = '';this.xmmcCode = '';this.carztStr = '';
|
||||||
@ -130,12 +143,19 @@ export default class Judge{
|
|||||||
console.info(judgeTag,'6.开始考试注册完成')
|
console.info(judgeTag,'6.开始考试注册完成')
|
||||||
|
|
||||||
avPlayer.playAudio(['voice/ksks.WAV'])
|
avPlayer.playAudio(['voice/ksks.WAV'])
|
||||||
|
|
||||||
|
await examJudgeMapSetParam(640, 480); //设置参数宽、高
|
||||||
|
await examJudgeMapSetScaling(120); //设置缩放比例,一般默认填100(就是100%的意思) ,数字越大视野越大,数字越小视野越小,不能为0
|
||||||
|
|
||||||
|
this.judgeUI.draw = true
|
||||||
|
|
||||||
// 处理轨迹plc信息
|
// 处理轨迹plc信息
|
||||||
if(isTrajectoryOpen){
|
if(isTrajectoryOpen){
|
||||||
handleTrajectoryUdp(strArr);
|
handleTrajectoryUdp(strArr);
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 处理实时udp里的plc信号
|
// 处理实时udp里的plc信号
|
||||||
globalThis.udpClient.onMessage(async (msg) => {
|
globalThis.udpClient.onMessage(async (msg) => {
|
||||||
handleUdp(msg)
|
handleUdp(msg)
|
||||||
@ -250,12 +270,15 @@ export default class Judge{
|
|||||||
const {xmdm,code} = sound;
|
const {xmdm,code} = sound;
|
||||||
//判断是不是模拟灯光语音
|
//判断是不是模拟灯光语音
|
||||||
const isLight = code.slice(0,3) === '417';
|
const isLight = code.slice(0,3) === '417';
|
||||||
console.info(judgeTag,'评判语音提示' + JSON.stringify(sound))
|
if(isLight){
|
||||||
|
console.info(judgeTag,'模拟灯光开始播放:' + code)
|
||||||
|
}
|
||||||
avPlayer.playAudio([`voice/${code}.mp3`],true,()=>{
|
avPlayer.playAudio([`voice/${code}.mp3`],true,()=>{
|
||||||
if(isLight){
|
if(isLight){
|
||||||
this.wav = 1;
|
console.info(judgeTag,'播放结束:' + code)
|
||||||
console.info(judgeTag,'模拟灯光播放代码:' + code)
|
setTimeout(()=>{
|
||||||
|
this.wav = 1;
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -338,7 +361,7 @@ export default class Judge{
|
|||||||
const {judgeConfigObj,totalScore} = judgeUI
|
const {judgeConfigObj,totalScore} = judgeUI
|
||||||
|
|
||||||
if(judgeConfigObj['344'] == 1){
|
if(judgeConfigObj['344'] == 1){
|
||||||
prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '考试未结束,不允许手动退出!',
|
message: '考试未结束,不允许手动退出!',
|
||||||
duration: 4000
|
duration: 4000
|
||||||
});
|
});
|
||||||
@ -788,7 +811,6 @@ export default class Judge{
|
|||||||
let tempArr = [];
|
let tempArr = [];
|
||||||
arr.forEach(itemArr =>{ tempArr = tempArr.concat(itemArr)})
|
arr.forEach(itemArr =>{ tempArr = tempArr.concat(itemArr)})
|
||||||
this.serialIndex += 1;
|
this.serialIndex += 1;
|
||||||
console.log('kmkmkm2',tempArr.length)
|
|
||||||
return Array2Byte(tempArr)
|
return Array2Byte(tempArr)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -940,6 +962,7 @@ export default class Judge{
|
|||||||
handleTrajectoryUdp = async (strArr) => {
|
handleTrajectoryUdp = async (strArr) => {
|
||||||
const {fileLog} = this;
|
const {fileLog} = this;
|
||||||
let num = 2;
|
let num = 2;
|
||||||
|
const {usbService} = this;
|
||||||
const judgeTimer = setInterval(async ()=>{
|
const judgeTimer = setInterval(async ()=>{
|
||||||
const msg = JSON.parse(strArr[num]);
|
const msg = JSON.parse(strArr[num]);
|
||||||
await fileLog.setExamJudgeData(msg)
|
await fileLog.setExamJudgeData(msg)
|
||||||
@ -954,6 +977,11 @@ export default class Judge{
|
|||||||
this.tempData = msg
|
this.tempData = msg
|
||||||
this.plcData= msg
|
this.plcData= msg
|
||||||
globalThis.msgStr= ''
|
globalThis.msgStr= ''
|
||||||
|
const str = await senorToWXDataStr(msg);
|
||||||
|
//检测到有无锡所设备接入,需要发送特定的数据,供检测
|
||||||
|
if(usbService.isWXUSBDevice){
|
||||||
|
usbService.sendUSB(str)
|
||||||
|
}
|
||||||
await examJudgeRealExam(msg)
|
await examJudgeRealExam(msg)
|
||||||
num++
|
num++
|
||||||
},200)
|
},200)
|
||||||
@ -1019,6 +1047,7 @@ export default class Judge{
|
|||||||
private xmxh:string
|
private xmxh:string
|
||||||
private fileModel:FileModel
|
private fileModel:FileModel
|
||||||
private filePhoto:FilePhoto
|
private filePhoto:FilePhoto
|
||||||
|
private usbService:UsbService
|
||||||
//是否是考试模式
|
//是否是考试模式
|
||||||
private isExam:boolean
|
private isExam:boolean
|
||||||
//考试是否结束了
|
//考试是否结束了
|
||||||
|
|||||||
@ -301,6 +301,56 @@ export const plcStrToWXJson = async (plc:string) =>{
|
|||||||
return wuXiDataStr
|
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(){
|
export function sendBlue(){
|
||||||
const arrBlue = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00];
|
const arrBlue = [0x55, 0xaa, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00];
|
||||||
|
|||||||
@ -3,15 +3,14 @@
|
|||||||
//考试回放开关
|
//考试回放开关
|
||||||
export const judgeConfig = {
|
export const judgeConfig = {
|
||||||
//本地目录开关
|
//本地目录开关
|
||||||
isTrajectoryOpen: false,
|
isTrajectoryOpen: true,
|
||||||
//是否开启Udp
|
//是否开启Udp
|
||||||
udpOpen:false,
|
udpOpen:false,
|
||||||
// 本地模型地址
|
// 本地模型地址
|
||||||
modelPath: 'models/model_enc',
|
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
|
//0000000000001_342323199501470011_测试学员1_2024_04_28_10_59_44
|
||||||
// 模拟灯光轨迹
|
// 模拟灯光轨迹
|
||||||
// test_sub3_car_test_jinan-32038219990808021X-20240417092356.txt
|
// test_sub3_car_test_jinan-32038219990808021X-20240417092356.txt
|
||||||
|
|||||||
@ -1,11 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
examJudgeSetLogCallback,
|
|
||||||
examJudgeBeginExam,
|
|
||||||
examJudgeInit,
|
|
||||||
examJudgeRealExam,
|
|
||||||
examJudgeSetRealExamCallback,
|
|
||||||
examJudgeMapSetParam,
|
examJudgeMapSetParam,
|
||||||
examJudgeMapSetDrawing,
|
|
||||||
examJudgeMapSetScaling
|
examJudgeMapSetScaling
|
||||||
} from '../api/index'
|
} from '../api/index'
|
||||||
import systemTime from '@ohos.systemDateTime';
|
import systemTime from '@ohos.systemDateTime';
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import prompt from '@ohos.prompt'
|
import Prompt from '@system.prompt'
|
||||||
|
|
||||||
const TAG = 'SURENJUN_JUDGE'
|
const TAG = 'SURENJUN_JUDGE'
|
||||||
|
|
||||||
export default class JudgeTask{
|
export default class JudgeTask{
|
||||||
@ -17,8 +18,8 @@ export default class JudgeTask{
|
|||||||
try {
|
try {
|
||||||
await currentTask();
|
await currentTask();
|
||||||
}catch (e){
|
}catch (e){
|
||||||
console.info(TAG,'过程数据接口解析错误')
|
// console.info(TAG,'过程数据接口解析错误')
|
||||||
prompt.showToast({
|
Prompt.showToast({
|
||||||
message: '过程数据接口解析错误',
|
message: '过程数据接口解析错误',
|
||||||
duration: 3000
|
duration: 3000
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import media from '@ohos.multimedia.media';
|
import media from '@ohos.multimedia.media';
|
||||||
import prompt from '@ohos.prompt';
|
import Prompt from '@system.prompt';
|
||||||
|
|
||||||
const TAG = 'VoiceAnnounce'
|
const TAG = 'VoiceAnnounce'
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ class AVPlayer {
|
|||||||
url = await globalThis.context.resourceManager.getRawFd(name);
|
url = await globalThis.context.resourceManager.getRawFd(name);
|
||||||
this.avPlayer.fdSrc = url;
|
this.avPlayer.fdSrc = url;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
prompt.showToast({
|
Prompt.showToast({
|
||||||
message: `${name}语音文件不存在`,
|
message: `${name}语音文件不存在`,
|
||||||
duration: 4000
|
duration: 4000
|
||||||
});
|
});
|
||||||
|
|||||||
@ -9,7 +9,6 @@
|
|||||||
"pages/TerminalInfos",
|
"pages/TerminalInfos",
|
||||||
"pages/VideoConfig",
|
"pages/VideoConfig",
|
||||||
"pages/SignDisplay",
|
"pages/SignDisplay",
|
||||||
"pages/RealTime",
|
|
||||||
"pages/Roads",
|
"pages/Roads",
|
||||||
"pages/Judge"
|
"pages/Judge"
|
||||||
],
|
],
|
||||||
|
|||||||
BIN
entry/src/main/resources/rawfile/voice/10_01.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_01.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_02.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_02.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_03.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_03.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_04.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_04.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_05.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_05.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_06.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_06.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_101.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_101.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_102.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_102.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_103.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_103.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_104.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_104.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_105.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_105.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_106.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_106.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_107.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_107.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_41.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_41.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_42.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_42.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/10_43.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/10_43.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_01.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_01.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_02.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_02.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_03.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_03.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_04.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_04.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_05.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_05.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_06.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_06.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_07.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_07.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_08.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_08.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_09.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_09.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_10.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_10.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_101.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_101.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_102.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_102.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_41.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_41.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_42.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_42.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_43.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_43.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/11_44.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/11_44.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_01.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_01.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_02.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_02.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_04.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_04.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_101.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_101.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_102.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_102.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_103.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_103.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_104.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_104.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_41.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_41.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_42.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_42.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_44.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_44.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_45.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_45.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/12_46.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/12_46.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_01.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_01.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_02.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_02.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_03.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_03.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_04.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_04.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_05.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_05.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_06.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_06.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_08.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_08.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_09.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_09.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_101.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_101.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_102.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_102.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/13_103.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/13_103.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_01.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_01.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_02.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_02.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_66.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_66.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_67.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_67.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_68.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_68.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_71.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_71.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_72.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_72.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_82.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_82.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_90.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_90.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/14_91.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/14_91.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_01.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_01.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_02.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_02.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_03.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_03.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_04.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_04.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_05.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_05.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_06.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_06.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_101.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_101.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_102.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_102.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_103.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_103.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_41.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_41.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_42.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_42.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_43.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_43.mp3
Normal file
Binary file not shown.
BIN
entry/src/main/resources/rawfile/voice/15_44.mp3
Normal file
BIN
entry/src/main/resources/rawfile/voice/15_44.mp3
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user