| | |
| | | <div class="contentBox"> |
| | | <div class="tipTitle">系统拓扑</div> |
| | | <div class="diagram-con"> |
| | | <el-button type="primary" size="mini" class="editBtn" @click="drawer=true">前置条件设置</el-button> |
| | | <div class="diagram-stc" ref="static"></div> |
| | | <div class="diagram-flush" ref="flush"></div> |
| | | <axis :position="axis1" v-if="axis1.length>0"></axis> |
| | |
| | | </div> |
| | | </diagram-panel> |
| | | </transition> |
| | | |
| | | <mw-drawer :visible.sync="drawer"> |
| | | <pre-option-list :bigPower="bigPower" :eleBoard="eleBoard" :AFEcabinet="AFEcabinet" |
| | | :waterStation="waterStation" :oilStation="oilStation" :switch5000="switch5000" |
| | | :switch32001="switch32001" :switch32002="switch32002" :switch5200="switch5200" v-if="drawer"> |
| | | </pre-option-list> |
| | | </mw-drawer> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import gridCircuitDiagram from "@/pages/home/topoGraphdiagram/js/gridCircuitDiagram" |
| | | import diagramStates from '@/pages/home/topoGraphdiagram/js/diagramStates' |
| | | import DiagramPanel from '@/components/smallModule/DiagramPanel.vue'; |
| | | import MwDrawer from "@/components/smallModule/mwDrawer"; |
| | | import PreOptionList from "@/pages/home/components/preOptionList"; |
| | | import { |
| | | deviceStateAllStatus, |
| | | centralMonitorSysInfoByDevId, |
| | |
| | | centralMonitorSysSTInfoByDevId, |
| | | afeInverterInfoByDeviceId, |
| | | WaterCommInfoByDevId, |
| | | OilCommInfoByDevId |
| | | OilCommInfoByDevId, |
| | | } from "./topoGraphdiagram/js/api" |
| | | import Axis from '@/components/smallModule/axis.vue'; |
| | | let diagram; |
| | |
| | | components: { |
| | | DiagramPanel, |
| | | Axis, |
| | | MwDrawer, |
| | | PreOptionList |
| | | }, |
| | | data() { |
| | | return { |
| | | type: 'kz', |
| | | drawer: false, |
| | | axis1: [], |
| | | axis2: [], |
| | | text1Pos: [], |
| | |
| | | this.deviceList.map(item => { |
| | | switch (item.position) { |
| | | case 5: // 大功率电源 |
| | | this.bigPower = item.commStatus; |
| | | if (this.bigPower == 0) { |
| | | diagramStates(diagram, 'bigPower'); |
| | | } |
| | | rectifierPowerInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | | if (res.data.code == 1) { |
| | | this.bigPower = res.data.data.rectifierPowerState; |
| | | if (this.bigPower == 0) { |
| | | diagramStates(diagram, 'bigPower'); |
| | | } |
| | | this.panel4 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | break; |
| | | case 6: // 直流主配电板 |
| | | this.eleBoard = item.commStatus |
| | | if (this.eleBoard == 0) { |
| | | diagramStates(diagram, 'eleBoard'); |
| | | } |
| | | centralMonitorSysSTInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | | if (res.data.code == 1) { |
| | | this.eleBoard = res.data.data.switchCloseBusScreen |
| | | if (this.eleBoard == 0) { |
| | | diagramStates(diagram, 'eleBoard'); |
| | | } |
| | | this.panel5 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | break; |
| | | case 8: // AFE变频 |
| | | this.AFEcabinet = item.commStatus |
| | | if (this.AFEcabinet == 0) { |
| | | diagramStates(diagram, 'AFEcabinet'); |
| | | } |
| | | case 7: // AFE变频 |
| | | afeInverterInfoByDeviceId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | | if (res.data.code == 1) { |
| | | this.AFEcabinet = res.data.data.inverterRun |
| | | if (this.AFEcabinet == 0) { |
| | | diagramStates(diagram, 'AFEcabinet'); |
| | | } |
| | | this.panel7 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | break; |
| | | case 9: // 水站 |
| | | this.waterStation = item.commStatus |
| | | if (this.waterStation == 0) { |
| | | diagramStates(diagram, 'waterStation'); |
| | | } |
| | | WaterCommInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | | if (res.data.code == 1) { |
| | | this.waterStation = res.data.data.waterState |
| | | if (this.waterStation == 0) { |
| | | diagramStates(diagram, 'waterStation'); |
| | | } |
| | | this.panel8 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | break; |
| | | case 10: // 油站 |
| | | this.oilStation = item.commStatus |
| | | if (this.oilStation == 0) { |
| | | diagramStates(diagram, 'oilStation'); |
| | | } |
| | | OilCommInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | | if (res.data.code == 1) { |
| | | this.oilStation = res.data.data.oilState |
| | | if (this.oilStation == 0) { |
| | | diagramStates(diagram, 'oilStation'); |
| | | } |
| | | this.panel9 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | break; |
| | | case 1: // 5000KV开关 |
| | | this.switch5000 = item.commStatus; |
| | | if (this.switch5000 == 1) { |
| | | diagramStates(diagram, 'switch5000'); |
| | | } |
| | | centralMonitorSysInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | | if (res.data.code == 1) { |
| | | this.switch5000 = res.data.data.switchClose; |
| | | if (this.switch5000 == 1) { |
| | | diagramStates(diagram, 'switch5000'); |
| | | } |
| | | this.panel1 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | break; |
| | | case 2: // 3200KV1开关 |
| | | this.switch32001 = item.commStatus |
| | | if (this.switch32001 == 1) { |
| | | diagramStates(diagram, 'switch32001'); |
| | | } |
| | | centralMonitorSysInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | | if (res.data.code == 1) { |
| | | this.switch32001 = res.data.data.switchClose |
| | | if (this.switch32001 == 1) { |
| | | diagramStates(diagram, 'switch32001'); |
| | | } |
| | | this.panel2 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | 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 == 0) { |
| | | if (res.data.code == 1) { |
| | | this.switch32002 = res.data.data.switchClose |
| | | if (this.switch32002 == 1) { |
| | | diagramStates(diagram, 'switch32002'); |
| | | } |
| | | this.panel3 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | break; |
| | | case 4: // 5200KV开关 |
| | | this.switch5200 = item.commStatus |
| | | if (this.switch5200 == 1) { |
| | | diagramStates(diagram, 'switch5200'); |
| | | } |
| | | centralMonitorSysInfoByDevId({ |
| | | devId: item.deviceId |
| | | }).then((res) => { |
| | | if (res.data.code == 1) { |
| | | this.switch5200 = res.data.data.switchClose |
| | | if (this.switch5200 == 1) { |
| | | diagramStates(diagram, 'switch5200'); |
| | | } |
| | | this.panel6 = res.data.data |
| | | this.setDiagramByType() |
| | | } |
| | | }).catch((err) => { |
| | | console.log(err) |
| | | }); |
| | | break; |
| | | } |
| | | this.setDiagramByType() |
| | | }) |
| | | } |
| | | }).catch((err) => { |
| | |
| | | position: relative; |
| | | } |
| | | |
| | | .diagram-con .editBtn { |
| | | position: absolute; |
| | | right: 20px; |
| | | top: 20px; |
| | | z-index: 15; |
| | | } |
| | | |
| | | .panel7 .panel-item .label { |
| | | width: 100px; |
| | | text-align: right; |