Compare commits
	
		
			3 Commits
		
	
	
		
			f61ec2bc2e
			...
			fdaba29b5c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| fdaba29b5c | |||
| 2d18527b96 | |||
| 63542bef08 | 
| @ -25,7 +25,6 @@ import prompt from '@ohos.prompt' | ||||
| import promptAction from '@ohos.promptAction'; | ||||
| import { getUDP } from './GlobalUdp'; | ||||
| import { dateFormat } from '../utils/tools' | ||||
| import { formatTime } from '../../../chengmai/ets/common/utils/tools'; | ||||
| 
 | ||||
| 
 | ||||
| export default class UdpClientByCenter { | ||||
| @ -369,13 +368,14 @@ export default class UdpClientByCenter { | ||||
|           console.log(TAG, 'plc udp信号丢失') | ||||
|           if (num == 3) { | ||||
|             getUDP(globalThis.context,true) | ||||
|             num = 0 | ||||
|           } | ||||
|             globalThis.title='plc udp信号丢失' | ||||
|             globalThis.type='3' | ||||
|             if(!globalThis.dialogOpen){ | ||||
|               AppStorage.SetOrCreate('errorMsg', 1); | ||||
|             } | ||||
|             num = 0 | ||||
|           } | ||||
| 
 | ||||
|           prompt.showToast({ | ||||
|             message: 'plc udp信号丢失', | ||||
|             duration: 2000 | ||||
| @ -384,7 +384,7 @@ export default class UdpClientByCenter { | ||||
| 
 | ||||
|         this.plcUdpError = true; | ||||
|       }, 2000) | ||||
|     }, 3000) | ||||
|     }, 2000) | ||||
|   } | ||||
| 
 | ||||
|   // initHeartSendMsg(param,context){
 | ||||
|  | ||||
| @ -386,7 +386,7 @@ struct Index { | ||||
|     // const TcpClient: TcpClient =new TcpClient(result[0].tcplocalIp, result[0].tcplocalIpPort,result[0].tcpOppositeIp,result[0].tcpOppositePort) | ||||
| 
 | ||||
|     console.info('Index onPageShow'); | ||||
| 
 | ||||
|     globalThis.lsh = '1111111111111' | ||||
|   } | ||||
| 
 | ||||
|   async createAlbum() { | ||||
| @ -447,10 +447,11 @@ struct Index { | ||||
|         this.heartMsg() | ||||
|       } | ||||
|       const data=AppStorage.Get('errorMsg'); // returns 47 | ||||
|       console.log('1123',data,globalThis.type) | ||||
|       console.log('1123',data,globalThis.type,globalThis.dialogOpen) | ||||
|       if(data==1){ | ||||
|         if(globalThis.type=='3'&&!globalThis.dialogOpen){ | ||||
|           globalThis.dialogOpen=true | ||||
|           this.errorDialog.open() | ||||
|         }else if(globalThis.type=='1'){ | ||||
|           this.errorDialog.open() | ||||
|         } | ||||
|  | ||||
| @ -12,8 +12,8 @@ export default struct errorMsgDialog { | ||||
| 
 | ||||
|   @Styles | ||||
|   commStyle(){ | ||||
|     .width(220 * globalThis.ratio * this.dialogRatio ) | ||||
|     .height(69 * globalThis.ratio * this.dialogRatio) | ||||
|     .width(220 * globalThis.ratio * this.dialogRatio *0.6) | ||||
|     .height(69 * globalThis.ratio * this.dialogRatio*0.6) | ||||
|     .backgroundImage($r('app.media.button_nor')) | ||||
|     .backgroundImageSize({ width: '100%', height: '100%' }) | ||||
|     // .margin({ bottom: 12 * this.ratio }) | ||||
| @ -44,9 +44,9 @@ export default struct errorMsgDialog { | ||||
|         Row() { | ||||
|           Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { | ||||
|             Text('  取   消  ') | ||||
|               .fontSize(24 * globalThis.ratio* this.dialogRatio ) | ||||
|               .fontSize(24 * globalThis.ratio* this.dialogRatio*0.6 ) | ||||
|               .fontColor('#fff') | ||||
|               .width(100 * globalThis.ratio* this.dialogRatio) | ||||
|               .width(60 * globalThis.ratio* this.dialogRatio) | ||||
|           } | ||||
|           .commStyle() | ||||
|           .onClick(() => { | ||||
| @ -58,9 +58,9 @@ export default struct errorMsgDialog { | ||||
| 
 | ||||
|           Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { | ||||
|             Text('  确   定  ') | ||||
|               .fontSize(24 * globalThis.ratio* this.dialogRatio) | ||||
|               .fontSize(24 * globalThis.ratio* this.dialogRatio*0.6) | ||||
|               .fontColor('#fff') | ||||
|               .width(100 * globalThis.ratio* this.dialogRatio) | ||||
|               .width(60 * globalThis.ratio* this.dialogRatio) | ||||
|           } | ||||
|           .commStyle() | ||||
|           .onClick(() => { | ||||
| @ -69,7 +69,7 @@ export default struct errorMsgDialog { | ||||
|               this.controller.close() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|         }.padding({bottom:20}) | ||||
| 
 | ||||
|       } | ||||
|     }.backgroundColor('#E6E3DF') | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user