彈框修改
This commit is contained in:
		
							parent
							
								
									4e4d357f7a
								
							
						
					
					
						commit
						5fba22c2ed
					
				| @ -324,33 +324,33 @@ export default class UdpClientByCenter { | |||||||
|           // getUDP(globalThis.context,true)
 |           // getUDP(globalThis.context,true)
 | ||||||
|           globalThis.title='差分状态异常' |           globalThis.title='差分状态异常' | ||||||
|           globalThis.type='3' |           globalThis.type='3' | ||||||
|           AppStorage.SetOrCreate('errorMsg', 1); |           // AppStorage.SetOrCreate('errorCode', 1);
 | ||||||
|           if(this.errorStep!=1){ |           // if(this.errorStep!=1){
 | ||||||
|             this.errorStep=1 |           //   this.errorStep=1
 | ||||||
|             this.avPlayer.playAudio(['voice/差分状态异常.wav']) |           //   this.avPlayer.playAudio(['voice/差分状态异常.wav'])
 | ||||||
|             getSyncData('MA_SYSSET').then(syssetParams => { |           //   getSyncData('MA_SYSSET').then(syssetParams => {
 | ||||||
|               // @ts-ignore
 |           //     // @ts-ignore
 | ||||||
|               syssetParams.forEach(sys => { |           //     syssetParams.forEach(sys => {
 | ||||||
|                 // 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是)
 |           //       // 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是)
 | ||||||
|                 if (sys.v_no === '424'&&sys.v_value==1){ |           //       if (sys.v_no === '424'&&sys.v_value==1){
 | ||||||
|                   //plc差分丢失
 |           //         //plc差分丢失
 | ||||||
|                   console.log('sys.v_valuesys.v_valuesys.v_value',sys.v_value) |           //         console.log('sys.v_valuesys.v_valuesys.v_value',sys.v_value)
 | ||||||
|                   AppStorage.SetOrCreate('errorCode', 0); |           //         AppStorage.SetOrCreate('errorCode', 0);
 | ||||||
|                   AppStorage.SetOrCreate('errorCodeFlage', true); |           //         AppStorage.SetOrCreate('errorCodeFlage', true);
 | ||||||
| 
 |           //
 | ||||||
|                 } |           //       }
 | ||||||
|               }) |           //     })
 | ||||||
|               // const errorParam = syssetParams.filter(sys => sys.v_no === '424') //
 |           //     // const errorParam = syssetParams.filter(sys => sys.v_no === '424') //
 | ||||||
|               // that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
 |           //     // that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
 | ||||||
| 
 |           //
 | ||||||
| 
 |           //
 | ||||||
|             }); |           //   });
 | ||||||
|           } |           // }
 | ||||||
|         } |         } | ||||||
|       }else{ |       }else{ | ||||||
|         AppStorage.SetOrCreate('errorCode', -1); |         // AppStorage.SetOrCreate('errorCode', -1);
 | ||||||
|         AppStorage.SetOrCreate('errorCodeFlage', false); |         // AppStorage.SetOrCreate('errorCodeFlage', false);
 | ||||||
|         this.errorStep=0 |         // this.errorStep=0
 | ||||||
|         globalThis.dialogOpen=false |         globalThis.dialogOpen=false | ||||||
|       } |       } | ||||||
|       this.chafenFlag=0 |       this.chafenFlag=0 | ||||||
| @ -401,30 +401,30 @@ export default class UdpClientByCenter { | |||||||
|             globalThis.title='plc udp信号丢失' |             globalThis.title='plc udp信号丢失' | ||||||
|             globalThis.type='3' |             globalThis.type='3' | ||||||
|             if(!globalThis.dialogOpen){ |             if(!globalThis.dialogOpen){ | ||||||
|               AppStorage.SetOrCreate('errorMsg', 1); |               // AppStorage.SetOrCreate('errorCode', 1);
 | ||||||
|               if(this.errorStep!=1){ |               // if(this.errorStep!=1){
 | ||||||
|                 console.log('sys.v_valuesys.v_valuesys.v_value11221') |               //   console.log('sys.v_valuesys.v_valuesys.v_value11221')
 | ||||||
| 
 |               //
 | ||||||
|                 this.errorStep=1 |               //   this.errorStep=1
 | ||||||
|                 this.avPlayer.playAudio(['voice/差分状态异常.wav']) |               //   this.avPlayer.playAudio(['voice/差分状态异常.wav'])
 | ||||||
|                 getSyncData('MA_SYSSET').then(syssetParams => { |               //   getSyncData('MA_SYSSET').then(syssetParams => {
 | ||||||
|                   console.log('sys.v_valuesys.v_valuesys.v_value11221',JSON.stringify(syssetParams)) |               //     console.log('sys.v_valuesys.v_valuesys.v_value11221',JSON.stringify(syssetParams))
 | ||||||
|                   // @ts-ignore
 |               //     // @ts-ignore
 | ||||||
|                   syssetParams.forEach(sys => { |               //     syssetParams.forEach(sys => {
 | ||||||
|                     // 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是)
 |               //       // 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是)
 | ||||||
|                     if (sys.v_no === '424'&&sys.v_value==1){ |               //       if (sys.v_no === '424'&&sys.v_value==1){
 | ||||||
|                       //plc差分丢失
 |               //         //plc差分丢失
 | ||||||
|                       AppStorage.SetOrCreate('errorCode', 0); |               //         AppStorage.SetOrCreate('errorCode', 0);
 | ||||||
|                       AppStorage.SetOrCreate('errorCodeFlage', true); |               //         AppStorage.SetOrCreate('errorCodeFlage', true);
 | ||||||
| 
 |               //
 | ||||||
|                     } |               //       }
 | ||||||
|                   }) |               //     })
 | ||||||
|                   // const errorParam = syssetParams.filter(sys => sys.v_no === '424') //
 |               //     // const errorParam = syssetParams.filter(sys => sys.v_no === '424') //
 | ||||||
|                   // that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
 |               //     // that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0'
 | ||||||
| 
 |               //
 | ||||||
| 
 |               //
 | ||||||
|                 }); |               //   });
 | ||||||
|               } |               // }
 | ||||||
|             } |             } | ||||||
|             num = 0 |             num = 0 | ||||||
|           } |           } | ||||||
|  | |||||||
| @ -72,8 +72,9 @@ export default async function request(req: any) { | |||||||
|             }else{ |             }else{ | ||||||
|                 globalThis.type='1' |                 globalThis.type='1' | ||||||
|                 const resultMessage = res?.body?.resultMessage || res?.head?.resultMessage |                 const resultMessage = res?.body?.resultMessage || res?.head?.resultMessage | ||||||
|                 AppStorage.SetOrCreate('errorMsg', 1); |                 // AppStorage.SetOrCreate('errorMsg', 1);
 | ||||||
|                 globalThis.title=decodeURIComponent(resultMessage) |                 globalThis.title=decodeURIComponent(resultMessage) | ||||||
|  |                 globalThis.errorDialog.open() | ||||||
|                 prompt.showToast({ |                 prompt.showToast({ | ||||||
|                     message: decodeURIComponent(resultMessage), |                     message: decodeURIComponent(resultMessage), | ||||||
|                     duration: 3000 |                     duration: 3000 | ||||||
| @ -90,8 +91,10 @@ export default async function request(req: any) { | |||||||
|         }else { |         }else { | ||||||
|             globalThis.type='1' |             globalThis.type='1' | ||||||
|             if(!host){ |             if(!host){ | ||||||
|                 AppStorage.SetOrCreate('errorMsg', 1); |                 // AppStorage.SetOrCreate('errorMsg', 1);
 | ||||||
|                 globalThis.title=decodeURIComponent(resObj.resultMessage) |                 globalThis.title=decodeURIComponent(resObj.resultMessage) | ||||||
|  |                 globalThis.errorDialog.open() | ||||||
|  | 
 | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             prompt.showToast({ |             prompt.showToast({ | ||||||
| @ -159,6 +162,8 @@ function handleCenterCode(msgXml,isNewCenter){ | |||||||
|             const {code,message,keystr} = result |             const {code,message,keystr} = result | ||||||
|             if(code != '1'){ |             if(code != '1'){ | ||||||
|                 const rMessage = decodeURIComponent(message as string) |                 const rMessage = decodeURIComponent(message as string) | ||||||
|  |                 globalThis.title=rMessage | ||||||
|  |                 globalThis.errorDialog.open() | ||||||
|                 prompt.showToast({ |                 prompt.showToast({ | ||||||
|                     message:rMessage, |                     message:rMessage, | ||||||
|                     duration: 3000 |                     duration: 3000 | ||||||
| @ -181,6 +186,8 @@ function handleCenterCode(msgXml,isNewCenter){ | |||||||
|             message: decodeURIComponent(message as string), |             message: decodeURIComponent(message as string), | ||||||
|             duration: 3000 |             duration: 3000 | ||||||
|         }); |         }); | ||||||
|  |         globalThis.title=decodeURIComponent(message as string) | ||||||
|  |         globalThis.errorDialog.open() | ||||||
|         return {code,message:decodeURIComponent(message)} |         return {code,message:decodeURIComponent(message)} | ||||||
|     }else{ |     }else{ | ||||||
|         return { code } |         return { code } | ||||||
|  | |||||||
| @ -101,21 +101,14 @@ struct Index { | |||||||
|                 if (this.loading) { |                 if (this.loading) { | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
|                 const data=AppStorage.Get('errorCode'); // returns 47 |  | ||||||
|                 if(data==0){ |  | ||||||
|                   globalThis.title='差分状态异常' |  | ||||||
|                   globalThis.type='3' |  | ||||||
|                   AppStorage.SetOrCreate('errorMsg', 1); |  | ||||||
|                   return |  | ||||||
|                 } |  | ||||||
|                 setTimeout(() => { |                 setTimeout(() => { | ||||||
|                   this.angle = 360 |                   this.angle = 360 | ||||||
|                 }, 1000) |                 }, 1000) | ||||||
|                 this.angle = 0 |                 this.angle = 0 | ||||||
|                 if (!globalThis.timeInfo) { |                 if (!globalThis.timeInfo) { | ||||||
|                   globalThis.type='1' |                   globalThis.type='1' | ||||||
|                   AppStorage.SetOrCreate('errorMsg', 1); |  | ||||||
|                   globalThis.title='时间同步接口连接失败' |                   globalThis.title='时间同步接口连接失败' | ||||||
|  |                   this.errorDialog.open() | ||||||
|                   promptAction.showToast({ |                   promptAction.showToast({ | ||||||
|                     message: `时间同步接口连接失败`, |                     message: `时间同步接口连接失败`, | ||||||
|                     duration: 3000 |                     duration: 3000 | ||||||
| @ -129,8 +122,8 @@ struct Index { | |||||||
|                     duration: 3000 |                     duration: 3000 | ||||||
|                   }); |                   }); | ||||||
|                   globalThis.type='1' |                   globalThis.type='1' | ||||||
|                   AppStorage.SetOrCreate('errorMsg', 1); |  | ||||||
|                   globalThis.title='车辆信息接口获取失败' |                   globalThis.title='车辆信息接口获取失败' | ||||||
|  |                   this.errorDialog.open() | ||||||
|                   this.loading = false |                   this.loading = false | ||||||
|                   return |                   return | ||||||
|                 } |                 } | ||||||
| @ -296,7 +289,7 @@ struct Index { | |||||||
|     this.angle = 0 |     this.angle = 0 | ||||||
|     this.loading = false |     this.loading = false | ||||||
|     globalThis.lsh = '1111111111111' |     globalThis.lsh = '1111111111111' | ||||||
| 
 |     globalThis.errorDialog=this.errorDialog | ||||||
|     const distanceClass = new GetDistance(globalThis.context) |     const distanceClass = new GetDistance(globalThis.context) | ||||||
|     await distanceClass.initFolder() |     await distanceClass.initFolder() | ||||||
|     globalThis.distanceClass = distanceClass |     globalThis.distanceClass = distanceClass | ||||||
| @ -363,7 +356,6 @@ struct Index { | |||||||
|   async onPageShow() { |   async onPageShow() { | ||||||
|     console.log('ttttt', 1111) |     console.log('ttttt', 1111) | ||||||
|     this.userAuth(); |     this.userAuth(); | ||||||
|     console.log('ttttt2222', 1111) |  | ||||||
| 
 | 
 | ||||||
|     this.vocObj = new voiceService(async (status, val, next) => { |     this.vocObj = new voiceService(async (status, val, next) => { | ||||||
|     }); |     }); | ||||||
| @ -442,16 +434,16 @@ struct Index { | |||||||
|       if (this.num >= 3) { |       if (this.num >= 3) { | ||||||
|         this.heartMsg() |         this.heartMsg() | ||||||
|       } |       } | ||||||
|       const data=AppStorage.Get('errorMsg'); |       // const data=AppStorage.Get('errorMsg'); | ||||||
|       console.log('1123',data,globalThis.type,globalThis.dialogOpen) |       // console.log('1123',data,globalThis.type,globalThis.dialogOpen) | ||||||
|       if(data==1){ |       // if(data==1){ | ||||||
|         if(globalThis.type=='3'&&!globalThis.dialogOpen){ |       //   if(globalThis.type=='3'&&!globalThis.dialogOpen){ | ||||||
|           globalThis.dialogOpen=true |       //     globalThis.dialogOpen=true | ||||||
|           this.errorDialog.open() |       //     this.errorDialog.open() | ||||||
|         }else if(globalThis.type=='1'){ |       //   }else if(globalThis.type=='1'){ | ||||||
|           this.errorDialog.open() |       //     this.errorDialog.open() | ||||||
|         } |       //   } | ||||||
|       } |       // } | ||||||
|     }, 1000) |     }, 1000) | ||||||
|     //下载模型 |     //下载模型 | ||||||
|     // await this.getModel() |     // await this.getModel() | ||||||
|  | |||||||
| @ -54,9 +54,9 @@ export default struct errorMsgDialog { | |||||||
|           .onClick(() => { |           .onClick(() => { | ||||||
|             if (this.controller != undefined) { |             if (this.controller != undefined) { | ||||||
|               const errorCode=AppStorage.Get('errorMsg'); |               const errorCode=AppStorage.Get('errorMsg'); | ||||||
|               const errorCodeFlage=AppStorage.Get('errorCodeFlage'); |               // const errorCodeFlage=AppStorage.Get('errorCodeFlage'); | ||||||
|               console.log('errorCode',errorCode,errorCodeFlage) |               // console.log('errorCode',errorCode,errorCodeFlage) | ||||||
|               if(errorCode==0&&errorCodeFlage){ |               if(errorCode==0){ | ||||||
|                 router.replaceUrl({ |                 router.replaceUrl({ | ||||||
|                   url: 'pages/Index', |                   url: 'pages/Index', | ||||||
|                 }, router.RouterMode.Single); |                 }, router.RouterMode.Single); | ||||||
| @ -76,7 +76,7 @@ export default struct errorMsgDialog { | |||||||
|           } |           } | ||||||
|           .commStyle() |           .commStyle() | ||||||
|           .onClick(() => { |           .onClick(() => { | ||||||
|                const errorCode=AppStorage.Get('errorMsg'); |               const errorCode=AppStorage.Get('errorCode'); | ||||||
|               const errorCodeFlage=AppStorage.Get('errorCodeFlage'); |               const errorCodeFlage=AppStorage.Get('errorCodeFlage'); | ||||||
|               console.log('errorCode',errorCode,errorCodeFlage) |               console.log('errorCode',errorCode,errorCodeFlage) | ||||||
|               if(errorCode==0&&errorCodeFlage){ |               if(errorCode==0&&errorCodeFlage){ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user