Compare commits
	
		
			2 Commits
		
	
	
		
			a48ba68e5c
			...
			664a4a91c6
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 664a4a91c6 | |||
| 54c7428b36 | 
										
											Binary file not shown.
										
									
								
							| @ -196,6 +196,7 @@ struct Index { | ||||
|   } | ||||
| 
 | ||||
|   async heartMsg() { | ||||
|                 //心跳指令编号                //考试状态 | ||||
|     const arr = [globalThis.signNum || 0, globalThis.statue || 1] | ||||
|     let tmpList = []; | ||||
|     tmpList.push(string2Bytes(arr[0], 1 * 8)[0]) | ||||
| @ -210,10 +211,10 @@ struct Index { | ||||
| 
 | ||||
|   onPageShow() { | ||||
|     this.loading = false | ||||
|     this.createAlbum() | ||||
|     this.userAuth(); | ||||
|     //plc | ||||
|     getUDP() | ||||
|     //中心udp | ||||
|     getUDP2() | ||||
|     clearInterval(this.interval) | ||||
|     this.interval=setInterval(() => { | ||||
| @ -223,10 +224,8 @@ struct Index { | ||||
|     }, 1000) | ||||
|     // 3s拍照 | ||||
|     takePhotoFn(this.context) | ||||
| 
 | ||||
|     // | ||||
|     //tcp差分转发,如果差分通过udp转发可注释 | ||||
|     getTCP() | ||||
|     // const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort) | ||||
| 
 | ||||
|     if (globalThis.singlePlay == undefined || globalThis.singlePlay == null) { | ||||
|       globalThis.singlePlay = false | ||||
| @ -236,10 +235,10 @@ struct Index { | ||||
|     console.info('Index onPageShow'); | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   //创建截图文件夹 | ||||
|   async createAlbum() { | ||||
|     this.fileHelper = new FileHelper(); | ||||
|     this.fileHelper.createAlbum('jt') | ||||
|     // this.fileHelper.createAlbum('jt') | ||||
|     this.fileHelper.createAlbum('pz'); | ||||
| 
 | ||||
|   } | ||||
| @ -268,7 +267,10 @@ struct Index { | ||||
|   } | ||||
|   async initParams() { | ||||
|     this.loading=false | ||||
|     //获取设备信息 | ||||
|     this.createAlbum() | ||||
|     await getDeviceInfo() | ||||
|     //车辆信息 | ||||
|     getCarInfo() | ||||
|     await setCurrentTime(); | ||||
|     this.carNum = globalThis.carInfo.plateNo; | ||||
|  | ||||
| @ -4,8 +4,8 @@ import ethernet from '@ohos.net.ethernet'; | ||||
| import prompt from '@ohos.prompt' | ||||
| import { upDateTableByArray} from '../common/service/initable' | ||||
| import { getSyncData} from '../common/service/initable' | ||||
| import { getUDP, getUDP2 } from '../common/utils/GlobleUdp'; | ||||
| import { getTCP } from '../common/utils/GlobleTcp'; | ||||
| // import { getUDP, getUDP2 } from '../common/utils/GlobleUdp'; | ||||
| // import { getTCP } from '../common/utils/GlobleTcp'; | ||||
| @Entry | ||||
| @Component | ||||
| struct Index { | ||||
| @ -102,9 +102,7 @@ struct Index { | ||||
|                 }); | ||||
|               } | ||||
|             }); | ||||
|             getUDP(true) | ||||
|             getUDP2(true) | ||||
|             getTCP(true) | ||||
| 
 | ||||
|           }) | ||||
|         } | ||||
|         .backgroundColor('#CCC4B8') | ||||
|  | ||||
| @ -62,19 +62,16 @@ struct UserInfo { | ||||
|   @State faceCatchImg: string = '' | ||||
| 
 | ||||
|   async onPageShow() { | ||||
| 
 | ||||
|     //语音功能 | ||||
|     const systemParms:any = await getSyncData('MA_SYSTEMPARM') | ||||
|     console.log('systemParms',systemParms.length) | ||||
|     new WebRTCVoice(this.context); | ||||
|     //初始化数据 | ||||
|     this.initData() | ||||
|     //身份证读卡器初始化 | ||||
|     // this.openDeviceByIDCard() | ||||
|     // 如果是单机模式则模拟假数据 | ||||
| 
 | ||||
|     //获取sysset表数据 | ||||
|     this.initSysset() | ||||
|     // initJudgeUdp() | ||||
|     //心跳处理 | ||||
|     this.heartMsg() | ||||
| 
 | ||||
|   } | ||||
| @ -185,6 +182,7 @@ struct UserInfo { | ||||
|   changeQkfn() { | ||||
|     this.qkFn() | ||||
|   } | ||||
|   //初始化数据 | ||||
|   initData(){ | ||||
|     this.stepFlag = false | ||||
|     this.faceCompareSucess = 0 | ||||
| @ -214,15 +212,18 @@ struct UserInfo { | ||||
|       if(val.id=='32'){ | ||||
|         globalThis.signNum=val.body[1] | ||||
|         if(val.body[0]=='7'){ | ||||
|           //缺考处理 | ||||
|           this.getqkFn() | ||||
|           this.signNum=val.body[1] | ||||
|         } | ||||
|       }else if(val.id=='42'){ | ||||
|         //收到中心缺考确认消息 | ||||
|         console.log('qkfnqkfn',val.body[0]) | ||||
|         this.qkFn() | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
|   //考点端查询缺考指令内容消息请求 | ||||
|   getqkFn() { | ||||
|     let tmpList = []; | ||||
|     tmpList.push(string2Bytes(globalThis.signNum, 1 * 8)[0]) | ||||
| @ -236,11 +237,6 @@ struct UserInfo { | ||||
|     globalThis.udpClient2.sendMsg(param, this.context) | ||||
|   } | ||||
| 
 | ||||
|   facePass() { | ||||
|     if (!this.stepFlag) { | ||||
|       this.sfbdinterfaceFn() | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   async initSysset() { | ||||
|     const that = this; | ||||
| @ -287,10 +283,11 @@ struct UserInfo { | ||||
|       }) | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
| //人脸比对窗口关闭 | ||||
|   changeFaceCompareSuccess() { | ||||
|     console.log('this.faceCompareSuces', this.faceCompareSucess, JSON.stringify(this.currentUser)) | ||||
|     if (this.faceCompareSucess > 0) { | ||||
|       //人脸比对通过 | ||||
|       this.sfbdinterfaceFn() | ||||
|     } | ||||
|   } | ||||
| @ -310,7 +307,7 @@ struct UserInfo { | ||||
|     this.pageIndex--; | ||||
|     this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||
|   } | ||||
| 
 | ||||
| //获取下载考生 | ||||
|   getExaminationStudentInfoFn() { | ||||
|     if (globalThis.singlePlay) { | ||||
|       return | ||||
| @ -363,6 +360,7 @@ struct UserInfo { | ||||
|       console.log('error12error' + error) | ||||
|     }) | ||||
|   } | ||||
|   //缺考 | ||||
|   qkFn() { | ||||
|     this.faceCompareSucess = 0 | ||||
|     if (globalThis.singlePlay) { | ||||
| @ -399,6 +397,7 @@ struct UserInfo { | ||||
|     }) | ||||
| 
 | ||||
|   } | ||||
|   // 获取考试项目 | ||||
|   async getExaminationItemFn(){ | ||||
|     console.info('surenjun', this.currentUser.lsh) | ||||
|     if(!this.currentUser.lsh||globalThis.singlePlay){ | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user