From 7121b5fcd163f576f5e17c54022dbc23f33d49a5 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 09 Apr 2021 17:18:56 +0800
Subject: [PATCH] 冲突合并
---
src/views/supervisoryConsole/card.vue | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/src/views/supervisoryConsole/card.vue b/src/views/supervisoryConsole/card.vue
index 62d08ff..36ac9ac 100644
--- a/src/views/supervisoryConsole/card.vue
+++ b/src/views/supervisoryConsole/card.vue
@@ -123,6 +123,56 @@
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 });
},
--
Gitblit v1.9.3