user
This commit is contained in:
		
							parent
							
								
									a12d8c79e9
								
							
						
					
					
						commit
						e828c532de
					
				| @ -57,8 +57,8 @@ export default class EntryAbility extends UIAbility { | ||||
| 
 | ||||
|         const windowClass  = await windowStage.getMainWindow(); | ||||
|         globalThis.windowClass = windowClass | ||||
|         await windowClass.setWindowLayoutFullScreen(true) | ||||
|         // await windowClass.setWindowSystemBarEnable([]) //全屏
 | ||||
|         // await windowClass.setWindowLayoutFullScreen(true)
 | ||||
|         await windowClass.setWindowSystemBarEnable([]) //全屏
 | ||||
|         // await windowClass.setWindowSystemBarEnable(['navigation'])
 | ||||
| 
 | ||||
|         windowStage.loadContent('pages/Index', (err, data) => { | ||||
|  | ||||
| @ -81,21 +81,21 @@ struct UserInfo { | ||||
|   @State faceFlag: string = '0'; | ||||
|   @State FaceOpenStatue: string = '0'; //是否开启人脸识别 | ||||
|   @State faceCatchImg: string = '' | ||||
|   @State systemParam:systemParam={ | ||||
|     'Param341':true,//是否按顺序考试 | ||||
|     'Param803Str':'0',//开始考试前必须解开安全带或关车门 | ||||
|     'Param612Str':'0',//开始考试触发方式 | ||||
|     'Param770Str':'0',//车上没有缺考功能 | ||||
|     'Param305Str':'0',//视频保存天数 | ||||
|     'Param352Str':'0',//车上考试过一次就不能缺考 | ||||
|     'Param828Str':'0',//828考生待考界面,安全员显示考试员 | ||||
|     'Param830Str':'0',//同一学员连续第二次考试时不再验证身份 | ||||
|     'Param364':'0',//考前上车准备 | ||||
|     'Param398':'0',//考前上车准备 | ||||
|   @State systemParam: systemParam = { | ||||
|     'Param341': true, //是否按顺序考试 | ||||
|     'Param803Str': '0', //开始考试前必须解开安全带或关车门 | ||||
|     'Param612Str': '0', //开始考试触发方式 | ||||
|     'Param770Str': '0', //车上没有缺考功能 | ||||
|     'Param305Str': '0', //视频保存天数 | ||||
|     'Param352Str': '0', //车上考试过一次就不能缺考 | ||||
|     'Param828Str': '0', //828考生待考界面,安全员显示考试员 | ||||
|     'Param830Str': '0', //同一学员连续第二次考试时不再验证身份 | ||||
|     'Param364': '0', //考前上车准备 | ||||
|     'Param398': '0', //考前上车准备 | ||||
|   } | ||||
|   private title = '' | ||||
|   private type = '2' | ||||
|   @State startExam:boolean=false | ||||
|   @State startExam: boolean = false | ||||
|   // 过程照片拍照 | ||||
|   getPhoto = async (empty?: boolean) => { | ||||
|     const singlePlay = globalThis.singlePlay | ||||
| @ -134,15 +134,17 @@ struct UserInfo { | ||||
|     alignment: DialogAlignment.Center, | ||||
|   }, | ||||
|   ) | ||||
|   aboutToAppear(){ | ||||
| 
 | ||||
|   aboutToAppear() { | ||||
|     this.avPlayer = new VoiceAnnounce(); | ||||
|   } | ||||
| 
 | ||||
|   async onPageShow() { | ||||
|     this.isExamStart = false | ||||
|     this.startExam=false | ||||
|     this.startExam = false | ||||
|     this.updateTimeLimit = false | ||||
|     this.ksksLimit = false | ||||
|     this.currentUser=EmptyCandidateObject | ||||
|     this.currentUser = EmptyCandidateObject | ||||
|     const mediaTest = new FilePhoto(this.context); | ||||
|     this.filePhoto = new FilePhoto(this.context); | ||||
|     //语音功能on | ||||
| @ -161,22 +163,22 @@ struct UserInfo { | ||||
|         this.list = await getSyncData('USERLIST') | ||||
|         // @ts-ignore | ||||
|         const data = await getSyncData('USER') | ||||
|         console.log('useruser,',JSON.stringify(this.list)) | ||||
|         console.log('useruser1,',JSON.stringify(data)) | ||||
|         console.log('useruser,', JSON.stringify(this.list)) | ||||
|         console.log('useruser1,', JSON.stringify(data)) | ||||
| 
 | ||||
|         const user = data[0] | ||||
|         if (user && Number(user.kssycs)) { | ||||
|           let flag=false | ||||
|           let flag = false | ||||
|           this.list.forEach(res => { | ||||
|             if (res.sfzmhm == user.sfzmhm) { | ||||
|               flag=true | ||||
|               flag = true | ||||
|               res.kssycs = user.kssycs | ||||
| 
 | ||||
|               this.getCurrentStudent(res.sfzmhm) | ||||
|             } | ||||
|           }) | ||||
|           if(!flag){ | ||||
|             this.currentUser=(this.list.length?this.list[0]:EmptyCandidateObject) | ||||
|           if (!flag) { | ||||
|             this.currentUser = (this.list.length ? this.list[0] : EmptyCandidateObject) | ||||
|           } | ||||
|         } | ||||
|         else if (user && (user.kssycs == '0' || user.kssycs == '')) { | ||||
| @ -186,15 +188,31 @@ struct UserInfo { | ||||
|           }) | ||||
|           this.pageIndex = 0 | ||||
|           this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||
|           if (this.dataList.length) { | ||||
|             setTimeout(()=>{ | ||||
|               this.currentUser = this.dataList[0] | ||||
|               this.currentUser.ksy2= globalThis.kgxm | ||||
|               globalThis.lsh=this.currentUser.lsh | ||||
|             },200) | ||||
|           } else { | ||||
|             this.currentUser = EmptyCandidateObject | ||||
|           const data = await getSyncData('USER') | ||||
|           const user = data[0] | ||||
|           if (user && Number(user.kssycs)) { | ||||
|             let flag = false | ||||
|             this.list.forEach(res => { | ||||
|               if (res.sfzmhm == user.sfzmhm) { | ||||
|                 flag = true | ||||
|                 res.kssycs = user.kssycs | ||||
|                 this.getCurrentStudent(res.sfzmhm) | ||||
|               } | ||||
|             }) | ||||
|             if (!flag) { | ||||
|               this.currentUser = (this.list.length ? this.list[0] : EmptyCandidateObject) | ||||
|             } | ||||
|           } | ||||
|           // if (this.dataList.length) { | ||||
|           // | ||||
|           //   setTimeout(()=>{ | ||||
|           //     this.currentUser = this.dataList[0] | ||||
|           //     this.currentUser.ksy2= globalThis.kgxm | ||||
|           //     globalThis.lsh=this.currentUser.lsh | ||||
|           //   },200) | ||||
|           // } else { | ||||
|           //   this.currentUser = EmptyCandidateObject | ||||
|           // } | ||||
|         } | ||||
|         this.list.forEach((res, index) => { | ||||
|           res.id = index.toString() | ||||
| @ -221,11 +239,11 @@ struct UserInfo { | ||||
|     initJudgeUdp() | ||||
| 
 | ||||
|     //监听远程开始考试 | ||||
|     globalThis.udpEvent.onBeginExam(async ()=>{ | ||||
|       console.info('surenjun','userInfo收到UdpEvent事件') | ||||
|     globalThis.udpEvent.onBeginExam(async () => { | ||||
|       console.info('surenjun', 'userInfo收到UdpEvent事件') | ||||
|       if (this.isBoardPrePareSetPopupOpen && !this.isFirstBoardPrePareSetPopupBtnShow) { | ||||
|         await this.prePareSCZB() | ||||
|       }else{ | ||||
|       } else { | ||||
|         await this.prePareExam() | ||||
|       } | ||||
|     }) | ||||
| @ -254,16 +272,16 @@ struct UserInfo { | ||||
|   async getCurrentStudent(id) { | ||||
|     let flag = false | ||||
|     // this.pageIndex | ||||
|     console.log('currentidid',id) | ||||
|     console.log('currentidid', id) | ||||
|     this.list.map((res, index) => { | ||||
|       console.log('tttt',res.sfzmhm,res.xm) | ||||
|       console.log('tttt', res.sfzmhm, res.xm) | ||||
|       if (res.sfzmhm == id) { | ||||
|         flag = true | ||||
|         this.currentUser=EmptyCandidateObject | ||||
|         setTimeout(()=>{ | ||||
|         this.currentUser = EmptyCandidateObject | ||||
|         setTimeout(() => { | ||||
|           this.currentUser = res | ||||
|           this.currentUser.ksy2= globalThis.kgxm | ||||
|         },200) | ||||
|           this.currentUser.ksy2 = globalThis.kgxm | ||||
|         }, 200) | ||||
| 
 | ||||
|         globalThis.lsh = res.lsh | ||||
|         globalThis.ksyh = res.ksy1sfzmhm | ||||
| @ -291,12 +309,12 @@ struct UserInfo { | ||||
|     if (!flag) { | ||||
|       globalThis.lsh = '0000000000000' | ||||
|       await upDateTableByArray('USER', []) | ||||
|       setTimeout(()=>{ | ||||
|       setTimeout(() => { | ||||
|         this.currentUser = this.list[0] | ||||
|         this.currentUser.ksy2= globalThis.kgxm | ||||
|         this.currentUser.ksy2 = globalThis.kgxm | ||||
| 
 | ||||
|         globalThis.lsh = this.currentUser.lsh | ||||
|       },200) | ||||
|       }, 200) | ||||
| 
 | ||||
|       // promptAction.showToast({ | ||||
|       //   message: '未匹配到对应下载学员', | ||||
| @ -379,7 +397,7 @@ struct UserInfo { | ||||
|       this.pageIndex = 0 | ||||
|       this.dataList = this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) | ||||
|       this.currentUser = this.dataList[0] | ||||
|       this.currentUser.ksy2= '' | ||||
|       this.currentUser.ksy2 = '' | ||||
| 
 | ||||
|       this.lsh = this.currentUser.lsh | ||||
|       globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||
| @ -437,7 +455,7 @@ struct UserInfo { | ||||
|         const openCheckFlag = openCheckFlagParam?.[0]?.v_value == '1' ? '1' : '0' | ||||
| 
 | ||||
|         const faceParam = syssetParams.filter(sys => sys.v_no == '2413') //3 | ||||
|         console.log('FaceOpenStatue',openCheckFlag,this.FaceOpenStatue) | ||||
|         console.log('FaceOpenStatue', openCheckFlag, this.FaceOpenStatue) | ||||
|         // 1身份证读卡器 2指纹 3人脸 | ||||
|         if (openCheckFlag == '1') { | ||||
|           that.FaceOpenStatue = faceParam?.[0]?.v_value == '3' ? '1' : '0' | ||||
| @ -449,13 +467,13 @@ struct UserInfo { | ||||
|         syssetParams.forEach(sys => { | ||||
|           //364	绕车一周评判时机(1-开始考试后判 2-开始考试前判) | ||||
|           if (sys.v_no === '364' && decodeURIComponent(sys.v_value) == '2') { | ||||
|             this.systemParam.Param364=sys.v_value | ||||
|             this.systemParam.Param364 = sys.v_value | ||||
|             that.isBoardPrePareSetPopupOpen = true; | ||||
|             that.isFirstBoardPrePareSetPopupBtnShow = false | ||||
|           } | ||||
| 
 | ||||
|           //398参数为1 第二场考试上车准备不考 | ||||
|           if(sys.v_no === '398' && decodeURIComponent(sys.v_value) == '1'){ | ||||
|           if (sys.v_no === '398' && decodeURIComponent(sys.v_value) == '1') { | ||||
|             that.systemParam.Param398 = decodeURIComponent(sys.v_value) | ||||
|             that.isSecondBoardPrePareSetPopupOpen = true; | ||||
|           } | ||||
| @ -469,36 +487,36 @@ struct UserInfo { | ||||
|             that.systemParam.Param803Str = sys.v_value + ''; | ||||
|           } | ||||
|           //判断是否考生是否按顺序考试 | ||||
|           if (sys.v_no === '341'&&decodeURIComponent(sys.v_value) == '1') { | ||||
|             that.systemParam.Param341= true | ||||
|           }else{ | ||||
|           if (sys.v_no === '341' && decodeURIComponent(sys.v_value) == '1') { | ||||
|             that.systemParam.Param341 = true | ||||
|           } else { | ||||
|             //todo | ||||
|             that.systemParam.Param341= true | ||||
|             that.systemParam.Param341 = true | ||||
|           } | ||||
|           //开始考试触发方式 | ||||
|           if (sys.v_no === '612') { | ||||
|             that.systemParam.Param612Str= decodeURIComponent(sys.v_value) | ||||
|             that.systemParam.Param612Str = decodeURIComponent(sys.v_value) | ||||
|           } | ||||
|           //车上考试过一次就不能缺考 | ||||
|           if (sys.v_no === '352') { | ||||
|             that.systemParam.Param352Str= decodeURIComponent(sys.v_value) | ||||
|             that.systemParam.Param352Str = decodeURIComponent(sys.v_value) | ||||
|           } | ||||
|           //828考生待考界面,安全员显示考试员 | ||||
|           if (sys.v_no === '828') { | ||||
|             that.systemParam.Param828Str= decodeURIComponent(sys.v_value) | ||||
|             if(that.systemParam.Param828Str=='1'){ | ||||
|               that.labelBlocks[5].label='安全员名' | ||||
|             }else{ | ||||
|               that.labelBlocks[5].label='考试员名' | ||||
|             that.systemParam.Param828Str = decodeURIComponent(sys.v_value) | ||||
|             if (that.systemParam.Param828Str == '1') { | ||||
|               that.labelBlocks[5].label = '安全员名' | ||||
|             } else { | ||||
|               that.labelBlocks[5].label = '考试员名' | ||||
|             } | ||||
|             that.labelBlocks=JSON.parse(JSON.stringify(this.labelBlocks)) | ||||
|             that.labelBlocks = JSON.parse(JSON.stringify(this.labelBlocks)) | ||||
| 
 | ||||
|           } | ||||
|           //视频保存天数 | ||||
|           if (sys.v_no === '305') { | ||||
|             that.systemParam.Param305Str= decodeURIComponent(sys.v_value) | ||||
|             if(!Number(this.systemParam.Param305Str)){ | ||||
|               that.systemParam.Param305Str='2' | ||||
|             that.systemParam.Param305Str = decodeURIComponent(sys.v_value) | ||||
|             if (!Number(this.systemParam.Param305Str)) { | ||||
|               that.systemParam.Param305Str = '2' | ||||
|             } | ||||
|             // console.log('Param305Str',that.systemParam.Param305Str) | ||||
|             // delHilog(this.Param305Str) | ||||
| @ -512,28 +530,28 @@ struct UserInfo { | ||||
| 
 | ||||
|         //0不自动更新 1自动更新(不限次数) 2没有考生更新2次 | ||||
|         if (that.studentRefreshStatue == '2') { | ||||
|           if(that.list.length == 0){ | ||||
|           if (that.list.length == 0) { | ||||
|             clearInterval(that.interval) | ||||
|             that.interval = setInterval(() => { | ||||
|               if (that.numCount < 3) { | ||||
|                 that.numCount++ | ||||
|                 if(that.list.length==0){ | ||||
|                 if (that.list.length == 0) { | ||||
|                   that.getExaminationStudentInfoFn() | ||||
|                 } | ||||
|               } | ||||
|             }, 5000) | ||||
|           }else{ | ||||
|           } else { | ||||
|             that.getExaminationStudentInfoFn() | ||||
|           } | ||||
|         } else if (that.studentRefreshStatue == '1') { | ||||
|           if(that.list.length == 0){ | ||||
|           if (that.list.length == 0) { | ||||
|             clearInterval(that.interval) | ||||
|             that.interval = setInterval(() => { | ||||
|               if(that.list.length==0){ | ||||
|               if (that.list.length == 0) { | ||||
|                 that.getExaminationStudentInfoFn() | ||||
|               } | ||||
|             }, 5000) | ||||
|           }else{ | ||||
|           } else { | ||||
|             that.getExaminationStudentInfoFn() | ||||
|           } | ||||
|         } else { | ||||
| @ -579,9 +597,9 @@ struct UserInfo { | ||||
|     } | ||||
| 
 | ||||
|     // this.isBoardPrePareSetPopupOpen=true | ||||
|     this.isFirstBoardPrePareSetPopupBtnShow=false | ||||
|     console.log('isFirstBoardPrePareSetPopupBtnShow',this.isFirstBoardPrePareSetPopupBtnShow,this.isBoardPrePareSetPopupOpen) | ||||
|     this.startExam=false | ||||
|     this.isFirstBoardPrePareSetPopupBtnShow = false | ||||
|     console.log('isFirstBoardPrePareSetPopupBtnShow', this.isFirstBoardPrePareSetPopupBtnShow, this.isBoardPrePareSetPopupOpen) | ||||
|     this.startExam = false | ||||
|     await upDateTableByArray('USER', []) | ||||
|     await upDateTableByArray('USERLIST', []) | ||||
|     this.type = '2' | ||||
| @ -617,19 +635,19 @@ struct UserInfo { | ||||
|         this.list = JSON.parse(JSON.stringify(dataList)) | ||||
|         this.list.forEach((listData, index) => { | ||||
|           //考过一次不允许切换学员 | ||||
|           if(listData.kssycs=='1'){ | ||||
|             this.startExam=true | ||||
|           if (listData.kssycs == '1') { | ||||
|             this.startExam = true | ||||
|           } | ||||
|           listData.id = index.toString() | ||||
|           for (let i in listData) { | ||||
|             listData[i] = decodeURI(listData[i]) | ||||
|           } | ||||
|           if(this.systemParam.Param828Str=='1'||this.systemParam.Param828Str=='2'){ | ||||
|           if (this.systemParam.Param828Str == '1' || this.systemParam.Param828Str == '2') { | ||||
|             // listData.ksy2=listData.ksy1; | ||||
|             listData.ksy2=globalThis.kgxm | ||||
|           }else{ | ||||
|             listData.ksy2 = globalThis.kgxm | ||||
|           } else { | ||||
|             // listData.ksy2=listData.ksy2; | ||||
|             listData.ksy2=globalThis.kgxm | ||||
|             listData.ksy2 = globalThis.kgxm | ||||
|           } | ||||
|           listData.kszp = this.photo + listData.kszp | ||||
|           listData.ksmjzp = this.photo + listData.ksmjzp | ||||
| @ -638,26 +656,50 @@ struct UserInfo { | ||||
|         dataList = this.list.length > 4 ? this.list.slice(this.pageIndex * 4, this.pageIndex * 4 + 4) : this.list; | ||||
| 
 | ||||
|         this.dataList = dataList | ||||
|         const flag=dataList.filter((res)=>{ | ||||
|            return res.sfzmhm==this.currentUser.sfzmhm | ||||
|         }).length?true:false | ||||
|         if(!this.currentUser.sfzmhm||this.currentUser.kssycs=='0'||!flag){ | ||||
|         const user = this.dataList.filter(res => { | ||||
|           res.kssycs = '1' | ||||
|         }) | ||||
|         if (this.dataList.length) { | ||||
|             setTimeout(()=>{ | ||||
|           if (user.length) { | ||||
|             setTimeout(() => { | ||||
|               this.currentUser = user[0] | ||||
|               this.currentUser.ksy2 = globalThis.kgxm | ||||
|               globalThis.lsh = this.currentUser.lsh | ||||
|               globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||
|             }, 200) | ||||
|           } else { | ||||
|             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)) | ||||
|               this.currentUser.ksy2 = globalThis.kgxm | ||||
|               globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||
|               globalThis.lsh = this.currentUser.lsh | ||||
|             }, 200) | ||||
|           } | ||||
|         } else { | ||||
|           this.currentUser = EmptyCandidateObject | ||||
|         } | ||||
|         } | ||||
| 
 | ||||
| 
 | ||||
|         this.lsh = this.currentUser.lsh | ||||
|         globalThis.lsh = this.lsh | ||||
|         globalThis.ksyh = this.currentUser.ksy1sfzmhm | ||||
|         // 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') { | ||||
| @ -666,7 +708,7 @@ struct UserInfo { | ||||
|         } | ||||
| 
 | ||||
|         //398参数为1 第二场考试上车准备不考 | ||||
|         if(this.systemParam.Param398 == '1'){ | ||||
|         if (this.systemParam.Param398 == '1') { | ||||
|           this.isSecondBoardPrePareSetPopupOpen = true; | ||||
|         } | ||||
| 
 | ||||
| @ -689,7 +731,7 @@ struct UserInfo { | ||||
|   } | ||||
| 
 | ||||
|   qkFn() { | ||||
|     if(this.systemParam.Param352Str=='1'&&this.currentUser.kssycs=='1'){ | ||||
|     if (this.systemParam.Param352Str == '1' && this.currentUser.kssycs == '1') { | ||||
|       return | ||||
|     } | ||||
|     this.faceCompareSucess = 0 | ||||
| @ -771,14 +813,14 @@ struct UserInfo { | ||||
|     this.isLoadingPopupVisible = true | ||||
| 
 | ||||
|     avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => { | ||||
|       console.info('surenjun','播放结束开始考试接口调用') | ||||
|       console.info('surenjun', '播放结束开始考试接口调用') | ||||
|       const {code,keystr,message} = await this.beginExam() || {}; | ||||
|       console.info('surenjun','开始考试接口调用结束') | ||||
|       console.info('surenjun', '开始考试接口调用结束') | ||||
|       // console.info('surenjun',code +'') | ||||
|       //@ts-ignore TODO code转换 | ||||
| 
 | ||||
|       if (code != 1) { | ||||
|         avPlayer.playAudio([code == -200?'voice/photo_error.mp3':'voice/监管审核未通过.mp3']); | ||||
|         avPlayer.playAudio([code == -200 ? 'voice/photo_error.mp3' : 'voice/监管审核未通过.mp3']); | ||||
|         this.isLoadingPopupVisible = false | ||||
|         this.isExamStart = false | ||||
|         promptAction.showToast({ | ||||
| @ -798,7 +840,7 @@ struct UserInfo { | ||||
|           sczb: Number(this.isBoardPrePareSetPopupOpen), | ||||
|           kfdm: this.sczbkf, | ||||
|           //真实监管项目 | ||||
|           kString: decodeURIComponent( keystr || '') | ||||
|           kString: decodeURIComponent(keystr || '') | ||||
|         } | ||||
|       }, router.RouterMode.Single); | ||||
|       this.updateTimeLimit = false | ||||
| @ -811,7 +853,7 @@ struct UserInfo { | ||||
|   async checkSignal(): Promise<boolean> { | ||||
|     const {isCheckFireOpen} = judgeConfig | ||||
|     const {systemParam,isBoardPrePareSetPopupOpen} = this; | ||||
|     const Param803Str=systemParam.Param803Str | ||||
|     const Param803Str = systemParam.Param803Str | ||||
|     if (Param803Str === '') { | ||||
|       return true | ||||
|     } | ||||
| @ -920,10 +962,10 @@ struct UserInfo { | ||||
|     const date = new Date() | ||||
|     globalThis.startHourTime = await getCurrentHourTime() | ||||
|     const photoBase64 = await this.getPhoto(); | ||||
|     if(photoBase64==''){ | ||||
|       this.ksksLimit= false | ||||
|       this.isLoadingPopupVisible=false | ||||
|       return {code:-200} | ||||
|     if (photoBase64 == '') { | ||||
|       this.ksksLimit = false | ||||
|       this.isLoadingPopupVisible = false | ||||
|       return { code: -200 } | ||||
|     } | ||||
|     const drvexam = { | ||||
|       lsh: this.currentUser.lsh || '', | ||||
| @ -968,9 +1010,8 @@ struct UserInfo { | ||||
| 
 | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   //开始考试准备 | ||||
|   prePareExam = async() => { | ||||
|   prePareExam = async () => { | ||||
|     if (this.ksksLimit) { | ||||
|       return | ||||
|     } | ||||
| @ -1000,12 +1041,12 @@ struct UserInfo { | ||||
|         this.stopDeviceById() | ||||
|         return | ||||
|       } | ||||
|       console.log('this.FaceOpenStatuethis.FaceOpenStatue',this.FaceOpenStatue) | ||||
|       console.log('this.FaceOpenStatuethis.FaceOpenStatue', this.FaceOpenStatue) | ||||
|       if (this.FaceOpenStatue != '0') { | ||||
|         //   同一学员连续第二次考试时不再验证身份 | ||||
|         if(this.currentUser.kssycs=='1'&&this.systemParam.Param830Str=='1'){ | ||||
|         if (this.currentUser.kssycs == '1' && this.systemParam.Param830Str == '1') { | ||||
|           this.sfbdinterfaceFn() | ||||
|         }else{ | ||||
|         } else { | ||||
|           this.showFaceCompare = true | ||||
|         } | ||||
|       } else { | ||||
| @ -1064,17 +1105,17 @@ struct UserInfo { | ||||
|             .backgroundImage(item.sfzmhm != this.currentUser.sfzmhm ? $r('app.media.userbox2') : $r('app.media.userboxbg')) | ||||
|             .backgroundImageSize({ width: '100%', height: '100%' }) | ||||
|             .onClick(() => { | ||||
|               console.log('this.startExam',this.startExam,this.systemParam.Param364,this.isExamStart) | ||||
|               if ((this.isExamStart && !globalThis.singlePlay&&this.systemParam.Param341)||(this.startExam&&this.systemParam.Param364=='2')) { | ||||
|               console.log('this.startExam', this.startExam, this.systemParam.Param364, this.isExamStart) | ||||
|               if ((this.isExamStart && !globalThis.singlePlay && this.systemParam.Param341) || (this.startExam && this.systemParam.Param364 == '2')) { | ||||
|                 return | ||||
|               } | ||||
|               this.currentUser=EmptyCandidateObject | ||||
|               this.currentUser = EmptyCandidateObject | ||||
|               globalThis.lsh = item.lsh; | ||||
|               setTimeout(()=>{ | ||||
|               setTimeout(() => { | ||||
|                 this.currentUser = item | ||||
|                 this.currentUser.ksy2= globalThis.kgxm | ||||
|                 this.currentUser.ksy2 = globalThis.kgxm | ||||
| 
 | ||||
|               },200) | ||||
|               }, 200) | ||||
| 
 | ||||
|             }) | ||||
|           }) | ||||
| @ -1137,11 +1178,13 @@ struct UserInfo { | ||||
|         Column() { | ||||
|           // Image($r('app.media.yydj_btn')) | ||||
|           //   .commStyle() | ||||
|           imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.yydj_btn')}).margin({ bottom: 12 * this.ratio }) | ||||
|           imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.yydj_btn') }) | ||||
|             .margin({ bottom: 12 * this.ratio }) | ||||
| 
 | ||||
|           // Image($r('app.media.gx_btn')) | ||||
|           //   .commStyle() | ||||
|           imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.gx_btn')}).margin({ bottom: 12 * this.ratio }) | ||||
|           imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.gx_btn') }) | ||||
|             .margin({ bottom: 12 * this.ratio }) | ||||
|             .onClick(() => { | ||||
|               // this.avPlayer.playAudio(['button_media.wav']) | ||||
|               if (this.isExamStart && !globalThis.singlePlay) { | ||||
| @ -1153,23 +1196,25 @@ struct UserInfo { | ||||
|             }) | ||||
|           // Image($r('app.media.qk_btn')) | ||||
|           //   .commStyle() | ||||
|           imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.qk_btn')}).margin({ bottom: 12 * this.ratio }) | ||||
|           imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.qk_btn') }) | ||||
|             .margin({ bottom: 12 * this.ratio }) | ||||
|             .onClick(() => { | ||||
|               // this.avPlayer.playAudio(['button_media.wav']) | ||||
|               //  已开始考试不能缺考   已考过一次学员不能缺考                                                 车上不能缺考 | ||||
|               if (this.ksksLimit||(this.systemParam.Param352Str=='1'&&this.currentUser.kssycs=='1')||this.systemParam.Param770Str=='1') { | ||||
|               if (this.ksksLimit || (this.systemParam.Param352Str == '1' && this.currentUser.kssycs == '1') || this.systemParam.Param770Str == '1') { | ||||
|                 return | ||||
|               } | ||||
|               this.ksksLimit = true | ||||
|               this.qkFlag = true | ||||
|             }) | ||||
| 
 | ||||
|           if (this.isBoardPrePareSetPopupOpen && (this.isSecondBoardPrePareSetPopupOpen && this.currentUser.kssycs == '2')&& !this.isFirstBoardPrePareSetPopupBtnShow ) { | ||||
|           if (this.isBoardPrePareSetPopupOpen && (this.isSecondBoardPrePareSetPopupOpen && this.currentUser.kssycs == '2') && !this.isFirstBoardPrePareSetPopupBtnShow) { | ||||
|             //上车准备 | ||||
|             // Image($r('app.media.sczb_btn')).commStyle() | ||||
|             imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.sczb_btn')}).margin({ bottom: 12 * this.ratio }) | ||||
|             imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.sczb_btn') }) | ||||
|               .margin({ bottom: 12 * this.ratio }) | ||||
|               .onClick(async () => { | ||||
|                 if(this.systemParam.Param612Str=='1'){ | ||||
|                 if (this.systemParam.Param612Str == '1') { | ||||
|                   return | ||||
|                 } | ||||
|                 await this.prePareSCZB() | ||||
| @ -1177,9 +1222,10 @@ struct UserInfo { | ||||
|           } else { | ||||
|             // Image($r('app.media.ksks_btn')) | ||||
|             //   .commStyle() | ||||
|             imageBtn({btnWidth:220 * this.ratio,btnHeight:69 * this.ratio,imgSrc:$r('app.media.ksks_btn')}).margin({ bottom: 12 * this.ratio }) | ||||
|             imageBtn({ btnWidth: 220 * this.ratio, btnHeight: 69 * this.ratio, imgSrc: $r('app.media.ksks_btn') }) | ||||
|               .margin({ bottom: 12 * this.ratio }) | ||||
|               .onClick(async () => { | ||||
|                 if(this.systemParam.Param612Str=='1'){ | ||||
|                 if (this.systemParam.Param612Str == '1') { | ||||
|                   return | ||||
|                 } | ||||
|                 await this.prePareExam() | ||||
| @ -1315,7 +1361,7 @@ struct LabelBlock { | ||||
|     Row() { | ||||
|       Text(this.label).fontSize(20 * this.ratio).fontColor('#99948A') | ||||
|       Row() { | ||||
|         Text(decodeURIComponent(this.value||'')|| '') | ||||
|         Text(decodeURIComponent(this.value || '') || '') | ||||
|           .fontColor('#fff') | ||||
|           .textAlign(TextAlign.Center) | ||||
|           .width('100%') | ||||
| @ -1326,15 +1372,15 @@ struct LabelBlock { | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| type systemParam={ | ||||
|   'Param341':boolean,//是否按顺序考试 | ||||
|   'Param803Str':string,//开始考试前必须解开安全带或关车门 | ||||
|   'Param612Str':string,//开始考试触发方式 | ||||
|   'Param305Str':string,//视频保存天数 | ||||
|   'Param352Str':string,//车上考试过一次就不能缺考 | ||||
|   'Param828Str':string,//828考生待考界面,安全员显示考试员 | ||||
|   'Param770Str':string,//车上没有缺考功能 | ||||
|   'Param830Str':string,//同一学员连续第二次考试时不再验证身份 | ||||
|   'Param364':string,//考前上车准备 | ||||
|   'Param398':string,//考前上车准备 | ||||
| type systemParam = { | ||||
|   'Param341': boolean, //是否按顺序考试 | ||||
|   'Param803Str': string, //开始考试前必须解开安全带或关车门 | ||||
|   'Param612Str': string, //开始考试触发方式 | ||||
|   'Param305Str': string, //视频保存天数 | ||||
|   'Param352Str': string, //车上考试过一次就不能缺考 | ||||
|   'Param828Str': string, //828考生待考界面,安全员显示考试员 | ||||
|   'Param770Str': string, //车上没有缺考功能 | ||||
|   'Param830Str': string, //同一学员连续第二次考试时不再验证身份 | ||||
|   'Param364': string, //考前上车准备 | ||||
|   'Param398': string, //考前上车准备 | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user