Merge branch 'main' of http://88.22.20.16:3000/shutdown/subject-two
This commit is contained in:
		
						commit
						38d48e778b
					
				| @ -4,7 +4,7 @@ import TopLogo from './compontents/topLogo' | |||||||
| import Md5 from '../common/utils/md5'; | import Md5 from '../common/utils/md5'; | ||||||
| import AccountTable from '../common/database/tables/AccountTable'; | import AccountTable from '../common/database/tables/AccountTable'; | ||||||
| import USER from '../common/constants/USER'; | import USER from '../common/constants/USER'; | ||||||
| import { dateFormat, getCurrentTime } from '../common/utils/tools'; | import { dateFormat,getCurrentTime } from '../common/utils/tools'; | ||||||
| import MA_SYSSET from '../common//constants/MA_SYSSET'; | import MA_SYSSET from '../common//constants/MA_SYSSET'; | ||||||
| import FaceCompare from './compontents/faceCompareByhaikang' | import FaceCompare from './compontents/faceCompareByhaikang' | ||||||
| import { initJudgeUdp } from '../common/utils/UdpJudge' | import { initJudgeUdp } from '../common/utils/UdpJudge' | ||||||
| @ -38,6 +38,7 @@ struct UserInfo { | |||||||
|   @State dataList: Array<User> = [] |   @State dataList: Array<User> = [] | ||||||
|   @State list: Array<User> = [] |   @State list: Array<User> = [] | ||||||
|   @State param: VideoConfig = { |   @State param: VideoConfig = { | ||||||
|  |     videoNum:'1', | ||||||
|     spls: '', |     spls: '', | ||||||
|     faceFlag: false, |     faceFlag: false, | ||||||
|     pztd: '2', |     pztd: '2', | ||||||
| @ -54,14 +55,16 @@ struct UserInfo { | |||||||
|     videoRecord2: false, |     videoRecord2: false, | ||||||
|     videoRecord3: false, |     videoRecord3: false, | ||||||
|     videoRecord4: false, |     videoRecord4: false, | ||||||
|     rlls: '1' |     rlls:'1' | ||||||
|   } |   } | ||||||
|   private AccountTable = new AccountTable(() => { |   private AccountTable = new AccountTable(() => { | ||||||
|   }, USER); |   }, USER); | ||||||
|  | 
 | ||||||
|   private context = getContext(this) as common.UIAbilityContext; |   private context = getContext(this) as common.UIAbilityContext; | ||||||
|  | 
 | ||||||
|   @State name: string = 'initName'; |   @State name: string = 'initName'; | ||||||
|   @State sex: string = ''; |   @State sex: string = ''; | ||||||
|   @State callBackFlag: boolean = false; |   @State callBackFlag:boolean=false; | ||||||
|   @State born?: string = ''; |   @State born?: string = ''; | ||||||
|   @State address: string = ''; |   @State address: string = ''; | ||||||
|   @State nation: string = ''; |   @State nation: string = ''; | ||||||
| @ -70,18 +73,22 @@ struct UserInfo { | |||||||
|   @State effectDate: string = ''; |   @State effectDate: string = ''; | ||||||
|   @State interval: any = null; |   @State interval: any = null; | ||||||
|   @State interval2: any = null; |   @State interval2: any = null; | ||||||
|   @State interval3: any = null; |  | ||||||
|   @State studentRefreshStatue: string = '0'; |   @State studentRefreshStatue: string = '0'; | ||||||
|   @State photo: string = 'data:image/bmp;base64,'; |   @State photo: string = 'data:image/bmp;base64,'; | ||||||
|   @State numCount: number = 0; |   @State numCount: number = 0; | ||||||
|   @State signNum: number = 0; |   @State signNum: number = 0; | ||||||
|   @State isCanClick: boolean = true; |   @State isCanClick: boolean = true; | ||||||
|   subscriber; |   subscriber; | ||||||
|   @State faceCatchImg: string = '' |   @State faceCatchImg:string='' | ||||||
| 
 | 
 | ||||||
|   onPageShow() { |   onPageShow() { | ||||||
|  |     //打开读卡器 | ||||||
|  |     this.openChuankouDeviceFn() | ||||||
|     //语音功能 |     //语音功能 | ||||||
|     this.stepFlag = false |     this.stepFlag=false | ||||||
|  |     this.initData() | ||||||
|  |     this.initSysset() | ||||||
|  |     initJudgeUdp() | ||||||
|     new WebRTCVoice(this.context); |     new WebRTCVoice(this.context); | ||||||
|     this.faceCompareSucess = 0 |     this.faceCompareSucess = 0 | ||||||
|     this.showFaceCompare = false |     this.showFaceCompare = false | ||||||
| @ -120,33 +127,47 @@ struct UserInfo { | |||||||
|       this.list = CandidateData |       this.list = CandidateData | ||||||
|       this.pageIndex = 0 |       this.pageIndex = 0 | ||||||
|       this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) |       this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||||
|       this.currentUser = this.dataList[0] |       this.currentUser=this.dataList[0] | ||||||
|       this.lsh = this.currentUser.lsh |       this.lsh=this.currentUser.lsh | ||||||
|       globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm |       globalThis.ksyh=this.currentUser.ksy1sfzmhm||this.currentUser.ksy2sfzmhm | ||||||
|       globalThis.lsh = this.lsh |       globalThis.lsh=this.lsh | ||||||
|       return |       return | ||||||
|     } else { |     }else{ | ||||||
|       //      this.getExaminationStudentInfoFn() |       //      this.getExaminationStudentInfoFn() | ||||||
|     } |     } | ||||||
|     this.initSysset() |  | ||||||
|     initJudgeUdp() |  | ||||||
|   } |  | ||||||
| 
 | 
 | ||||||
|   changeQkfn() { |  | ||||||
|     this.qkFn() |  | ||||||
|   } |   } | ||||||
| 
 |   //初始化reset data | ||||||
|   getqkFn() { |   initData(){ | ||||||
|     let tmpList = []; |     this.lsh='0000000000000' | ||||||
|     tmpList.push(this.string2Bytes(globalThis.signNum, 1 * 8)[0]) |     this.faceCompareSucess=0 | ||||||
|     const param = { |     this.showFaceCompare=false | ||||||
|       id: 41, |     globalThis.lsh = this.lsh | ||||||
|       list: tmpList, |     this.currentUser= { | ||||||
|       carNo: globalThis.carInfo.carNo, |       sfzmhm: '', | ||||||
|       placeId: globalThis.carInfo.examinationRoomId |       xm: '', | ||||||
|  |       lsh: '', | ||||||
|  |       ksy1: '', | ||||||
|  |       id: '', | ||||||
|  |       kszp: '', | ||||||
|  |       ksmjzp: '', | ||||||
|  |       bz1: '', | ||||||
|  |       jxmc: '', | ||||||
|  |       kchp: '', | ||||||
|  |       kscx: '', | ||||||
|  |       ksdd: '', | ||||||
|  |       kssycs: '', | ||||||
|  |       ksxl: '', | ||||||
|  |       ksy1sfzmhm: '', | ||||||
|  |       kszt: '', | ||||||
|  |       xb: '', | ||||||
|  |       xh: '', | ||||||
|  |       xldm: '', | ||||||
|  |       yycs: '' | ||||||
|     } |     } | ||||||
| 
 |     globalThis.statue=2 | ||||||
|     globalThis.udpClient2.sendMsg(param, this.context) |     this.numCount=0 | ||||||
|  |     this.callBackFlag=false | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async heartMsg(context) { |   async heartMsg(context) { | ||||||
| @ -211,12 +232,12 @@ struct UserInfo { | |||||||
|       this.sfbdinterfaceFn() |       this.sfbdinterfaceFn() | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 |   //读卡器阅读 | ||||||
|   onReadCard(ret) { |   onReadCard(ret) { | ||||||
|     console.info(`zzctest xx Read Card ret =${ret.status}`) |     console.info(`zzctest xx Read Card ret =${ret.status}`) | ||||||
|     let thisVar = globalThis.indexComponent; |     let thisVar = globalThis.indexComponent; | ||||||
| 
 | 
 | ||||||
|     if (ret.status == 0) { // status = 1 为读到身份证信息; status = 1 为身份证离开读卡器 |     if(ret.status == 0) { // status = 1 为读到身份证信息; status = 1 为身份证离开读卡器 | ||||||
|       // 收到身份证离开读卡器的事件通知,根据实际业务需要决定是否需要清空之前已读取的身份证信息。 |       // 收到身份证离开读卡器的事件通知,根据实际业务需要决定是否需要清空之前已读取的身份证信息。 | ||||||
|       // 如果身份证卡片离开读卡器时,需要继续保留UI界面上已读取到的身份信息,以下代码可以注释掉。 |       // 如果身份证卡片离开读卡器时,需要继续保留UI界面上已读取到的身份信息,以下代码可以注释掉。 | ||||||
|       thisVar.name = ""; |       thisVar.name = ""; | ||||||
| @ -243,9 +264,9 @@ struct UserInfo { | |||||||
|       thisVar.born = baseInfos[3]; |       thisVar.born = baseInfos[3]; | ||||||
|       thisVar.address = baseInfos[4]; |       thisVar.address = baseInfos[4]; | ||||||
|       thisVar.idCard = baseInfos[5]; |       thisVar.idCard = baseInfos[5]; | ||||||
|       setTimeout(() => { |       setTimeout(()=>{ | ||||||
|         thisVar.getCurrentStudent(baseInfos[5]) |         thisVar.getCurrentStudent(baseInfos[5]) | ||||||
|       }, 1000) |       },1000) | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     // 身份证照片数据处理 |     // 身份证照片数据处理 | ||||||
| @ -253,7 +274,7 @@ struct UserInfo { | |||||||
|       let dataView = new DataView(ret.photo) |       let dataView = new DataView(ret.photo) | ||||||
|       console.info(`Read Card ret = length = ${dataView.byteLength}`) |       console.info(`Read Card ret = length = ${dataView.byteLength}`) | ||||||
|       let str = "" |       let str = "" | ||||||
|       for (let i = 0; i < dataView.byteLength; ++i) { |       for (let i = 0;i < dataView.byteLength; ++i) { | ||||||
|         let c = String.fromCharCode(dataView.getUint8(i)) |         let c = String.fromCharCode(dataView.getUint8(i)) | ||||||
|         if (c !== "\n") { |         if (c !== "\n") { | ||||||
|           str += c |           str += c | ||||||
| @ -325,27 +346,27 @@ struct UserInfo { | |||||||
|   getCurrentStudent(id) { |   getCurrentStudent(id) { | ||||||
|     let flag = false |     let flag = false | ||||||
|     this.pageIndex |     this.pageIndex | ||||||
|     this.list.map((res, index) => { |     this.list.map((res,index)=>{ | ||||||
|       if (res.sfzmhm == id) { |       if(res.sfzmhm==id){ | ||||||
|         flag = true |         flag=true | ||||||
|         this.currentUser = res |         this.currentUser=res | ||||||
|         this.lsh = this.currentUser.lsh |         this.lsh=this.currentUser.lsh | ||||||
|         globalThis.lsh = this.currentUser.lsh |         globalThis.lsh=this.currentUser.lsh | ||||||
|         globalThis.ksyh = this.currentUser.ksy1sfzmhm || this.currentUser.ksy2sfzmhm |         globalThis.ksyh=this.currentUser.ksy1sfzmhm||this.currentUser.ksy2sfzmhm | ||||||
| 
 | 
 | ||||||
|         // this.currentUser.kszp=this.photo+res.kszp |         // this.currentUser.kszp=this.photo+res.kszp | ||||||
|         // this.currentUser.ksmjzp=this.photo+this.currentUser.ksmjzp |         // this.currentUser.ksmjzp=this.photo+this.currentUser.ksmjzp | ||||||
|         if (globalThis.singlePlay) { |         if(globalThis.singlePlay){ | ||||||
|           testNapi.StopReadCard(); |           testNapi.StopReadCard(); | ||||||
|           // globalThis.statue=4 |           // globalThis.statue=4 | ||||||
|           router.pushUrl({ |           router.pushUrl({ | ||||||
|             url: 'pages/Judge', |             url: 'pages/Judge', | ||||||
|           }, router.RouterMode.Single); |           },router.RouterMode.Single); | ||||||
|           return |           return | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         this.showFaceCompare = true |         this.showFaceCompare=true | ||||||
|         this.pageIndex = Math.floor(index / 4) |         this.pageIndex=Math.floor(index/4) | ||||||
|       } |       } | ||||||
|     }) |     }) | ||||||
|     this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) |     this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||||
| @ -419,6 +440,11 @@ struct UserInfo { | |||||||
|     const zeroStr = '0'.repeat(num); |     const zeroStr = '0'.repeat(num); | ||||||
|     return zeroStr + str; |     return zeroStr + str; | ||||||
|   } |   } | ||||||
|  |   //考点端查询缺考指令内容消息请求 | ||||||
|  |   getqkFn(){ | ||||||
|  |     let tmpList = []; | ||||||
|  |     tmpList.push(string2Bytes(globalThis.signNum, 1 * 8)[0]) | ||||||
|  |     const param= {id: 41,list:tmpList,carNo: globalThis.carInfo.carNo,placeId: globalThis.carInfo.examinationRoomId} | ||||||
| 
 | 
 | ||||||
|   string2Bytes(number, len) { |   string2Bytes(number, len) { | ||||||
|     const str = (+number).toString(2); |     const str = (+number).toString(2); | ||||||
| @ -434,24 +460,7 @@ struct UserInfo { | |||||||
|     }); |     }); | ||||||
|     return arrBytes; |     return arrBytes; | ||||||
|   } |   } | ||||||
| 
 |   //车载端学员缺考 | ||||||
|   getPhotosForOtherFn(data, type) { |  | ||||||
|     const date = new Date() |  | ||||||
|     const param = { |  | ||||||
|       time: dateFormat(date), |  | ||||||
|       ksrq: dateFormat(date).split(' ')[0], |  | ||||||
|       sfzmhm: data.sfzmhm, |  | ||||||
|       zptype: type |  | ||||||
|     } |  | ||||||
|     getPhotosForOther(param).then(res => { |  | ||||||
|       if (type == '1') { |  | ||||||
|         this.currentUser.kszp = 'data:image/jpg;base64,' + res.getBmzpRsp.body.kszp |  | ||||||
|       } else { |  | ||||||
|         this.currentUser.ksmjzp = 'data:image/jpg;base64,' + res.getBmzpRsp.body.ksmjzp |  | ||||||
|       } |  | ||||||
|     }) |  | ||||||
|   } |  | ||||||
| 
 |  | ||||||
|   qkFn() { |   qkFn() { | ||||||
|     this.faceCompareSucess = 0 |     this.faceCompareSucess = 0 | ||||||
|     if (globalThis.singlePlay) { |     if (globalThis.singlePlay) { | ||||||
| @ -460,10 +469,10 @@ struct UserInfo { | |||||||
|     } |     } | ||||||
|     console.log('JsonJson', JSON.stringify(this.currentUser)) |     console.log('JsonJson', JSON.stringify(this.currentUser)) | ||||||
|     const param = `<?xml version="1.0" encoding="UTF-8" ?><examinationStuAbsentReq><body><carId>${globalThis.carInfo.carId}</carId><cardNo>${this.currentUser.sfzmhm}</cardNo><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName><lsh>${this.lsh}</lsh></body></examinationStuAbsentReq>` |     const param = `<?xml version="1.0" encoding="UTF-8" ?><examinationStuAbsentReq><body><carId>${globalThis.carInfo.carId}</carId><cardNo>${this.currentUser.sfzmhm}</cardNo><examinationRoomId>${globalThis.carInfo.examinationRoomId}</examinationRoomId><examinerName>${globalThis.username}</examinerName><lsh>${this.lsh}</lsh></body></examinationStuAbsentReq>` | ||||||
|     console.log('carNo1111', param) |     console.log('carNo1111',param) | ||||||
| 
 | 
 | ||||||
|     examinationStuAbsent(param).then(res => { |     examinationStuAbsent(param).then(res => { | ||||||
|       const arr = [this.signNum || 0, 1] |       const arr = [this.signNum||0,1] | ||||||
|       let tmpList = []; |       let tmpList = []; | ||||||
|       tmpList.push(this.string2Bytes(arr[0], 1 * 8)[0]) |       tmpList.push(this.string2Bytes(arr[0], 1 * 8)[0]) | ||||||
|       tmpList.push(this.string2Bytes(arr[1], 1 * 8)[0]) |       tmpList.push(this.string2Bytes(arr[1], 1 * 8)[0]) | ||||||
| @ -476,7 +485,7 @@ struct UserInfo { | |||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       globalThis.udpClient2.sendMsg(param, this.context) |       globalThis.udpClient2.sendMsg(param, this.context) | ||||||
|       if (res.examinationStuAbsentRsp.head.resultCode == '0') { |       if (res.examinationStuAbsentRsp.head.resultCode=='0') { | ||||||
|         this.pageIndex = 0 |         this.pageIndex = 0 | ||||||
|         this.qkFlag = false |         this.qkFlag = false | ||||||
|         this.currentUser = EmptyCandidateObject |         this.currentUser = EmptyCandidateObject | ||||||
| @ -488,27 +497,164 @@ struct UserInfo { | |||||||
|     }) |     }) | ||||||
| 
 | 
 | ||||||
|   } |   } | ||||||
|  |   async heartMsg(context) { | ||||||
|  |     let tmpList=[] | ||||||
|  |     const str =globalThis.lsh | ||||||
|  |     for (let i = 0;i < str.length; i++) { | ||||||
|  |       tmpList.push(string2Bytes(str.charCodeAt(i), 1 * 8)[0]) | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|   outClick() { |   outClick() { | ||||||
|     testNapi.StopReadCard(); |     testNapi.StopReadCard(); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   async sfbdinterfaceFn() { |   facePass(){ | ||||||
|     this.stepFlag = true |     if(!this.stepFlag){ | ||||||
|     console.info('surenjun', this.currentUser.lsh) |       this.sfbdinterfaceFn() | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |   changefaceCompareSucess() { | ||||||
|  |     if(this.faceCompareSucess>0){ | ||||||
|  |       this.sfbdinterfaceFn() | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   nextClick() { | ||||||
|  |     if (this.list.length <= 4||this.pageIndex==Math.floor(this.list.length/4)) { | ||||||
|  |       return | ||||||
|  |     } | ||||||
|  |     this.pageIndex++; | ||||||
|  |     this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  |   prevClick() { | ||||||
|  |     if (this.list.length <= 4||this.pageIndex==0) { | ||||||
|  |       return | ||||||
|  |     } | ||||||
|  |     this.pageIndex--; | ||||||
|  |     this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||||
|  |   } | ||||||
|  |   //获取下载学员接口 | ||||||
|  |   getExaminationStudentInfoFn() { | ||||||
|  |     if(globalThis.singlePlay){ | ||||||
|  |       return | ||||||
|  |     } | ||||||
|  |     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></body></getExaminationStudentInfoReq>` | ||||||
|  |     getExaminationStudentInfo(param).then(res => { | ||||||
|  |       if (!res) { | ||||||
|  |         this.dataList=[] | ||||||
|  |         this.currentUser={ | ||||||
|  |           sfzmhm: '', | ||||||
|  |           xm: '', | ||||||
|  |           lsh: '', | ||||||
|  |           ksy1: '', | ||||||
|  |           id: '', | ||||||
|  |           kszp: '', | ||||||
|  |           ksmjzp: '', | ||||||
|  |           bz1: '', | ||||||
|  |           jxmc: '', | ||||||
|  |           kchp: '', | ||||||
|  |           kscx: '', | ||||||
|  |           ksdd: '', | ||||||
|  |           kssycs: '', | ||||||
|  |           ksxl: '', | ||||||
|  |           ksy1sfzmhm: '', | ||||||
|  |           kszt: '', | ||||||
|  |           xb: '', | ||||||
|  |           xh: '', | ||||||
|  |           xldm: '', | ||||||
|  |           yycs: '' | ||||||
|  |         } | ||||||
|  |         console.log('currentUser',JSON.stringify(this.currentUser)) | ||||||
|  |         this.errorMsg = decodeURI(res.getExaminationStudentInfoRsp.head.resultMessage) | ||||||
|  |         return | ||||||
|  |       } | ||||||
|  |       let dataList = [] | ||||||
|  |       this.list=[] | ||||||
|  |       for (let key in res.getExaminationStudentInfoRsp.body) { | ||||||
|  |         const a = res.getExaminationStudentInfoRsp.body[key] | ||||||
|  |         if(a instanceof Array){ | ||||||
|  |           dataList=a | ||||||
|  |         }else{ | ||||||
|  |           dataList=[a] | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |       } | ||||||
|  |       if(dataList.length){ | ||||||
|  |         this.numCount=0 | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       this.list=JSON.parse(JSON.stringify(dataList)) | ||||||
|  |       if (dataList.length > 4) { | ||||||
|  |         dataList = dataList.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||||
|  |       } else { | ||||||
|  |         dataList = dataList | ||||||
|  |       } | ||||||
|  |       dataList.forEach(listData=>{ | ||||||
|  |         for(let i in listData){ | ||||||
|  |           listData[i]= decodeURI(listData[i]) | ||||||
|  |         } | ||||||
|  |         listData.kszp=this.photo+listData.kszp | ||||||
|  |         listData.ksmjzp=this.photo+listData.ksmjzp | ||||||
|  |       }) | ||||||
|  |       this.dataList = dataList | ||||||
|  |       if(this.dataList.length){ | ||||||
|  |         this.currentUser = this.dataList[0] | ||||||
|  |       }else{ | ||||||
|  |         this.currentUser={ | ||||||
|  |           sfzmhm: '', | ||||||
|  |           xm: '', | ||||||
|  |           lsh: '', | ||||||
|  |           ksy1: '', | ||||||
|  |           id: '', | ||||||
|  |           kszp: '', | ||||||
|  |           ksmjzp: '', | ||||||
|  |           bz1: '', | ||||||
|  |           jxmc: '', | ||||||
|  |           kchp: '', | ||||||
|  |           kscx: '', | ||||||
|  |           ksdd: '', | ||||||
|  |           kssycs: '', | ||||||
|  |           ksxl: '', | ||||||
|  |           ksy1sfzmhm: '', | ||||||
|  |           kszt: '', | ||||||
|  |           xb: '', | ||||||
|  |           xh: '', | ||||||
|  |           xldm: '', | ||||||
|  |           yycs: '' | ||||||
|  |         } | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|  |       this.lsh=this.currentUser.lsh | ||||||
|  |       globalThis.lsh=this.lsh | ||||||
|  |       globalThis.ksyh=this.currentUser.ksy1sfzmhm||this.currentUser.ksy2sfzmhm | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |       console.log('this.currentUse3' + JSON.stringify(this.currentUser)) | ||||||
|  |       this.pageIndex = 0 | ||||||
|  |     }).catch((error) => { | ||||||
|  |       console.log('error12error' + error) | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | //身份比对 | ||||||
|  |   async sfbdinterfaceFn(){ | ||||||
|  |     this.stepFlag=true | ||||||
|  |     console.info('surenjun',this.currentUser.lsh) | ||||||
|     const carInfo = globalThis.carInfo; |     const carInfo = globalThis.carInfo; | ||||||
|     const {carId,examinationRoomId} = carInfo; |     const {carId,examinationRoomId} = carInfo; | ||||||
|     const examItems = await getExaminationItem({ |     const examItems = await getExaminationItem({ | ||||||
|       time: getCurrentTime(), |       time:getCurrentTime(), | ||||||
|       carId, |       carId, | ||||||
|       lsh: this.currentUser.lsh || '', |       lsh:this.currentUser.lsh || '', | ||||||
|       examinationRoomId |       examinationRoomId | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     //获取已考项目 |     //获取已考项目 | ||||||
|     console.log('goroute') |     console.log('goroute') | ||||||
|     const date = new Date() |     const date = new Date() | ||||||
|     this.showFaceCompare = false |     this.showFaceCompare=false | ||||||
|     const { examSubject,plateNo } = carInfo; |     const { examSubject,plateNo } = carInfo; | ||||||
|     const drvexam = { |     const drvexam = { | ||||||
|       lsh: this.currentUser.lsh || '', |       lsh: this.currentUser.lsh || '', | ||||||
| @ -516,7 +662,7 @@ struct UserInfo { | |||||||
|       ksxtbh: this.ksxtbh || '222', |       ksxtbh: this.ksxtbh || '222', | ||||||
|       sfzmhm: this.currentUser.sfzmhm || '', |       sfzmhm: this.currentUser.sfzmhm || '', | ||||||
|       ksysfzmhm: this.currentUser.ksy1sfzmhm || '', |       ksysfzmhm: this.currentUser.ksy1sfzmhm || '', | ||||||
|       zp: encodeURIComponent(this.faceCatchImg || ''), |       zp:encodeURIComponent(this.faceCatchImg ||''), | ||||||
|       kssj: dateFormat(date) || '', |       kssj: dateFormat(date) || '', | ||||||
|       kchp: decodeURI(plateNo), |       kchp: decodeURI(plateNo), | ||||||
|       Ksy2sfzmhm: this.currentUser.ksy2sfzmhm || '' |       Ksy2sfzmhm: this.currentUser.ksy2sfzmhm || '' | ||||||
| @ -542,7 +688,7 @@ struct UserInfo { | |||||||
|               this.stepFlag = false |               this.stepFlag = false | ||||||
|               router.pushUrl({ |               router.pushUrl({ | ||||||
|                 url: 'pages/Judge', |                 url: 'pages/Judge', | ||||||
|                 params: { examItems: examItems?.getExaminationItemRsp?.body?.ykxx } |                 params:{examItems:examItems?.getExaminationItemRsp?.body?.ykxx} | ||||||
|               }, router.RouterMode.Single); |               }, router.RouterMode.Single); | ||||||
|               testNapi.StopReadCard(); |               testNapi.StopReadCard(); | ||||||
|             }) |             }) | ||||||
| @ -553,16 +699,16 @@ struct UserInfo { | |||||||
|               this.stepFlag = false |               this.stepFlag = false | ||||||
|               router.pushUrl({ |               router.pushUrl({ | ||||||
|                 url: 'pages/Judge', |                 url: 'pages/Judge', | ||||||
|                 params: { examItems: examItems?.getExaminationItemRsp?.body?.ykxx } |                 params:{examItems:examItems?.getExaminationItemRsp?.body?.ykxx} | ||||||
|               }, router.RouterMode.Single); |               }, router.RouterMode.Single); | ||||||
|               globalThis.statue = 4 |               globalThis.statue=4 | ||||||
|               testNapi.StopReadCard(); |               testNapi.StopReadCard(); | ||||||
|             }) |             }) | ||||||
|           }) |           }) | ||||||
|         } |         } | ||||||
|       }) |       }) | ||||||
|     } else { |     }else{ | ||||||
|       this.stepFlag = false |       this.stepFlag=false | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
| @ -587,7 +733,7 @@ struct UserInfo { | |||||||
| 
 | 
 | ||||||
|   build() { |   build() { | ||||||
|     Column() { |     Column() { | ||||||
|       TopLogo({ outFlag: $outFlag }).margin({ bottom: 10 }) |       TopLogo({outFlag:$outFlag}).margin({ bottom: 10 }) | ||||||
|       Row() { |       Row() { | ||||||
|         Row() { |         Row() { | ||||||
|           ForEach(this.dataList, (item) => { |           ForEach(this.dataList, (item) => { | ||||||
| @ -607,7 +753,7 @@ struct UserInfo { | |||||||
|             } |             } | ||||||
|             .width(165 * this.ratio) |             .width(165 * this.ratio) | ||||||
|             .height(85 * this.ratio) |             .height(85 * this.ratio) | ||||||
|             .backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : $r('app.media.userboxbg')) |             .backgroundImage(item.sfzmhm != this.currentUser.sfzmhm? $r('app.media.userbox2') : $r('app.media.userboxbg')) | ||||||
|             .backgroundImageSize({ width: '100%', height: '100%' }) |             .backgroundImageSize({ width: '100%', height: '100%' }) | ||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               this.currentUser = item |               this.currentUser = item | ||||||
| @ -618,7 +764,7 @@ struct UserInfo { | |||||||
|         Image($r('app.media.dk_prev')) |         Image($r('app.media.dk_prev')) | ||||||
|           .width(90 * this.ratio) |           .width(90 * this.ratio) | ||||||
|           .height(70 * this.ratio) |           .height(70 * this.ratio) | ||||||
|           .margin({ left: 65 * this.ratio, right: 10 * this.ratio }) |           .margin({ left: 65 * this.ratio, right:10 * this.ratio }) | ||||||
|           .onClick(() => { |           .onClick(() => { | ||||||
|             this.prevClick() |             this.prevClick() | ||||||
|           }) |           }) | ||||||
| @ -703,12 +849,12 @@ struct UserInfo { | |||||||
|           Image($r('app.media.ksks_btn')) |           Image($r('app.media.ksks_btn')) | ||||||
|             .commStyle() |             .commStyle() | ||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               this.faceCompareSucess = 0 |               this.faceCompareSucess=0 | ||||||
|               globalThis.statue = 2 |               globalThis.statue=2 | ||||||
|               if (!this.currentUser.xm) { |               if(!this.currentUser.xm){ | ||||||
|                 return |                 return | ||||||
|               } |               } | ||||||
|               if (globalThis.singlePlay) { |               if(globalThis.singlePlay){ | ||||||
|                 this.AccountTable.query('0', (result) => { |                 this.AccountTable.query('0', (result) => { | ||||||
|                   if (result.length == 0) { |                   if (result.length == 0) { | ||||||
|                     this.AccountTable.insertData(this.currentUser, (id) => { |                     this.AccountTable.insertData(this.currentUser, (id) => { | ||||||
| @ -716,7 +862,7 @@ struct UserInfo { | |||||||
|                         console.log(result) |                         console.log(result) | ||||||
|                         router.pushUrl({ |                         router.pushUrl({ | ||||||
|                           url: 'pages/Judge', |                           url: 'pages/Judge', | ||||||
|                         }, router.RouterMode.Single); |                         },router.RouterMode.Single); | ||||||
|                         testNapi.StopReadCard(); |                         testNapi.StopReadCard(); | ||||||
|                       }) |                       }) | ||||||
|                     }) |                     }) | ||||||
| @ -725,7 +871,7 @@ struct UserInfo { | |||||||
|                       this.AccountTable.query('0', (result) => { |                       this.AccountTable.query('0', (result) => { | ||||||
|                         router.pushUrl({ |                         router.pushUrl({ | ||||||
|                           url: 'pages/Judge', |                           url: 'pages/Judge', | ||||||
|                         }, router.RouterMode.Single); |                         },router.RouterMode.Single); | ||||||
|                         testNapi.StopReadCard(); |                         testNapi.StopReadCard(); | ||||||
|                       }) |                       }) | ||||||
|                     }) |                     }) | ||||||
| @ -737,24 +883,13 @@ struct UserInfo { | |||||||
|             }) |             }) | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
| 
 |       if(this.showFaceCompare) { | ||||||
|       if (this.showFaceCompare) { |         FaceCompare({   sfzh: this.currentUser.sfzmhm, firstImage:this.currentUser.kszp,faceCompareSucess: $faceCompareSucess,getqkFlag:$getqkFlag,faceCatchImg:$faceCatchImg,lsh:globalThis.lsh }) | ||||||
|         FaceCompare({ |  | ||||||
|           showFaceCompare: $showFaceCompare, |  | ||||||
|           sfzh: this.currentUser.sfzmhm, |  | ||||||
|           firstImage: this.currentUser.kszp, |  | ||||||
|           faceCompareSucess: $faceCompareSucess, |  | ||||||
|           getqkFlag: $getqkFlag, |  | ||||||
|           faceCatchImg: $faceCatchImg, |  | ||||||
|           lsh: globalThis.lsh |  | ||||||
|         }) |  | ||||||
|       } |       } | ||||||
|       if (this.qkFlag) { |       if(this.qkFlag){ | ||||||
|         Column() { |         Column(){ | ||||||
|           Text('确认考生:' + this.currentUser.xm + '是否缺考') |           Text('确认考生:'+this.currentUser.xm+'是否缺考').fontSize(28*this.ratio).position({x:160*this.ratio,y:122*this.ratio}) | ||||||
|             .fontSize(28 * this.ratio) |           Row(){ | ||||||
|             .position({ x: 160 * this.ratio, y: 122 * this.ratio }) |  | ||||||
|           Row() { |  | ||||||
|             Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { |             Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { | ||||||
|               Text('  取   消  ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio) |               Text('  取   消  ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio) | ||||||
|             } |             } | ||||||
| @ -762,7 +897,6 @@ struct UserInfo { | |||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               this.qkFlag = false |               this.qkFlag = false | ||||||
|             }) |             }) | ||||||
| 
 |  | ||||||
|             Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { |             Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { | ||||||
|               Text('  确   定  ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio) |               Text('  确   定  ').fontSize(24 * this.ratio).fontColor('#fff').width(100 * this.ratio) | ||||||
|             } |             } | ||||||
| @ -770,15 +904,16 @@ struct UserInfo { | |||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|               this.qkFn() |               this.qkFn() | ||||||
|             }) |             }) | ||||||
|           }.position({ y: 265 * this.ratio, x: 115 * this.ratio }) |           }.position({y:265*this.ratio,x:115*this.ratio}) | ||||||
| 
 | 
 | ||||||
|         } |         }.width(660 * this.ratio) | ||||||
|         .width(660 * this.ratio) |  | ||||||
|         .height(360 * this.ratio) |         .height(360 * this.ratio) | ||||||
|         .position({ x: 150 * this.ratio, y: 98 * this.ratio }) |         .position({ x: 150 * this.ratio, y: 98 * this.ratio }) | ||||||
|         .backgroundColor('#E6E3DF') |         .backgroundColor('#E6E3DF') | ||||||
|         .borderRadius(19 * this.ratio) |         .borderRadius(19 * this.ratio) | ||||||
|       } |       } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|     } |     } | ||||||
|     .height('100%') |     .height('100%') | ||||||
|     .width('100%') |     .width('100%') | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user