Compare commits

...

6 Commits

Author SHA1 Message Date
Surenjun
b0a490441d fix:build-profile修改 2025-10-10 14:32:41 +08:00
Surenjun
c06a122de4 feat:新科目视觉类代码 2025-10-09 09:25:37 +08:00
Surenjun
158f6260db feat:新科目视觉类代码 2025-09-29 08:39:44 +08:00
Surenjun
50c16cb56a feat:新科目三&安全员代码 2025-09-24 15:49:29 +08:00
Surenjun
4fa6ad0544 feat:新科目三 2025-09-02 09:40:01 +08:00
Surenjun
b5c641c16b feat:新科目三开发 2025-08-27 13:50:20 +08:00
17 changed files with 808 additions and 12 deletions

View File

@ -9,12 +9,17 @@
],
"path": "./src/main/cpp/CMakeLists.txt",
"arguments": "",
"cppFlags": "",
"cppFlags": ""
},
"sourceOption": {
"workers": [
'./src/main/ets/workers/worker.ts'
]
},
"arkOptions": {
"types": [
"./src/main/ets/common/lidar/type"
]
}
},
"targets": [

View File

@ -0,0 +1,108 @@
import emitter from '@ohos.events.emitter';
import radarClient from './radar/index'
import visionClient from './vision/index'
import FileUtil from '../../common/utils/File';
import { GlobalConfig } from '../../config/index';
import { messageIds } from './type'
class Lidar {
public localRadarUdp: radarClient
public localVisionUdp: visionClient
//是否新科目三设备
private isNewKm3: Boolean
//雷达消息Ids
private radarMessageIds: messageIds = {}
///视觉消息Ids
private senseMessageIds: messageIds = {}
constructor() {
this.init()
}
async init() {
const fileUtil = new FileUtil(globalThis.context)
const addressStr = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/ipConfig.txt');
const {deviceType,deviceIpArr,devicePortArr,udplocalIp} = JSON.parse(addressStr);
//新科目三设备
if (deviceType == '2') {
//雷达UDP
this.localRadarUdp = new radarClient({
deviceIpArr, devicePortArr, udplocalIp
})
this.localRadarUdp.onRadarClientMessage(async (obj) => {
//广播注册的radar消息
Reflect.ownKeys(this.radarMessageIds).forEach((messageId: string) => {
emitter.emit({ eventId: this.radarMessageIds[messageId] }, { data: obj })
})
})
// this.localRadarUdp.onMessage((obj) => {
// //广播注册的radar消息
// Reflect.ownKeys(this.radarMessageIds).forEach((messageId:string) => {
// emitter.emit({eventId:this.radarMessageIds[messageId]},{data:obj})
// })
// })
//
// this.localVisionUdp.onMessage((obj) => {
// //广播注册的sense消息
// Reflect.ownKeys(this.senseMessageIds).forEach((messageId:string) => {
// emitter.emit({eventId:this.radarMessageIds[messageId]},{data:obj})
// })
// })
this.isNewKm3 = true;
}
//安全员&新科目三均需要视觉
this.localVisionUdp = new visionClient({
deviceIpArr, devicePortArr, udplocalIp
})
//TODO 初始化视觉设备
this.localVisionUdp.visionInit();
this.localVisionUdp.onVisionClientMessage(async (obj) => {
//广播注册的sense消息
Reflect.ownKeys(this.senseMessageIds).forEach((messageId: string) => {
emitter.emit({ eventId: this.senseMessageIds[messageId] }, { data: obj })
})
})
}
//监听雷达信息
async onRadarMsg(messageId: string, callback: Function) {
if (this.radarMessageIds[messageId] === undefined) {
const eventId = this.generateRandomNumber();
emitter.on({ eventId }, (data) => {
callback(data)
});
this.radarMessageIds[messageId] = eventId;
}
}
//监听视觉信息
async onSenseMsg(messageId: string, callback: Function) {
if (this.senseMessageIds[messageId] === undefined) {
const eventId = this.generateRandomNumber();
emitter.on({ eventId }, (data) => {
callback(data)
});
this.senseMessageIds[messageId] = eventId;
}
}
//关闭消息
async offMsg(type: 'radar' | 'vision', messageId: string) {
emitter.off(
[type === 'radar' ? this.radarMessageIds[messageId] : this.senseMessageIds][messageId]
)
delete [type === 'radar' ? this.radarMessageIds[messageId] : this.senseMessageIds][messageId]
}
//随机生成6位的id
generateRandomNumber() {
let num = '';
for (let i = 0; i < 6; i++) {
num += Math.floor(Math.random() * 10);
}
return Number(num);
}
}

View File

@ -0,0 +1,90 @@
import UdpClient from '../udpClient/index'
import emitter from '@ohos.events.emitter';
import {Machine,messageIds} from '../type'
import systemTime from '@ohos.systemDateTime';
//雷达消息Ids
export default class RadarClient{
public localRadarUdp: UdpClient
constructor(params:{
deviceIpArr:string[],
devicePortArr:number[],
udplocalIp:string
}) {
const {deviceIpArr,devicePortArr,udplocalIp} = params;
//雷达UDP
this.localRadarUdp = new UdpClient('radar', {
deviceIpArr, devicePortArr, udplocalIp
});
}
//雷达信息监听
async onRadarClientMessage(callback){
this.localRadarUdp.onClientMessage((radarStr)=>{
const radarObj = this.radarStrToObj(radarStr)
callback(radarObj)
console.log(radarStr+'');
});
}
// 雷达数据解析
async radarStrToObj(str:string){
//$MachineVision,30.950^0_-1_1_1,-1^-1_-1_-1_1,-1^-1_-1_-1_1,-1^-1_-1_-1_1,-1^-1_-1_-1_1,-1^-1_-1_-1_1,-1^-1_-1_-1_1,-1^-1_-1_-1_1,-1^-1_-1_-1_1,-1^-1_-1^-1,43083,0_0_0_0,-1^-1_-1_-1_1,-1^-1_-1_-1_1,-1^-1_-1_-1_1,10102264201.69632,1.1.1.2,0*+$VisualInfo,1_-7205_3480_-7300_3350_-7655_3610_-7560_3735_,*+[ { "bodyangle": "1.00", "bodyx": "0.490", "bodyy": "31.300", "elevation": "2.403", "geoangle": "323.90", "geolat": "29.92678975", "geolon": "119.89823128", "id": 1, "type": 2 } ]
const [machine, visual, obj] = str.split('+');
const machineArr = machine.split(',');
let tempObj:Machine = {};
tempObj.sj = await systemTime.getCurrentTime();
tempObj.xh = Number(machineArr[10]);
['qf', 'hf', 'zq', 'zh', 'yq', 'yh', 'zc', 'yc', 'zf'].forEach((c,index) => {
tempObj[c] = this.getMachineItem(machineArr[index + 1]);
});
['lq', 'lz', 'ly'].forEach((c,index) => {
tempObj[c] = this.getMachineItem(machineArr[index + 13]);
});
tempObj.wt = this.getMachineWt(machineArr[10])
tempObj.rc = this.getMachineRc(machineArr[12])
}
getMachineItem(str){
const strArr = str.split('_');
return {
//对象编号
bh:strArr[2],
//车类型
lx:strArr[3],
//纵向距离
jz:strArr[0].split('^')[0],
//横向距离
jh:strArr[0].split('^')[1],
//速度
sd:strArr[1]
}
}
//获取前方数据
getMachineWt(str){
return {
xz:str.split('_')[0].split('^')[0],
xh:str.split('_')[0].split('^')[1],
zz:str.split('_')[1].split('^')[0],
zh:str.split('_')[1].split('^')[1],
}
}
//获取绕车一周数据
getMachineRc(str){
return {
zh:str.split('_')[0],
yh:str.split('_')[1],
yq:str.split('_')[2],
zq:str.split('_')[3]
}
}
async offMessage(){
this.localRadarUdp.closeUdp()
}
}

View File

@ -0,0 +1,106 @@
interface visionType1 {
sj?: number
//置信度
df?: 0 | 1
//摇头旋转角度
yt?: number
//左右旋转角度
zy?: number
//上下点头角度
sx?: number
}
interface visionType2 {
sj?: number
//控制方向盘
fx?: number
//手伸出窗外
ch?: number
}
interface visionType3 {
sj?: number
//信号灯
xd?: string
//识别前方物体
wt: 0 | 1 | 2 | 3 | 4
//中心隔离设施或中心线
zx: 0 | 1 | -1
//后车超车信号灯
hc: string
}
interface MachineItem {
//对象编号
bh: number
//车类型
lx: number
//纵向距离
jz: number
//横向距离
jh: number
//速度
sd: number
}
export interface Machine {
sj?: number
//帧数
xh?: number
//本车道前方数据
qf?: MachineItem
//本车道后方数据
hf?: MachineItem
//左侧车道前方
zq?: MachineItem
//左侧车道后方
zh?: MachineItem
//右侧车道前方
yq?: MachineItem
//右侧车道后方
yh?: MachineItem
//左侧车道
zc?: MachineItem
//右侧车道
yc?: MachineItem
//左侧方向车道
zf?: MachineItem
//前方数据
wt?: {
//行人距离本车的距离(纵向距离)
xz: number
//行人距离本车的距离(横向向距离)
xh: number
//障碍物距离本车的距离(纵向距离)
zz: number
//障碍物距离本车的距离(横向距离)
zh: number
}
//绕车一车数据
rc?: {
//左后
zh: number
//右后
yh: number
//右前
yq: number
//左前
zq: number
},
//路口前方来车数据
lq?: MachineItem,
//路口左侧来车
lz?: MachineItem,
//路口右侧来车
ly?: MachineItem
[k: string]: any
}
export interface messageIds {
[k: string]: number;
}

View File

@ -0,0 +1,106 @@
import socket from '@ohos.net.socket';
import FileUtil from '../../../common/utils/File';
import { GlobalConfig } from '../../../config/index';
import {Machine} from '../type'
import promptAction from '@ohos.promptAction'
import systemTime from '@ohos.systemDateTime';
const TAG = 'LIDAUDP'
type TYPE = 'vision' | 'radar'
interface IPAPORT{
address:string,
port:number
}
interface Params{
deviceIpArr:string[],
devicePortArr:number[],
udplocalIp:string
}
export default class LidaUdpClient{
// 0: 视觉 1: 雷达
public type:TYPE
private udpClient:socket.UDPSocket
private localIp:string
private localSensePort: 33313
private localVisionPort: 33314
private params:Params
public message:string
constructor(type:TYPE,params:Params) {
this.type = type;
this.params = params
this.localIp = params.udplocalIp
}
async init(){
const {address,port} = await this.getIpAPort()
this.udpClient = socket.constructUDPSocketInstance();
//bind
await this.safeFn(async()=>{
await this.udpClient.bind({
address: this.localIp, port: port, family: 1
});
})
}
async onClientMessage(callback){
this.offMessage()
//message
this.udpClient.on('message',(buffer)=>{
const dataStr = this.arrayBuffetToStr(buffer.message);
callback(dataStr)
});
}
//arrayBuffer转string
arrayBuffetToStr(arrayBuffer){
let dataView = new DataView(arrayBuffer)
let str = ""
for (let i = 0; i < dataView?.byteLength; ++i) {
let c = String.fromCharCode(dataView?.getUint8(i))
if (c !== "\n") {
str += c
}
}
return str
}
//获取对应的IP和端口
async getIpAPort(): Promise<IPAPORT>{
const fileUtil = new FileUtil(globalThis.context)
const addressStr = await fileUtil.readFile(GlobalConfig.comoonfileWriteAddress + '/config/ipConfig.txt');
const {deviceIpArr,devicePortArr,udplocalIp} = JSON.parse(addressStr);
this.localIp = udplocalIp
return {
address:this.type === 'radar' ? deviceIpArr[0] : deviceIpArr[1],
port: Number(this.type === 'vision' ? devicePortArr[1] : devicePortArr[1])
}
}
async offMessage(){
this.udpClient.off('message')
}
async closeUdp(){
this.offMessage();
this.udpClient.close()
}
async safeFn(fn:Function){
try {
await fn()
} catch (e) {
console.info(TAG + JSON.stringify(e))
promptAction.showToast({
message: TAG + JSON.stringify(e),
duration: 3000
});
throw e
}
}
}

View File

@ -0,0 +1,106 @@
import UdpClient from '../udpClient/index'
import emitter from '@ohos.events.emitter';
import {messageIds} from '../type'
import systemTime from '@ohos.systemDateTime';
export default class VisionClient{
public localVisionUdp: UdpClient
constructor(params:{
deviceIpArr:string[],
devicePortArr:number[],
udplocalIp:string
}) {
const {deviceIpArr,devicePortArr,udplocalIp} = params;
//视觉UDP
this.localVisionUdp = new UdpClient('vision', {
deviceIpArr, devicePortArr, udplocalIp
});
}
// 视觉信息监听
public async onVisionClientMessage(callback){
this.localVisionUdp.onClientMessage((str) => {
const data = this.visionStrToObj(str)
callback(data)
})
}
// 视觉数据解析
async visionStrToObj(visionStr:string){
const visionDataArr = visionStr.split(',');
const [dataType, message] = [visionDataArr[3] , visionDataArr[4]];
const messageArr = (message || '').split('@')
const sj = await systemTime.getCurrentTime();
switch (dataType){
//头部姿态
case 'A204':return {
//系统时间戳
sj,
//置信度
df:Number(messageArr[0]),
//摇头旋转角度
yt:Number(messageArr[1]),
//左右旋转角度
zy:Number(messageArr[2]),
//上下点头角度
sx:Number(messageArr[3]),
}
//驾驶行为
case 'A206':return {
//系统时间戳
sj,
//控制方向盘
fx:Number(messageArr[0]),
//手伸出窗外
ch:Number(messageArr[1]),
}
//前方障碍物
case 'A205':return {
//系统时间戳
sj,
//信号灯
xd:messageArr[0],
//识别前方物体
wt:Number(messageArr[1]),
//中心隔离设施或中心线
zx:Number(messageArr[2]),
//后车超车信号
hc:messageArr[3]
}
}
//头部姿态 驾驶行为 前方障碍物
//$SBXS,85,20250603115529563,B202,赣A78QK6@360803200602253517@1@20250603115523132@@@@@李从星@001@@001@2506455453517,05,*SBJS
//$SBXS,213,20250603090553562,B207,邓凯倩@@320250603085259@000000100000001001001000@14@870@28520185@115902060@1@828@4294943473@359.8704@0@0@1111111111011111111111111111111100000000@0@0000000000@3142@0@0@@C1@赣A78QK6@0@001-001@360121200401040528,01,*SBJS
}
// 初始化指令
public async visionInit(){
//车牌号@时间戳@空@空@空@空@空
}
// 开始考试指令
async visionExamStart(){
//车牌号@考试身份证号@考试状态(1-考试考试0-结束考试)@开始考试时间@考试次数@考车信息@窗户标注信息@方向盘标注信息@考生姓名@安全员编号@是否合格(1-合格0-不合格)@安全员姓名@流水号
}
// 结束考试指令
async visionExamEnd(){}
// 开始录像
async visionStartRecord(){
//考车号_流水号_时间_扣分项目_扣分序号_倒退时长_顺延时长_是否扣分@关键值1_关键字2_关键字3@
}
// 结束录像
async visionEndRecord(){}
// 安全员信号传输
public async visionSignalSend(){
/*
* @考试员号@考车车型@车牌号@科目类型+@设备信号状态@速度@发动机转速@GPS (线)@GPS (线)
* @主天线位置@GPS (线)@GPS (线)@航向角@俯仰角@高程@项目状态@当前项目编号
* @场地设备编号@本次考试行驶总距离@扣分值@扣分项数量@n个扣分项序号@考车车型@车牌号
* @工控机是否在播报语音@安全员姓名
*/
}
}

View File

@ -218,6 +218,7 @@ export async function takePhoto(param, context, dir, flag = 1, callback?) {
// @ts-ignore
// var snapResult = rtsp_server.getVideoSnapshot(context, video_uri, '', dir);
if (flag == 0) {
//@ts-ignore
rtsp_server.detectVideoSnapshotSize(video_uri, fileName, (err, snapResult) => {
console.log("baohaowen_detectLoop round end size1:" + snapResult.fileSize);
callback({ fileSize: snapResult.fileSize, errorCode: snapResult.errorCode })

View File

@ -85,3 +85,7 @@ export const RoadData = [
{name:'形状',key:['InShapeAttr','ShapeNo','']},
{name:'路段点',key:['CrossPointNo']},
]
export const radarData = [
]

View File

@ -1121,6 +1121,9 @@ struct Index {
case '4':
return '#FF7566';
break;
case '5':
return '#FF7566';
break;
default:
return '#E6DECF';
break;

View File

@ -23,10 +23,15 @@ struct Index {
@State terTextList: string[] = ['一型机', '二型机', '三型机', '一体机']
@State cardTextList: string[] = ['北云', '天宝MB2']
@State netTextList: string[] = ['否', '是']
@State deviceTypeSelect: string[] = ['正常', '安全员','新科目三']
@State selectedTerType: number = 0
@State selectedCardType: number = 0
//是否启用网络差分
@State netOpen: number = 0
//设备应用类型
@State deviceType: number = 0
@State deviceIpArr: string[] = ['192.168.7.173', '192.168.7.173']
@State devicePortArr: string[] = ['8052', '8053']
// @State inputTextList2: string[] = []
// 112.80.35.83 11052
// @State inputTextList1: string[] = ['192.168.36.2','8084','192.168.36.200','20122','255.255.255.0','192.168.36.1','','','114.114.114.114','192.168.36.139','8000']
@ -118,7 +123,6 @@ struct Index {
})
}.width('51%').height('14%')
Row(){
Text('板卡类型')
.width('40%')
@ -140,6 +144,128 @@ struct Index {
})
}.width('49%').height('14%')
Row() {
Text('设备应用场景')
.width('40%')
.height('100%')
.fontColor('#E5CBA1')
.padding({ 'left': '35px' })
.fontSize(this.inputFontSize * this.ratio)
ForEach(this.deviceTypeSelect, (netText, index) => {
Radio({ value: netText, group: 'deviceRadioGroup' })
.borderColor('#E5CBA1')
.checked(index === this.deviceType)
.onChange((value: boolean) => {
if(value){
this.deviceType = index
}
})
Text(netText).fontSize(20).fontColor('#FFF')
})
}.width('52%').height('14%')
// 新科目三设备
if(this.deviceType == 1 || this.deviceType == 2){
Row() {
Text('雷达设备IP')
.width('40%')
.height('100%')
.fontColor('#E5CBA1')
.padding({ 'left': '35px' })
.fontSize(this.inputFontSize * this.ratio)
TextInput({ 'text':this.deviceIpArr[0] })
.width('50%')
.height('50%')
.fontColor('#fff')
.borderColor('#E6E0D8')
.borderRadius('10px')
.borderWidth('2px')
.fontSize(this.inputFontSize * this.ratio)
.padding({ top: 0, bottom: 0 })
.linearGradient({angle: 0,colors: [[0x403C36, 0.0], [0x4D473D, 0.34], [0x3D3A34, 1.0]] })
.onChange((value: string) => {
this.deviceIpArr[0] = value
})
}.width('50%').height('14%')
Row() {
Text('响应端口')
.width('40%')
.height('100%')
.fontColor('#E5CBA1')
.padding({ 'left': '35px' })
.fontSize(this.inputFontSize * this.ratio)
TextInput({ 'text':this.devicePortArr[0] })
.width('50%')
.height('50%')
.fontColor('#fff')
.borderColor('#E6E0D8')
.borderRadius('10px')
.borderWidth('2px')
.fontSize(this.inputFontSize * this.ratio)
.padding({ top: 0, bottom: 0 })
.linearGradient({
angle: 0,
colors: [[0x403C36, 0.0], [0x4D473D, 0.34], [0x3D3A34, 1.0]]
})
.onChange((value: string) => {
this.devicePortArr[0] = value
})
}.width('50%').height('14%')
}
// 安全员设备
if(this.deviceType == 2){
Row() {
Text('视觉设备IP')
.width('40%')
.height('100%')
.fontColor('#E5CBA1')
.padding({ 'left': '35px' })
.fontSize(this.inputFontSize * this.ratio)
TextInput({ 'text': this.deviceIpArr[1] })
.width('50%')
.height('50%')
.fontColor('#fff')
.borderColor('#E6E0D8')
.borderRadius('10px')
.borderWidth('2px')
.fontSize(this.inputFontSize * this.ratio)
.padding({ top: 0, bottom: 0 })
.linearGradient({
angle: 0,
colors: [[0x403C36, 0.0], [0x4D473D, 0.34], [0x3D3A34, 1.0]]
})
.onChange((value: string) => {
this.deviceIpArr[1] = value
})
}.width('50%').height('14%')
Row() {
Text('响应端口')
.width('40%')
.height('100%')
.fontColor('#E5CBA1')
.padding({ 'left': '35px' })
.fontSize(this.inputFontSize * this.ratio)
TextInput({ 'text': this.devicePortArr[1] })
.width('50%')
.height('50%')
.fontColor('#fff')
.borderColor('#E6E0D8')
.borderRadius('10px')
.borderWidth('2px')
.fontSize(this.inputFontSize * this.ratio)
.padding({ top: 0, bottom: 0 })
.linearGradient({
angle: 0,
colors: [[0x403C36, 0.0], [0x4D473D, 0.34], [0x3D3A34, 1.0]]
})
.onChange((value: string) => {
this.devicePortArr[1] = value;
})
}.width('50%').height('14%')
}
}
}
.width('95%')
@ -172,7 +298,10 @@ struct Index {
centerPort: this.inputTextList1[3],
terType: this.selectedTerType,
cardType: this.selectedCardType,
netOpen: this.netOpen
netOpen: this.netOpen,
deviceType: this.deviceType,
deviceIpArr: this.deviceIpArr,
devicePortArr: this.devicePortArr,
}
fileUtil.addFile(`${folderPath}/ipConfig.txt`, JSON.stringify(param), '')
// upDateTableByArray('IpConfigTable',[])
@ -247,6 +376,9 @@ struct Index {
this.selectedTerType = result.terType
this.selectedCardType = result.cardType
this.netOpen= result.netOpen
this.deviceType= result.deviceType || 0
this.deviceIpArr= result.deviceIpArr || ['','']
this.devicePortArr= result.devicePortArr || ['','']
console.log('surenjun', this.selectedTerType + '');
}

View File

@ -69,6 +69,18 @@ export default struct SignDisplayCom {
})
}
Row() {
Text('雷达数据').fontColor(this.active == 3 ? '#FFAD33' : '#e7cba3').fontSize(20 * this.ratio)
}
.backgroundImage(this.active == 3 ? $r('app.media.signal_tabS') : $r('app.media.signal_tab'))
.width(144 * this.ratio)
.height(50 * this.ratio)
.backgroundImageSize({ width: '100%', height: '100%' })
.justifyContent(FlexAlign.Center)
.onClick(() => {
this.active = 3
})
Row() {
Text('原始数据').fontColor(this.active == 2 ? '#FFAD33' : '#e7cba3').fontSize(20 * this.ratio)
}
@ -314,6 +326,30 @@ export default struct SignDisplayCom {
.backgroundImage($r('app.media.km_open'))
.backgroundImageSize({ width: '100%', height: '100%' })
.visibility(this.active == 1 ? Visibility.Visible : Visibility.None)
Row(){
Column() {
Column(){
Text('雷达').fontColor('#fff')
}
Column(){
Text('视觉').fontColor('#fff')
}
.height(436 * this.ratio)
}
.backgroundColor('#282828')
.width(this.ratio * 880)
.height(415 * this.ratio)
.margin({ left: 15 * this.ratio, top: 15 * this.ratio })
}
.width(936 * this.ratio)
.height(460 * this.ratio)
.margin({ left: 10 * this.ratio })
.padding({ left: 10 * this.ratio, right: 10 * this.ratio })
.backgroundImage($r('app.media.km_open'))
.backgroundImageSize({ width: '100%', height: '100%' })
.visibility(this.active == 3 ? Visibility.Visible : Visibility.None)
}
.width('100%')
.height('100%')
@ -323,6 +359,8 @@ export default struct SignDisplayCom {
aboutToDisappear() {
clearInterval(this.interval)
//TODO
console.info('surenjun','123')
}
async aboutToAppear() {

View File

@ -44,7 +44,7 @@ export default struct RealTime {
Row() {
Column() {
Row() {
Text('车道信息').fontColor(this.gpsActive == 0 ? '#2D3C5A' : '#fff').fontSize(20)
Text('车道信息').fontColor(this.gpsActive == 0 ? '#2D3C5A' : '#fff').fontSize(14)
}
.width('100%')
.height(37)

View File

@ -1 +1,86 @@
{"code":1,"data":{"videoChapterList":[{"chapterId":"8","chapterName":"第一章:驾驶证的基本信息、申领和使用","code":"1001","name":"驾驶证申领与使用机动车登记","subjectType":"1","count":"4","chapterVideoList":[{"videoId":"95","name":"第一课:准驾车型","title":"准驾车型是指什么样的驾驶证能开什么样的车我国总计有16种驾照按照ABCD的顺序划分。","photoUrl":"https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822259WBGURTDW.png","videoUrl":"https://ddjdvideo.duolunxc.com/d8cca146136b4036a193ec1c72a1ad84/2e2c2ed873d24f239cd5ca1cb9756bd1-81fdf63dd56b4dfce8ee63e8807d291f-ld.m3u8?auth_key=1726196458-4dd8bdf313b945808f2a62032d00d846-0-14b7843e2ba491a1918177784e37d772","viewCount":50766,"questCount":0,"isView":"0"},{"videoId":"61","name":"第二课:驾驶证的申请条件","title":"驾驶证申请条件,分为年龄条件、身体条件和禁止条件。","photoUrl":"https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/16588222718TK8QETW.png","videoUrl":"https://ddjdvideo.duolunxc.com/b95873736b3e4f1dbd94159c4f88d3c2/fb0562a3d19b40189f7dc2ce8d2b18f6-b8ca137e222c55292b19abeb9472f7b4-ld.m3u8?auth_key=1726196458-185f9fc53e614fd7bc117f2f16e87066-0-9b40a712d59de2385daf195af77df644","viewCount":55988,"questCount":0,"isView":"0"},{"videoId":"96","name":"第三课:初次申请及增加准驾车型","title":"准驾车型的16种车型中有三种是不可以初次申请的包括大型客车A1、牵引车A2、中型客车B1。","photoUrl":"https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822248BLOG5F77.png","videoUrl":"https://ddjdvideo.duolunxc.com/583e26489a714e0c9713de49e297cd52/f8a0eb3a29924468a2be4278b82e84d1-39adbbdba4e730b4615416e186981d91-ld.m3u8?auth_key=1726196459-f37ddff500984ad9913a457914d4b7d9-0-33fa677f8c8e2f2c384d5a133a5a7511","viewCount":19449,"questCount":0,"isView":"0"},{"videoId":"97","name":"第四课:驾驶考试","title":"驾驶考试的内容及标准。","photoUrl":"https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822237ECGG1PQV.png","videoUrl":"https://ddjdvideo.duolunxc.com/84b4a019330b41b48b93818596e1baa2/6a0b423ba95f41f5834ea3c6c4e7e6ab-184dc5731e236cb26fe1a6abf890ae4f-ld.m3u8?auth_key=1726196459-a1daf329320a49b0a19d36c16fbcd398-0-a99a54448590acfde0d26fa0de3dcdd3","viewCount":18434,"questCount":0,"isView":"0"}]},{"chapterId":"10","chapterName":"第一章:文明驾驶","code":"4001","name":"安全文明驾驶常识","subjectType":"4","count":"3","chapterVideoList":[{"videoId":"111","name":"第一课:安全驾驶基础知识","title":"驾驶机动车上道路行驶,驾驶人首先要确保自己处于良好的驾驶状态,避免不文明的驾驶状态和行为会为自己和他人的生命安全埋下隐患。","photoUrl":"https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822228B0QUTOS9.png","videoUrl":"https://ddjdvideo.duolunxc.com/a9c572ca6fb24c0b86c4bb822bc9559d/3b9c3452052d48c695d3bc7701b7e0d2-beb7fa718d09f342c0343f248501ec10-ld.m3u8?auth_key=1726196459-c79a4890ea2745ceb312469186afdfa0-0-47b4001a778636678c70c2feb4d42586","viewCount":22494,"questCount":0,"isView":"0"},{"videoId":"112","name":"第二课:常见的不文明驾驶行为","title":"不遵守交通法律法规的行为,既属于违法行为,也是不文明的驾驶行为,驾驶人应该增加文明驾驶意识,自觉遵守交通规则,安全第一。","photoUrl":"https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822219GA9GTG2J.png","videoUrl":"https://ddjdvideo.duolunxc.com/1bdea813f93a456e890defd3f6d24a42/178aa73b657444989b543dfcd386b4ab-2045d439a68331e4c7b8b1a511d698e1-ld.m3u8?auth_key=1726196459-6d161bab98394c8f981a5df4b07ff77f-0-9527085c0efc3ca3befcb4025b1db1a5","viewCount":10562,"questCount":0,"isView":"0"},{"videoId":"113","name":"第三课:文明礼让驾驶","title":"
{
"code": 1,
"data": {
"videoChapterList": [
{
"chapterId": "8",
"chapterName": "第一章:驾驶证的基本信息、申领和使用",
"code": "1001",
"name": "驾驶证申领与使用机动车登记",
"subjectType": "1",
"count": "4",
"chapterVideoList": [
{
"videoId": "95",
"name": "第一课:准驾车型",
"title": "准驾车型是指什么样的驾驶证能开什么样的车我国总计有16种驾照按照ABCD的顺序划分。",
"photoUrl": "https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822259WBGURTDW.png",
"videoUrl": "https://ddjdvideo.duolunxc.com/d8cca146136b4036a193ec1c72a1ad84/2e2c2ed873d24f239cd5ca1cb9756bd1-81fdf63dd56b4dfce8ee63e8807d291f-ld.m3u8?auth_key=1726196458-4dd8bdf313b945808f2a62032d00d846-0-14b7843e2ba491a1918177784e37d772",
"viewCount": 50766,
"questCount": 0,
"isView": "0"
},
{
"videoId": "61",
"name": "第二课:驾驶证的申请条件",
"title": "驾驶证申请条件,分为年龄条件、身体条件和禁止条件。",
"photoUrl": "https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/16588222718TK8QETW.png",
"videoUrl": "https://ddjdvideo.duolunxc.com/b95873736b3e4f1dbd94159c4f88d3c2/fb0562a3d19b40189f7dc2ce8d2b18f6-b8ca137e222c55292b19abeb9472f7b4-ld.m3u8?auth_key=1726196458-185f9fc53e614fd7bc117f2f16e87066-0-9b40a712d59de2385daf195af77df644",
"viewCount": 55988,
"questCount": 0,
"isView": "0"
},
{
"videoId": "96",
"name": "第三课:初次申请及增加准驾车型",
"title": "准驾车型的16种车型中有三种是不可以初次申请的包括大型客车A1、牵引车A2、中型客车B1。",
"photoUrl": "https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822248BLOG5F77.png",
"videoUrl": "https://ddjdvideo.duolunxc.com/583e26489a714e0c9713de49e297cd52/f8a0eb3a29924468a2be4278b82e84d1-39adbbdba4e730b4615416e186981d91-ld.m3u8?auth_key=1726196459-f37ddff500984ad9913a457914d4b7d9-0-33fa677f8c8e2f2c384d5a133a5a7511",
"viewCount": 19449,
"questCount": 0,
"isView": "0"
},
{
"videoId": "97",
"name": "第四课:驾驶考试",
"title": "驾驶考试的内容及标准。",
"photoUrl": "https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822237ECGG1PQV.png",
"videoUrl": "https://ddjdvideo.duolunxc.com/84b4a019330b41b48b93818596e1baa2/6a0b423ba95f41f5834ea3c6c4e7e6ab-184dc5731e236cb26fe1a6abf890ae4f-ld.m3u8?auth_key=1726196459-a1daf329320a49b0a19d36c16fbcd398-0-a99a54448590acfde0d26fa0de3dcdd3",
"viewCount": 18434,
"questCount": 0,
"isView": "0"
}
]
},
{
"chapterId": "10",
"chapterName": "第一章:文明驾驶",
"code": "4001",
"name": "安全文明驾驶常识",
"subjectType": "4",
"count": "3",
"chapterVideoList": [
{
"videoId": "111",
"name": "第一课:安全驾驶基础知识",
"title": "驾驶机动车上道路行驶,驾驶人首先要确保自己处于良好的驾驶状态,避免不文明的驾驶状态和行为会为自己和他人的生命安全埋下隐患。",
"photoUrl": "https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822228B0QUTOS9.png",
"videoUrl": "https://ddjdvideo.duolunxc.com/a9c572ca6fb24c0b86c4bb822bc9559d/3b9c3452052d48c695d3bc7701b7e0d2-beb7fa718d09f342c0343f248501ec10-ld.m3u8?auth_key=1726196459-c79a4890ea2745ceb312469186afdfa0-0-47b4001a778636678c70c2feb4d42586",
"viewCount": 22494,
"questCount": 0,
"isView": "0"
},
{
"videoId": "112",
"name": "第二课:常见的不文明驾驶行为",
"title": "不遵守交通法律法规的行为,既属于违法行为,也是不文明的驾驶行为,驾驶人应该增加文明驾驶意识,自觉遵守交通规则,安全第一。",
"photoUrl": "https://duolunstorage.oss-cn-hangzhou.aliyuncs.com/archive/ddjd/202207/1658822219GA9GTG2J.png",
"videoUrl": "https://ddjdvideo.duolunxc.com/1bdea813f93a456e890defd3f6d24a42/178aa73b657444989b543dfcd386b4ab-2045d439a68331e4c7b8b1a511d698e1-ld.m3u8?auth_key=1726196459-6d161bab98394c8f981a5df4b07ff77f-0-9527085c0efc3ca3befcb4025b1db1a5",
"viewCount": 10562,
"questCount": 0,
"isView": "0"
},
{
"videoId": "113",
"name": "第三课:文明礼让驾驶",
"title": "

View File

@ -209,6 +209,18 @@ export async function examCalcGpsDistance(param:{
return await temp;
}
/**
* @desc
*
*/
/**
* @desc
*
*/
/*
* @desc通用处理函数

View File

@ -934,6 +934,8 @@ export default class Judge {
this.judgeUI.totalScore += thisKf.score * 1;
if (kf.xmdm != 20) {
const type = judgeUI.projectsObj[kf.xmdm].type;
console.info('surejun kf=>',JSON.stringify(kf))
console.info('surejun kf_type=>',type)
judgeUI.projectsObj[kf.xmdm].type = (type == 3 || type == 4) ? '4' : '5';
}
break;
@ -956,11 +958,11 @@ export default class Judge {
console.info(judgeTag, '项目取消');
const {examSubject} = this.judgeUI
const xmdm = xmqx.xmdm;
const xmmcCode = judgeUI.projectsObj[xmdm].projectCodeCenter;
const xmmcCode1 = judgeUI.projectsObj[xmdm].projectCodeCenter;
// const voiceCode = getKmProjectCancelVoice(examSubject, xmmcCode);
// avPlayer.playAudio([`voice/${voiceCode}.mp3`],true)
this.judgeUI.projectsObj[xmdm].type = '1';
this.testKmItems[xmmcCode].status = '1';
this.testKmItems[xmmcCode1].status = '1';
break;
}

View File

@ -2,9 +2,9 @@
export const judgeConfig = {
version:'2024.08.21.01',
//本地目录开关
isTrajectoryOpen: false,
isTrajectoryOpen: true,
//是否开启拍照
isPhotoOpen: true,
isPhotoOpen: false,
//扣分语音是否强制开启
kfVoiceOpen: false,
//忽略的考试项目
@ -16,14 +16,12 @@ export const judgeConfig = {
// 本地模型地址
// modelPath: 'models/model_enc',
// 济南科目三
trajectoryPath: 'logs/2025_04_23_09_50_55_2504755332926_320924199111132926_陈静/judge_exam_data.txt',
trajectoryPath: 'logs/2025_06_20_08_20_09_2250107217821_340823199508126112_左江辉/judge_exam_data.txt',
//四合一画面配置
fourInOneScreen:{
//gps位数
gpsDigit:7
},
// 杭州科目二
// trajectoryPath: 'logs/2024_07_19/0000000000001_342323199501470011_测试学员1_2024_07_19_06_49_12/judge_exam_data.txt',
//TODO 济南临时特殊配置
systemParamConfig:{}
}