<template>
|
<flex-layout direction="row" class="page-real-time" :no-bg="true">
|
<!-- <home-list
|
v-if="homeListShow"
|
slot="header"
|
@toggleChange="toggleChange"
|
@leaf-click="leafClick"
|
></home-list> -->
|
<content-box
|
style="margin-left: 4px; margin-right: 4px"
|
:title="battFullName"
|
>
|
<div slot="box-tools" class="box-tools">
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="历史数据"
|
placement="bottom"
|
>
|
<i class="iconfont el-icon-jinru" @click="syncPage"></i>
|
</el-tooltip>
|
</div>
|
<div slot="box-tools" class="box-tools" style="right: 40px">
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="历史实时数据"
|
placement="bottom"
|
>
|
<i
|
class="el-iconfont el-icon-s-marketing"
|
@click="historyRealTimeDataDialog.show = true"
|
></i>
|
</el-tooltip>
|
</div>
|
<!-- <div slot="box-tools" class="box-tools" style="right: 72px;">-->
|
<!-- <el-tooltip class="item" effect="dark" content="逆变信息" placement="bottom">-->
|
<!-- <i class="iconfont el-icon-icon-test" @click="nibian.show=true"></i>-->
|
<!-- </el-tooltip>-->
|
<!-- </div>-->
|
<flex-layout :no-bg="true">
|
<div class="content-header" slot="header" :model="inputs">
|
<div class="table-layout">
|
<div class="table-row">
|
<div class="table-cell text-right w80">电池状态:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.battState"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
<div class="table-cell text-right w80">端电压:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.group_online_vol"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
<div class="table-cell text-right w80">电池电流:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.groupCurr"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
<div class="table-cell text-right w80">更新日期:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.recDatetime"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right w80">测试时长:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.battTestTlong"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
<div class="table-cell text-right w80">测试容量:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.battTestCap"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
<div class="table-cell text-right w80">剩余容量:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.batt_syrl_cap"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
<div class="table-cell text-right w80">续航时长:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.sysc"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div class="page-content">
|
<div class="page-content-tools" v-if="control.show && isCanTest">
|
<el-popover placement="bottom" trigger="hover">
|
<div class="hdw-menu-list">
|
<ul>
|
<li class="hdw-menu-item" v-if="control.data.startTest.show">
|
<a
|
@click="dischargeDialog.show = true"
|
href="javascript:void(0);"
|
>启动测试</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="control.data.stopTest.show">
|
<a @click="stopTest" href="javascript:void(0);">停止测试</a>
|
</li>
|
<li
|
class="hdw-menu-item"
|
v-if="control.data.setSystemParams.show"
|
>
|
<a
|
@click="systemDialog.show = true"
|
href="javascript:void(0);"
|
>系统参数设置</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="control.data.clearWarn.show">
|
<a @click="clearWarn" href="javascript:void(0);"
|
>清除告警</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="control.data.startYH.show">
|
<a
|
@click="curingDialog.show = true"
|
href="javascript:void(0);"
|
>启动养护/除硫</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="control.data.stopYH.show">
|
<a
|
@click="stopCuringDialog.show = true"
|
href="javascript:void(0);"
|
>停止养护/除硫</a
|
>
|
</li>
|
<li
|
class="hdw-menu-item"
|
v-if="control.data.startOutlineYH.show"
|
>
|
<a
|
@click="outlineCuringDialog.show = true"
|
href="javascript:void(0);"
|
>启动离线养护</a
|
>
|
</li>
|
<li
|
class="hdw-menu-item"
|
v-if="control.data.stopOutlineYH.show"
|
>
|
<a href="javascript:void(0);">停止离线养护</a>
|
</li>
|
<li
|
class="hdw-menu-item"
|
v-if="control.data.circleRestart.show"
|
>
|
<a
|
@click="restartPlanDialog.show = true"
|
href="javascript:void(0);"
|
>定期重启设备</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="control.data.restart.show">
|
<a href="javascript:void(0);">重启设备</a>
|
</li>
|
</ul>
|
</div>
|
<button class="hdw-btn transparentBtn" slot="reference">
|
<span class="light-color">远程管理</span>
|
<i class="hdw-icon el-icon-caret-bottom"></i>
|
</button>
|
</el-popover>
|
</div>
|
<el-tabs
|
v-model="acTabs"
|
type="border-card"
|
class="flex-layout noborder"
|
@tab-click="tabClick"
|
>
|
<el-tab-pane label="电路拓扑图" name="eleLine">
|
<el-row :gutter="8" class="full-height padding0888">
|
<el-col :span="11" class="full-height">
|
<div class="h30-percent padding0080 box-sizing">
|
<flex-layout direction="row">
|
<div class="full-height padding0800" slot="header">
|
<div
|
class="hdw-state-list-wrapper"
|
v-show="stateListState"
|
>
|
<div class="hdw-state-list table-layout">
|
<div
|
v-for="state in showStateList"
|
:key="state.text"
|
class="table-row"
|
:class="state.type"
|
v-show="!state.notShow"
|
>
|
<div class="table-cell text-right">
|
<i
|
v-if="state.icon"
|
class="iconfont"
|
:class="state.icon"
|
></i
|
>{{ state.text }}
|
</div>
|
<div class="table-cell">
|
{{ state.value }}{{ state.unit }}
|
</div>
|
</div>
|
</div>
|
<table class="table-info-list" v-if="fodShow">
|
<thead>
|
<tr>
|
<td v-for="item in fodHeaders" :key="item.prop">
|
{{ item.label }}
|
</td>
|
</tr>
|
</thead>
|
<tbody>
|
<tr v-for="(fod, key) in fodData" :key="key">
|
<td v-for="(item, index) in fod" :key="index">
|
{{ fod[index] }}
|
</td>
|
</tr>
|
</tbody>
|
</table>
|
</div>
|
</div>
|
<chart-wrapper title="电压和电流">
|
<el-row class="full-height" :gutter="8">
|
<el-col :span="12" class="full-height">
|
<pie-chart-fill-wrapper title="电压(V)">
|
<pie-chart-fill
|
ref="pieChartFill1"
|
slot="header"
|
text1="电池组1"
|
text2="电压"
|
unit="V"
|
></pie-chart-fill>
|
<pie-chart-fill
|
bg-color="#757ffb"
|
ref="pieChartFill2"
|
text1="直流母线"
|
text2="电压"
|
unit="V"
|
></pie-chart-fill>
|
<pie-chart-fill
|
ref="pieChartFill3"
|
slot="footer"
|
text1="电池组2"
|
text2="电压"
|
unit="V"
|
></pie-chart-fill>
|
</pie-chart-fill-wrapper>
|
</el-col>
|
<el-col :span="12" class="full-height">
|
<pie-chart-fill-wrapper title="电流(A)">
|
<pie-chart-fill
|
ref="pieChartFill4"
|
slot="header"
|
text1="电池组1"
|
text2="电流"
|
:max="50"
|
unit="A"
|
></pie-chart-fill>
|
<pie-chart-fill
|
bg-color="#757ffb"
|
ref="pieChartFill5"
|
text1="直流母线"
|
text2="电流"
|
:max="50"
|
unit="A"
|
></pie-chart-fill>
|
<pie-chart-fill
|
ref="pieChartFill6"
|
slot="footer"
|
text1="电池组2"
|
text2="电流"
|
:max="50"
|
unit="A"
|
></pie-chart-fill>
|
</pie-chart-fill-wrapper>
|
</el-col>
|
</el-row>
|
</chart-wrapper>
|
</flex-layout>
|
</div>
|
<div class="h30-percent padding0080 box-sizing">
|
<el-row :gutter="8" class="full-height">
|
<el-col :span="12" class="full-height">
|
<chart-wrapper title="交流输入电压">
|
<three-terms-bar
|
unit="V"
|
ref="threeTermsBar1"
|
y-text="Y轴单位(V)"
|
></three-terms-bar>
|
</chart-wrapper>
|
</el-col>
|
<el-col :span="12" class="full-height">
|
<chart-wrapper title="交流输入电流">
|
<three-terms-bar
|
ref="threeTermsBar2"
|
:color="termsBarColor"
|
unit="A"
|
y-text="Y轴单位(A)"
|
:max="-Infinity"
|
></three-terms-bar>
|
</chart-wrapper>
|
</el-col>
|
</el-row>
|
</div>
|
<div class="h40-percent">
|
<chart-wrapper title="整流器模块输出电压和电流">
|
<two-lines ref="twoLines"></two-lines>
|
</chart-wrapper>
|
</div>
|
</el-col>
|
<el-col :span="13" class="full-height">
|
<flex-layout no-bg>
|
<div class="padding0080 box-sizing" slot="header">
|
<chart-wrapper>
|
<div class="align-center">
|
<power-state-box
|
v-for="item in powerStates.list1"
|
:key="item.key"
|
:icon="item.icon"
|
:text1="item.text1"
|
:text2="item.text2"
|
:state="item.state"
|
></power-state-box>
|
</div>
|
<div class="align-center">
|
<power-state-box
|
v-for="item in powerStates.list2"
|
:key="item.key"
|
:icon="item.icon"
|
:text1="item.text1"
|
:text2="item.text2"
|
:state="item.state"
|
></power-state-box>
|
</div>
|
<div class="align-center">
|
<power-state-box
|
v-for="item in powerStates.list3"
|
:key="item.key"
|
:icon="item.icon"
|
:text1="item.text1"
|
:text2="item.text2"
|
:state="item.state"
|
></power-state-box>
|
</div>
|
</chart-wrapper>
|
</div>
|
|
<div class="full-height">
|
<chart-wrapper>
|
<circuit-diagram
|
:batt="batt"
|
:online-vol="inputs.onlineVol"
|
:group-vol="inputs.groupVol"
|
:batt-curr="inputs.groupCurr"
|
:dev-temp="diagram.temp"
|
:type="diagram.type"
|
:update="diagram.update"
|
:version="devVersion"
|
:contact-res="diagram.contactRes"
|
:drop-vol="diagram.dropVol"
|
:start="circleStart"
|
></circuit-diagram>
|
</chart-wrapper>
|
</div>
|
</flex-layout>
|
</el-col>
|
</el-row>
|
</el-tab-pane>
|
<el-tab-pane label="电压" name="vol">
|
<bar-chart
|
ref="vol"
|
id="vol"
|
unit="V"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane label="内阻" name="res">
|
<bar-chart
|
ref="res"
|
id="res"
|
unit="mΩ"
|
:show-tools="true"
|
max-color="red"
|
min-color="green"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane label="温度" name="temp">
|
<bar-chart
|
ref="temp"
|
id="temp"
|
unit="℃"
|
:show-tools="true"
|
max-color="red"
|
min-color="green"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane label="电导" name="conduct">
|
<bar-chart
|
ref="conduct"
|
id="conduct"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane label="均衡电流" name="curr">
|
<bar-chart
|
ref="curr"
|
id="curr"
|
unit="A"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane label="漏液电压" name="leakVol">
|
<bar-chart
|
ref="leakVol"
|
id="leakVol"
|
unit="V"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
|
<el-tab-pane
|
label="数据表格"
|
name="tblData"
|
class="el-table-wrapper"
|
>
|
<el-table stripe size="small" :data="table.datas" height="100%">
|
<el-table-column
|
v-for="header in table.headers"
|
:key="header.prop"
|
:prop="header.prop"
|
:label="header.label"
|
:width="header.width"
|
:sortable="header.sortable"
|
align="center"
|
></el-table-column>
|
</el-table>
|
</el-tab-pane>
|
<el-tab-pane label="逆变信息" name="niBianInfoTab" v-if="isNiBian">
|
<ni-bian-info-tab
|
ref="niBianInfoTab"
|
:name="acTabs"
|
:devId="batt.fbsdeviceId"
|
></ni-bian-info-tab>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</flex-layout>
|
</content-box>
|
<!-- 放电参数设置 -->
|
<el-dialog
|
:title="dischargeDialogTitle"
|
width="700px"
|
:visible.sync="dischargeDialog.show"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<discharge-dialog-content
|
v-if="dischargeDialog.show"
|
:batt="batt"
|
@close="closeDisChargeDialog"
|
></discharge-dialog-content>
|
</el-dialog>
|
<!-- 系统参数设置 -->
|
<el-dialog
|
title="系统参数设置"
|
width="700px"
|
:visible.sync="systemDialog.show"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<system-params v-if="systemDialog.show" :batt="batt"></system-params>
|
</el-dialog>
|
<!-- 除硫养护参数设置 -->
|
<el-dialog
|
title="除硫养护参数设置"
|
width="700px"
|
:visible.sync="curingDialog.show"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<curing-params v-if="curingDialog.show" :batt="batt"></curing-params>
|
</el-dialog>
|
<!-- 离线养护参数设置 -->
|
<el-dialog
|
title="离线养护参数设置"
|
width="700px"
|
:visible.sync="outlineCuringDialog.show"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<outline-curing-params
|
v-if="outlineCuringDialog.show"
|
:batt="batt"
|
></outline-curing-params>
|
</el-dialog>
|
<!-- 定期重启参数设置 -->
|
<el-dialog
|
title="定期重启参数设置"
|
width="700px"
|
:visible.sync="restartPlanDialog.show"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<restart-plan-params
|
v-if="restartPlanDialog.show"
|
:batt="batt"
|
></restart-plan-params>
|
</el-dialog>
|
<!-- 实时历史数据 -->
|
<el-dialog
|
:title="histroyDataTitle"
|
width="1200px"
|
:visible.sync="historyRealTimeDataDialog.show"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center no-bg"
|
:modal-append-to-body="false"
|
>
|
<history-realtime-data
|
:batt="batt"
|
v-if="historyRealTimeDataDialog.show"
|
></history-realtime-data>
|
</el-dialog>
|
<!-- 逆变信息 -->
|
<el-dialog
|
title="逆变信息"
|
width="600px"
|
:visible.sync="nibian.show"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<ni-bian v-if="nibian.show" :batt="batt"></ni-bian>
|
</el-dialog>
|
<!-- 停止养护除硫 -->
|
<el-dialog
|
title="停止养护除硫"
|
width="600px"
|
:visible.sync="stopCuringDialog.show"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<stop-curing v-if="stopCuringDialog.show" :batt="batt"></stop-curing>
|
</el-dialog>
|
<right-menu
|
:visible.sync="rightMenu.show"
|
:x="rightMenu.x"
|
:y="rightMenu.y"
|
>
|
<div class="right-menu-list">
|
<ul>
|
<li>
|
<a href="javascript:;" @click="payAttentionMon">添加关注单体</a>
|
</li>
|
</ul>
|
</div>
|
</right-menu>
|
</flex-layout>
|
</template>
|
|
<script>
|
import ContentBox from "@/components/ContentBox";
|
// import HomeList from "./movingRingSystem/HomeList";
|
import BarChart from "@/components/chart/BarChart";
|
import CircuitDiagram from "./components/CircuitDiagram";
|
import DischargeDialogContent from "./components/DischargeDialogContent";
|
import SystemParams from "./components/SystemParams";
|
import CuringParams from "./components/CuringParams";
|
import OutlineCuringParams from "./components/OutlineCuringParams";
|
import RestartPlanParams from "./components/RestartPlanParams";
|
import HistoryRealtimeData from "./components/HistoryRealtimeData";
|
import RightMenu from "./components/RightMenu";
|
import NiBian from "./components/NiBian";
|
import StopCuring from "./components/StopCuring";
|
import NiBianInfoTab from "./components/NiBianInfoTab";
|
|
import {
|
realTimeNot,
|
realTimeAdd,
|
realTimeSearch,
|
realTimeGroup,
|
realTimeAlarm,
|
realTimePowerOff,
|
realTimeStateList,
|
clearWarn,
|
searchInfo,
|
btsControl,
|
curingControl,
|
} from "./js/realTime";
|
import { getInfoById, getACDCData } from "@/views/dataMager/js/power";
|
import { getBattGroupInfo } from "../dataMager/js/battGroupMager";
|
import {
|
formatSeconds,
|
sethoubeiTime,
|
Timeout,
|
regEquipType,
|
getBarNum,
|
isHasPermit,
|
getValByKey,
|
} from "@/assets/js/tools";
|
|
import { const_61850, const_9100, const_power } from "@/assets/js/const";
|
import getMarkLineData from "@/components/chart/js/getMarkLineDataPlus";
|
import ChartWrapper from "@/components/ChartWrapper";
|
import PowerStateBox from "@/components/PowerStateBox";
|
import TwoLines from "@/components/chart/TwoLines";
|
import ThreeTermsBar from "@/components/chart/ThreeTermsBar";
|
import PieChartFill from "@/components/chart/PieChartFill";
|
import PieChartFillWrapper from "@/components/chart/PieChartFillWrapper";
|
import getPowerInfo from "./js/getPowerInfo";
|
import createWs from "@/assets/js/websocket";
|
const WSMixin = createWs("RealTime");
|
|
import const_digit from "@/assets/js/const/const_digit";
|
const {
|
cap: CAP,
|
vol: VOL,
|
curr: CURR,
|
res: RES,
|
conduct: CONDUCT,
|
temp: TEMP,
|
hum: HUM,
|
} = const_digit;
|
|
/* import moment from "moment"; */
|
let vol, resChart, temp, conduct, currChart, leakVol;
|
let tblData = [];
|
export default {
|
components: {
|
PieChartFill,
|
ThreeTermsBar,
|
TwoLines,
|
PowerStateBox,
|
ChartWrapper,
|
//BarChartThreeD,
|
ContentBox,
|
// HomeList,
|
BarChart,
|
CircuitDiagram,
|
//ScienceBox,
|
DischargeDialogContent,
|
SystemParams,
|
CuringParams,
|
OutlineCuringParams,
|
RestartPlanParams,
|
HistoryRealtimeData,
|
RightMenu,
|
NiBian,
|
StopCuring,
|
NiBianInfoTab,
|
// NiBianInfo,
|
PieChartFillWrapper,
|
},
|
mixins: [WSMixin],
|
watch: {
|
"$route.params.battGroupId"(battGroupId) {
|
this.$nextTick(() => {
|
this.getBattGroupInfo(battGroupId);
|
});
|
},
|
"$route.params.powerDeviceId"(powerDeviceId) {
|
this.$nextTick(() => {
|
this.getPowerInfo(powerDeviceId);
|
});
|
},
|
isNiBian(val) {
|
if (!val && this.acTabs == "niBianInfoTab") {
|
this.acTabs = "eleLine";
|
}
|
},
|
"$store.state.theme.collapse"() {
|
this.$nextTick(() => {
|
this.resize();
|
});
|
},
|
},
|
data() {
|
let permits = this.$store.state.user.permits;
|
let isCanTest = isHasPermit("batt_test_op_permit", permits);
|
let stateList = JSON.parse(JSON.stringify(const_61850.stateList));
|
return {
|
isCanTest: isCanTest,
|
homeListShow: true,
|
devVersion: "",
|
username: sessionStorage.getItem("username"),
|
rightMenu: {
|
show: false,
|
x: 0,
|
y: 0,
|
xIndex: 0,
|
},
|
/* 电池状态 模块 组端展示 */
|
inputs: {
|
groupVol: 0 /* 端电压-组端电压 */,
|
onlineVol: 0 /* 端电压-在线电压 */,
|
groupCurr: 0 /* 电池电流 */,
|
battTestTlong: "0:00:00" /* 测试时长 */,
|
recDatetime: 0 /* 更新日期 */,
|
battTestCap: 0 /* 测试容量 */,
|
battRestCap: 0, // 剩余容量
|
battState: 0 /* 电池状态 */,
|
},
|
acTabs: "eleLine",
|
table: {
|
headers: [
|
{
|
prop: "num1",
|
label: "单体编号",
|
width: "",
|
sortable: false
|
},
|
{
|
prop: "vol1",
|
label: "电压(V)",
|
width: "",
|
sortable: true
|
},
|
{
|
prop: "res1",
|
label: "内阻(mΩ)",
|
width: "",
|
sortable: true
|
},
|
{
|
prop: "temp1",
|
label: "温度(℃)",
|
width: "",
|
sortable: true
|
},
|
{
|
prop: "conduct1",
|
label: "电导",
|
width: "",
|
sortable: false
|
},
|
{
|
prop: "curr1",
|
label: "均衡电流(A)",
|
width: "",
|
sortable: false
|
},
|
{
|
prop: "leakVol1",
|
label: "漏液电压(V)",
|
width: "",
|
sortable: false
|
},
|
],
|
datas: [
|
{
|
num1: 0,
|
vol1: 0,
|
res1: 0,
|
temp1: 0,
|
conduct1: 0,
|
curr1: 0,
|
leakVol1: 0,
|
},
|
],
|
},
|
batt: {},
|
stateListShow: true,
|
stateList: stateList,
|
diagram: {
|
update: true,
|
type: -1,
|
desc: "",
|
powerCut: 1,
|
temp: 0, // 设备温度
|
contactRes: 0, // 接触器阻抗
|
dropVol: 0, // 导通压降
|
},
|
dischargeDialog: {
|
show: false,
|
},
|
systemDialog: {
|
show: false,
|
},
|
curingDialog: {
|
show: false,
|
},
|
outlineCuringDialog: {
|
show: false,
|
},
|
restartPlanDialog: {
|
show: false,
|
},
|
historyRealTimeDataDialog: {
|
show: false,
|
},
|
control: {
|
show: false,
|
data: {
|
startTest: {
|
// 启动核容测试
|
show: true,
|
typeShow: false,
|
id: 11,
|
},
|
stopTest: {
|
// 停止测试
|
show: true,
|
typeShow: false,
|
id: 12,
|
},
|
setSystemParams: {
|
// 系统参数设置
|
show: true,
|
typeShow: false,
|
id: 13,
|
},
|
clearWarn: {
|
// 清理告警
|
show: true,
|
typeShow: false,
|
id: 14,
|
},
|
startYH: {
|
// 启动养护/除硫
|
show: true,
|
typeShow: false,
|
id: 15,
|
},
|
stopYH: {
|
// 停止养护/除硫
|
show: true,
|
typeShow: false,
|
id: 16,
|
},
|
startOutlineYH: {
|
// 启动离线养护/除硫
|
show: true,
|
typeShow: false,
|
id: 17,
|
},
|
stopOutlineYH: {
|
// 停止离线养护/除硫
|
show: true,
|
typeShow: false,
|
id: 18,
|
},
|
circleRestart: {
|
// 定期重启
|
show: true,
|
typeShow: false,
|
id: 19,
|
},
|
restart: {
|
// 重启
|
show: true,
|
typeShow: false,
|
id: 20,
|
},
|
},
|
},
|
powerChart: {
|
ACVol: [
|
{
|
id: "ACVolA",
|
name: "三项交流电压",
|
number: "A",
|
min: 0,
|
max: 250,
|
unit: "伏特(V)",
|
color: [
|
[0.2, "#FA62E8"],
|
[0.8, "#00FFFF"],
|
[1, "#DCFD00"],
|
],
|
},
|
{
|
id: "ACVolB",
|
name: "三项交流电压",
|
number: "B",
|
min: 0,
|
max: 250,
|
unit: "伏特(V)",
|
color: [
|
[0.2, "#FA62E8"],
|
[0.8, "#00FFFF"],
|
[1, "#DCFD00"],
|
],
|
},
|
{
|
id: "ACVolC",
|
name: "三项交流电压",
|
number: "C",
|
min: 0,
|
max: 250,
|
unit: "伏特(V)",
|
color: [
|
[0.2, "#FA62E8"],
|
[0.8, "#00FFFF"],
|
[1, "#DCFD00"],
|
],
|
},
|
],
|
ACCurr: [
|
{
|
id: "ACCurrA",
|
name: "三项交流电流",
|
number: "A",
|
min: 0,
|
max: 100,
|
unit: "安培(A)",
|
color: [
|
[0.2, "#0081FF"],
|
[0.8, "#90EC7D"],
|
[1, "#E5357E"],
|
],
|
},
|
{
|
id: "ACCurrB",
|
name: "三项交流电流",
|
number: "B",
|
min: 0,
|
max: 100,
|
unit: "安培(A)",
|
color: [
|
[0.2, "#0081FF"],
|
[0.8, "#90EC7D"],
|
[1, "#E5357E"],
|
],
|
},
|
{
|
id: "ACCurrC",
|
name: "三项交流电流",
|
number: "C",
|
min: 0,
|
max: 100,
|
unit: "安培(A)",
|
color: [
|
[0.2, "#0081FF"],
|
[0.8, "#90EC7D"],
|
[1, "#E5357E"],
|
],
|
},
|
],
|
ACPower: [
|
{
|
id: "ACPowerA",
|
name: "三项交流频率",
|
number: "A",
|
min: 40,
|
max: 80,
|
unit: "赫兹(Hz)",
|
color: [
|
[0.2, "#F8BD45"],
|
[0.8, "#00FFFF"],
|
[1, "#F3535F"],
|
],
|
},
|
{
|
id: "ACPowerB",
|
name: "三项交流频率",
|
number: "B",
|
min: 40,
|
max: 80,
|
unit: "赫兹(Hz)",
|
color: [
|
[0.2, "#F8BD45"],
|
[0.8, "#00FFFF"],
|
[1, "#F3535F"],
|
],
|
},
|
{
|
id: "ACPowerC",
|
name: "三项交流频率",
|
number: "C",
|
min: 40,
|
max: 80,
|
unit: "赫兹(Hz)",
|
color: [
|
[0.2, "#F8BD45"],
|
[0.8, "#00FFFF"],
|
[1, "#F3535F"],
|
],
|
},
|
],
|
Cos: [
|
{
|
id: "CosA",
|
name: "三项功率因数",
|
number: "A",
|
min: 0,
|
max: 0.2,
|
unit: "",
|
color: [
|
[0.2, "#F8BD45"],
|
[0.8, "#00FFFF"],
|
[1, "#F3535F"],
|
],
|
},
|
{
|
id: "CosB",
|
name: "三项功率因数",
|
number: "B",
|
min: 0,
|
max: 0.2,
|
unit: "",
|
color: [
|
[0.2, "#F8BD45"],
|
[0.8, "#00FFFF"],
|
[1, "#F3535F"],
|
],
|
},
|
{
|
id: "CosC",
|
name: "三项功率因数",
|
number: "C",
|
min: 0,
|
max: 0.2,
|
unit: "",
|
color: [
|
[0.2, "#F8BD45"],
|
[0.8, "#00FFFF"],
|
[1, "#F3535F"],
|
],
|
},
|
],
|
apparentPower: [
|
{
|
id: "apparentPowerA",
|
name: "三项视在功率",
|
number: "A",
|
min: 0,
|
max: 1000,
|
unit: "千伏安(KVA)",
|
color: [
|
[0.2, "#6042FA"],
|
[0.8, "#F8BD45"],
|
[1, "#00FFFF"],
|
],
|
},
|
{
|
id: "apparentPowerB",
|
name: "三项视在功率",
|
number: "B",
|
min: 0,
|
max: 1000,
|
unit: "千伏安(KVA)",
|
color: [
|
[0.2, "#6042FA"],
|
[0.8, "#F8BD45"],
|
[1, "#00FFFF"],
|
],
|
},
|
{
|
id: "apparentPowerC",
|
name: "三项视在功率",
|
number: "C",
|
min: 0,
|
max: 1000,
|
unit: "千伏安(KVA)",
|
color: [
|
[0.2, "#6042FA"],
|
[0.8, "#F8BD45"],
|
[1, "#00FFFF"],
|
],
|
},
|
],
|
direct: [
|
{
|
id: "directVol",
|
name: "输出直流电压",
|
number: "电压",
|
min: 0,
|
max: 60,
|
unit: "伏特(V)",
|
color: [
|
[0.2, "#FA62E8"],
|
[0.8, "#00FFFF"],
|
[1, "#DCFD00"],
|
],
|
},
|
{
|
id: "directCurr",
|
name: "输出直流电流",
|
number: "电流",
|
min: 0,
|
max: 100,
|
unit: "安培(A)",
|
color: [
|
[0.2, "#0081FF"],
|
[0.8, "#90EC7D"],
|
[1, "#E5357E"],
|
],
|
},
|
{
|
id: "directPower",
|
name: "输出直流功率",
|
number: "功率",
|
min: 0,
|
max: 100,
|
unit: "千瓦(KW)",
|
color: [
|
[0.2, "#F8BD45"],
|
[0.8, "#00FFFF"],
|
[1, "#F3535F"],
|
],
|
},
|
],
|
},
|
nibian: {
|
show: false,
|
},
|
stopCuringDialog: {
|
show: false,
|
},
|
fodHeaders: [],
|
fodData: [],
|
circleStart: [40, 40],
|
powerStates: {
|
list1: [
|
{
|
key: "isAcin1Powerdown",
|
icon: "el-icon-jiaoliudianyuan",
|
text1: "交流电源",
|
text2: "失电信号",
|
state: 0,
|
},
|
{
|
key: "isAcdcmod1Err,isAcdcmod2Err,isAcdcmod3Err,isAcdcmod4Err,isAcdcmod5Err,isAcdcmod6Err,isAcdcmod7Err,isAcdcmod8Err,isAcdcmod9Err,isAcdcmod10Err,isAcdcmod11Err,isAcdcmod12Err,isAcdcmod13Err,isAcdcmod14Err,isAcdcmod15Err,isAcdcmod16Err",
|
icon: "el-icon-zhengliumokuaifuchongzhuangtai",
|
text1: "整流模块",
|
text2: "故障信号",
|
state: 0,
|
},
|
{
|
key: "isAcin1UnderVola,isAcin1UnderVolb,isAcin1UnderVolc,isAcin2UnderVola,isAcin2UnderVolb,isAcin2UnderVolc",
|
icon: "el-icon-jiaoliudianyuan",
|
text1: "交流电源",
|
text2: "欠压信号",
|
state: 0,
|
},
|
{
|
key: "isBattgroup1Vollow,isBattgroup2Vollow",
|
icon: "el-icon-xudianchidianya",
|
text1: "蓄电池",
|
text2: "欠压信号",
|
state: 0,
|
},
|
{
|
key: "isAcdcmod1Off",
|
icon: "el-icon-zhengliumokuaikaiguanjizhuangtai",
|
text1: "整流模块",
|
text2: "开关机状态",
|
state: 0,
|
},
|
],
|
list2: [
|
{
|
key: "isAcin1LessA,isAcin1LessB,isAcin1LessC",
|
icon: "el-icon-jiaoliudianyuan",
|
text1: "交流电源",
|
text2: "缺相信号",
|
state: 0,
|
},
|
{
|
key: "isAcin1Fuse,isAcin2Fuse",
|
icon: "el-icon-rongsiguzhangxinhao1",
|
text1: "熔丝故障",
|
text2: "信号",
|
state: 0,
|
},
|
{
|
key: "isDcoutOverVol",
|
icon: "el-icon-zhiliudianyuan",
|
text1: "直流母线",
|
text2: "过压信号",
|
state: 0,
|
},
|
{
|
key: "isLoaderFuse",
|
icon: "el-icon-kaiguantiaozhuanxinhao",
|
text1: "开关跳闸",
|
text2: "信号",
|
state: 0,
|
},
|
],
|
list3: [
|
{
|
key: "isAcin1OverVola,isAcin1OverVolb,isAcin1OverVolc",
|
icon: "el-icon-jiaoliudianyuan",
|
text1: "交流电源",
|
text2: "过压信号",
|
state: 0,
|
},
|
{
|
key: "isAcin1ThunderErr",
|
icon: "el-icon-fangleiqixinhao_huaban1",
|
text1: "防雷器",
|
text2: "故障信号",
|
state: 0,
|
},
|
{
|
key: "isDcoutUnderVol",
|
icon: "el-icon-zhiliudianyuan",
|
text1: "直流母线",
|
text2: "欠压信号",
|
state: 0,
|
},
|
{
|
key: "isL1",
|
icon: "el-icon-zhukaiguanxinhao1",
|
text1: "主开关",
|
text2: "状态信号",
|
state: 0,
|
},
|
{
|
key: "isJunCharge",
|
icon: "el-icon-zhengliumokuaifuchongzhuangtai",
|
text1: "整流模块",
|
text2: "均浮充状态",
|
state: 0,
|
},
|
],
|
},
|
termsBarColor: ["#B671FF", "#90EC7D", "#71ffea", "#ec7da0"],
|
powerData: {
|
info: {
|
powerDeviceId: 0,
|
stationId: 0,
|
stationName: "",
|
stationName1: "",
|
stationName2: "",
|
stationName3: "",
|
stationName4: " ",
|
stationName5: "",
|
},
|
realData: {},
|
},
|
};
|
},
|
methods: {
|
tabClick(tab) {
|
this.acTabs = tab.name;
|
// 根据tab更新电路图
|
if (this.acTabs === "eleLine") {
|
this.diagram.update = true;
|
} else {
|
this.diagram.update = false;
|
}
|
// 更新图表
|
this.setChart();
|
|
// 重置图表的大小
|
this.$nextTick(() => {
|
this.resize();
|
// 设置表格的数据
|
if (this.acTabs == "tblData") {
|
this.table.datas = tblData;
|
}
|
});
|
},
|
toggleChange() {
|
this.resize();
|
},
|
resize() {
|
if (this.acTabs === "powerInfo") {
|
this.powerInfoChartResize();
|
} else if (this.acTabs === "niBianInfoTab") {
|
this.$refs.niBianInfoTab.resize();
|
} else if (this.acTabs === "eleLine") {
|
this.eleLineChartResize();
|
} else {
|
this.$G.chartManage.resize(this.acTabs);
|
}
|
},
|
eleLineChartResize() {
|
// 饼状图
|
this.$refs.pieChartFill1.resize();
|
this.$refs.pieChartFill2.resize();
|
this.$refs.pieChartFill3.resize();
|
this.$refs.pieChartFill4.resize();
|
this.$refs.pieChartFill5.resize();
|
this.$refs.pieChartFill6.resize();
|
|
//柱状图
|
this.$refs.threeTermsBar1.resize();
|
this.$refs.threeTermsBar2.resize();
|
|
//折线图
|
this.$refs.twoLines.resize();
|
},
|
powerInfoChartResize() {
|
// 三项交流电压
|
this.powerChart.ACVol.forEach((item) => {
|
this.$refs[item.id][0].resize();
|
});
|
|
// 三项交流电流
|
this.powerChart.ACCurr.forEach((item) => {
|
this.$refs[item.id][0].resize();
|
});
|
|
// 三项交流频率
|
this.powerChart.ACPower.forEach((item) => {
|
this.$refs[item.id][0].resize();
|
});
|
|
// 三项功率因数
|
this.powerChart.Cos.forEach((item) => {
|
this.$refs[item.id][0].resize();
|
});
|
|
// 三项视在功率
|
this.powerChart.apparentPower.forEach((item) => {
|
this.$refs[item.id][0].resize();
|
});
|
|
// 输出直流
|
this.powerChart.direct.forEach((item) => {
|
this.$refs[item.id][0].resize();
|
});
|
},
|
initChart() {
|
// 电压
|
vol = {
|
title: {
|
show: true,
|
text: "最大值=0V;最小值=0V;平均值=0V",
|
x: "center",
|
textStyle: {
|
fontSize: "14",
|
},
|
},
|
series: [
|
{
|
name: "电压",
|
type: "bar",
|
data: [],
|
markLine: {
|
data: getMarkLineData(),
|
},
|
},
|
],
|
};
|
// 漏液电压
|
leakVol = {
|
title: {
|
show: true,
|
text: "最大值=0V;最小值=0V;平均值=0V",
|
x: "center",
|
textStyle: {
|
fontSize: "14",
|
},
|
},
|
series: [
|
{
|
name: "漏液电压",
|
type: "bar",
|
data: [],
|
},
|
],
|
};
|
|
// 内阻
|
resChart = {
|
title: {
|
show: true,
|
text: "最大值=0mΩ;最小值=mΩ;平均值=0mΩ",
|
x: "center",
|
textStyle: {
|
fontSize: "14",
|
},
|
},
|
series: [
|
{
|
name: "内阻",
|
type: "bar",
|
data: [],
|
markLine: {
|
data: getMarkLineData(),
|
},
|
},
|
],
|
};
|
|
// 温度
|
temp = {
|
title: {
|
show: true,
|
text: "最大值=0℃;最小值=0℃;平均值=0℃",
|
x: "center",
|
textStyle: {
|
fontSize: "14",
|
},
|
},
|
series: [
|
{
|
name: "温度",
|
type: "bar",
|
data: [],
|
markLine: {
|
data: getMarkLineData(),
|
},
|
},
|
],
|
};
|
|
// 电导
|
conduct = {
|
title: {
|
show: true,
|
text: "最大值=0;最小值=0;平均值=0",
|
x: "center",
|
textStyle: {
|
fontSize: "14",
|
},
|
},
|
series: [
|
{
|
name: "电导",
|
type: "bar",
|
data: [],
|
markLine: {
|
data: getMarkLineData(),
|
},
|
},
|
],
|
};
|
// 均衡电流
|
currChart = {
|
title: {
|
show: true,
|
text: "最大值=0mA;最小值=0mA;平均值=0mA",
|
x: "center",
|
textStyle: {
|
fontSize: "14",
|
},
|
},
|
series: [
|
{
|
name: "均衡电流",
|
type: "bar",
|
data: [],
|
},
|
],
|
};
|
// 设置配置项
|
this.setChart();
|
},
|
setChart() {
|
let acTabs = this.acTabs;
|
switch (acTabs) {
|
case "vol":
|
this.$refs.vol.setOption(vol);
|
break;
|
case "res":
|
this.$refs.res.setOption(resChart);
|
break;
|
case "temp":
|
this.$refs.temp.setOption(temp);
|
break;
|
case "conduct":
|
this.$refs.conduct.setOption(conduct);
|
break;
|
case "curr":
|
this.$refs.curr.setOption(currChart);
|
break;
|
case "leakVol":
|
this.$refs.leakVol.setOption(leakVol);
|
break;
|
}
|
},
|
onWSOpen() {
|
this.sendMessage();
|
},
|
sendMessage() {
|
let batt = this.batt;
|
// console.log(batt, '=====batt');
|
if (!batt.battGroupId || !this.powerData.info.powerDeviceId || !this.isWSOpen) {
|
return false;
|
}
|
let params = {
|
battGroupId: batt.battGroupId,
|
devId: batt.fbsdeviceId,
|
powerDeviceId: this.powerData.info.powerDeviceId,
|
pageType: "totalInfo",
|
};
|
// console.log("====", params, JSON.stringify(params));
|
this.SOCKET.send(JSON.stringify(params));
|
},
|
onWSMessage(res) {
|
res = JSON.parse(res.data);
|
let data = res.data.data;
|
// console.log(data, "====2=data");
|
this.realTimeSearch(data.rtdata);
|
this.realTimeGroupss(data.rtstate);
|
this.realTimePowerOffs(data.f9100state);
|
this.realTimeStateList(data.fod);
|
this.searchPowerACDCInfo(data.pwrdevAcdc);
|
},
|
getBattGroupInfo(battGroupId) {
|
this.homeListShow = false;
|
getBattGroupInfo(battGroupId)
|
.then((res) => {
|
res = res.data;
|
if (res.code) {
|
this.leafClick(res.data[0]);
|
} else {
|
this.$layer.msg("未获取到电池组的信息");
|
}
|
})
|
.catch((error) => {
|
console.log(error);
|
});
|
},
|
leafClick(data) {
|
this.batt = data;
|
this.diagram.desc = "";
|
this.realTimeAlarmss();
|
// 开启循环请求
|
this.sendMessage();
|
},
|
/* 查询电池告警参数 */
|
realTimeAlarmss() {
|
var batt = this.batt;
|
realTimeAlarm({
|
devId: batt.fbsdeviceId,
|
}).then((res) => {
|
res = res.data;
|
if (res.code) {
|
let list = res.data.list;
|
// 单体电压
|
this.setChartMarkLine(vol, "Voltage", "Batt_Alarm_Type_MonVol", list);
|
// 单体温度
|
this.setChartMarkLine(
|
temp,
|
"Temperature",
|
"Batt_Alarm_Type_MonTmp",
|
list
|
);
|
// 单体内阻
|
this.setChartMarkLine(
|
resChart,
|
"Resistance",
|
"Batt_Alarm_Type_MonRes",
|
list
|
);
|
// 单体电导
|
this.setChartMarkLine(
|
conduct,
|
"Conductance",
|
"Batt_Alarm_Type_MonRes",
|
list
|
);
|
}
|
});
|
},
|
setChartMarkLine(chartData, name, almName, list) {
|
let batt = this.batt;
|
// 遍历list
|
for (let i = 0; i < list.length; i++) {
|
let item = list[i];
|
if (item.almName == almName) {
|
let high = 0;
|
let highHigh = 0;
|
let low = 0;
|
let lowLow = 0;
|
let guides = 0;
|
switch (name) {
|
case "Voltage": // 电压告警
|
//单体电压
|
let std_mon_vol = batt.monVolStd;
|
high = parseFloat(std_mon_vol * item.almHighCoe).toHold(VOL);
|
highHigh = parseFloat(std_mon_vol * item.almHighCoeUpper).toHold(
|
VOL
|
);
|
low = parseFloat(std_mon_vol * item.almLowCoe).toHold(VOL);
|
lowLow = parseFloat(std_mon_vol * item.almLowCoeLower).toHold(
|
VOL
|
);
|
if (this.cdshStatus == "cdsh") {
|
guides = this.guidesData.monVol;
|
}
|
break;
|
case "Temperature":
|
//单体温度
|
let std_mon_tmp = 25;
|
high = parseFloat(std_mon_tmp * item.almHighCoe).toHold(TEMP);
|
highHigh = parseFloat(std_mon_tmp * item.almHighCoeUpper).toHold(
|
TEMP
|
);
|
low = parseFloat(std_mon_tmp * item.almLowCoe).toHold(TEMP);
|
lowLow = parseFloat(std_mon_tmp * item.almLowCoeLower).toHold(
|
TEMP
|
);
|
if (this.cdshStatus == "cdsh") {
|
guides = this.guidesData.monTemp;
|
}
|
break;
|
case "Resistance":
|
// 单体电阻
|
let std_mon_res =
|
(1 * (batt.monVolStd / 2)) / (batt.monCapStd / 100);
|
high = parseFloat(std_mon_res * item.almHighCoe).toHold(RES);
|
highHigh = parseFloat(std_mon_res * item.almHighCoeUpper).toHold(
|
RES
|
);
|
low = parseFloat(std_mon_res * item.almLowCoe).toHold(RES);
|
lowLow = parseFloat(std_mon_res * item.almLowCoeLower).toHold(
|
RES
|
);
|
if (this.cdshStatus == "cdsh") {
|
guides = this.guidesData.monRes;
|
}
|
break;
|
case "Conductance":
|
// 单体电导
|
let std_mon_ser = batt.monSerStd;
|
high = parseFloat(std_mon_ser * item.almHighCoe).toHold(CONDUCT);
|
highHigh = parseFloat(std_mon_ser * item.almHighCoeUpper).toHold(
|
CONDUCT
|
);
|
low = parseFloat(std_mon_ser * item.almLowCoe).toHold(CONDUCT);
|
lowLow = parseFloat(std_mon_ser * item.almLowCoeLower).toHold(
|
CONDUCT
|
);
|
if (this.cdshStatus == "cdsh") {
|
guides = this.guidesData.monConduct;
|
}
|
break;
|
case "leakVol":
|
// 漏液电压
|
high = parseFloat(item.almHighCoe);
|
highHigh = parseFloat(item.almHighCoeUpper);
|
low = parseFloat(item.almLowCoe);
|
lowLow = parseFloat(item.almLowCoeLower);
|
if (this.cdshStatus == "cdsh") {
|
guides = this.guidesData.leakVol;
|
}
|
break;
|
}
|
// debugger
|
// 下限预告警
|
chartData.series[0].markLine.data[0].yAxis = low;
|
// 下限告警
|
chartData.series[0].markLine.data[1].yAxis = lowLow;
|
// 上限预告警
|
chartData.series[0].markLine.data[2].yAxis = high;
|
// 上限告警
|
chartData.series[0].markLine.data[3].yAxis = highHigh;
|
if (this.cdshStatus == "cdsh") {
|
//参考线
|
chartData.series[0].markLine.data[4].yAxis = guides;
|
}
|
|
break;
|
}
|
}
|
},
|
/* 实时组端信息 */
|
realTimeGroupss(res) {
|
if (res) {
|
if (res.code && res.data) {
|
this.inputs = res.data2;
|
}
|
}
|
},
|
/* 查询电路图开关状态和信息 */
|
realTimePowerOffs(res) {
|
let batt = this.batt;
|
// 设备为61850显示右侧的面板
|
if (regEquipType(batt.fbsdeviceId, "equip61850")) {
|
this.stateListShow = true;
|
} else {
|
this.stateListShow = false;
|
}
|
// 查询后台数据
|
if (res) {
|
let outTime = 2 * 60; //设备超时时间(2分钟)
|
if (res.code && res.data) {
|
let data = res.data2;
|
// 设置版本号
|
this.devVersion = data.devVersion;
|
// 基础信息
|
this.setEquipBase(data);
|
|
// 判断是否超时
|
var nowTime = new Date(data.note).getTime(); //当前时间
|
var record = new Date(data.recordDatetime).getTime();
|
if (Math.abs(nowTime - record) / 1000 > outTime) {
|
this.disconnect();
|
} else {
|
// 未超时执行逻辑
|
let devId = batt.fbsdeviceId;
|
this.diagram.powerCut = 0;
|
// 设备为61850
|
if (regEquipType(devId, "equip61850")) {
|
this.setEquip61850(data);
|
} else if (regEquipType(devId, ["BTS", "BTS9110", "BTS9120"])) {
|
this.setEquipBTS(data);
|
} else if (regEquipType(devId, ["BTS9605", "BTS9611"])) {
|
this.setEquip9605(data);
|
} else {
|
this.disconnect();
|
}
|
}
|
} else {
|
// 设置版本号
|
this.devVersion = "";
|
// 设备处于未连接
|
this.disconnect();
|
}
|
}
|
},
|
disconnect() {
|
// 设备未连接
|
this.diagram.type = -1;
|
this.setStateList("workState", "未连接");
|
this.diagram.temp = 0;
|
// 通讯状态
|
this.setStateList("connect", "异常", "table-row-error");
|
// 温度
|
this.setStateList("devTemp", "未知", "table-row-warn");
|
// 干接点
|
this.setStateList("contact", "未知", "table-row-warn");
|
// 核容终止原因
|
this.setStateList("stopReason", "未知");
|
// 操作失败原因
|
this.setStateList("failReason", "未知");
|
},
|
// 基础信息
|
setEquipBase(data) {
|
let groupIndex = this.batt.groupIndexInFBSDevice;
|
// 设备的温度
|
this.diagram.temp = data.devTemp;
|
this.diagram.contactRes =
|
groupIndex != 0 ? data.devConresist1 : data.devConresist;
|
this.diagram.dropVol =
|
groupIndex != 0 ? data.devCondvoldp1 : data.devCondvoldp;
|
},
|
// BTS设备信息
|
setEquipBTS(data) {
|
let batt = this.batt;
|
// 电路图类型
|
let workstatus = parseInt(data.devWorkstate); //[0:'在线监测',1:'放电测试',2:'充电测试',3:'内阻测试',4:'未知'];
|
this.diagram.desc = "";
|
let battstate = this.inputs.battState;
|
let alarmstatus = data.devAlarmstate;
|
|
// 设置停电放电状态
|
if (data.devOnlinevollow) {
|
this.inputs.battState = 5;
|
this.diagram.type = 5;
|
this.diagram.desc = "(开关闭合)";
|
this.diagram.powerCut = 1;
|
// 当前设备是BTS设备
|
if (workstatus === 0 && data.devResTestState !== 0) {
|
this.diagram.desc += "(内阻测试)";
|
}
|
return;
|
}
|
// 判断workstatus
|
switch (workstatus) {
|
case 0:
|
this.diagram.type = 0;
|
this.diagram.desc = "(开关闭合)";
|
// 当前设备是BTS设备
|
if (data.devResTestState !== 0) {
|
this.diagram.desc += "(内阻测试)";
|
}
|
break;
|
case 1:
|
if (
|
data.devTestgroupnum > 0 &&
|
data.devTestgroupnum === batt.groupIndexInFBSDevice + 1
|
) {
|
this.diagram.type = 1;
|
this.diagram.desc = "(开关断开)";
|
} else {
|
if (battstate === 3) {
|
this.diagram.type = 1;
|
this.diagram.desc = "(开关断开)";
|
} else {
|
this.diagram.type = 0;
|
this.diagram.desc = "(开关闭合)";
|
}
|
}
|
|
// 当前设备是BTS设备
|
if (data.devTesttype == 209) {
|
this.diagram.desc += "(KD测试)";
|
this.diagram.type = 3;
|
}
|
break;
|
case 2:
|
//辨别当前电池组是否在充电
|
if (
|
this.diagram.type == 2 ||
|
(data.devTestgroupnum > 0 &&
|
data.devTestgroupnum === batt.groupIndexInFBSDevice + 1)
|
) {
|
//充电
|
if (
|
alarmstatus === 1 ||
|
alarmstatus === 2 ||
|
alarmstatus === 3 ||
|
alarmstatus === 4 ||
|
alarmstatus === 6
|
) {
|
//限流充电 -->常闭接触器断开
|
this.diagram.type = 2;
|
this.diagram.desc = "(开关断开)";
|
} else {
|
//直流充电 -->常闭接触器闭合
|
this.diagram.type = 2;
|
this.diagram.desc = "(开关闭合)";
|
}
|
} else {
|
this.diagram.type = 0;
|
this.diagram.desc = "(开关闭合)";
|
}
|
break;
|
default:
|
this.diagram.type = -1;
|
break;
|
}
|
},
|
// 61850设备信息
|
setEquip61850(data) {
|
// 电路图类型
|
let workstatus = parseInt(data.devWorkstate); //[0:'在线监测',1:'放电测试',2:'充电测试',3:'内阻测试',4:'未知'];
|
this.diagram.desc = "";
|
|
// 设置停电放电状态
|
if (data.devOnlinevollow) {
|
this.inputs.battState = 5;
|
this.diagram.type = 5;
|
this.diagram.desc = "(开关闭合)";
|
this.diagram.powerCut = 1;
|
// 当前设备是BTS设备
|
if (workstatus === 0 && data.devResTestState !== 0) {
|
this.diagram.desc += "(内阻测试)";
|
}
|
return;
|
}
|
|
switch (workstatus) {
|
case 0: //浮充状态拓扑图
|
this.diagram.type = 0;
|
this.diagram.desc = "(开关闭合)";
|
break;
|
case 4: //浮充状态(内阻测试)拓扑图
|
this.diagram.type = 0;
|
// 当前设备是否是内阻测试
|
this.diagram.desc = "(开关闭合)";
|
this.diagram.desc += "(内阻测试)";
|
break;
|
case 1: //充电状态拓扑图
|
this.diagram.type = 2;
|
this.diagram.desc = "(开关断开)";
|
break;
|
case 2: //放电状态拓扑图
|
this.diagram.type = 1;
|
this.diagram.desc = "(开关断开)";
|
break;
|
case 3: //放电状态拓扑图
|
this.diagram.type = 7;
|
break;
|
case 5: //放电状态(KD测试)拓扑图
|
this.diagram.type = 3;
|
this.diagram.desc = "(开关断开)";
|
this.diagram.desc += "(KD测试)";
|
break;
|
case 6: // 离线养护测试
|
this.diagram.type = 4;
|
this.diagram.desc = "离线养护测试";
|
break;
|
default:
|
//未知
|
this.diagram.type = -1;
|
this.diagram.desc = "(未知)";
|
break;
|
}
|
|
// 设备工作状态
|
let workStates = const_61850.workstates;
|
this.setStateList("workState", workStates[data.devWorkstate]);
|
// 核容终止原因
|
let stopReasons = const_61850.stopreasons;
|
if (data.devWorkstate == 2) {
|
this.setStateList("stopReason", "未知");
|
} else {
|
this.setStateList(
|
"stopReason",
|
stopReasons[data.devLastCaptestStopType]
|
);
|
}
|
|
// 操作失败原因
|
let failReasons = const_61850.failreasons;
|
this.setStateList("failReason", failReasons[data.devAlarmstate]);
|
|
// 告警信息
|
let alarms = data.dev61850alarms.split(",");
|
// alarms = ['false', 'false', 'true', 'false', 'true'];
|
// 通讯状态
|
if (alarms[1] == "true") {
|
this.setStateList("connect", "异常", "table-row-error");
|
} else {
|
this.setStateList("connect", "正常", "");
|
}
|
|
// 温度
|
if (alarms[2] == "true") {
|
this.setStateList("devTemp", "异常", "table-row-error");
|
} else {
|
this.setStateList("devTemp", "正常", "");
|
}
|
|
// 干接点
|
if (alarms[4] == "true") {
|
this.setStateList("contact", "异常", "table-row-error");
|
} else {
|
this.setStateList("contact", "正常", "");
|
}
|
},
|
// 9605设备
|
setEquip9605(data) {
|
let batt = this.batt;
|
// 电路图类型
|
let workstatus = parseInt(data.devWorkstate); //[0:'在线监测',1:'放电测试',2:'充电测试',3:'内阻测试',4:'未知'];
|
this.diagram.desc = "";
|
let battstate = this.inputs.battState;
|
let alarmstatus = data.devAlarmstate;
|
|
// 设置停电放电状态
|
if (data.devOnlinevollow) {
|
this.inputs.battState = 5;
|
this.diagram.type = 5;
|
this.diagram.desc = "(开关闭合)";
|
this.diagram.powerCut = 1;
|
// 当前设备是BTS设备
|
if (workstatus === 0 && data.devResTestState !== 0) {
|
this.diagram.desc += "(内阻测试)";
|
}
|
return;
|
}
|
// 判断workstatus
|
switch (workstatus) {
|
case 0:
|
this.diagram.type = 0;
|
//this.diagram.desc = '(开关闭合)';
|
// 当前设备是BTS设备
|
if (data.devResTestState !== 0) {
|
this.diagram.type = 6;
|
this.diagram.desc += "(内阻测试)";
|
}
|
break;
|
case 1:
|
this.diagram.type = 1;
|
//this.diagram.desc = '(开关断开)';
|
break;
|
case 2:
|
this.diagram.type = 2;
|
//this.diagram.desc = '(开关断开)';
|
break;
|
default:
|
this.diagram.type = -1;
|
break;
|
}
|
},
|
// 设置stateList的值
|
setStateList(name, value, type) {
|
let stateList = this.stateList;
|
for (let i = 0; i < stateList.length; i++) {
|
let state = stateList[i];
|
if (state.name == name) {
|
state.value = value;
|
state.type = type ? type : "";
|
}
|
}
|
},
|
/* echars图表 */
|
realTimeSearch(res) {
|
if (res) {
|
let data = [];
|
if (res.code && res.data) {
|
data = res.data2.list.map((item) => {
|
return {
|
num1: "#" + item.monNum,
|
vol1: item.monVol.toHold(VOL),
|
res1: item.monRes.toHold(RES),
|
temp1: item.monTmp.toHold(TEMP),
|
conduct1: item.monRes ? ((1 / item.monRes) * 1000).toHold(CONDUCT) : 0,
|
curr1: item.monJhCurr.toHold(CURR),
|
leakVol1: item.monLyVol.toHold(VOL),
|
};
|
});
|
}
|
// 更新表格
|
if (this.acTabs == "tblData") {
|
this.table.datas = data;
|
} else {
|
tblData = data;
|
}
|
|
// 电压值
|
let volTempVol = [];
|
if (res.code && res.data) {
|
volTempVol = res.data2.list.map((item) => {
|
return ["#" + item.monNum, item.monVol.toHold(VOL)];
|
});
|
}
|
let volBarNum = getBarNum(volTempVol);
|
vol.title.text =
|
"最大值=" +
|
volBarNum.max.toHold(VOL) +
|
"V;最小值=" +
|
volBarNum.min.toHold(VOL) +
|
"V;平均值=" +
|
volBarNum.avg.toHold(VOL) +
|
"V";
|
vol.series[0].data = volTempVol;
|
|
// 内阻
|
let volTempres = [];
|
if (res.code && res.data) {
|
volTempres = res.data2.list.map((item) => {
|
return ["#" + item.monNum, item.monRes.toHold(RES)];
|
});
|
}
|
let resBarNum = getBarNum(volTempres);
|
resChart.title.text =
|
"最大值=" +
|
resBarNum.max.toHold(RES) +
|
"mΩ;最小值=" +
|
resBarNum.min.toHold(RES) +
|
"mΩ;平均值=" +
|
resBarNum.avg.toHold(RES) +
|
"mΩ";
|
resChart.series[0].data = volTempres;
|
|
// 温度
|
let volTempte = [];
|
if (res.code && res.data) {
|
volTempte = res.data2.list.map((item) => {
|
return ["#" + item.monNum, item.monTmp.toHold(TEMP)];
|
});
|
}
|
let tempBarNum = getBarNum(volTempte);
|
temp.title.text =
|
"最大值=" +
|
tempBarNum.max.toHold(TEMP) +
|
"℃;最小值=" +
|
tempBarNum.min.toHold(TEMP) +
|
"℃;平均值=" +
|
tempBarNum.avg.toHold(TEMP) +
|
"℃";
|
temp.series[0].data = volTempte;
|
|
// 电导
|
let conductTemp = [];
|
if (res.code && res.data) {
|
conductTemp = res.data2.list.map((item) => {
|
return [
|
"#" + item.monNum,
|
item.monRes ? ((1 / item.monRes) * 1000).toHold(CONDUCT) : 0,
|
];
|
});
|
}
|
let conductBarNum = getBarNum(conductTemp);
|
conduct.title.text =
|
"最大值=" +
|
conductBarNum.max.toHold(CONDUCT) +
|
";最小值=" +
|
conductBarNum.min.toHold(CONDUCT) +
|
";平均值=" +
|
conductBarNum.avg.toHold(CONDUCT);
|
conduct.series[0].data = conductTemp;
|
// 均衡电流
|
let currTemp = [];
|
if (res.code && res.data) {
|
currTemp = res.data2.list.map((item) => {
|
return ["#" + item.monNum, item.monJhCurr.toHold(CURR)];
|
});
|
}
|
let currBarNum = getBarNum(currTemp);
|
currChart.title.text =
|
"最大值=" +
|
currBarNum.max.toHold(CURR) +
|
"mA;最小值=" +
|
currBarNum.min.toHold(CURR) +
|
"mA;平均值=" +
|
currBarNum.avg.toHold(CURR) +
|
"mA";
|
currChart.series[0].data = currTemp;
|
// 漏液电压
|
let leakVolTemp = [];
|
if (res.code && res.data) {
|
leakVolTemp = res.data2.list.map((item) => {
|
return ["#" + item.monNum, item.monLyVol.toHold(VOL)];
|
});
|
}
|
let leakVolNum = getBarNum(leakVolTemp);
|
leakVol.title.text =
|
"最大值=" +
|
leakVolNum.max.toHold(VOL) +
|
"V;最小值=" +
|
leakVolNum.min.toHold(VOL) +
|
"V;平均值=" +
|
leakVolNum.avg.toHold(VOL) +
|
"V";
|
leakVol.series[0].data = leakVolTemp;
|
// 更新电压图表
|
this.setChart();
|
}
|
},
|
// 向父级发送同步页面的指令
|
syncPage() {
|
let batt = this.batt;
|
let search =
|
"?province=" +
|
batt.stationName1 +
|
"&city=" +
|
batt.stationName2 +
|
"&county=" +
|
batt.stationName5 +
|
"&home=" +
|
batt.stationName3 +
|
"&batt=" +
|
batt.battGroupId;
|
this.$router.push("/dataTest/history" + search);
|
},
|
// 停止测试
|
stopTest() {
|
this.$layer.confirm(
|
"停止测试",
|
{
|
icon: 3,
|
},
|
(index) => {
|
// 关闭询问层
|
this.$layer.close(index);
|
// 根据设备id进行停止
|
if (regEquipType(this.batt.fbsdeviceId, "equip61850")) {
|
// 停止设备
|
this.stop61850Test();
|
} else if (
|
regEquipType(this.batt.fbsdeviceId, [
|
"BTS",
|
"BTS9110",
|
"BTS9120",
|
"BTS9605",
|
])
|
) {
|
// 停止设备
|
this.stopBtsTest();
|
} else {
|
// 提示信息
|
this.$layer.msg("未知设备类型,暂无法停止测试!");
|
}
|
}
|
);
|
},
|
// 停止bts测试
|
stopBtsTest() {
|
// 开启等待框
|
let loading = this.$layer.loading(1);
|
// 请求后台
|
btsControl({
|
num: const_9100.cmd.stop,
|
devId: this.batt.fbsdeviceId,
|
battGroupNum: this.batt.groupIndexInFBSDevice+1,
|
})
|
.then((res) => {
|
res = res.data;
|
if (res.code) {
|
// 提示信息
|
this.$layer.msg("停止测试成功");
|
} else {
|
// 提示信息
|
this.$layer.msg("停止测试失败!");
|
}
|
// 关闭等待框
|
this.$layer.close(loading);
|
})
|
.catch((error) => {
|
console.log(error);
|
// 关闭等待框
|
this.$layer.close(loading);
|
// 提示信息
|
this.$layer.msg("停止测试失败,停止测试请求异常!");
|
});
|
},
|
// 停止61850测试
|
stop61850Test() {
|
// 开启等待框
|
let loading = this.$layer.loading(1);
|
// 请求后台
|
btsControl({
|
num: const_61850.cmd.stop,
|
devId: this.batt.fbsdeviceId,
|
battGroupNum: this.batt.groupIndexInFBSDevice+1,
|
})
|
.then((res) => {
|
res = res.data;
|
if (res.code) {
|
// 提示信息
|
this.$layer.msg("停止测试成功");
|
} else {
|
// 提示信息
|
this.$layer.msg("停止测试失败!");
|
}
|
// 关闭等待框
|
this.$layer.close(loading);
|
})
|
.catch((error) => {
|
console.log(error);
|
// 关闭等待框
|
this.$layer.close(loading);
|
// 提示信息
|
this.$layer.msg("停止测试失败,停止测试请求异常!");
|
});
|
},
|
// 停止养护除硫
|
stopCuring() {
|
let batt = this.batt;
|
let groupNum = batt.groupIndexInFBSDevice + 1;
|
this.$layer.confirm(
|
"确定停止养护/除硫",
|
{
|
icon: 3,
|
},
|
(index) => {
|
// 关闭确认框
|
this.$layer.close(index);
|
let loading = this.$layer.loading(1);
|
curingControl({
|
devId: batt.fbsdeviceId,
|
groupNum,
|
battGroupNum,
|
})
|
.then((res) => {
|
res = res.data;
|
this.$layer.msg(res.msg);
|
// 关闭等待框
|
this.$layer.close(loading);
|
})
|
.catch((error) => {
|
// 关闭等待框
|
this.$layer.close(loading);
|
});
|
}
|
);
|
},
|
// 查询拓扑图状态的显示
|
searchStatus() {
|
searchInfo({ categoryId: 1 })
|
.then((res) => {
|
res = res.data;
|
if (res.code) {
|
let data = res.data.list;
|
this.stateList.forEach((item) => {
|
item.show = this.getStateById(item.id, data);
|
});
|
}
|
// 设置养护除硫信息
|
this.setFodHeaders(this.stateList);
|
})
|
.catch((error) => {
|
console.log(error);
|
});
|
},
|
setFodHeaders(stateList) {
|
let result = [];
|
result.push({
|
prop: "num",
|
label: "编号",
|
});
|
// 剩余天数
|
let resDay = const_61850.getItemByName("resDay", stateList);
|
if (resDay && resDay.show) {
|
result.push({
|
prop: "RestTime_",
|
label: "天数",
|
});
|
}
|
// 工作状态
|
let workModel = const_61850.getItemByName("workMode", stateList);
|
if (workModel && workModel.show) {
|
result.push({
|
prop: "workstate",
|
label: "模式",
|
});
|
}
|
// 组端电压
|
let groupVol = const_61850.getItemByName("groupVol", stateList);
|
if (groupVol && groupVol.show) {
|
result.push({
|
prop: "vgroupvol",
|
label: "组压",
|
});
|
}
|
// 峰值电压
|
let peakVol = const_61850.getItemByName("peakVol", stateList);
|
if (peakVol && peakVol.show) {
|
result.push({
|
prop: "vpeakvol",
|
label: "峰压",
|
});
|
}
|
this.fodHeaders = result;
|
},
|
// 查询控制按钮的内容
|
searchControl() {
|
searchInfo({ categoryId: 2 })
|
.then((res) => {
|
res = res.data;
|
let control = false; // 控制整体的显示
|
if (res.code) {
|
let data = res.data.list;
|
Object.keys(this.control.data).forEach((key) => {
|
let item = this.control.data[key];
|
item.show = this.getStateById(item.id, data); // 根据id设置按钮的状态
|
// 存在控制
|
if (item.show) {
|
control = item.show;
|
}
|
});
|
}
|
this.control.show = control; // 设置整体显示的状态
|
})
|
.catch((error) => {
|
console.log(error);
|
});
|
},
|
getStateById(id, list) {
|
let result = false;
|
for (let i = 0; i < list.length; i++) {
|
let item = list[i];
|
if (id == item.id) {
|
result = item.status ? true : false;
|
break;
|
}
|
}
|
return result;
|
},
|
clearWarn() {
|
// 清除告警
|
this.$layer.confirm(
|
"清除设备告警",
|
{
|
icon: 3,
|
title: "系统提示",
|
},
|
(index) => {
|
// 关闭弹出框
|
this.$layer.close(index);
|
// 开启加载等待
|
let load = this.$layer.loading(1);
|
// 执行清除告警
|
let batt = this.batt;
|
clearWarn({
|
devId: batt.fbsdeviceId,
|
num: const_system.cmd.clear,
|
})
|
.then((res) => {
|
res = res.data;
|
if (res.code && res.data) {
|
this.$layer.msg("清除设备告警成功!");
|
} else {
|
this.$layer.msg("清除设备告警失败!");
|
}
|
// 关闭等待
|
this.$layer.close(load);
|
})
|
.catch((error) => {
|
console.log(error);
|
// 关闭等待
|
this.$layer.close(load);
|
});
|
}
|
);
|
},
|
realTimeStateList(res) {
|
// 获取剩余天数,工作模式,组端电压,峰值电压
|
// 仅有编号不做任何操作
|
if (this.fodHeaders.length == 1) {
|
return;
|
}
|
if (res) {
|
let data = [];
|
if (res.code && res.data) {
|
let rsData = res.data2;
|
let workModels = ["停止", "养护", "除硫"];
|
let list = ["One", "Two", "Three", "Four", "Five"];
|
let fodHeaders = this.fodHeaders;
|
data = list.map((item, index) => {
|
let workModel = rsData["workstate" + item];
|
return fodHeaders.map((fod) => {
|
if (fod.prop == "num") {
|
return index + 1;
|
} else if (fod.prop == "workstate") {
|
return workModels[workModel];
|
} else {
|
return rsData[fod.prop + item];
|
}
|
});
|
//return [index+1, rsData['RestTime_'+item], workModels[workModel], rsData['vgroupvol'+item], rsData['vpeakvol'+item]]
|
});
|
this.fodData = data;
|
}
|
}
|
},
|
setRightMenuPos(x, y) {
|
this.rightMenu.show = true;
|
this.rightMenu.x = x;
|
this.rightMenu.y = y;
|
},
|
chartRightCLick(params) {
|
this.rightMenu.show = true;
|
this.rightMenu.x = params.x;
|
this.rightMenu.y = params.y;
|
this.rightMenu.xIndex = params.xIndex;
|
},
|
payAttentionMon() {
|
let searchParams = {
|
battGroupId: this.batt.battGroupId,
|
monNum: this.rightMenu.xIndex + 1,
|
};
|
|
// 查询
|
realTimeNot(searchParams)
|
.then((res) => {
|
res = res.data;
|
if (res.code && res.data) {
|
this.$layer.msg("单体#" + searchParams.monNum + "已被关注");
|
} else {
|
this.addAttentionMon(searchParams);
|
}
|
})
|
.catch((error) => {
|
console.log(error);
|
});
|
},
|
addAttentionMon(params) {
|
let loading = this.$layer.loading(1);
|
// 请求后台添加
|
realTimeAdd(params)
|
.then((res) => {
|
res = res.data;
|
if (res.code && res.data) {
|
this.$layer.msg("成功关注单体#" + params.monNum);
|
} else {
|
this.$layer.msg("添加失败");
|
}
|
this.$layer.close(loading);
|
})
|
.catch((error) => {
|
this.$layer.close(loading);
|
console.log(error);
|
});
|
},
|
closeDisChargeDialog() {
|
this.dischargeDialog.show = false;
|
},
|
getPowerInfo(powerDeviceId) {
|
this.powerData.info.powerDeviceId = powerDeviceId;
|
getInfoById({
|
powerDeviceId: powerDeviceId,
|
})
|
.then((res) => {
|
res = res.data;
|
if (res.code && res.data.list.length) {
|
this.powerData.info = res.data.list[0];
|
} else {
|
this.powerData.info = {
|
powerDeviceId: 0,
|
stationId: 0,
|
stationName: "",
|
stationName1: "",
|
stationName2: "",
|
stationName3: "",
|
stationName4: " ",
|
stationName5: "",
|
};
|
}
|
// 查询电源信息
|
// this.searchPowerACDCInfo();
|
})
|
.catch((error) => {
|
console.log(error);
|
});
|
},
|
searchPowerACDCInfo(res) {
|
if (res) {
|
let data = getPowerInfo();
|
if (res.code && res.data && res.data2.list.length) {
|
data = res.data2.list[0];
|
}
|
|
// 设置电压和电流
|
setTimeout(() => {
|
this.setPowerVolCurr(data);
|
setTimeout(() => {
|
this.setThreeTermVolCurr(data);
|
setTimeout(() => {
|
this.setTwoLinesData(data);
|
}, 300);
|
}, 300);
|
}, 0);
|
|
// 设置状态
|
this.setPowerState(data);
|
}
|
},
|
// 设置电压和电流
|
setPowerVolCurr(data) {
|
// 电池组1电压
|
let group1Vol = getValByKey("battgroup1Vol", data, 0, VOL);
|
this.$refs.pieChartFill1.setData({
|
title: {
|
color: "#fff",
|
},
|
value: group1Vol,
|
});
|
|
// 直流母线电压
|
let dcOutVol = getValByKey("dcOutVol", data, 0, VOL);
|
this.$refs.pieChartFill2.setData({
|
title: {
|
color: "#fff",
|
},
|
value: dcOutVol,
|
});
|
|
// 电池组2电压
|
let group2Vol = getValByKey("battgroup2Vol", data, 0, VOL);
|
this.$refs.pieChartFill3.setData({
|
title: {
|
color: "#fff",
|
},
|
value: group2Vol,
|
});
|
|
// 电池组1电流
|
let group1Curr = getValByKey("battgroup1Curr", data, 0, CURR);
|
this.$refs.pieChartFill4.setData({
|
title: {
|
color: "#fff",
|
},
|
value: group1Curr,
|
});
|
|
// 直流母线电流
|
let dcOutCurr = getValByKey("dcOutCurr", data, 0, CURR);
|
this.$refs.pieChartFill5.setData({
|
title: {
|
color: "#fff",
|
},
|
value: dcOutCurr,
|
});
|
|
// 电池组2电流
|
let group2Curr = getValByKey("battgroup2Curr", data, 0, CURR);
|
this.$refs.pieChartFill6.setData({
|
title: {
|
color: "#fff",
|
},
|
value: group2Curr,
|
});
|
},
|
// 设置三项电压和电流
|
setThreeTermVolCurr(data) {
|
// 三相电压
|
let threeTermVol = const_power.vol();
|
// 更新柱状图
|
this.$refs.threeTermsBar1.setData({
|
data1: threeTermVol.data1.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, value.toHold(0)];
|
}),
|
data2: threeTermVol.data2.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, value.toHold(0)];
|
}),
|
|
data3: threeTermVol.data3.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, value.toHold(0)];
|
}),
|
|
data4: threeTermVol.data4.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, value.toHold(0)];
|
}),
|
});
|
|
// 三相电流
|
let threeTermCurr = const_power.curr();
|
// 更新柱状图
|
this.$refs.threeTermsBar2.setData({
|
data1: threeTermCurr.data1.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, value.toHold(1)];
|
}),
|
data2: threeTermCurr.data2.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, value.toHold(1)];
|
}),
|
data3: threeTermCurr.data3.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, value.toHold(1)];
|
}),
|
data4: threeTermCurr.data4.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, value.toHold(1)];
|
}),
|
});
|
},
|
// 设置整流器电压和电流
|
setTwoLinesData(data) {
|
// 整流器电压和电流
|
let list = {
|
data1: [
|
{ key: "m1OutVol", name: "支路1" },
|
{ key: "m2OutVol", name: "支路2" },
|
{ key: "m3OutVol", name: "支路3" },
|
{ key: "m4OutVol", name: "支路4" },
|
{ key: "m5OutVol", name: "支路5" },
|
{ key: "m6OutVol", name: "支路6" },
|
{ key: "m7OutVol", name: "支路7" },
|
{ key: "m8OutVol", name: "支路8" },
|
{ key: "m9OutVol", name: "支路9" },
|
{ key: "m10OutVol", name: "支路10" },
|
{ key: "m11OutVol", name: "支路11" },
|
{ key: "m12OutVol", name: "支路12" },
|
{ key: "m13OutVol", name: "支路13" },
|
{ key: "m14OutVol", name: "支路14" },
|
{ key: "m15OutVol", name: "支路15" },
|
{ key: "m16OutVol", name: "支路16" },
|
],
|
data2: [
|
{ key: "m1Outcurr", name: "支路1" },
|
{ key: "m2Outcurr", name: "支路2" },
|
{ key: "m3Outcurr", name: "支路3" },
|
{ key: "m4Outcurr", name: "支路4" },
|
{ key: "m5Outcurr", name: "支路5" },
|
{ key: "m6Outcurr", name: "支路6" },
|
{ key: "m7Outcurr", name: "支路7" },
|
{ key: "m8Outcurr", name: "支路8" },
|
{ key: "m9Outcurr", name: "支路9" },
|
{ key: "m10Outcurr", name: "支路10" },
|
{ key: "m11Outcurr", name: "支路11" },
|
{ key: "m12Outcurr", name: "支路12" },
|
{ key: "m13Outcurr", name: "支路13" },
|
{ key: "m14Outcurr", name: "支路14" },
|
{ key: "m15Outcurr", name: "支路15" },
|
{ key: "m16Outcurr", name: "支路16" },
|
],
|
};
|
// 更新柱状图
|
this.$refs.twoLines.setData({
|
data1: list.data1.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, Number(value).toHold(VOL)];
|
}),
|
data2: list.data2.map((item) => {
|
let value = getValByKey(item.key, data, 0);
|
return [item.name, Number(value).toHold(CURR)];
|
}),
|
});
|
},
|
// 设置电源的状态
|
setPowerState(data) {
|
let powerStates = this.powerStates;
|
Object.keys(powerStates).forEach((list) => {
|
powerStates[list].map((item) => {
|
let states = item.key.split(",").map((key) => {
|
return getValByKey(key, data, -1);
|
});
|
// 设置item的值
|
item.state = Math.max(...states);
|
});
|
});
|
},
|
},
|
computed: {
|
battFullName() {
|
let batt = this.batt;
|
if (batt.stationName && batt.battGroupName) {
|
return batt.stationName + "-" + batt.battGroupName;
|
}
|
return "电池组全称";
|
},
|
backInputs() {
|
let batt = this.batt;
|
const obj = {
|
0: "未知",
|
1: "浮充",
|
2: "充电",
|
3: "放电",
|
4: "均充",
|
},
|
list = {
|
battState: "未知",
|
group_online_vol: "在线:0.00V;组端:0.00V",
|
groupCurr: "0.00A",
|
recDatetime: "1982-01-01 00:00:00",
|
battTestTlong: formatSeconds(0),
|
battTestCap: "0Ah",
|
batt_syrl_cap: "---",
|
sysc: "------",
|
};
|
if (this.diagram.type == -1) {
|
return list;
|
}
|
let batt_state_text = this.diagram.powerCut
|
? "停电放电"
|
: obj[this.inputs.battState];
|
list.battState = batt_state_text + this.diagram.desc;
|
if (regEquipType(batt.fbsdeviceId, "BTS9605")) {
|
list.group_online_vol = `组端:${this.inputs.groupVol.toHold(VOL)}V`;
|
} else {
|
list.group_online_vol = `在线:${this.inputs.onlineVol.toHold(
|
VOL
|
)}V;组端:${this.inputs.groupVol.toHold(VOL)}V`;
|
}
|
|
list.groupCurr = this.inputs.groupCurr.toHold(CURR) + "A";
|
list.recDatetime = this.inputs.recDatetime;
|
list.battTestTlong = formatSeconds(this.inputs.battTestTlong);
|
|
list.battTestCap = this.inputs.battTestCap.toHold(CAP) + "AH";
|
if (this.inputs.battState === 2) {
|
list.batt_syrl_cap = "---";
|
} else {
|
list.batt_syrl_cap = this.inputs.battRestCap.toHold(CAP) + "AH";
|
}
|
if (this.inputs.battState === 3) {
|
list.sysc = sethoubeiTime(
|
parseFloat(this.inputs.battRestCap) /
|
parseFloat(this.inputs.groupCurr)
|
);
|
} else {
|
list.sysc = "------";
|
}
|
return list;
|
},
|
showStateList() {
|
return this.stateList.filter((item) => {
|
if (item.show) {
|
return item;
|
}
|
});
|
},
|
dischargeDialogTitle() {
|
let batt = this.batt;
|
if (regEquipType(batt.fbsdeviceId, "equip61850")) {
|
return "放电参数设置";
|
} else if (
|
regEquipType(batt.fbsdeviceId, ["BTS", "BTS9110", "BTS9120", "BTS9605"])
|
) {
|
return "BTS设备放电参数设置";
|
} else if (regEquipType(batt.fbsdeviceId, ["BTS9611", "BTS9605"])) {
|
return "内阻测试";
|
} else {
|
return "未知设备(待开发)";
|
}
|
},
|
stateListState() {
|
return this.stateListShow && this.showStateList.length;
|
},
|
histroyDataTitle() {
|
return this.batt.stationName + "-历史实时数据";
|
},
|
fodShow() {
|
return this.fodHeaders.length === 1 || this.fodData.length === 0
|
? false
|
: true;
|
},
|
isNiBian() {
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, "BTS9120");
|
},
|
},
|
mounted() {
|
let battGroupId = this.$route.params.battGroupId;
|
if (battGroupId) {
|
this.getBattGroupInfo(battGroupId);
|
}
|
|
// 获取电源信息
|
let powerDeviceId = this.$route.params.powerDeviceId;
|
if (powerDeviceId) {
|
this.getPowerInfo(powerDeviceId);
|
}
|
|
// 查询拓扑图状态的显示
|
this.searchStatus();
|
// 查询控制按钮的配置
|
this.searchControl();
|
// 初始化图表
|
this.initChart();
|
setTimeout(() => {
|
this.$nextTick(() => {
|
this.resize();
|
this.$G.chartManage.resize(this.acTabs);
|
});
|
}, 100);
|
|
// 屏幕缩放时触发
|
window.addEventListener("resize", this.resize);
|
|
// 监控是否已经切换到当前页面
|
// this.monitorPage();
|
// 监听点击事件
|
// this.$G.chartManage.get("vol").getZr().on('contextmenu', params=>{
|
// let pointInPixel= [params.offsetX, params.offsetY];
|
// console.log(this.$G.chartManage.get("vol").containPixel('grid',pointInPixel));
|
// this.setRightMenuPos(params.event.clientX, params.event.clientY);
|
// });
|
},
|
destroyed() {
|
window.removeEventListener("resize", this.resize);
|
},
|
};
|
</script>
|
|
<style scoped>
|
.page-real-time {
|
color: #ffffff;
|
}
|
|
.table-cell.text-right {
|
font-size: 14px;
|
}
|
|
.table-cell.text-right .iconfont {
|
margin-right: 4px;
|
}
|
|
.table-row.table-row-error {
|
color: #ff0000;
|
}
|
|
.table-row.table-row-warn {
|
color: #e6a23c;
|
}
|
|
.table-row .table-cell {
|
padding-top: 12px;
|
}
|
|
.page-content {
|
position: relative;
|
padding-top: 8px;
|
padding-bottom: 2px;
|
box-sizing: border-box;
|
height: 100%;
|
}
|
|
.box-tools {
|
line-height: 32px;
|
}
|
|
.box-tools .iconfont,
|
.box-tools .el-iconfont {
|
font-size: 24px;
|
}
|
|
.box-tools .iconfont:hover,
|
.box-tools .el-iconfont:hover {
|
cursor: pointer;
|
color: #cfcfcf;
|
}
|
|
.box-tools .iconfont:active,
|
.box-tools .el-iconfont:active {
|
color: #ff0000;
|
}
|
|
.page-content-tools {
|
position: absolute;
|
top: 14px;
|
right: 8px;
|
z-index: 99;
|
}
|
|
.hdw-btn {
|
display: inline-block;
|
color: #fff;
|
background-color: #409eff;
|
border-color: #409eff;
|
line-height: 1;
|
white-space: nowrap;
|
cursor: pointer;
|
-webkit-appearance: none;
|
text-align: center;
|
box-sizing: border-box;
|
outline: none;
|
margin: 0;
|
transition: 0.1s;
|
font-weight: 500;
|
-webkit-user-select: none;
|
-moz-user-select: none;
|
-ms-user-select: none;
|
user-select: none;
|
padding: 6px 10px;
|
font-size: 14px;
|
border-radius: 4px;
|
}
|
|
.hdw-btn:hover {
|
background-color: #3c91e6;
|
}
|
|
.hdw-menu-list {
|
border: 1px solid #409eff;
|
}
|
|
.hdw-menu-list .hdw-menu-item {
|
border-top: 1px solid #0e5194;
|
}
|
|
.hdw-menu-list .hdw-menu-item:first-child {
|
border-top: none;
|
}
|
|
.hdw-menu-item a {
|
display: block;
|
text-align: center;
|
padding: 8px;
|
color: #ffffff;
|
cursor: pointer;
|
background-color: rgba(30, 125, 219, 0.767);
|
}
|
|
.hdw-menu-item a:hover {
|
background-color: rgb(60, 135, 211);
|
}
|
|
.hdw-menu-item a:active {
|
background-color: rgb(34, 100, 167);
|
}
|
|
.hdw-state-list {
|
box-sizing: border-box;
|
font-size: 14px;
|
padding-bottom: 8px;
|
}
|
|
.table-info-list {
|
width: 100%;
|
font-size: 14px;
|
}
|
|
.table-info-list td {
|
padding: 4px;
|
text-align: center;
|
}
|
|
.noborder {
|
border: none;
|
}
|
|
.el-table-wrapper {
|
background-color: #052272;
|
}
|
|
.flex-box-list,
|
.flex-box-list-full {
|
display: flex;
|
flex-direction: row;
|
height: 50%;
|
box-sizing: border-box;
|
}
|
|
.flex-box-list-full {
|
height: 100%;
|
}
|
|
.flex-box-mgr {
|
margin: 16px;
|
}
|
|
.page-content .flex-box {
|
flex: 1;
|
overflow: hidden;
|
}
|
|
.hdw-state-list-wrapper {
|
box-sizing: border-box;
|
padding-left: 8px;
|
padding-right: 8px;
|
border-radius: 4px;
|
height: 100%;
|
}
|
</style>
|