异常数据处理&&850盲考处理
This commit is contained in:
		
							parent
							
								
									645fc33a23
								
							
						
					
					
						commit
						85654ce427
					
				| @ -246,6 +246,9 @@ export default class UdpClientByCenter { | ||||
|       for (let i = 0; i < dataView?.byteLength; ++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 id = Math.floor(+idNum / 1000) | ||||
| 
 | ||||
|  | ||||
| @ -90,6 +90,7 @@ struct UserInfo { | ||||
|     'Param364': '0', //考前上车准备 | ||||
|     'Param398': '0', //考前上车准备 | ||||
|     'Param835': '0', //考前上车准备 | ||||
|     'Param850': '0', //考前上车准备 | ||||
|   } | ||||
|   @State startExam: boolean = false | ||||
|   // 过程照片拍照 | ||||
| @ -540,6 +541,10 @@ struct UserInfo { | ||||
|         if (sys.v_no === '835') { | ||||
|           that.systemParam.Param835 = sys.v_value; | ||||
|         } | ||||
|         //盲考 | ||||
|         if (sys.v_no === '850') { | ||||
|           that.systemParam.Param850 = sys.v_value; | ||||
|         } | ||||
|         // 开始考试前必须解开安全带或关车门 | ||||
|         if (sys.v_no === '803') { | ||||
|           that.systemParam.Param803Str = sys.v_value + ''; | ||||
| @ -1138,12 +1143,12 @@ struct UserInfo { | ||||
|                 CommText({ | ||||
|                   ratio: this.ratio, | ||||
|                   color: item.sfzmhm != this.currentUser.sfzmhm ? '#FFFFFF' : '#000000', | ||||
|                   text: item.lsh | ||||
|                   text: this.systemParam.Param850&&Number(this.systemParam.Param850)>0?"*****":item.lsh | ||||
|                 }) | ||||
|                 CommText({ | ||||
|                   ratio: this.ratio, | ||||
|                   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() { | ||||
|             ForEach(this.labelBlocks, (item) => { | ||||
|               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, //考前上车准备 | ||||
|   'Param398': string, //考前上车准备 | ||||
|   'Param835': string, //考前上车准备 | ||||
|   'Param850': string, //考前上车准备 | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user