wuyouming666
2024-05-09 92dab966727b26c69a8a1d5839b064f7942895e8
CanadaMes-ui/src/layout/index.vue
@@ -253,37 +253,40 @@
          let obj = JSON.parse(msg.data);
          if (obj.alarmmg) {
            if (obj.alarmmg[0].length > 0) {
              if (this.alarm.length > 0) {
                if (this.alarm[this.alarm.length - 1].id != obj.alarmmg[0][obj.alarmmg[0].length - 1].id) {
                  this.alarm = obj.alarmmg[0];
                  this.dialogFormVisible2 = true;
                }
              } else {
                this.alarm = obj.alarmmg[0];
                this.dialogFormVisible2 = true;
              }
            } else {
            if( obj.alarmmg!=null){
              this.alarm = obj.alarmmg[0];
              this.dialogFormVisible2 = false;
            }
            //是否急停
            if (obj.emergencystop != null) {
              this.EmergencyStop = obj.emergencystop[0];
            }
            // if (obj.alarmmg[0].length > 0) {
            //   if (this.alarm.length > 0) {
            //     if (this.alarm[this.alarm.length - 1].id != obj.alarmmg[0][obj.alarmmg[0].length - 1].id) {
            //       this.alarm = obj.alarmmg[0];
            //       this.dialogFormVisible2 = true;
            //     }
            //   } else {
            //     this.alarm = obj.alarmmg[0];
            //     this.dialogFormVisible2 = true;
            //   }
            // } else {
            //   this.alarm = obj.alarmmg[0];
            //   this.dialogFormVisible2 = false;
            // }
            // //是否急停
            // if (obj.emergencystop != null) {
            //   this.EmergencyStop = obj.emergencystop[0];
            // }
            //复位倒计时
            if (obj.countdown != null) {
              if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
                this.CountDown();
              }
            }
            // //复位倒计时
            // if (obj.countdown != null) {
            //   if ((obj.countdown[0] == true && this.CountDowns == 0) || this.EmergencyStop == true) {
            //     this.CountDown();
            //   }
            // }
            //复位完成信号
            if (obj.reset != null) {
              this.reset = obj.reset[0];
            }
            // //复位完成信号
            // if (obj.reset != null) {
            //   this.reset = obj.reset[0];
            // }
          }
@@ -398,7 +401,7 @@
        '用户列表': 'UserList',
        '设备管理': 'DeviceManagement',
        '报警信息': 'Alarm',
        '参数下发': 'Parameter',
        '手动/自动': 'Manual/Automatic',
        '开关控制': 'Action',
        'IO状态': 'Sign',
        '权限管理': 'PermissionManagement',