弹窗异常关闭
This commit is contained in:
		
							parent
							
								
									2a9b4a4f4d
								
							
						
					
					
						commit
						bd41dc0ad2
					
				| @ -54,59 +54,6 @@ struct Index { | ||||
|     }), | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|      | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     customStyle: true, | ||||
|     alignment: DialogAlignment.Center, | ||||
|   }) | ||||
| @ -507,7 +454,6 @@ struct Index { | ||||
|         } | ||||
|       }) | ||||
|     }); | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   aboutToDisappear() { | ||||
| @ -518,10 +464,6 @@ struct Index { | ||||
|     if (this.loading) { | ||||
|       return | ||||
|     } | ||||
|     // let mode=globalThis.timeInfo?.mode?globalThis.timeInfo?.mode:1 | ||||
| 
 | ||||
|     // console.log('mode',mode) | ||||
| 
 | ||||
|     const param = { | ||||
|       carId: globalThis.carInfo?.carId, | ||||
|       examinationRoomId: globalThis.carInfo?.examinationRoomId, | ||||
| @ -536,30 +478,18 @@ struct Index { | ||||
|       singlePlay: globalThis.singlePlay | ||||
|     } | ||||
|     this.loading = true | ||||
|     console.log("sql 1111") | ||||
| 
 | ||||
|     getSingleCenterTable(param).then((ret) => { | ||||
|       console.log('teststetfinsh1', ret) | ||||
|       // DB.queryListBySql('select * from MA_SYSSET', [{ | ||||
|       //   name: "v_no", | ||||
|       //   type: ColumnType.STRING, | ||||
|       //   columnName: "v_no" | ||||
|       // }]).then((res) => { | ||||
|       //   console.log('sql success', JSON.stringify(res)) | ||||
|       // }).catch((err) => { | ||||
|       //   console.log('sql error1', err) | ||||
|       // }) | ||||
|       console.log('getSingleCenterTable finish', ret) | ||||
|       if (ret) { | ||||
|         getSyncData('MA_SYSSET').then(data => { | ||||
|           console.log('datadata', JSON.stringify(data)) | ||||
|           // @ts-ignore | ||||
|         getSyncData('MA_SYSSET').then((data: any[]) => { | ||||
|           console.log('MA_SYSSET data', JSON.stringify(data)) | ||||
|           data.forEach(sys => { | ||||
|             //判断是否能点开始考试 | ||||
|             if (sys.v_no === '854') { | ||||
|               globalThis.param854Str = sys.v_value | ||||
|             } | ||||
|             if (sys.v_no === '824' && decodeURIComponent(sys.v_value) == '0') { | ||||
|               // this.Param612Str= decodeURIComponent(sys.v_value) | ||||
|               router.pushUrl({ | ||||
|                 url: 'pages/CarCheck', | ||||
|                 params: { | ||||
| @ -572,9 +502,12 @@ struct Index { | ||||
|               }, router.RouterMode.Single) | ||||
|             } | ||||
|           }) | ||||
|         }).finally(() => { | ||||
|           this.loading = false | ||||
|         }); | ||||
| 
 | ||||
|       } | ||||
|     }).finally(() => { | ||||
|       this.loading = false | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
| @ -623,9 +556,7 @@ struct Index { | ||||
|       globalThis.singlePlay = false | ||||
|     } | ||||
|     this.isSingle = globalThis.singlePlay | ||||
|     // this.loading = false | ||||
|     this.num = 0 | ||||
|     // const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort) | ||||
|     globalThis.lsh = '1111111111111' | ||||
|   } | ||||
| 
 | ||||
| @ -666,7 +597,6 @@ struct Index { | ||||
|         console.error(`Failed to request permissions from user. Code is ${err.code}, message is ${err.message}`); | ||||
|       }) | ||||
|     }) | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   async initParams() { | ||||
|  | ||||
| @ -109,7 +109,6 @@ struct UserInfo { | ||||
|     if (this.ksksLimit) { | ||||
|       return | ||||
|     } | ||||
|     console.log('routerParamrouterParam') | ||||
|     try { | ||||
|       await this.checkSignal() | ||||
|       this.faceCompareSucess = 0 | ||||
| @ -140,7 +139,6 @@ struct UserInfo { | ||||
|         //   同一学员连续第二次考试时不再验证身份 | ||||
|         if (this.currentUser.kssycs == '1' && this.systemParam.Param830Str == '1') { | ||||
|           this.sfbdinterfaceFn() | ||||
| 
 | ||||
|         } else { | ||||
|           this.ksksLimit = false | ||||
|           this.showFaceCompare = true | ||||
| @ -891,6 +889,7 @@ struct UserInfo { | ||||
|     const {carId,examinationRoomId} = carInfo; | ||||
|     let examItems = { getExaminationItemRsp: { body: { ykxx: '' } } }; | ||||
|     if (!globalThis.singlePlay) { | ||||
|       try { | ||||
|         //获取已考项目 | ||||
|         // @ts-ignore | ||||
|         examItems = await getExaminationItem({ | ||||
| @ -899,6 +898,15 @@ struct UserInfo { | ||||
|           lsh: this.currentUser.lsh || '', | ||||
|           examinationRoomId | ||||
|         }) | ||||
|       } catch (e) { | ||||
|         promptAction.showToast({ | ||||
|           message: "获取考试信息失败,请重试", | ||||
|           duration: 3000 | ||||
|         }) | ||||
|         this.isLoadingPopupVisible = false | ||||
|         this.isExamStart = false | ||||
|         return | ||||
|       } | ||||
|     } | ||||
|     this.currentUser.id = '1' | ||||
|     const avPlayer = this.avPlayer; | ||||
| @ -906,11 +914,9 @@ struct UserInfo { | ||||
| 
 | ||||
|     avPlayer.playAudio([`voice/监管通信中.mp3`], false, async () => { | ||||
|       console.info('surenjun', '播放结束开始考试接口调用') | ||||
|       try { | ||||
|         const {code,keystr,message} = await this.beginExam() || {}; | ||||
|         console.info('surenjun', '开始考试接口调用结束') | ||||
|       // console.info('surenjun',code +'') | ||||
|       //@ts-ignore TODO code转换 | ||||
| 
 | ||||
|         if (code != 1) { | ||||
|           avPlayer.playAudio([code == -200 ? 'voice/photo_error.mp3' : 'voice/监管审核未通过.mp3']); | ||||
|           this.isLoadingPopupVisible = false | ||||
| @ -938,6 +944,15 @@ struct UserInfo { | ||||
|         this.updateTimeLimit = false | ||||
|         this.stopDeviceById() | ||||
|         this.stepFlag = false | ||||
|       } catch (e) { | ||||
|         promptAction.showToast({ | ||||
|           message: "监管审核失败,请重试", | ||||
|           duration: 3000 | ||||
|         }) | ||||
|         this.isLoadingPopupVisible = false | ||||
|         this.isExamStart = false | ||||
|         return | ||||
|       } | ||||
|     }) | ||||
|   } | ||||
| 
 | ||||
| @ -1097,9 +1112,7 @@ struct UserInfo { | ||||
|       }).catch(err => { | ||||
|         console.log("USER insert fail", JSON.stringify(err)) | ||||
|       }) | ||||
|       // await upDateTableByArray('USER', [this.currentUser]) | ||||
|       console.log("User", JSON.stringify(this.currentUser)) | ||||
|       // await sqlInsertCommonFn("USER", [this.currentUser]) | ||||
|       globalThis.statue = 4 | ||||
|       this.isBoardPrePareSetPopupShow = true; | ||||
|       this.isFirstBoardPrePareSetPopupBtnShow = true; | ||||
| @ -1284,9 +1297,9 @@ struct UserInfo { | ||||
|                   return | ||||
|                 } | ||||
|                 //835参数值和预约考试次数对比 | ||||
|                 if(Number(this.systemParam.Param835)<=Number(this.currentUser.yycs)&&!globalThis.singlePlay){ | ||||
|                   this.type='4' | ||||
|                   this.title='当前考生预约考试次数为'+this.currentUser.yycs | ||||
|                 if (Number(this.systemParam.Param835) <= Number(this.currentUser.yycs) && !globalThis.singlePlay) { | ||||
|                   this.type = '4' | ||||
|                   this.title = '当前考生预约考试次数为' + this.currentUser.yycs | ||||
|                   this.errorDialog.open() | ||||
|                   return | ||||
|                 } | ||||
| @ -1446,5 +1459,5 @@ type systemParam = { | ||||
|   'Param830Str': string, //同一学员连续第二次考试时不再验证身份 | ||||
|   'Param364': string, //考前上车准备 | ||||
|   'Param398': string, //考前上车准备 | ||||
|   'Param835' :string | ||||
|   'Param835': string | ||||
| } | ||||
| @ -54,6 +54,7 @@ import { | ||||
|   examJudgeVersion | ||||
| } from './api/index'; | ||||
| import { getSyncData, upDateTableByArray } from '../../common/service/initable'; | ||||
| import promptAction from '@ohos.promptAction'; | ||||
| 
 | ||||
| const judgeTag = 'SURENJUN_JUDGE' | ||||
| 
 | ||||
| @ -382,10 +383,10 @@ export default class Judge { | ||||
|           //成绩不合格
 | ||||
|           if (totalScore < passingGrade) { | ||||
|             //科目三不合格报靠边停车
 | ||||
|             if (examSubject == 3 ) { | ||||
|               if( param302 == 1){ | ||||
|             if (examSubject == 3) { | ||||
|               if (param302 == 1) { | ||||
|                 avPlayer.playAudio([`voice/考试结束.mp3`]); | ||||
|               }else if(param302 == 0){ | ||||
|               } else if (param302 == 0) { | ||||
|                 return | ||||
|               } | ||||
|             } | ||||
| @ -1226,7 +1227,7 @@ export default class Judge { | ||||
|       }) | ||||
|     } else { | ||||
|       //收到综合评判语音时,显示综合评判弹窗
 | ||||
|       if(code[0] == 'zhpp'){ | ||||
|       if (code[0] == 'zhpp') { | ||||
|         clearTimeout(this.deductedPopShowTimer) | ||||
|         this.judgeUI.isDeductedPopShow = true | ||||
|         this.judgeUI.defaultTabIndex = 1 | ||||
| @ -1298,17 +1299,15 @@ export default class Judge { | ||||
|       judgeUI, | ||||
|       ksjs, | ||||
|       getPhoto, | ||||
|       uploadProgressData, | ||||
|       uploadDisConnectData, | ||||
|       avPlayer, | ||||
|       kfArr, | ||||
|       judgeTask, | ||||
|       filePath, | ||||
|       closeAllFiles | ||||
|     } = this; | ||||
|     const { lsh, idCard, serialNumber, kssycs, totalScore, judgeConfigObj, isAllProjectsEnd, passingScore } = judgeUI | ||||
|     //TODO 断网考试结束补传
 | ||||
|     // await uploadDisConnectData();
 | ||||
|     try { | ||||
|       const time = await getCurrentTime(); | ||||
|       const photoBase64 = await getPhoto(); | ||||
|       const { d1, d2, d3, d4, d5 } = ksjs | ||||
| @ -1458,6 +1457,14 @@ export default class Judge { | ||||
|         }) | ||||
|       } | ||||
| 
 | ||||
|     } catch (e) { | ||||
|       promptAction.showToast({ | ||||
|         message: "考试结束异常,请尝试重新结束", | ||||
|         duration: 3000 | ||||
|       }) | ||||
|       judgeUI.loadingPopupVisible = false | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   // 当前项目转换
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user