From b9f0dfc4c0c48d65842d417b5babe1304439a735 Mon Sep 17 00:00:00 2001 From: whyczyk <525500596@qq.com> Date: 星期一, 19 七月 2021 16:09:37 +0800 Subject: [PATCH] 首页拓扑图问题修改 --- src/pages/home/topoGraph.vue | 74 ++++++++++++++++++------------------- 1 files changed, 36 insertions(+), 38 deletions(-) diff --git a/src/pages/home/topoGraph.vue b/src/pages/home/topoGraph.vue index 8b68405..b8e0c6d 100644 --- a/src/pages/home/topoGraph.vue +++ b/src/pages/home/topoGraph.vue @@ -514,7 +514,10 @@ this.deviceList.map(item => { switch (item.position) { case 5: // 澶у姛鐜囩數婧� - this.bigPower = item.commStatus + this.bigPower = item.commStatus; + if (this.bigPower == 0) { + diagramStates(diagram, 'bigPower'); + } rectifierPowerInfoByDevId({ devId: item.deviceId }).then((res) => { @@ -527,6 +530,9 @@ break; case 6: // 鐩存祦涓婚厤鐢垫澘 this.eleBoard = item.commStatus + if (this.eleBoard == 0) { + diagramStates(diagram, 'eleBoard'); + } centralMonitorSysSTInfoByDevId({ devId: item.deviceId }).then((res) => { @@ -539,6 +545,9 @@ break; case 8: // AFE鍙橀 this.AFEcabinet = item.commStatus + if (this.AFEcabinet == 0) { + diagramStates(diagram, 'AFEcabinet'); + } afeInverterInfoByDeviceId({ devId: item.deviceId }).then((res) => { @@ -551,6 +560,9 @@ break; case 9: // 姘寸珯 this.waterStation = item.commStatus + if (this.waterStation == 0) { + diagramStates(diagram, 'waterStation'); + } WaterCommInfoByDevId({ devId: item.deviceId }).then((res) => { @@ -563,6 +575,9 @@ break; case 10: // 娌圭珯 this.oilStation = item.commStatus + if (this.oilStation == 0) { + diagramStates(diagram, 'oilStation'); + } OilCommInfoByDevId({ devId: item.deviceId }).then((res) => { @@ -575,6 +590,9 @@ break; case 1: // 5000KV寮�鍏� this.switch5000 = item.commStatus; + if (this.switch5000 == 1) { + diagramStates(diagram, 'switch5000'); + } centralMonitorSysInfoByDevId({ devId: item.deviceId }).then((res) => { @@ -587,6 +605,9 @@ break; case 2: // 3200KV1寮�鍏� this.switch32001 = item.commStatus + if (this.switch32001 == 1) { + diagramStates(diagram, 'switch32001'); + } centralMonitorSysInfoByDevId({ devId: item.deviceId }).then((res) => { @@ -599,10 +620,13 @@ break; case 3: // 3200KV2寮�鍏� this.switch32002 = item.commStatus + if (this.switch32002 == 1) { + diagramStates(diagram, 'switch32002'); + } centralMonitorSysInfoByDevId({ devId: item.deviceId }).then((res) => { - if (res.data.code == 1) { + if (res.data.code == 0) { this.panel3 = res.data.data } }).catch((err) => { @@ -611,6 +635,9 @@ break; case 4: // 5200KV寮�鍏� this.switch5200 = item.commStatus + if (this.switch5200 == 1) { + diagramStates(diagram, 'switch5200'); + } centralMonitorSysInfoByDevId({ devId: item.deviceId }).then((res) => { @@ -622,7 +649,7 @@ }); break; } - this.setDiagramByType(); + this.setDiagramByType() }) } }).catch((err) => { @@ -681,48 +708,22 @@ }, setDiagramByType() { this.run = ""; - if (this.bigPower == 1) { - diagramStates(diagram, 'bigPower'); - } - if (this.eleBoard == 1) { - diagramStates(diagram, 'eleBoard'); - } - if (this.speedCabinet == 1) { + if (this.speedCabinet == 0) { diagramStates(diagram, 'speedCabinet'); } - if (this.electric == 1) { + if (this.electric == 0) { diagramStates(diagram, 'electric'); } - if (this.sensor == 1) { + if (this.sensor == 0) { diagramStates(diagram, 'sensor'); } - if (this.dynamometer == 1) { + if (this.dynamometer == 0) { diagramStates(diagram, 'dynamometer'); } - if (this.AFEcabinet == 1) { - diagramStates(diagram, 'AFEcabinet'); - } - if (this.transformer == 1) { + if (this.transformer == 0) { diagramStates(diagram, 'transformer'); } - if (this.waterStation == 1) { - diagramStates(diagram, 'waterStation'); - } - if (this.oilStation == 1) { - diagramStates(diagram, 'oilStation'); - } - if (this.switch5000 == 1) { - diagramStates(diagram, 'switch5000'); - } - if (this.switch32001 == 1) { - diagramStates(diagram, 'switch32001'); - } - if (this.switch32002 == 1) { - diagramStates(diagram, 'switch32002'); - } - if (this.switch5200 == 1) { - diagramStates(diagram, 'switch5200'); - } + if (this.switch5000 == 1) { this.run = 'run1'; } @@ -836,9 +837,6 @@ } } }, false) - - // 璁剧疆鍏呮斁鐢电殑绫诲瀷 - this.setDiagramByType(); }, destroyed() { diagram.stop(); -- Gitblit v1.9.1