fix: 版本号
This commit is contained in:
		
							parent
							
								
									8d7173c545
								
							
						
					
					
						commit
						3ee1b98b43
					
				| @ -5,9 +5,9 @@ | |||||||
|         "name": "default", |         "name": "default", | ||||||
|         "material": { |         "material": { | ||||||
|           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.cer", |           "certpath": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.cer", | ||||||
|           "storePassword": "0000001B0D8963A2149509CE4705E3453B788A74A9A4A6714814A79A4AA117A71A42C0D48243CE59D648EE", |           "storePassword": "0000001B16BF173FAE0A4B7B6556BEFBF019A66FA1332BD4CE16B85D6FDCDB05CDB01EBBC32A8B55F90168", | ||||||
|           "keyAlias": "debugKey", |           "keyAlias": "debugKey", | ||||||
|           "keyPassword": "0000001BABDF12118AF1E7E6AFF8D76FA6D89B08D9E1EC05B6A55CFDAABB51A25D3EA85D9B0E3570B4E666", |           "keyPassword": "0000001B2679DA5771C677985ED3A052179731797CD7638B37C0C5DE3D97C1041D0E80EB0D0947ADF133B0", | ||||||
|           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p7b", |           "profile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p7b", | ||||||
|           "signAlg": "SHA256withECDSA", |           "signAlg": "SHA256withECDSA", | ||||||
|           "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p12" |           "storeFile": "/Users/wangzhongjie/.ohos/config/openharmony/default_subject-two_Kl4t-ZSvZeuUm9s8O-e6FIH2VFR_OaNyhDP8kPjIWgU=.p12" | ||||||
|  | |||||||
| @ -1,13 +1,15 @@ | |||||||
| { | { | ||||||
|   "lockfileVersion": 1, |   "lockfileVersion": 2, | ||||||
|   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||||||
|   "specifiers": { |   "specifiers": { | ||||||
|     "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" |     "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" | ||||||
|   }, |   }, | ||||||
|   "packages": { |   "packages": { | ||||||
|     "@ohos/hypium@1.0.6": { |     "@ohos/hypium@1.0.6": { | ||||||
|       "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", |       "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", | ||||||
|       "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==" |       "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", | ||||||
|  |       "registryType": "ohpm", | ||||||
|  |       "shasum": "3f5fed65372633233264b3447705b0831dfe7ea1" | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
| @ -25,7 +25,7 @@ interface WR { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // 通用监管接口
 | // 通用监管接口
 | ||||||
| export async function writeObjectOut(params, filePath?: string): Promise<WR> { | export async function writeObjectOut(params, externalTransmission: boolean, filePath?: string): Promise<WR> { | ||||||
|   const singlePlay = globalThis.singlePlay |   const singlePlay = globalThis.singlePlay | ||||||
|   if (singlePlay) { |   if (singlePlay) { | ||||||
|     return { code: 1 } |     return { code: 1 } | ||||||
| @ -54,8 +54,7 @@ export async function writeObjectOut(params, filePath?: string): Promise<WR> { | |||||||
| 
 | 
 | ||||||
|   //新监管调用
 |   //新监管调用
 | ||||||
|   if (globalThis.isJGNew) { |   if (globalThis.isJGNew) { | ||||||
| 
 |     return await writeObjectOutNew(params, filePath, externalTransmission) | ||||||
|     return await writeObjectOutNew(params, filePath) |  | ||||||
|   } |   } | ||||||
|   drvexam.zp = drvexam.zp === undefined ? undefined : encodeURIComponent(drvexam.zp) |   drvexam.zp = drvexam.zp === undefined ? undefined : encodeURIComponent(drvexam.zp) | ||||||
| 
 | 
 | ||||||
| @ -189,7 +188,6 @@ export async function uploadExamMileage(params) { | |||||||
|                       <lsh>${params.lsh}<lsh> |                       <lsh>${params.lsh}<lsh> | ||||||
|                       <kskssj>${params.examinationRoomId}<kskssj> |                       <kskssj>${params.examinationRoomId}<kskssj> | ||||||
|                       <kslc>${params.kslc}<kslc> |                       <kslc>${params.kslc}<kslc> | ||||||
|                       <specialkf>${params.specialkf}<specialkf> |  | ||||||
|                     </body> |                     </body> | ||||||
|                 </uploadExamMileageReq>`,
 |                 </uploadExamMileageReq>`,
 | ||||||
|     method: 'post', |     method: 'post', | ||||||
|  | |||||||
| @ -1,4 +1,5 @@ | |||||||
| import libJudgeSdk from 'libJudgeSdk.so' | import libJudgeSdk from 'libJudgeSdk.so' | ||||||
|  | 
 | ||||||
| //@ts-ignore
 | //@ts-ignore
 | ||||||
| // import libJudgeSdk from '@ohos.judgesdk'
 | // import libJudgeSdk from '@ohos.judgesdk'
 | ||||||
| /** | /** | ||||||
| @ -12,7 +13,7 @@ import libJudgeSdk from 'libJudgeSdk.so' | |||||||
|  * |  * | ||||||
|  * @desc 获取版本信息 |  * @desc 获取版本信息 | ||||||
|  **/ |  **/ | ||||||
| export async function examJudgeVersion(){ | export async function examJudgeVersion() { | ||||||
|   return await libJudgeSdk.examJudgeVersion(); |   return await libJudgeSdk.examJudgeVersion(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -24,29 +25,29 @@ export async function examJudgeVersion(){ | |||||||
|  * @params callBack 日志操作回调 |  * @params callBack 日志操作回调 | ||||||
|  * @desc 设置评判日志级别和日志回调函数 |  * @desc 设置评判日志级别和日志回调函数 | ||||||
|  */ |  */ | ||||||
| export async function examJudgeSetLogCallback(level:number,handleLog:Function):Promise<string>{ | export async function examJudgeSetLogCallback(level: number, handleLog: Function): Promise<string> { | ||||||
|   const temp = libJudgeSdk.examJudgeSetLogCallback(level,handleLog); |   const temp = libJudgeSdk.examJudgeSetLogCallback(level, handleLog); | ||||||
|   return await handle(temp,'examJudgeSetLogCallback') |   return await handle(temp, 'examJudgeSetLogCallback') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  * |  * | ||||||
|  * @desc评判初始化 |  * @desc评判初始化 | ||||||
|  */ |  */ | ||||||
| export async function examJudgeInit(data){ | export async function examJudgeInit(data) { | ||||||
|   const str = JSON.stringify(data); |   const str = JSON.stringify(data); | ||||||
|   const temp = libJudgeSdk.examJudgeInit(str,str.length); |   const temp = libJudgeSdk.examJudgeInit(str, str.length); | ||||||
|   return await handle(temp,'examJudgeInit') |   return await handle(temp, 'examJudgeInit') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  * |  * | ||||||
|  * @desc 执行实时考试过程 实时传递传感信息 |  * @desc 执行实时考试过程 实时传递传感信息 | ||||||
|  */ |  */ | ||||||
| export async function examJudgeRealExam(data){ | export async function examJudgeRealExam(data) { | ||||||
|   const str = JSON.stringify(data); |   const str = JSON.stringify(data); | ||||||
|   const temp = libJudgeSdk.examJudgeRealExam(str,str.length); |   const temp = libJudgeSdk.examJudgeRealExam(str, str.length); | ||||||
|   return await handle(temp,'examJudgeRealExam') |   return await handle(temp, 'examJudgeRealExam') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
| @ -54,18 +55,18 @@ export async function examJudgeRealExam(data){ | |||||||
|  * @desc 设置评判输出的考试过程数据回调函数 |  * @desc 设置评判输出的考试过程数据回调函数 | ||||||
|  */ |  */ | ||||||
| //js_examJudgeSetRealExamCallback
 | //js_examJudgeSetRealExamCallback
 | ||||||
| export async function examJudgeSetRealExamCallback(fn){ | export async function examJudgeSetRealExamCallback(fn) { | ||||||
|   const temp = libJudgeSdk.examJudgeSetRealExamCallback(fn); |   const temp = libJudgeSdk.examJudgeSetRealExamCallback(fn); | ||||||
|   return await handle(temp,'examJudgeSetRealExamCallback') |   return await handle(temp, 'examJudgeSetRealExamCallback') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  * |  * | ||||||
|  * @desc 设置轨迹图像回调函数 |  * @desc 设置轨迹图像回调函数 | ||||||
|  */ |  */ | ||||||
| export async function examJudgeMapImageSetCallback(fn){ | export async function examJudgeMapImageSetCallback(fn) { | ||||||
|   const temp = libJudgeSdk.examJudgeMapImageSetCallback(fn); |   const temp = libJudgeSdk.examJudgeMapImageSetCallback(fn); | ||||||
|   return await handle(temp,'examJudgeMapImageSetCallback') |   return await handle(temp, 'examJudgeMapImageSetCallback') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
| @ -75,14 +76,14 @@ export async function examJudgeMapImageSetCallback(fn){ | |||||||
| 
 | 
 | ||||||
| export async function examJudgeArtificialMark( | export async function examJudgeArtificialMark( | ||||||
|   //项目代码
 |   //项目代码
 | ||||||
|   itemno:number, |   itemno: number, | ||||||
|   //扣分代码
 |   //扣分代码
 | ||||||
|   serial:string, |   serial: string, | ||||||
|   //扣分类型:number
 |   //扣分类型:number
 | ||||||
|   type:number |   type: number | ||||||
| ){ | ) { | ||||||
|   const temp = libJudgeSdk.examJudgeArtificialMark(itemno,serial,type); |   const temp = libJudgeSdk.examJudgeArtificialMark(itemno, serial, type); | ||||||
|   return await handle(temp,'examJudgeArtificialMark') |   return await handle(temp, 'examJudgeArtificialMark') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
| @ -91,12 +92,12 @@ export async function examJudgeArtificialMark( | |||||||
|  */ |  */ | ||||||
| export async function examJudgeArtificialItem( | export async function examJudgeArtificialItem( | ||||||
|   //项目代码
 |   //项目代码
 | ||||||
|   itemno:number, |   itemno: number, | ||||||
|   //操作类型
 |   //操作类型
 | ||||||
|   type:number = 0 |   type: number = 0 | ||||||
| ){ | ) { | ||||||
|   const temp = libJudgeSdk.examJudgeArtificialItem(itemno,type); |   const temp = libJudgeSdk.examJudgeArtificialItem(itemno, type); | ||||||
|   return await handle(temp,'examJudgeArtificialMark') |   return await handle(temp, 'examJudgeArtificialMark') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -104,9 +105,9 @@ export async function examJudgeArtificialItem( | |||||||
|  * |  * | ||||||
|  * @desc 设置地图轨迹图像绘制的开关 |  * @desc 设置地图轨迹图像绘制的开关 | ||||||
|  */ |  */ | ||||||
| export async function examJudgeMapSetDrawing(fn){ | export async function examJudgeMapSetDrawing(fn) { | ||||||
|   const temp = libJudgeSdk.examJudgeMapSetDrawing(fn); |   const temp = libJudgeSdk.examJudgeMapSetDrawing(fn); | ||||||
|   return await handle(temp,'examJudgeMapSetDrawing') |   return await handle(temp, 'examJudgeMapSetDrawing') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -114,17 +115,17 @@ export async function examJudgeMapSetDrawing(fn){ | |||||||
|  * |  * | ||||||
|  * @desc开始考试 |  * @desc开始考试 | ||||||
|  */ |  */ | ||||||
| export async function examJudgeBeginExam(data){ | export async function examJudgeBeginExam(data) { | ||||||
|   const str = JSON.stringify(data); |   const str = JSON.stringify(data); | ||||||
|   const temp = libJudgeSdk.examJudgeBeginExam(str,str.length); |   const temp = libJudgeSdk.examJudgeBeginExam(str, str.length); | ||||||
|   return await handle(temp,'examJudgeBeginExam') |   return await handle(temp, 'examJudgeBeginExam') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| /* @params level:日志等级,infoStr:日志信息,len:数据长度 | /* @params level:日志等级,infoStr:日志信息,len:数据长度 | ||||||
|  * @desc处理日志文件 |  * @desc处理日志文件 | ||||||
|  */ |  */ | ||||||
| export function handleLog(level,infoStr, len){ | export function handleLog(level, infoStr, len) { | ||||||
|   //TODO
 |   //TODO
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -132,45 +133,45 @@ export function handleLog(level,infoStr, len){ | |||||||
|  * @desc结束考试 |  * @desc结束考试 | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| export async function examJudgeEndExam(){ | export async function examJudgeEndExam() { | ||||||
|   const temp = libJudgeSdk.examJudgeEndExam(); |   const temp = libJudgeSdk.examJudgeEndExam(); | ||||||
|   return await handle(temp,'examJudgeEndExam') |   return await handle(temp, 'examJudgeEndExam') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *@desc examJudgeDestroy |  *@desc examJudgeDestroy | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| export async function examJudgeDestroy(){ | export async function examJudgeDestroy() { | ||||||
|   const temp = libJudgeSdk.examJudgeDestroy(); |   const temp = libJudgeSdk.examJudgeDestroy(); | ||||||
|   return await handle(temp,'examJudgeDestroy') |   return await handle(temp, 'examJudgeDestroy') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *@desc设置地图轨迹图像参数 |  *@desc设置地图轨迹图像参数 | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| export async function examJudgeMapSetParam(width:number,height:number){ | export async function examJudgeMapSetParam(width: number, height: number) { | ||||||
|   const temp = libJudgeSdk.examJudgeMapSetParam(width,height ); |   const temp = libJudgeSdk.examJudgeMapSetParam(width, height); | ||||||
|   return await handle(temp,'examJudgeMapSetParam') |   return await handle(temp, 'examJudgeMapSetParam') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *@desc设置地图图像缩放系数 |  *@desc设置地图图像缩放系数 | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| export async function examJudgeMapSetScaling(scaling?:number){ | export async function examJudgeMapSetScaling(scaling?: number) { | ||||||
|   const temp = libJudgeSdk.examJudgeMapSetScaling(scaling || 1); |   const temp = libJudgeSdk.examJudgeMapSetScaling(scaling || 1); | ||||||
|   return await handle(temp,'examJudgeMapSetScaling') |   return await handle(temp, 'examJudgeMapSetScaling') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* | /* | ||||||
|  *@desc设置考试过程数据回调 |  *@desc设置考试过程数据回调 | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| export async function examJudgeSetPerformCallback(fn){ | export async function examJudgeSetPerformCallback(fn) { | ||||||
|   const temp = libJudgeSdk.examJudgeSetPerformCallback(fn); |   const temp = libJudgeSdk.examJudgeSetPerformCallback(fn); | ||||||
|   return await handle(temp,'examJudgeSetPerformCallback') |   return await handle(temp, 'examJudgeSetPerformCallback') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
| @ -179,17 +180,17 @@ export async function examJudgeSetPerformCallback(fn){ | |||||||
|  * / |  * / | ||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| export async function examJudgeSoundEnd(param:{ | export async function examJudgeSoundEnd(param: { | ||||||
|   //项目代码
 |   //项目代码
 | ||||||
|   itemno:number, |   itemno: number, | ||||||
|   //语音码
 |   //语音码
 | ||||||
|   code:string, |   code: string, | ||||||
|   //语音类型
 |   //语音类型
 | ||||||
|   type:number, |   type: number, | ||||||
| }){ | }) { | ||||||
|   const {itemno,code,type} = param; |   const {itemno,code,type} = param; | ||||||
|   const temp = libJudgeSdk.examJudgeSoundEnd(itemno,code,type); |   const temp = libJudgeSdk.examJudgeSoundEnd(itemno, code, type); | ||||||
|   return await handle(temp,'examJudgeSoundEnd') |   return await handle(temp, 'examJudgeSoundEnd') | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
| @ -197,15 +198,15 @@ export async function examJudgeSoundEnd(param:{ | |||||||
|  * @desc 实时距离计算 |  * @desc 实时距离计算 | ||||||
|  * |  * | ||||||
|  * */ |  * */ | ||||||
| export async function examCalcGpsDistance(param:{ | export async function examCalcGpsDistance(param: { | ||||||
|   jd1:number, |   jd1: number, | ||||||
|   wd1:number, |   wd1: number, | ||||||
|   jd2:number, |   jd2: number, | ||||||
|   wd2:number, |   wd2: number, | ||||||
|   h:number |   h: number | ||||||
| }){ | }) { | ||||||
|   const {jd1,wd1,jd2,wd2,h} = param |   const {jd1,wd1,jd2,wd2,h} = param | ||||||
|   const temp = libJudgeSdk.examCalcGpsDistance(jd1,wd1,jd2,wd2,h); |   const temp = libJudgeSdk.examCalcGpsDistance(jd1, wd1, jd2, wd2, h); | ||||||
|   return await temp; |   return await temp; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -214,13 +215,21 @@ export async function examCalcGpsDistance(param:{ | |||||||
|  * @desc通用处理函数 |  * @desc通用处理函数 | ||||||
|  * |  * | ||||||
|  */ |  */ | ||||||
| async  function handle(temp,fnName):Promise<string>{ | async function handle(temp, fnName): Promise<string> { | ||||||
|   return new Promise((resolve,reject)=>{ |   return new Promise((resolve, reject) => { | ||||||
|     if(temp == 0){ |     if (temp == 0) { | ||||||
|       resolve(temp); |       resolve(temp); | ||||||
|     }else{ |     } else { | ||||||
|       console.log('surenjun error:' + `调用c++函数 ${fnName} 异常:`+ libJudgeSdk.examJudgeErrorInfo(temp*1)) |       console.log('surenjun error:' + `调用c++函数 ${fnName} 异常:` + libJudgeSdk.examJudgeErrorInfo(temp * 1)) | ||||||
|       reject(temp) |       reject(temp) | ||||||
|     } |     } | ||||||
|   }) |   }) | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * 获取cpu内存使用情况 | ||||||
|  |  * @returns | ||||||
|  |  */ | ||||||
|  | export function examPeerOccupy() { | ||||||
|  |   return libJudgeSdk.examPeerOccupy() | ||||||
|  | } | ||||||
| @ -73,7 +73,6 @@ export interface CARINFO { | |||||||
|   FLAG: string, |   FLAG: string, | ||||||
|   BK1: string, |   BK1: string, | ||||||
|   BK2: string |   BK2: string | ||||||
|   //脉冲里程设置
 |  | ||||||
|   X_MCH: string |   X_MCH: string | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @ -55,11 +55,10 @@ export default class FileModel{ | |||||||
|       return content; |       return content; | ||||||
|     }catch (e){ |     }catch (e){ | ||||||
|       console.info('surenjun',JSON.stringify(e)) |       console.info('surenjun',JSON.stringify(e)) | ||||||
|       // promptAction.showToast({
 |       promptAction.showToast({ | ||||||
|       //   message:`请检查模型路径${folderPath}/${fileName}是否正确!`,
 |         message:`请检查模型路径${folderPath}/${fileName}是否正确!`, | ||||||
|       //   duration:4000
 |         duration:4000 | ||||||
|       // })
 |       }) | ||||||
|       return ''; |  | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1,46 +1,30 @@ | |||||||
| import FileUtil from '../../../common/utils/File' | import FileUtil from '../../../common/utils/File' | ||||||
| import { takePhoto } from '../../../common/service/videoService'; | import { takePhoto } from '../../../common/service/videoService'; | ||||||
| import promptAction from '@ohos.promptAction'; | import promptAction from '@ohos.promptAction'; | ||||||
| import {judgeConfig} from './judgeConfig' | import { judgeConfig } from './judgeConfig' | ||||||
| 
 | 
 | ||||||
| interface Params{ | interface Params { | ||||||
|   userName:string |   userName: string | ||||||
|   pwd:string |   pwd: string | ||||||
|   ip:string |   ip: string | ||||||
|   port:string |   port: string | ||||||
|   rlls:string |   rlls: string | ||||||
|   pztd:string |   pztd: string | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export default class FilePhoto{ | export default class FilePhoto { | ||||||
| 
 |  | ||||||
|   private params:Params |  | ||||||
|   private context:any |  | ||||||
|   private fileUtil:FileUtil |  | ||||||
|   public mediaTest |   public mediaTest | ||||||
| 
 |   private params: Params | ||||||
|   constructor(context) { |   private context: any | ||||||
|     (async ()=>{ |  | ||||||
|       //TODO 309参数 获取拍照摄像头拍照通道
 |  | ||||||
|       const fileUtil = new FileUtil(context) |  | ||||||
|       const strConfig = await fileUtil.readFile('/mnt/hmdfs/100/account/device_view/local/files/duolun/config/config3.txt'); |  | ||||||
|       const config = JSON.parse(strConfig) |  | ||||||
|       const  {userName,ip,pwd,port,rlls,pztd} = config |  | ||||||
|       this.params = {userName,pwd,ip,port,rlls,pztd} |  | ||||||
|       this.context = context |  | ||||||
|       this.fileUtil = fileUtil |  | ||||||
|     })() |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   public getPhoto = async () => { |   public getPhoto = async () => { | ||||||
|     const {params} = this; |     const { params } = this; | ||||||
|     if(!judgeConfig.isPhotoOpen){ |     if (!judgeConfig.isPhotoOpen) { | ||||||
|       return '' |       return '' | ||||||
|     }else{ |     } else { | ||||||
|       try { |       try { | ||||||
|         console.info('surenjun','拍照开始') |         console.info('surenjun', '拍照开始') | ||||||
|         const res = await takePhoto(params, this.context, 'pz/',2); |         const res = await takePhoto(params, this.context, 'pz/', 2); | ||||||
|         console.info('surenjun','拍照结束' + JSON.stringify(res)) |         console.info('surenjun', '拍照结束' + JSON.stringify(res)) | ||||||
|         return res.base64 |         return res.base64 | ||||||
|       } catch (e) { |       } catch (e) { | ||||||
|         console.error('surenjun =>拍照异常' + JSON.stringify(e)) |         console.error('surenjun =>拍照异常' + JSON.stringify(e)) | ||||||
| @ -52,5 +36,26 @@ export default class FilePhoto{ | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |   private fileUtil: FileUtil | ||||||
| 
 | 
 | ||||||
|  |   constructor(context) { | ||||||
|  |     (async () => { | ||||||
|  |       //TODO 309参数 获取拍照摄像头拍照通道
 | ||||||
|  |       const fileUtil = new FileUtil(context) | ||||||
|  |       const strConfig = | ||||||
|  |         await fileUtil.readFile('/mnt/hmdfs/100/account/device_view/local/files/duolun/config/config3.txt'); | ||||||
|  |       const config = JSON.parse(strConfig) | ||||||
|  |       const { userName, ip, pwd, port, rlls, pztd } = config | ||||||
|  |       this.params = { | ||||||
|  |         userName, | ||||||
|  |         pwd, | ||||||
|  |         ip, | ||||||
|  |         port, | ||||||
|  |         rlls, | ||||||
|  |         pztd | ||||||
|  |       } | ||||||
|  |       this.context = context | ||||||
|  |       this.fileUtil = fileUtil | ||||||
|  |     })() | ||||||
|  |   } | ||||||
| } | } | ||||||
| @ -107,6 +107,8 @@ export function getKmProjectVoice( | |||||||
|   const param544Str = judgeConfig['544']?.split(',') || []; |   const param544Str = judgeConfig['544']?.split(',') || []; | ||||||
|   const param405Str = judgeConfig['405'] || 0; |   const param405Str = judgeConfig['405'] || 0; | ||||||
| 
 | 
 | ||||||
|  |   console.info('surenjun => param544Str.length',param544Str.length) | ||||||
|  | 
 | ||||||
|   const {num,count,road} = lane |   const {num,count,road} = lane | ||||||
|   if(examSubject == 2){ |   if(examSubject == 2){ | ||||||
|     return projectCode |     return projectCode | ||||||
| @ -317,14 +319,12 @@ export const plcStrToJson = async (plc:string) =>{ | |||||||
|     }, |     }, | ||||||
|     gps:{ |     gps:{ | ||||||
|       //办卡类型    定位差分状态
 |       //办卡类型    定位差分状态
 | ||||||
|       bklx:Number(p[56]), dwzt:p[83], |       bklx:p[56], dwzt:p[83], | ||||||
|       //@ts-ignore 角度差分状态
 |       //@ts-ignore 角度差分状态
 | ||||||
|       jdzt:p[92].split('-')[0]*1, |       jdzt:p[92].split('-')[0]*1, | ||||||
|       //一代机、三代机经纬度数据兼容
 |       //gps数据
 | ||||||
|       //gps时间 经度                                       纬度
 |       //gps时间 经度      纬度       航向角      俯仰角      海拔高       高度差     速度
 | ||||||
|       sj:time, jd:Math.max(Number(p[95]),Number(p[96])), wd:Math.min(Number(p[95]),Number(p[96])), |       sj:time, jd:p[96], wd:p[95], hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97], | ||||||
|       //航向角      俯仰角      海拔高       高度差     速度
 |  | ||||||
|       hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97], |  | ||||||
|       //龄期      经度因子     纬度因子      定位搜星数
 |       //龄期      经度因子     纬度因子      定位搜星数
 | ||||||
|       age:p[87], jdyz:p[89], wdyz:p[88], dwsxs:p[84] || 0, |       age:p[87], jdyz:p[89], wdyz:p[88], dwsxs:p[84] || 0, | ||||||
|       //@ts-ignore 角度搜星数
 |       //@ts-ignore 角度搜星数
 | ||||||
| @ -350,7 +350,7 @@ export const plcStrToWXJson = async (plc:string) =>{ | |||||||
|   const timeStr = p[93] + '' + p[94]; |   const timeStr = p[93] + '' + p[94]; | ||||||
|   const gps = { |   const gps = { | ||||||
|     //办卡类型    定位差分状态
 |     //办卡类型    定位差分状态
 | ||||||
|     bklx:Number(p[56]), dwzt:p[83], |     bklx:p[56], dwzt:p[83], | ||||||
|     // 经度      纬度       航向角      俯仰角      海拔高       高度差     速度
 |     // 经度      纬度       航向角      俯仰角      海拔高       高度差     速度
 | ||||||
|     jd:p[96], wd:p[95], hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97], |     jd:p[96], wd:p[95], hxj:p[90], fyj:p[91], hbg:p[85], gdc:p[86], sd:p[97], | ||||||
|     //龄期      经度因子     纬度因子      定位搜星数
 |     //龄期      经度因子     纬度因子      定位搜星数
 | ||||||
|  | |||||||
| @ -1,6 +1,7 @@ | |||||||
| //考试回放开关
 | //考试回放开关
 | ||||||
| export const judgeConfig = { | export const judgeConfig = { | ||||||
|   version:'2024.08.21.01', |   // 外壳版本号
 | ||||||
|  |   version: "2025.05.26.01", | ||||||
|   //本地目录开关
 |   //本地目录开关
 | ||||||
|   isTrajectoryOpen: false, |   isTrajectoryOpen: false, | ||||||
|   //是否开启拍照
 |   //是否开启拍照
 | ||||||
| @ -8,22 +9,22 @@ export const judgeConfig = { | |||||||
|   //扣分语音是否强制开启
 |   //扣分语音是否强制开启
 | ||||||
|   kfVoiceOpen: false, |   kfVoiceOpen: false, | ||||||
|   //忽略的考试项目
 |   //忽略的考试项目
 | ||||||
|   ignoreProjects:[], |   ignoreProjects: [], | ||||||
|   // 是否忽略考试前熄火、车门检查
 |   // 是否忽略考试前熄火、车门检查
 | ||||||
|   isCheckFireOpen: false, |   isCheckFireOpen: false, | ||||||
|   //轨迹回放是否开启Udp
 |   //轨迹回放是否开启Udp
 | ||||||
|   udpOpen:true, |   udpOpen: true, | ||||||
|   // 本地模型地址
 |   // 本地模型地址
 | ||||||
|   // modelPath: 'models/model_enc',
 |   modelPath: 'models/model_enc', | ||||||
|   // 济南科目三
 |   // 济南科目三
 | ||||||
|   trajectoryPath: 'logs/2025_04_23_09_50_55_2504755332926_320924199111132926_陈静/judge_exam_data.txt', |   trajectoryPath: 'logs/2024_10_12/2024_10_12_11_50_10_9999427676823_744299437502336256_隋统/judge_exam_data.txt', | ||||||
|   //四合一画面配置
 |   //四合一画面配置
 | ||||||
|   fourInOneScreen:{ |   fourInOneScreen: { | ||||||
|     //gps位数
 |     //gps位数
 | ||||||
|     gpsDigit:7 |     gpsDigit: 6 | ||||||
|   }, |   }, | ||||||
|   // 杭州科目二
 |   // 杭州科目二
 | ||||||
|   // trajectoryPath: 'logs/2024_07_19/0000000000001_342323199501470011_测试学员1_2024_07_19_06_49_12/judge_exam_data.txt',
 |   // trajectoryPath: 'logs/2024_07_19/0000000000001_342323199501470011_测试学员1_2024_07_19_06_49_12/judge_exam_data.txt',
 | ||||||
|   //TODO 济南临时特殊配置
 |   //TODO 济南临时特殊配置
 | ||||||
|   systemParamConfig:{} |   systemParamConfig: {} | ||||||
| } | } | ||||||
| @ -1,13 +1,15 @@ | |||||||
| { | { | ||||||
|   "lockfileVersion": 1, |   "lockfileVersion": 2, | ||||||
|   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", |   "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", | ||||||
|   "specifiers": { |   "specifiers": { | ||||||
|     "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" |     "@ohos/hypium@1.0.6": "@ohos/hypium@1.0.6" | ||||||
|   }, |   }, | ||||||
|   "packages": { |   "packages": { | ||||||
|     "@ohos/hypium@1.0.6": { |     "@ohos/hypium@1.0.6": { | ||||||
|       "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", |       "resolved": "https://ohpm.openharmony.cn/ohpm/@ohos/hypium/-/hypium-1.0.6.tgz", | ||||||
|       "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==" |       "integrity": "sha512-bb3DWeWhYrFqj9mPFV3yZQpkm36kbcK+YYaeY9g292QKSjOdmhEIQR2ULPvyMsgSR4usOBf5nnYrDmaCCXirgQ==", | ||||||
|  |       "registryType": "ohpm", | ||||||
|  |       "shasum": "3f5fed65372633233264b3447705b0831dfe7ea1" | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user