南昌市物联网技防平台-前端
Administrator
2021-05-10 b921db470a289d3a5bdf2db8d60e6e5e6b4b5973
src/views/system/cs.vue
@@ -1154,19 +1154,29 @@
      if (dat.length > 0) {
        for (var key in dat) {
          let states;
          if (dat[key].state != "") {
            states = "故障";
          } else {
            if (dat[key].jtype != 1) {
              if (dat[key].onlineStatus == 1) {
                states = "在线";
              } else {
                states = "掉线";
              }
            } else {
              states = "预警";
            }
          }
          // if (dat[key].state != "") {
          //   states = "故障";
          // } else {
          //   if (dat[key].jtype != 1) {
          //     if (dat[key].onlineStatus == 1) {
          //       states = "在线";
          //     } else {
          //       states = "掉线";
          //     }
          //   } else {
          //     states = "预警";
          //   }
          // }
          states =
            dat[key].dtype == 0
              ? "掉线"
              : dat[key].dtype == 1
              ? "正常"
              : dat[key].dtype == 2
              ? "预警"
              : dat[key].dtype == 3
              ? "故障"
              : "";
          // console.log(states);
          dat[key].states = states;
          dat[key].stateSevicestate =