下载考生重连
This commit is contained in:
		
							parent
							
								
									6f76677c3e
								
							
						
					
					
						commit
						af31e5436e
					
				| @ -96,7 +96,7 @@ export default async function tempRequest<T>(req: any): Promise<T> { | ||||
|         }).catch(Error => { | ||||
|         console.info('test-error0' + url + ' error:resp: ' + JSON.stringify(Error.message)) | ||||
|         Prompt.showToast({ | ||||
|           message: Error?.message, | ||||
|           message: Error?.message=='Failure when receiving data from the peer'?'网络异常,请重试':Error?.message, | ||||
|           duration: 5000 | ||||
|         }); | ||||
|         reject(Error) | ||||
| @ -111,7 +111,7 @@ export default async function tempRequest<T>(req: any): Promise<T> { | ||||
|         }) | ||||
|       } | ||||
|       Prompt.showToast({ | ||||
|         message: e?.message, | ||||
|         message: e?.message=='Failure when receiving data from the peer'?'网络异常,请重试':e?.message, | ||||
|         duration: 5000 | ||||
|       }); | ||||
|       reject({ | ||||
|  | ||||
| @ -2,8 +2,6 @@ import { examinationStuAbsent, getExaminationItem, getExaminationStudentInfo } f | ||||
| import router from '@ohos.router'; | ||||
| import TopLogo from './compontents/TopLogo'; | ||||
| import Md5 from '../common/utils/md5'; | ||||
| import AccountTable from '../common/database/tables/AccountTable'; | ||||
| import USER from '../common/constants/USER'; | ||||
| import { dateFormat, getCurrentHourTime, getCurrentTime, string2Bytes } from '../common/utils/tools'; | ||||
| import FaceCompare from './compontents/FaceCompare'; | ||||
| // import { initJudgeUdp } from '../common/utils/UdpJudge' | ||||
| @ -67,6 +65,7 @@ struct UserInfo { | ||||
|   //是否已经开始考试 | ||||
|   @State isExamStart: boolean = false; | ||||
|   @State effectDate: string = ''; | ||||
|   @State errorNum: number = 0; | ||||
|   @State interval: any = null; | ||||
|   @State studentRefreshStatue: string = '0'; | ||||
|   @State photo: string = 'data:image/bmp;base64,'; | ||||
| @ -167,8 +166,6 @@ struct UserInfo { | ||||
|   ) | ||||
|   private filePhoto: FilePhoto | ||||
|   private avPlayer | ||||
|   private AccountTable = new AccountTable(() => { | ||||
|   }, USER); | ||||
|   private context = getContext(this) as common.UIAbilityContext; | ||||
|   private labelBlocks = [ | ||||
|     { label: '考生姓名', key: 'xm' }, | ||||
| @ -588,14 +585,7 @@ struct UserInfo { | ||||
|         // this.getExaminationItemFn() | ||||
|       } | ||||
|     }) | ||||
|     // const db = new AccountTable(() => { | ||||
|     // }, MA_SYSSET); | ||||
|     // db.getRdbStore(() => { | ||||
|     //   db.query('0', (syssetParams) => { | ||||
|     // | ||||
|     // | ||||
|     //   }) | ||||
|     // }) | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   //人脸比对窗口关闭 | ||||
| @ -644,14 +634,15 @@ struct UserInfo { | ||||
|     // await upDateTableByArray('USERLIST', []) | ||||
|     // await DB.clearTable('USER') | ||||
|     // await DB.clearTable('USERLIST') | ||||
|     this.type = '2' | ||||
|     this.errorDialog.open() | ||||
| 
 | ||||
|     // this.type = '2' | ||||
|     // this.errorDialog.open() | ||||
|     this.updateTimeLimit = true | ||||
|     const param = `<getExaminationStudentInfoReq><head><checkCode>${Md5.Instance.get_md5(globalThis.carInfo.carId + | ||||
|     globalThis.carInfo.examinationRoomId + | ||||
|     globalThis.username)}</checkCode></head><body><carId>${globalThis.carInfo.carId}</carId><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName><sfzmhm></sfzmhm></body></getExaminationStudentInfoReq>` | ||||
|     try { | ||||
|     getExaminationStudentInfo(param).then(async (res) => { | ||||
|       this.errorNum=0 | ||||
|       console.log("temp log ", JSON.stringify(res)) | ||||
|       await DB.clearTable('USER') | ||||
|       await DB.clearTable('USERLIST') | ||||
| @ -739,27 +730,6 @@ struct UserInfo { | ||||
|       } | ||||
| 
 | ||||
| 
 | ||||
|         // const flag=dataList.filter((res)=>{ | ||||
|         //    return res.sfzmhm==this.currentUser.sfzmhm | ||||
|         // }).length?true:false | ||||
|         // if(!this.currentUser.sfzmhm||this.currentUser.kssycs=='0'||!flag){ | ||||
|         //   if (this.dataList.length) { | ||||
|         //     setTimeout(()=>{ | ||||
|         //       this.currentUser = this.dataList[0] | ||||
|         //       this.currentUser.ksy2= globalThis.kgxm | ||||
|         //       globalThis.lsh=this.currentUser.lsh | ||||
|         //     },200) | ||||
|         //     console.log('this.currentUser1',JSON.stringify(this.currentUser)) | ||||
|         //   } else { | ||||
|         //     this.currentUser = EmptyCandidateObject | ||||
|         //   } | ||||
|         // } | ||||
| 
 | ||||
| 
 | ||||
|         // this.lsh = this.currentUser.lsh | ||||
|         // globalThis.lsh = this.lsh | ||||
|         // globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||
| 
 | ||||
|       //364	绕车一周评判时机(1-开始考试后判 2-开始考试前判) | ||||
|       if (this.systemParam.Param364 == '2') { | ||||
|         this.isBoardPrePareSetPopupOpen = true; | ||||
| @ -772,21 +742,21 @@ struct UserInfo { | ||||
|       } | ||||
| 
 | ||||
|       this.pageIndex = 0 | ||||
|         getSyncData('USER').then(data => { | ||||
|           if (data?.[0]) { | ||||
|             this.getCurrentStudent(data[0].sfzmhm) | ||||
|           } | ||||
|         }) | ||||
|       // getSyncData('USER').then(data => { | ||||
|       //   if (data?.[0]) { | ||||
|       //     this.getCurrentStudent(data[0].sfzmhm) | ||||
|       //   } | ||||
|       // }) | ||||
|     }).catch((error) => { | ||||
|       this.updateTimeLimit = false | ||||
|         this.errorDialog.close() | ||||
|       // this.errorDialog.close() | ||||
|       this.errorNum++ | ||||
|       if (this.errorNum < 2) { | ||||
|         this.getExaminationStudentInfoFn() | ||||
|       } | ||||
|       console.log('error12error' + error) | ||||
|     }) | ||||
|     } catch (error) { | ||||
|       this.updateTimeLimit = false | ||||
|       this.errorDialog.close() | ||||
|       console.log('error14error' + error) | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   qkFn() { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user