| | |
| | | siteStatus(value, e) { |
| | | console.log(this.radio, value); |
| | | }, |
| | | inputSearchBtn() { |
| | | this.getEquipmentLists(); |
| | | }, |
| | | |
| | | siteStatus() { |
| | | this.inputSearchValue = ""; |
| | | this.getEquipmentLists(); |
| | | }, |
| | | |
| | | getEquipmentLists() { |
| | | getList({ deviceName: this.inputSearchValue }).then((res) => { |
| | | var a = [], |
| | | b = [], |
| | | c = []; |
| | | if (this.radio == "全部") { |
| | | res.data.data.forEach((item) => { |
| | | if (item.state != "") a.push(item); |
| | | if (item.state == "" && item.onlineStatus == 1) c.push(item); |
| | | if (item.state == "" && item.onlineStatus != 1) b.push(item); |
| | | }); |
| | | } else if (this.radio == "仅显示预警设备") { |
| | | res.data.data.forEach((item) => { |
| | | if (item.jtype == 1) c.push(item); |
| | | }); |
| | | } else if (this.radio == "仅显示设备掉线") { |
| | | res.data.data.forEach((item) => { |
| | | if (item.onlineStatus != 1) b.push(item); |
| | | }); |
| | | } else if (this.radio == "仅显示设备故障") { |
| | | res.data.data.forEach((item) => { |
| | | if (item.state != "") a.push(item); |
| | | }); |
| | | } |
| | | |
| | | var d = a.concat(c.concat(b)); |
| | | |
| | | d.forEach((item) => { |
| | | this.count.push(item); |
| | | }); |
| | | this.option = []; |
| | | for (var i = 0; i <= 24; i++) { |
| | | if (this.count.length > 0) { |
| | | this.option.push(this.count[0]); |
| | | this.count.shift(); |
| | | } |
| | | } |
| | | this.inputSearchValue = ""; |
| | | }); |
| | | }, |
| | | |
| | | goToDetails(data) { |
| | | this.$router.push({ path: "/dataL/dataL", query: data }); |
| | | }, |