feat:更新
This commit is contained in:
		
							parent
							
								
									ac95a82524
								
							
						
					
					
						commit
						9dd3b84534
					
				| @ -47,6 +47,7 @@ struct UserInfo { | ||||
|   @State lsh: string = '' | ||||
|   @State qkFlag: boolean = false | ||||
|   @State isBoardPrePareSetPopupOpen: boolean = false | ||||
|   @State isSecondBoardPrePareSetPopupOpen: boolean = false | ||||
|   @State isFirstBoardPrePareSetPopupBtnShow: boolean = false | ||||
|   @State isBoardPrePareSetPopupShow: boolean = false | ||||
|   @State isLoadingPopupVisible: boolean = false; | ||||
| @ -199,7 +200,7 @@ struct UserInfo { | ||||
|         }) | ||||
|         await upDateTableByArray('USERLIST', this.list || []) | ||||
|       } else { | ||||
|         this.getExaminationStudentInfoFn() | ||||
|         await this.getExaminationStudentInfoFn() | ||||
|       } | ||||
|     } | ||||
| 
 | ||||
| @ -447,12 +448,13 @@ struct UserInfo { | ||||
|           if (sys.v_no === '364' && decodeURIComponent(sys.v_value) == '2') { | ||||
|             this.systemParam.Param364=sys.v_value | ||||
|             that.isBoardPrePareSetPopupOpen = true; | ||||
|             that.isFirstBoardPrePareSetPopupBtnShow = false | ||||
|           } | ||||
| 
 | ||||
|           //398参数为1 第二场考试上车准备不考 | ||||
|           if(sys.v_no === '398' && decodeURIComponent(sys.v_value) == '1' && this.currentUser.kssycs == '1'){ | ||||
|             that.systemParam.Param398=decodeURIComponent(sys.v_value) | ||||
|             that.isBoardPrePareSetPopupOpen = false; | ||||
|           if(sys.v_no === '398' && decodeURIComponent(sys.v_value) == '1'){ | ||||
|             that.systemParam.Param398 = decodeURIComponent(sys.v_value) | ||||
|             that.isSecondBoardPrePareSetPopupOpen = true; | ||||
|           } | ||||
| 
 | ||||
|           // 车上没有缺考功能 | ||||
| @ -649,15 +651,18 @@ struct UserInfo { | ||||
|         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; | ||||
|           this.isFirstBoardPrePareSetPopupBtnShow = false; | ||||
|         } | ||||
| 
 | ||||
|         //398参数为1 第二场考试上车准备不考 | ||||
|         if(this.systemParam.Param398 == '1' && this.currentUser.kssycs == '1'){ | ||||
|           this.isBoardPrePareSetPopupOpen = false; | ||||
|         if(this.systemParam.Param398 == '1'){ | ||||
|           this.isSecondBoardPrePareSetPopupOpen = true; | ||||
|         } | ||||
| 
 | ||||
|         this.pageIndex = 0 | ||||
|         getSyncData('USER').then(data => { | ||||
|           if (data?.[0]) { | ||||
| @ -764,8 +769,9 @@ struct UserInfo { | ||||
|       console.info('surenjun','开始考试接口调用结束') | ||||
|       // console.info('surenjun',code +'') | ||||
|       //@ts-ignore TODO code转换 | ||||
| 
 | ||||
|       if (code != 1) { | ||||
|         avPlayer.playAudio(['voice/监管审核未通过.mp3']); | ||||
|         avPlayer.playAudio([code == -200?'voice/photo_error.mp3':'voice/监管审核未通过.mp3']); | ||||
|         this.isLoadingPopupVisible = false | ||||
|         this.isExamStart = false | ||||
|         promptAction.showToast({ | ||||
| @ -908,9 +914,9 @@ struct UserInfo { | ||||
|     globalThis.startHourTime = await getCurrentHourTime() | ||||
|     const photoBase64 = await this.getPhoto(); | ||||
|     if(photoBase64==''){ | ||||
|       this.ksksLimit=false | ||||
|       this.ksksLimit= false | ||||
|       this.isLoadingPopupVisible=false | ||||
|       return | ||||
|       return {code:-200} | ||||
|     } | ||||
|     const drvexam = { | ||||
|       lsh: this.currentUser.lsh || '', | ||||
| @ -1140,7 +1146,7 @@ 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']) | ||||
|               //  已开始考试不能缺考   已考过一次学员不能缺考                                                 车上不能缺考 | ||||
| @ -1151,16 +1157,16 @@ struct UserInfo { | ||||
|               this.qkFlag = true | ||||
|             }) | ||||
| 
 | ||||
|           if (this.isBoardPrePareSetPopupOpen && !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 }) | ||||
|               .onClick(async () => { | ||||
|               if(this.systemParam.Param612Str=='1'){ | ||||
|                 return | ||||
|               } | ||||
|               await this.prePareSCZB() | ||||
|             }) | ||||
|                 if(this.systemParam.Param612Str=='1'){ | ||||
|                   return | ||||
|                 } | ||||
|                 await this.prePareSCZB() | ||||
|               }) | ||||
|           } else { | ||||
|             // Image($r('app.media.ksks_btn')) | ||||
|             //   .commStyle() | ||||
|  | ||||
| @ -23,8 +23,6 @@ export default struct  DeductedPopup { | ||||
|   private  markRules:MarkRule[] = [] | ||||
|   @State universalMarkRules:MarkRule[] = [] | ||||
|   @State manualMarkRules:MarkRule[] = [] | ||||
|   @State currentItems:string[] = [] | ||||
|   @Prop defaultTabIndex:number = 0 | ||||
|   @State lineBg:Array<string> = ['#4D4136','#26231E'] | ||||
|   @State selectedLine:number = undefined | ||||
|   @State endPopupVisible:boolean = false | ||||
| @ -35,6 +33,9 @@ export default struct  DeductedPopup { | ||||
|     bgColor:'#B36E00' | ||||
|   } | ||||
| 
 | ||||
|   @Prop defaultTabIndex:number = 0 | ||||
|   @Prop @Watch('changeCurrentItems') currentItems:string[] = [] | ||||
| 
 | ||||
|   aboutToAppear(){ | ||||
|     //@ts-ignore | ||||
|     this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno) || this.currentItems.includes(item.itemno + ''))); | ||||
| @ -42,8 +43,18 @@ export default struct  DeductedPopup { | ||||
|     if(this.currentIndex == 1){ | ||||
|       this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) | ||||
|     } | ||||
| 
 | ||||
|   } | ||||
| 
 | ||||
|   changeCurrentItems(){ | ||||
|     console.info('popup',JSON.stringify(this.currentItems)); | ||||
|     //@ts-ignore | ||||
|     this.universalMarkRules = this.markRules.filter(item => (this.currentItems.includes(item.itemno) || this.currentItems.includes(item.itemno + ''))); | ||||
|     this.currentIndex = this.defaultTabIndex | ||||
|     if(this.currentIndex == 1){ | ||||
|       this.universalMarkRules = this.markRules.filter(item => item.itemno == 20 ) | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   //上一页 下一页 | ||||
|   goPage(typeIndex){ | ||||
|     const currentIndex = this.currentIndex | ||||
|  | ||||
| @ -43,8 +43,9 @@ export default class FilePhoto{ | ||||
|         console.info('surenjun','拍照结束' + JSON.stringify(res)) | ||||
|         return res.base64 | ||||
|       } catch (e) { | ||||
|         console.error('surenjun =>拍照异常' + JSON.stringify(e)) | ||||
|         promptAction.showToast({ | ||||
|           message: '拍照异常,请重新' + JSON.stringify(e), | ||||
|           message: '拍照异常,请联系工程人员!', | ||||
|           duration: 2000 | ||||
|         }); | ||||
|         return '' | ||||
|  | ||||
							
								
								
									
										
											BIN
										
									
								
								entry/src/main/resources/rawfile/voice/photo_error.mp3
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								entry/src/main/resources/rawfile/voice/photo_error.mp3
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user