Merge branch 'dev' of http://88.22.24.105:3000/harmony_car/subject-two into dev
This commit is contained in:
		
						commit
						04b75c3a9e
					
				| @ -82,7 +82,6 @@ export default class UdpByOne { | |||||||
|         address: this.OppositeIp, |         address: this.OppositeIp, | ||||||
|         port: parseInt(this.PLCOppositeIpPort), |         port: parseInt(this.PLCOppositeIpPort), | ||||||
|       } |       } | ||||||
| 
 |  | ||||||
|     }) |     }) | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -119,6 +118,8 @@ export default class UdpByOne { | |||||||
|   public handleMsg() { |   public handleMsg() { | ||||||
|     let newMessage = PLCGPSData; |     let newMessage = PLCGPSData; | ||||||
|     if (this.GPSMsg) { |     if (this.GPSMsg) { | ||||||
|  |       //let GPRMCMsgArr = GPRMCMatch ? GPRMCMatch === null || GPRMCMatch === void 0 ? void 0 : GPRMCMatch.split(",").slice(0, 14) : [];
 | ||||||
|  | 
 | ||||||
|       let GPGGAMatch = this.GPSMsg.match(/\$GPGGA[^$]*/); |       let GPGGAMatch = this.GPSMsg.match(/\$GPGGA[^$]*/); | ||||||
|       let GPGGAMsgArr = GPGGAMatch ? GPGGAMatch[0]?.split(",").slice(0, 15) : []; |       let GPGGAMsgArr = GPGGAMatch ? GPGGAMatch[0]?.split(",").slice(0, 15) : []; | ||||||
|       //   使用正则提取$GPRMC消息
 |       //   使用正则提取$GPRMC消息
 | ||||||
| @ -131,29 +132,33 @@ export default class UdpByOne { | |||||||
|       let PTNLMatch = this.GPSMsg.match(/\$PTNL[^$]*/); |       let PTNLMatch = this.GPSMsg.match(/\$PTNL[^$]*/); | ||||||
|       let PTNLMsgArr = PTNLMatch ? PTNLMatch[0].split(",")?.slice(0, 14) : []; |       let PTNLMsgArr = PTNLMatch ? PTNLMatch[0].split(",")?.slice(0, 14) : []; | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|       //   组合GPS数据
 |       //   组合GPS数据
 | ||||||
|       // 状态83
 |       // 状态83
 | ||||||
|       newMessage[83] = GPGGAMsgArr[6]; |       newMessage[83] = GPGGAMsgArr[6]; | ||||||
|       // 收星数84
 |       // 收星数84
 | ||||||
|       newMessage[84] = GPGGAMsgArr[7]; |       newMessage[84] = GPGGAMsgArr[7]; | ||||||
|       // 海拔高85
 |       // 海拔高85
 | ||||||
|       newMessage[80] = GPGGAMsgArr[9]; |       newMessage[85] = GPGGAMsgArr[9]; | ||||||
|       // 高度差86
 |       // 高度差86
 | ||||||
|  |       newMessage[86] = GPGGAMsgArr[11]; | ||||||
|       // 龄期87
 |       // 龄期87
 | ||||||
|       newMessage[87] = GPGGAMsgArr[13]; |       newMessage[87] = GPGGAMsgArr[13]; | ||||||
|       // 维度因子88
 |       // 维度因子88
 | ||||||
|  |       newMessage[88] = GPGSTMsgArr[6]; | ||||||
|       // 经度因子89
 |       // 经度因子89
 | ||||||
|  |       newMessage[89] = GPGSTMsgArr[7]; | ||||||
|       // 航向角90
 |       // 航向角90
 | ||||||
|       newMessage[90] = PTNLMsgArr[3]; |       newMessage[90] = PTNLMsgArr[3]; | ||||||
|       // 俯仰角91
 |       // 俯仰角91
 | ||||||
|       newMessage[91] = PTNLMsgArr[5]; |       newMessage[91] = PTNLMsgArr[5]; | ||||||
|       // 航向角状态-收星数92
 |       // 航向角状态-收星数92
 | ||||||
|       newMessage[92] = PTNLMsgArr[10] + '-' + PTNLMsgArr[12].split('*')[0]; |       newMessage[92] = PTNLMsgArr[10] + '-' + (PTNLMsgArr[12] && PTNLMsgArr[12].split('*')[0]); | ||||||
|       //  年月日93 RMCMsgArr[9]为ddmmyy 日月年 转换为年月日
 |       //  年月日93 RMCMsgArr[9]为ddmmyy 日月年 转换为年月日
 | ||||||
|       newMessage[93] = |       newMessage[93] = | ||||||
|         GPRMCMsgArr[9].slice(0, 2) + GPRMCMsgArr[9].slice(2, 4) + GPRMCMsgArr[9].slice(4, 6); |         GPRMCMsgArr[9] && (GPRMCMsgArr[9].slice(0, 2) + GPRMCMsgArr[9].slice(2, 4) + GPRMCMsgArr[9].slice(4, 6)); | ||||||
|       // 时分秒94 GPGGAMsgArr[1]为021126.00去掉小数点后的时间
 |       // 时分秒94 GPGGAMsgArr[1]为021126.00去掉小数点后的时间
 | ||||||
|       newMessage[94] = GPGGAMsgArr[1].replace(".", ""); |       newMessage[94] = GPGGAMsgArr[1] && GPGGAMsgArr[1].replace(".", ""); | ||||||
|       // 经度95
 |       // 经度95
 | ||||||
|       newMessage[95] = GPGGAMsgArr[4]; |       newMessage[95] = GPGGAMsgArr[4]; | ||||||
|       // 纬度96
 |       // 纬度96
 | ||||||
| @ -274,7 +279,7 @@ export default class UdpByOne { | |||||||
|       // 改正数数据长度*数据长度-基准站RTCM改正数类型 62
 |       // 改正数数据长度*数据长度-基准站RTCM改正数类型 62
 | ||||||
|     } |     } | ||||||
|     return newMessage.map(i=>{ |     return newMessage.map(i=>{ | ||||||
|       return i === undefined?'':i |       return i === undefined ? '' : i | ||||||
|     }).join(",") |     }).join(",") | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -246,6 +246,9 @@ export default class UdpClientByCenter { | |||||||
|       for (let i = 0; i < dataView?.byteLength; ++i) { |       for (let i = 0; i < dataView?.byteLength; ++i) { | ||||||
|         arr[i] = dataView?.getUint8(i) |         arr[i] = dataView?.getUint8(i) | ||||||
|       } |       } | ||||||
|  |       if(!arr.length){ | ||||||
|  |         return | ||||||
|  |       } | ||||||
|       let idNum = '0x' + fillZero(arr[1].toString(16), 2) + fillZero(arr[0].toString(16), 2); |       let idNum = '0x' + fillZero(arr[1].toString(16), 2) + fillZero(arr[0].toString(16), 2); | ||||||
|       let id = Math.floor(+idNum / 1000) |       let id = Math.floor(+idNum / 1000) | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -111,6 +111,7 @@ struct Index { | |||||||
|       FLAG: carInfo.flag, |       FLAG: carInfo.flag, | ||||||
|       BK1: carInfo.bk1, |       BK1: carInfo.bk1, | ||||||
|       BK2: carInfo.bk2, |       BK2: carInfo.bk2, | ||||||
|  |       X_MCH:carInfo.x_mch, | ||||||
|     }) |     }) | ||||||
|     console.info('surenjun =>carinfoArrr',JSON.stringify( this.carinfoArr)) |     console.info('surenjun =>carinfoArrr',JSON.stringify( this.carinfoArr)) | ||||||
|   } |   } | ||||||
|  | |||||||
| @ -90,6 +90,7 @@ struct UserInfo { | |||||||
|     'Param364': '0', //考前上车准备 |     'Param364': '0', //考前上车准备 | ||||||
|     'Param398': '0', //考前上车准备 |     'Param398': '0', //考前上车准备 | ||||||
|     'Param835': '0', //考前上车准备 |     'Param835': '0', //考前上车准备 | ||||||
|  |     'Param850': '0', //考前上车准备 | ||||||
|   } |   } | ||||||
|   @State startExam: boolean = false |   @State startExam: boolean = false | ||||||
|   // 过程照片拍照 |   // 过程照片拍照 | ||||||
| @ -540,6 +541,10 @@ struct UserInfo { | |||||||
|         if (sys.v_no === '835') { |         if (sys.v_no === '835') { | ||||||
|           that.systemParam.Param835 = sys.v_value; |           that.systemParam.Param835 = sys.v_value; | ||||||
|         } |         } | ||||||
|  |         //盲考 | ||||||
|  |         if (sys.v_no === '850') { | ||||||
|  |           that.systemParam.Param850 = sys.v_value; | ||||||
|  |         } | ||||||
|         // 开始考试前必须解开安全带或关车门 |         // 开始考试前必须解开安全带或关车门 | ||||||
|         if (sys.v_no === '803') { |         if (sys.v_no === '803') { | ||||||
|           that.systemParam.Param803Str = sys.v_value + ''; |           that.systemParam.Param803Str = sys.v_value + ''; | ||||||
| @ -1138,12 +1143,12 @@ struct UserInfo { | |||||||
|                 CommText({ |                 CommText({ | ||||||
|                   ratio: this.ratio, |                   ratio: this.ratio, | ||||||
|                   color: item.sfzmhm != this.currentUser.sfzmhm ? '#FFFFFF' : '#000000', |                   color: item.sfzmhm != this.currentUser.sfzmhm ? '#FFFFFF' : '#000000', | ||||||
|                   text: item.lsh |                   text: this.systemParam.Param850&&Number(this.systemParam.Param850)>0?"*****":item.lsh | ||||||
|                 }) |                 }) | ||||||
|                 CommText({ |                 CommText({ | ||||||
|                   ratio: this.ratio, |                   ratio: this.ratio, | ||||||
|                   color: item.sfzmhm != this.currentUser.sfzmhm ? '#FFFFFF' : '#000000', |                   color: item.sfzmhm != this.currentUser.sfzmhm ? '#FFFFFF' : '#000000', | ||||||
|                   text: decodeURIComponent(item.xm) |                   text: this.systemParam.Param850&&Number(this.systemParam.Param850)>0?"*****":decodeURIComponent(item.xm) | ||||||
|                 }) |                 }) | ||||||
|               } |               } | ||||||
|             } |             } | ||||||
| @ -1212,7 +1217,42 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|           Column() { |           Column() { | ||||||
|             ForEach(this.labelBlocks, (item) => { |             ForEach(this.labelBlocks, (item) => { | ||||||
|               LabelBlock({ label: item.label, ratio: this.ratio, value: this.currentUser[item.key] }) |               if(this.systemParam.Param850=='1'){ | ||||||
|  |                 LabelBlock({ label: item.label, ratio: this.ratio, value:'*****'}) | ||||||
|  |               } | ||||||
|  |               else if(this.systemParam.Param850=='2'){ | ||||||
|  |                 if(item.key=='xm'){ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: this.currentUser.xh }) | ||||||
|  |                 }else if(item.key=='ksxl'){ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: this.currentUser[item.key] }) | ||||||
|  |                 }else{ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: '*****' }) | ||||||
|  |                 } | ||||||
|  |               }else if(this.systemParam.Param850=='4'){ | ||||||
|  |                 if(item.key=='ksxl'){ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: '*****' }) | ||||||
|  |                 }else{ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: this.currentUser[item.key] }) | ||||||
|  |                 } | ||||||
|  |               }else if(this.systemParam.Param850=='5'){ | ||||||
|  |                 if(item.key=='xm'){ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: this.currentUser.xh }) | ||||||
|  |                 }else{ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: '*****' }) | ||||||
|  |                 } | ||||||
|  |               }else if(this.systemParam.Param850=='6'){ | ||||||
|  |                 if(item.key=='ksxl'){ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: this.currentUser.ksxl }) | ||||||
|  |                 }else if(item.key=='sfzmhm'){ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: this.currentUser.sfzmhm.slice(-6) }) | ||||||
|  |                 }else{ | ||||||
|  |                   LabelBlock({ label: item.label, ratio: this.ratio, value: '*****' }) | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |               else{ | ||||||
|  |                 LabelBlock({ label: item.label, ratio: this.ratio, value: this.currentUser[item.key] }) | ||||||
|  | 
 | ||||||
|  |               } | ||||||
|             }) |             }) | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
| @ -1441,4 +1481,5 @@ type systemParam = { | |||||||
|   'Param364': string, //考前上车准备 |   'Param364': string, //考前上车准备 | ||||||
|   'Param398': string, //考前上车准备 |   'Param398': string, //考前上车准备 | ||||||
|   'Param835': string, //考前上车准备 |   'Param835': string, //考前上车准备 | ||||||
|  |   'Param850': string, //考前上车准备 | ||||||
| } | } | ||||||
| @ -73,6 +73,8 @@ export interface CARINFO { | |||||||
|   FLAG: string, |   FLAG: string, | ||||||
|   BK1: string, |   BK1: string, | ||||||
|   BK2: string |   BK2: string | ||||||
|  |   //脉冲里程设置
 | ||||||
|  |   X_MCH: string | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export interface MAPPOINT { | export interface MAPPOINT { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user