润和联网
This commit is contained in:
		
							parent
							
								
									5d075743ae
								
							
						
					
					
						commit
						0820ac658c
					
				
							
								
								
									
										
											BIN
										
									
								
								entry/src/.DS_Store
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								entry/src/.DS_Store
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								entry/src/main/.DS_Store
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								entry/src/main/.DS_Store
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| @ -16,7 +16,7 @@ import promptAction from '@ohos.promptAction'; | ||||
| import errorMsgDialog from './compontents/errorMsgDialog'; | ||||
| import GetDistance from '../common/utils/GetDistance'; | ||||
| import UdpEvent from '../common/utils/UdpEvent'; | ||||
| import { delPic } from '../common/service/videoService'; | ||||
| // import { delPic } from '../common/service/videoService'; | ||||
| import imageBtn from './compontents/imageBtn'; | ||||
| import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; | ||||
| 
 | ||||
| @ -395,8 +395,8 @@ struct Index { | ||||
|           console.log('syssyssyssys') | ||||
|           // this.delLoading=true | ||||
|           // globalThis.param854Str=sys.v_value | ||||
|           delPic(Number(sys.v_value), 1) | ||||
|           delPic(Number(sys.v_value), 2) | ||||
|           // delPic(Number(sys.v_value), 1) | ||||
|           // delPic(Number(sys.v_value), 2) | ||||
|           // this.delLoading=false | ||||
| 
 | ||||
|         } | ||||
| @ -618,12 +618,12 @@ struct Index { | ||||
|     getTCP() | ||||
|     this.deviceId = globalThis.carInfo.carNo | ||||
|     await setCurrentTime(); | ||||
|     if (!globalThis.distanceClass) { | ||||
|       const distanceClass = new GetDistance(globalThis.context) | ||||
|       await distanceClass.initFolder() | ||||
|       globalThis.distanceClass = distanceClass | ||||
|       console.info('surenjun', 'distanceClass=>初始化完成') | ||||
|     } | ||||
|     // if (!globalThis.distanceClass) { | ||||
|     //   const distanceClass = new GetDistance(globalThis.context) | ||||
|     //   await distanceClass.initFolder() | ||||
|     //   globalThis.distanceClass = distanceClass | ||||
|     //   console.info('surenjun', 'distanceClass=>初始化完成') | ||||
|     // } | ||||
|     this.carNum = globalThis.carInfo.plateNo; | ||||
|     this.version = globalThis.version; | ||||
|     this.hasAuth = globalThis.hasAuth; | ||||
|  | ||||
| @ -542,7 +542,7 @@ struct Index { | ||||
|     globalThis.carInfo.examSubject = this.examSubject | ||||
|     this.singlePlay = beginDataObj.exam == 0; | ||||
|     this.carName = initDataObj.name; | ||||
|     globalThis.singlePlay = beginDataObj.exam == 0; | ||||
|     // globalThis.singlePlay = beginDataObj.exam == 0; | ||||
|     await this.initSystemParam(initDataObj.systemparm) | ||||
|     await this.initMarkRules(initDataObj.mark); | ||||
|     await this.initSysset(initDataObj.sysset); | ||||
|  | ||||
| @ -1,6 +1,7 @@ | ||||
| import { GPSData, SignalData } from '../mock'; | ||||
| import { SignalDataType } from '../model'; | ||||
| import signDisplayCom from './compontents/signDisplayCom'; | ||||
| import TopLogo from './compontents/TopLogo'; | ||||
| 
 | ||||
| @Entry | ||||
| @Component | ||||
| @ -18,6 +19,7 @@ export default struct Index { | ||||
|   //  @State gpsList: Array<any> = [] | ||||
|   build() { | ||||
|     Column() { | ||||
|       TopLogo({ outFlag: $outFlag }).margin({ bottom: 25.5 * this.ratio }) | ||||
|       signDisplayCom({ | ||||
|         showBack: true | ||||
|       }) | ||||
|  | ||||
| @ -37,7 +37,7 @@ export default struct SignDisplayCom { | ||||
|       Column() { | ||||
|         Flex({ justifyContent: FlexAlign.SpaceBetween }) { | ||||
|           Row() { | ||||
|             Image($r('app.media.signal_logoS')).width(30 * this.ratio).height(24 * this.ratio) | ||||
|             // Image($r('app.media.signal_logoS')).width(30 * this.ratio).height(24 * this.ratio) | ||||
|             Row() { | ||||
|               Text('PLC信号').fontColor(this.active == 0 ? '#FFAD33' : '#e7cba3').fontSize(20 * this.ratio) | ||||
|             } | ||||
| @ -51,7 +51,7 @@ export default struct SignDisplayCom { | ||||
| 
 | ||||
|             }) | ||||
| 
 | ||||
|             if (this.showTrajectory) { | ||||
|             if (this.showTrajectory||true) { | ||||
|               Row() { | ||||
|                 Text('实时轨迹').fontColor(this.active == 1 ? '#FFAD33' : '#e7cba3').fontSize(20 * this.ratio) | ||||
|               } | ||||
| @ -82,20 +82,20 @@ export default struct SignDisplayCom { | ||||
|             }) | ||||
|           } | ||||
| 
 | ||||
|           Row() { | ||||
|             if (this.showBack) { | ||||
|               Image($r('app.media.topB_back')).height('12.2%') | ||||
|                 .onClick(() => { | ||||
|                   router.back() | ||||
|                   // this.url='back' | ||||
|                   // this.vocObj.playAudio({ | ||||
|                   //   type: 1, | ||||
|                   //   name: 'media_button.wav' | ||||
|                   // }) | ||||
|                   this.outFlag = true | ||||
|                 }) | ||||
|             } | ||||
|           } | ||||
|           // Row() { | ||||
|           //   if (this.showBack) { | ||||
|           //     Image($r('app.media.topB_back')).height('12.2%') | ||||
|           //       .onClick(() => { | ||||
|           //         router.back() | ||||
|           //         // this.url='back' | ||||
|           //         // this.vocObj.playAudio({ | ||||
|           //         //   type: 1, | ||||
|           //         //   name: 'media_button.wav' | ||||
|           //         // }) | ||||
|           //         this.outFlag = true | ||||
|           //       }) | ||||
|           //   } | ||||
|           // } | ||||
|         }.width(936 * this.ratio) | ||||
| 
 | ||||
|         Column() { | ||||
|  | ||||
| @ -78,6 +78,7 @@ export default struct RealTime { | ||||
|             .height(this.heightNumber) | ||||
|             .onLoad(() => { | ||||
|               libJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹,false:表示结束绘制 | ||||
| 
 | ||||
|             }) | ||||
|             .onDestroy(() => { | ||||
|               libJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹,false:表示结束绘制 | ||||
|  | ||||
| @ -64,7 +64,11 @@ export async function examJudgeSetRealExamCallback(fn){ | ||||
|  * @desc 设置轨迹图像回调函数 | ||||
|  */ | ||||
| export async function examJudgeMapImageSetCallback(fn){ | ||||
|   console.log('examJudgeMapexamJudgeMapImageSetCallbackStart') | ||||
| 
 | ||||
|   const temp = libJudgeSdk.examJudgeMapImageSetCallback(fn); | ||||
|   console.log('examJudgeMapexamJudgeMapImageSetCallbackEnd') | ||||
| 
 | ||||
|   return await handle(temp,'examJudgeMapImageSetCallback') | ||||
| } | ||||
| 
 | ||||
| @ -105,7 +109,10 @@ export async function examJudgeArtificialItem( | ||||
|  * @desc 设置地图轨迹图像绘制的开关 | ||||
|  */ | ||||
| export async function examJudgeMapSetDrawing(fn){ | ||||
|   console.log('examJudgeMapexamJudgeMapSetDrawingStart') | ||||
|   const temp = libJudgeSdk.examJudgeMapSetDrawing(fn); | ||||
|   console.log('examJudgeMapexamJudgeMapSetDrawingEnd') | ||||
| 
 | ||||
|   return await handle(temp,'examJudgeMapSetDrawing') | ||||
| } | ||||
| 
 | ||||
| @ -151,7 +158,11 @@ export async function examJudgeDestroy(){ | ||||
|  * | ||||
|  */ | ||||
| export async function examJudgeMapSetParam(width:number,height:number){ | ||||
|   console.log('examJudgeMapSetstart') | ||||
| 
 | ||||
|   const temp = libJudgeSdk.examJudgeMapSetParam(width,height ); | ||||
|   console.log('examJudgeMapSetEnd') | ||||
| 
 | ||||
|   return await handle(temp,'examJudgeMapSetParam') | ||||
| } | ||||
| 
 | ||||
| @ -160,7 +171,10 @@ export async function examJudgeMapSetParam(width:number,height:number){ | ||||
|  * | ||||
|  */ | ||||
| export async function examJudgeMapSetScaling(scaling?:number){ | ||||
|   console.log('examJudgeMapscanl') | ||||
|   const temp = libJudgeSdk.examJudgeMapSetScaling(scaling || 1); | ||||
|   console.log('examJudgeMapscanlend') | ||||
| 
 | ||||
|   return await handle(temp,'examJudgeMapSetScaling') | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -151,6 +151,7 @@ export default class Judge { | ||||
|   } | ||||
|   //获取科目三的评判初始化配置
 | ||||
|   getKm3JudgeInitConfig = async () => { | ||||
|     console.log('modelsmodels00') | ||||
|     const {judgeUI,getModelData} = this; | ||||
|     const {mapPointArr,mapPointItemArr} = judgeUI; | ||||
|     return { | ||||
| @ -702,6 +703,7 @@ export default class Judge { | ||||
| 
 | ||||
|   // 获取评判初始化数据
 | ||||
|   getJudgeInitData = async () => { | ||||
|     console.log('modelsmodels0000') | ||||
|     const {getModelData,getKm3JudgeInitConfig} = this | ||||
|     const carInfo = globalThis.carInfo; | ||||
|     const { examSubject,plateNo,carId } = carInfo; | ||||
| @ -721,6 +723,8 @@ export default class Judge { | ||||
|     } | ||||
|     //获取版本号
 | ||||
|     const sdkver = await examJudgeVersion(); | ||||
|     console.info(judgeTag, '3.1获取评判初始化数据完成') | ||||
| 
 | ||||
|     const initInfo = { | ||||
|       sdkver, | ||||
|       appver: globalThis.version, | ||||
| @ -1640,8 +1644,10 @@ export default class Judge { | ||||
| 
 | ||||
|   // 获取模型数据
 | ||||
|   getModelData = (modelName) => { | ||||
|     console.log('modelsmodels0') | ||||
|     const modelPath = this.modelPath | ||||
|     const fileModel = this.fileModel; | ||||
|     console.log('modelsmodels',modelPath,fileModel) | ||||
|     const modelData = fileModel.getModelContent(modelPath, modelName); | ||||
|     return modelData | ||||
|   } | ||||
| @ -1742,12 +1748,13 @@ export default class Judge { | ||||
|     let strArr = []; | ||||
|     if (isTrajectoryOpen) { | ||||
|       const folderPath = await this.fileUtil.initFolder(trajectoryPath); | ||||
|       console.log('surenjun','folderPath',folderPath) | ||||
|       const str = await fileUtil.readFile(folderPath) | ||||
|       strArr = str.split('\n') | ||||
|     } | ||||
|     //日志回调
 | ||||
|     console.info(judgeTag, '1.进入评判入口') | ||||
|     await examJudgeSetLogCallback(3, async (level, info, len) => { | ||||
|     await examJudgeSetLogCallback(6, async (level, info, len) => { | ||||
|       console.log('评判日志:' + info) | ||||
|       await fileLog.setExamJudgeLogData(info); | ||||
|     }) | ||||
| @ -1812,6 +1819,7 @@ export default class Judge { | ||||
|     // }
 | ||||
| 
 | ||||
|     this.judgeUI.draw = true | ||||
| 
 | ||||
|     // 处理轨迹plc信息
 | ||||
|     if (isTrajectoryOpen) { | ||||
|       handleTrajectoryUdp(strArr); | ||||
|  | ||||
| @ -22,6 +22,7 @@ export default class FileModel{ | ||||
|     const {fileUtil} = this | ||||
|     await fileUtil.initFolder(`/models/model_enc`); | ||||
|     const folderPath =  await fileUtil.initFolder(`/models`); | ||||
|     console.log('surenjun','modelsmodels',folderPath) | ||||
|     this.folderPath = folderPath; | ||||
|   } | ||||
| 
 | ||||
|  | ||||
| @ -1,21 +1,21 @@ | ||||
| //考试回放开关
 | ||||
| export const judgeConfig = { | ||||
|   //本地目录开关
 | ||||
|   isTrajectoryOpen: false, | ||||
|   isTrajectoryOpen: true, | ||||
|   //是否开启拍照
 | ||||
|   isPhotoOpen: true, | ||||
|   isPhotoOpen: false, | ||||
|   //扣分语音是否强制开启
 | ||||
|   kfVoiceOpen: false, | ||||
|   //忽略的考试项目
 | ||||
|   ignoreProjects:[], | ||||
|   // 是否忽略考试前熄火、车门检查
 | ||||
|   isCheckFireOpen: false, | ||||
|   isCheckFireOpen: true, | ||||
|   //轨迹回放是否开启Udp
 | ||||
|   udpOpen:true, | ||||
|   // 本地模型地址
 | ||||
|   modelPath: 'models/model_enc', | ||||
|   // 济南科目三
 | ||||
|   trajectoryPath: 'logs/2024_12_26/2024_12_26_14_12_51_2412505941910_370125200404041910_赵宇/judge_exam_data.txt', | ||||
|   trajectoryPath: 'logs/2024_10_12/2024_10_12_11_50_10_9999427676823_744299437502336256_隋统/judge_exam_data.txt', | ||||
|   //四合一画面配置
 | ||||
|   fourInOneScreen:{ | ||||
|     //gps位数
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user