From 9949fa676e6f1fc53d1003535e44abd0862eadff Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Sat, 14 Sep 2024 09:18:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=AE=E5=88=86=E7=8A=B6=E6=80=81=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ets/common/utils/UdpClientByCenter.ts | 36 +++---------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/entry/src/main/ets/common/utils/UdpClientByCenter.ts b/entry/src/main/ets/common/utils/UdpClientByCenter.ts index c497585d..da87ac5f 100644 --- a/entry/src/main/ets/common/utils/UdpClientByCenter.ts +++ b/entry/src/main/ets/common/utils/UdpClientByCenter.ts @@ -347,46 +347,20 @@ export default class UdpClientByCenter { time:dateFormat(new Date()), PLC: JSON.stringify(newArr.toString()), }) - if(strachArr[83]!='4'){ + if(strachArr[83]!='4'||strachArr[92]!='0'){ + console.log('差分状态异常',strachArr[83],strachArr[92]) this.chafenFlag++ if(this.chafenFlag>=15&&!globalThis.dialogOpen){ // getUDP(globalThis.context,true) globalThis.title='差分状态异常' globalThis.type='3' - prompt.showToast({ - message: '差分状态异常', - duration: 2000 - }); - // AppStorage.SetOrCreate('errorCode', 1); - // if(this.errorStep!=1){ - // this.errorStep=1 - // this.avPlayer.playAudio(['voice/差分状态异常.wav']) - // getSyncData('MA_SYSSET').then(syssetParams => { - // // @ts-ignore - // syssetParams.forEach(sys => { - // // 差分长时间是SINGLE状态报考车故障,停止考试(0-否 1-是) - // if (sys.v_no === '424'&&sys.v_value==1){ - // //plc差分丢失 - // console.log('sys.v_valuesys.v_valuesys.v_value',sys.v_value) - // AppStorage.SetOrCreate('errorCode', 0); - // AppStorage.SetOrCreate('errorCodeFlage', true); - // - // } - // }) - // // const errorParam = syssetParams.filter(sys => sys.v_no === '424') // - // // that.studentRefreshStatue = studentRefreshParam?.[0]?.v_value || '0' - // - // - // }); - // } + globalThis.errorDialog.open() + globalThis.dialogOpen=true } }else{ - // AppStorage.SetOrCreate('errorCode', -1); - // AppStorage.SetOrCreate('errorCodeFlage', false); - // this.errorStep=0 globalThis.dialogOpen=false + this.chafenFlag=0 } - this.chafenFlag=0 callback && callback(newArr.toString()) this.currentValue = newArr.toString(); } else {