| | |
| | | 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 = |