| | |
| | | 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) => { |
| | |
| | | break; |
| | | case 6: // 直流主配电板 |
| | | this.eleBoard = item.commStatus |
| | | if (this.eleBoard == 0) { |
| | | diagramStates(diagram, 'eleBoard'); |
| | | } |
| | | centralMonitorSysSTInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | |
| | | break; |
| | | case 8: // AFE变频 |
| | | this.AFEcabinet = item.commStatus |
| | | if (this.AFEcabinet == 0) { |
| | | diagramStates(diagram, 'AFEcabinet'); |
| | | } |
| | | afeInverterInfoByDeviceId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | |
| | | break; |
| | | case 9: // 水站 |
| | | this.waterStation = item.commStatus |
| | | if (this.waterStation == 0) { |
| | | diagramStates(diagram, 'waterStation'); |
| | | } |
| | | WaterCommInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | |
| | | break; |
| | | case 10: // 油站 |
| | | this.oilStation = item.commStatus |
| | | if (this.oilStation == 0) { |
| | | diagramStates(diagram, 'oilStation'); |
| | | } |
| | | OilCommInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | |
| | | break; |
| | | case 1: // 5000KV开关 |
| | | this.switch5000 = item.commStatus; |
| | | if (this.switch5000 == 1) { |
| | | diagramStates(diagram, 'switch5000'); |
| | | } |
| | | centralMonitorSysInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | |
| | | break; |
| | | case 2: // 3200KV1开关 |
| | | this.switch32001 = item.commStatus |
| | | if (this.switch32001 == 1) { |
| | | diagramStates(diagram, 'switch32001'); |
| | | } |
| | | centralMonitorSysInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | |
| | | 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) => { |
| | |
| | | break; |
| | | case 4: // 5200KV开关 |
| | | this.switch5200 = item.commStatus |
| | | if (this.switch5200 == 1) { |
| | | diagramStates(diagram, 'switch5200'); |
| | | } |
| | | centralMonitorSysInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | |
| | | }); |
| | | break; |
| | | } |
| | | this.setDiagramByType(); |
| | | this.setDiagramByType() |
| | | }) |
| | | } |
| | | }).catch((err) => { |
| | |
| | | }, |
| | | 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'; |
| | | } |
| | |
| | | } |
| | | } |
| | | }, false) |
| | | |
| | | // 设置充放电的类型 |
| | | this.setDiagramByType(); |
| | | }, |
| | | destroyed() { |
| | | diagram.stop(); |