<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" v-if="esVideoSn">
|
<el-tooltip class="item" effect="dark" content="视频监控" placement="bottom">
|
<i class="el-iconfont el-icon-video-camera-solid" @click="esVideoDialog = true"></i>
|
</el-tooltip>
|
</div>
|
<div style="right: 72px" slot="box-tools" class="box-tools">
|
<el-tooltip class="item" effect="dark" content="通讯状态" placement="bottom">
|
<hdw-light :type="isLink"></hdw-light>
|
</el-tooltip>
|
</div>
|
<div slot="box-tools" class="box-tools" style="right: 106px">
|
<el-tooltip class="item" effect="dark" content="3D机房" placement="bottom">
|
<i class="el-iconfont el-icon-office-building" @click="station.show = true"></i>
|
</el-tooltip>
|
</div>
|
<div slot="box-tools" class="box-tools" style="right: 140px">
|
<el-tooltip class="item" effect="dark" content="机房环境图集" placement="bottom">
|
<i class="el-iconfont el-icon-picture" @click="homeImageDialog = 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 && isTestDev">
|
<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="discharge" :class="{ disabled: dischargeDisabled }" href="javascript:void(0);">启动放电</a>
|
</li>
|
<li class="hdw-menu-item" v-if="control.data.stopTest.show">
|
<a :class="{ disabled: stopDisChargeDisabled }" @click="stopTest('stopDisCharge')"
|
href="javascript:void(0);">停止放电</a>
|
</li>
|
<li class="hdw-menu-item" v-if="control.data.startTest.show">
|
<a @click="charge" :class="{ disabled: chargeDisabled }" href="javascript:void(0);">启动充电</a>
|
</li>
|
<li class="hdw-menu-item" v-if="control.data.stopTest.show">
|
<a :class="{ disabled: stopChargeDisabled }" @click="stopTest('stopCharge')"
|
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 key="eleLine" label="电路拓扑图" name="eleLine" v-if="pageConfig.eleLine">
|
<div style="position: absolute; top: 8px; left: 8px">
|
<science-box style="position: relative" no-header v-show="batt.fbsdeviceId">
|
<div class="hdw-state-list table-layout">
|
<div class="table-row">
|
<div class="table-cell text-right">设备工作状态:</div>
|
<div class="table-cell">{{ workState }}</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right">当前状态:</div>
|
<div class="table-cell">
|
{{ backInputs.fbo4830Stopstr }}
|
</div>
|
</div>
|
</div>
|
</science-box>
|
</div>
|
<circuit-diagram v-show="batt.fbsdeviceId" :batt="batt" :online-vol="inputs.onlineVol"
|
:group-vol="inputs.groupVol" :batt-curr="inputs.groupCurr" :dev-temp="diagram.temp" :type="diagram.type"
|
:update="diagram.update" :mode="fbo4830IsOnline" :version="devVersion" :contact-res="diagram.contactRes"
|
:drop-vol="diagram.dropVol" :dev-type="diagram.devType" :charge-mon="chargeMon"
|
:discharge-mon="dischargeMon" :buscouple-switch="buscoupleSwitch"></circuit-diagram>
|
</el-tab-pane>
|
<el-tab-pane key="battdata" label="电池信息" name="battData">
|
<batt-data :mon-data="monData" :grp-data="grpData" :update="acTabs == 'battData'"
|
:change-flag="dataChangeFlag" :his-data="hisData"></batt-data>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</flex-layout>
|
</content-box>
|
<!-- 放电参数设置 -->
|
<el-dialog :title="chargeType == 'disCharge' ? '放电参数设置' : '充电参数设置'" width="700px" :visible.sync="dischargeDialog.show"
|
:close-on-click-modal="false" top="0" class="dialog-center dialog-params" :modal-append-to-body="false">
|
<!-- :type="" -->
|
<fbo-discharge-params v-if="dischargeDialog.show" :type="chargeType" :batt="batt" :max-mon="devEachgroupBattsum"
|
:is-discharge="devWorkstate == 2" @close="closeDisChargeDialog">
|
</fbo-discharge-params>
|
</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="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="esVideoDialog" :close-on-click-modal="false" top="0"
|
class="dialog-center" :modal-append-to-body="false">
|
<ez-video v-if="esVideoDialog" :sn="esVideoSn"></ez-video>
|
</el-dialog>
|
<el-dialog title="历史内阻数据" width="1200px" :visible.sync="hisResDialog" :close-on-click-modal="false" top="0"
|
class="dialog-center" :modal-append-to-body="false">
|
<history-res v-if="hisResDialog" :batt="batt"></history-res>
|
</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>
|
<li>
|
<a href="javascript:;" @click="hisResDialog = true">导出历史内阻数据</a>
|
</li>
|
</ul>
|
</div>
|
</right-menu>
|
<!-- 3d机房 -->
|
<el-dialog title="3d机房" class="threeD-dialog" :visible.sync="station.show" :close-on-click-modal="false">
|
<div class="station-contain">
|
<three-station :data="station.data"></three-station>
|
</div>
|
<!-- <div slot="footer">
|
v-if="station.data.stationId"
|
<el-button @click="station.show = false">关闭</el-button>
|
</div> -->
|
</el-dialog>
|
<!-- 机房环境图集 -->
|
<el-dialog title="机房环境图集" width="auto" :visible.sync="homeImageDialog" :close-on-click-modal="false" top="0"
|
class="dialog-center" :modal-append-to-body="false">
|
<home-image-list v-if="homeImageDialog" :batt="batt" :images="stationImages"
|
@success="getStationPic"></home-image-list>
|
</el-dialog>
|
</flex-layout>
|
</template>
|
|
<script>
|
import ContentBox from "@/components/ContentBox";
|
import BarChart from "@/components/chart/BarChart";
|
import ScienceBox from "@/components/ScienceBox";
|
import HdwLight from "@/components/HdwLight.vue";
|
// import HomeList from "./components/HomeList";
|
import HomeList from "./movingRingSystem/HomeList";
|
import FboDischargeParams from "./components/fbo4815DischargeParams";
|
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 NiBian from "./components/NiBian";
|
import StopCuring from "./components/StopCuring";
|
import NiBianInfoTab from "./components/NiBianInfoTab";
|
import dcWorkParams from "./components/dcdc/workParams";
|
import CircuitDiagram from "./components/CircuitDiagram";
|
import RightMenu from "./components/RightMenu";
|
import historyRes from "./components/historyRes";
|
import BalanceSupplyModule from "./components/balance-supply-module.vue";
|
import BalanceControlParams from "./components/balance-control-params.vue";
|
import ezVideo from "@/components/ezVideo";
|
import workPlan from "./components/dcdc/workPlan";
|
import ElePriceTpl from "./components/elePriceTpl";
|
import BmsInfo from "./components/bmsInfoFbo";
|
import BattData from "./components/battData";
|
import qrCode from "@/assets/js/outside/qrCode";
|
import sysConfig from "@/assets/js/config";
|
|
import {
|
realTimeNot,
|
realTimeAdd,
|
realTimeAlarm,
|
clearWarn,
|
controllerFBO4830,
|
searchInfo,
|
outlineControl as restart,
|
getStationPic,
|
getGuidesData,
|
setGuidesData,
|
serchDate100
|
} from "./js/realTime";
|
import {
|
getBattGroupInfo,
|
getStationBattInfo,
|
} from "../dataMager/js/battGroupMager";
|
import {
|
formatSeconds,
|
sethoubeiTime,
|
Timeout,
|
regEquipType,
|
getBarNum,
|
GetMonomerCap,
|
GetHourRate,
|
isHasPermit,
|
getConduct,
|
lithium as lithiumInfo,
|
getDevType,
|
} from "@/assets/js/tools";
|
|
import {
|
const_61850,
|
const_fbo4830,
|
const_system,
|
} from "@/assets/js/const";
|
import getMarkLineData from "@/components/chart/js/getMarkLineData";
|
|
import ThreeStation from "@/components/threeStation";
|
import { checkUserPwd } from "@/views/login/js/api";
|
|
import createWs from "@/assets/js/websocket";
|
import HomeImageList from "@/components/homeImageList";
|
import JcParams from "@/views/dataTest/components/JcParams";
|
import { ExportFile } from "@/assets/js/tools/exportFile";
|
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, monConnRes;
|
export default {
|
name: "movingRingSysteRrealTime",
|
mixins: [WSMixin],
|
components: {
|
JcParams,
|
HomeImageList,
|
BmsInfo,
|
ElePriceTpl,
|
ezVideo,
|
ContentBox,
|
HomeList,
|
BarChart,
|
CircuitDiagram,
|
ScienceBox,
|
FboDischargeParams,
|
SystemParams,
|
CuringParams,
|
OutlineCuringParams,
|
// RestartPlanParams,
|
HistoryRealtimeData,
|
RightMenu,
|
NiBian,
|
StopCuring,
|
NiBianInfoTab,
|
HdwLight,
|
historyRes,
|
BalanceSupplyModule,
|
BalanceControlParams,
|
dcWorkParams,
|
workPlan,
|
ThreeStation,
|
BattData,
|
},
|
watch: {
|
"$route.params.BattGroupId"(battGroupId) {
|
this.$nextTick(() => {
|
this.getBattGroupInfo(battGroupId);
|
});
|
},
|
isNiBian(val) {
|
if (!val && this.acTabs == "niBianInfoTab") {
|
this.acTabs = "eleLine";
|
}
|
},
|
"$store.state.theme.collapse"() {
|
this.$nextTick(() => {
|
this.resize();
|
});
|
},
|
// "diagram.type"() {
|
// let batt = this.batt;
|
// this.getLastCapacityTest(batt);
|
// },
|
},
|
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));
|
let historyStateList = JSON.parse(JSON.stringify(const_61850.historyStateList));
|
let lastCapacityTest = JSON.parse(JSON.stringify(const_61850.lastCapacityTest));
|
let pageConfig = this.$store.getters["user/realTabsConfig"];
|
return {
|
monData: [],
|
grpData: {},
|
hisData: [],
|
devWorkstate: -1,
|
devEachgroupBattsum: 1,
|
liData: [],
|
fbo4830IsOnline: 0,
|
chargeType: "disCharge",
|
workState: "未知",
|
guidesDialog: false,
|
guidesVal: "",
|
guidesData: {},
|
// autoCheck: false,
|
homeImageDialog: false,
|
workPlanDialog: false,
|
dcdcWorkDialog: false,
|
balanceControlDialog: false,
|
jcParamsDialog: false,
|
hisResDialog: false,
|
esVideoDialog: false,
|
esVideoSn: "",
|
maskShow: false,
|
isCanTest: isCanTest,
|
homeListShow: true,
|
devVersion: "",
|
username: sessionStorage.getItem("username"),
|
pageConfig: pageConfig,
|
stationImages: [],
|
rightMenu: {
|
show: false,
|
x: 0,
|
y: 0,
|
xIndex: 0,
|
},
|
/* 电池状态 模块 组端展示 */
|
inputs: {
|
fbo4830Stopstr: "",
|
groupVol: 0 /* 端电压-组端电压 */,
|
onlineVol: 0 /* 端电压-在线电压 */,
|
groupCurr: 0 /* 电池电流 */,
|
battTestTlong: "0:00:00" /* 测试时长 */,
|
recDatetime: 0 /* 更新日期 */,
|
battTestCap: 0 /* 测试容量 */,
|
battRestCap: 0, // 剩余容量
|
battState: 0 /* 电池状态 */,
|
devTemperature: 0, // 环境温度
|
devHumidity: 0, // 环境湿度
|
},
|
chargeMon: "",
|
dischargeMon: "",
|
acTabs: "eleLine",
|
// table: {
|
// headers: [
|
// {
|
// prop: "num1",
|
// label: "单体编号",
|
// width: "",
|
// key1: "",
|
// },
|
// {
|
// prop: "vol1",
|
// label: "电压(V)",
|
// width: "",
|
// key1: "vol",
|
// },
|
// ],
|
// datas: [],
|
// },
|
batt: {},
|
stateList: stateList,
|
historyStateList: historyStateList,
|
lastCapacityTest: lastCapacityTest,
|
diagram: {
|
update: true,
|
type: -1,
|
desc: "",
|
powerCut: 1,
|
temp: 0, // 设备温度
|
contactRes: 0, // 接触器阻抗
|
dropVol: 0, // 导通压降
|
devType: 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,
|
},
|
juheng: {
|
// 均衡控制参数设置
|
show: true,
|
typeShow: false,
|
id: 21,
|
},
|
},
|
},
|
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: [],
|
lithiumParams: {
|
analog: lithiumInfo.analog().params,
|
},
|
// 空开状态 0-断开 1-闭合
|
buscoupleSwitch: 0,
|
// 数据更新标识
|
dataChangeFlag: 0,
|
// 包电压
|
packVols: [],
|
packCurrs: [],
|
station: {
|
show: false,
|
data: {
|
stationId: 0,
|
info: null,
|
},
|
},
|
};
|
},
|
methods: {
|
tabClick(tab) {
|
this.acTabs = tab.name;
|
// 根据tab更新电路图
|
if (this.acTabs === "eleLine") {
|
this.diagram.update = true;
|
} else {
|
this.diagram.update = false;
|
}
|
|
// 重置图表的大小
|
this.$nextTick(() => {
|
this.resize();
|
});
|
},
|
toggleChange() {
|
this.resize();
|
},
|
resize() {
|
if (this.acTabs === "powerInfo") {
|
this.powerInfoChartResize();
|
} else if (this.acTabs === "niBianInfoTab") {
|
this.$refs.niBianInfoTab.resize();
|
} else {
|
this.$G.chartManage.resize(this.acTabs);
|
}
|
// if (isToggleChange) {
|
const acTabs = this.acTabs;
|
this.acTabs = "";
|
this.$nextTick(() => {
|
this.acTabs = acTabs;
|
});
|
// }
|
},
|
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();
|
});
|
},
|
onWSOpen() {
|
this.$nextTick(() => {
|
this.sendMessage();
|
});
|
},
|
sendMessage() {
|
let batt = this.batt;
|
// console.log(batt, '=====batt');
|
// console.log(
|
// this.isWSOpen,
|
// "websocket status",
|
// this.SOCKET ? this.SOCKET.readyState : "socket为null"
|
// );
|
// if (!batt.battGroupId || this.SOCKET.readyState != 1) {
|
if (!batt.battGroupId || !this.isWSOpen) {
|
return false;
|
}
|
let params = {
|
battGroupId: batt.battGroupId,
|
devId: batt.fbsdeviceId,
|
pageType: "fbo4815",
|
};
|
// powerDeviceId: 0,
|
// groupNum: batt.groupIndexInFBSDevice,
|
console.log("=====9=", 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, "=====111data");
|
this.realTimePowerOffs(data.f9100state);
|
this.realTimeSearch(data.rtdata);
|
this.realTimeGroupss(data.rtstate, res.data.data2);
|
// 最后一次核容数据
|
// this.getLastCapacityTest(data.tinfdata);
|
this.dataChangeFlag = Math.random(); // 数据更新
|
},
|
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 = "";
|
// 查询机房电池组信息(3D用)
|
this.getStationBattInfo(data.stationId);
|
this.realTimeAlarmss();
|
// this.realTimeXuHang(); // 预估续航时长
|
this.diagram.devType = getDevType(data.chargeType, data.buscoupleState);
|
this.esVideoSn = data.videoUrl;
|
// this.table.headers = getTblHeader(data.fbsdeviceId);
|
// 如果是61850 则查询最后一次放电数据
|
if (regEquipType(data.fbsdeviceId, ["equip61850"])) {
|
this.getLastCapacityTest(data);
|
}
|
this.$nextTick(() => {
|
this.changeTabsName();
|
// 开启循环请求
|
this.sendMessage();
|
// 获取机房的图片
|
this.getStationPic();
|
});
|
},
|
getStationBattInfo(id) {
|
getStationBattInfo(id).then((res) => {
|
res = res.data;
|
// console.log(res, '======res?a');
|
if (res.code && res.data.length) {
|
this.station.data.stationId = res.data[0].stationId;
|
this.station.data.info = res.data;
|
}
|
});
|
},
|
/**
|
* 根据设备类型修改Tabs选中状态
|
*/
|
changeTabsName() {
|
// if (this.isLd9) {
|
// this.acTabs = "vol";
|
// }
|
|
this.$nextTick(() => {
|
this.resize();
|
});
|
},
|
/* 查询电池告警参数 */
|
realTimeAlarmss() {
|
var batt = this.batt;
|
realTimeAlarm({
|
devId: batt.fbsdeviceId,
|
}).then((res) => {
|
res = res.data;
|
});
|
},
|
discharge() {
|
if (this.dischargeDisabled) {
|
return false;
|
}
|
this.chargeType = "disCharge";
|
this.dischargeDialog.show = true;
|
},
|
charge() {
|
if (this.chargeDisabled) {
|
return false;
|
}
|
this.confirmStartTest();
|
},
|
// 确认框
|
confirmStartTest() {
|
this.$layer.prompt(
|
{
|
title: "输入启动口令,并确认",
|
formType: 2,
|
area: ["300px", "180px"],
|
},
|
(pass, index) => {
|
// 请求后台校验密码
|
checkUserPwd(pass)
|
.then((res) => {
|
res = res.data;
|
if (res.code) {
|
// 关闭弹出框
|
this.$layer.close(index);
|
this.$layer.msg("密码检测通过,启动测试");
|
// 启动测试
|
this.startTest();
|
} else {
|
this.$layer.msg("启动口令错误!");
|
}
|
})
|
.catch((error) => {
|
console.log(error);
|
this.$layer.msg("网络请求异常");
|
});
|
}
|
);
|
},
|
// 启动
|
startTest() {
|
// 等待框
|
let loading = this.$layer.loading(1);
|
let opCmd = const_fbo4830.cmd.startCharge;
|
// 请求后台
|
controllerFBO4830({
|
opCmd,
|
devId: this.batt.fbsdeviceId,
|
})
|
.then((res) => {
|
res = res.data;
|
if (res.code && res.data) {
|
// 提示信息
|
this.$layer.msg("启动成功");
|
this.$emit("close");
|
} else {
|
// 提示信息
|
this.$layer.msg("启动失败!");
|
}
|
// 关闭等待框
|
this.$layer.close(loading);
|
})
|
.catch((error) => {
|
console.log(error);
|
// 关闭等待框
|
this.$layer.close(loading);
|
// 提示信息
|
this.$layer.msg("启动失败,启动测试请求异常!");
|
});
|
},
|
/* 实时组端信息 */
|
realTimeGroupss(res, res2) {
|
if (res) {
|
// res = res.data;
|
if (res.code && res.data) {
|
this.inputs = { ...this.inputs, ...res.data2 };
|
|
// 格式化历史实时数据
|
if (-1 != this.diagram.type) {
|
this.formatHisData(res.data2);
|
} else {
|
this.hisData = [];
|
}
|
}
|
}
|
if (res2.cellShowType != this.batt.cellShowType) {
|
this.batt.cellShowType = res2.cellShowType;
|
}
|
},
|
/* 查询电路图开关状态和信息 */
|
realTimePowerOffs(res) {
|
let batt = this.batt;
|
// 查询后台数据
|
if (res) {
|
// res = res.data;
|
let outTime = 2 * 60; //设备超时时间(2分钟)
|
if (res.code && res.data) {
|
let data = res.data2;
|
this.devEachgroupBattsum = data.devEachgroupBattsum;
|
// 设置版本号
|
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 {
|
// 未超时执行逻辑
|
this.diagram.powerCut = 0;
|
// 设备为61850
|
this.setEquipBTS(data);
|
}
|
} else {
|
// 设置版本号
|
this.devVersion = "";
|
// 设备处于未连接
|
this.disconnect();
|
}
|
}
|
},
|
disconnect() {
|
// 设备未连接
|
this.diagram.type = -1;
|
this.devWorkstate = -1;
|
this.setStateList("workState", "未连接");
|
if (this.isBTS9140) {
|
this.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", "未知");
|
// 预估续航时长
|
//this.setStateList("xuHang", "???");
|
|
// 显示遮罩层
|
this.maskShow = true;
|
},
|
// 基础信息
|
setEquipBase(data) {
|
let groupIndex = this.batt.groupIndexInFBSDevice;
|
// 设备的温度
|
this.diagram.temp = data.devTemp;
|
let contactRes = (
|
groupIndex != 0 ? data.devConresist1 : data.devConresist
|
).toHold(RES);
|
let dropVol = (
|
groupIndex != 0 ? data.devCondvoldp1 : data.devCondvoldp
|
).toHold(VOL);
|
let alarms = data.dev61850alarms.split(",");
|
if (alarms.length) {
|
this.diagram.contactRes = alarms[0] == "true" ? "k1异常" : contactRes;
|
this.diagram.dropVol = alarms[3] == "true" ? "D1异常" : dropVol;
|
} else {
|
this.diagram.contactRes = contactRes;
|
this.diagram.dropVol = dropVol;
|
}
|
},
|
// BTS设备信息
|
setEquipBTS(data) {
|
let batt = this.batt;
|
// 关闭遮罩层
|
this.maskShow = false;
|
this.devWorkstate = data.devWorkstate;
|
// 电路图类型
|
let workstatus = parseInt(data.devWorkstate); //[0:'在线监测',1:'放电测试',2:'充电测试',3:'内阻测试',4:'未知'];
|
// if (this.isBTS9140) {
|
// }
|
this.workState = const_fbo4830.workstates[data.devWorkstate] || "未知";
|
this.diagram.desc = "";
|
let battstate = this.inputs.battState;
|
let alarmstatus = data.devAlarmstate;
|
|
this.fbo4830IsOnline = data.fbo4830IsOnline;
|
this.inputs.fbo4830Stopstr = data.fbo4830Stopstr;
|
|
|
// 设置停电放电状态
|
if (data.devOnlinevollow) {
|
this.inputs.battState = 5;
|
this.diagram.type = 5;
|
this.diagram.desc = "(开关闭合)";
|
this.diagram.powerCut = 1;
|
if (this.isBTS9140) {
|
this.workState = "停电放电";
|
}
|
// 当前设备是BTS设备
|
if (workstatus === 0 && data.devResTestState !== 0) {
|
this.diagram.desc += "(内阻测试)";
|
}
|
|
|
return;
|
}
|
|
// 判断workstatus
|
switch (workstatus) {
|
case 0:
|
// 停机
|
this.diagram.type = 0;
|
break;
|
case 1:
|
case 2:
|
case 5: // 等待充电 显示放电状态
|
// 放电
|
this.diagram.type = 1;
|
break;
|
case 3:
|
case 4:
|
// 充电
|
this.diagram.type = 2;
|
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 : "";
|
}
|
}
|
|
let historyStateList = this.historyStateList;
|
for (let i = 0; i < historyStateList.length; i++) {
|
let state = historyStateList[i];
|
if (state.name == name) {
|
state.value = value;
|
state.type = type ? type : "";
|
}
|
}
|
|
for (
|
let i = 0, list = this.lastCapacityTest, j = list.length;
|
i < j;
|
i++
|
) {
|
let state = list[i];
|
if (state.name == name) {
|
state.value = value;
|
state.type = type || "";
|
}
|
}
|
},
|
setTableRowClass({ row }) {
|
if (row.monState == 1) {
|
return "red-row";
|
} else if (row.monState == 2) {
|
return "green-row";
|
}
|
return "";
|
},
|
/* echars图表 */
|
realTimeSearch(res) {
|
if (res) {
|
let diagramType = this.diagram.type;
|
// res = res.data;
|
let data = [];
|
let grpData = {};
|
let chargeMon = "";
|
let dischargeMon = "";
|
if (res.code && res.data && diagramType != -1) {
|
data = res.data2.list.map((item) => {
|
if (item.monState == 1) {
|
dischargeMon += (dischargeMon == "" ? "#" : ",#") + item.monNum;
|
} else if (item.monState == 2) {
|
chargeMon += (chargeMon == "" ? "#" : ",#") + item.monNum;
|
}
|
return {
|
num1: "#" + item.monNum,
|
vol1: item.monVol,
|
res1: item.monRes,
|
temp1: item.monTmp,
|
conduct1: item.monRes ? ((1 / item.monRes) * 1000).toHold(CONDUCT) : 0,
|
curr1: item.monJhCurr,
|
leakVol1: item.monLyVol,
|
monConnRes: item.monConnRes,
|
monCap: item.monCap,
|
monTestCap:
|
diagramType == 1 || diagramType == 2 || diagramType == 6
|
? item.monTestCap
|
: "---",
|
monResCap:
|
diagramType == 1 || diagramType == 2 || diagramType == 6
|
? item.monRestCap
|
: "---",
|
monDisTimeLong:
|
diagramType == 1 || diagramType == 2 || diagramType == 6
|
? Math.floor(item.monDisTimelong / 60) +
|
"时" +
|
(item.monDisTimelong % 60) +
|
"分"
|
: "---",
|
monState: item.monState,
|
};
|
});
|
}
|
// 添加正在测试的单体
|
this.chargeMon = chargeMon;
|
this.dischargeMon = dischargeMon;
|
|
// 更新表格
|
// TODO
|
// this.table.datas = data;
|
// 实时数据 图
|
|
this.monData = data;
|
}
|
},
|
formatHisData(grpD) {
|
if (this.hisData.length) {
|
this.formatData(this.hisData, grpD);
|
} else {
|
this.getHisData().then((res) => {
|
console.log(res, 'res');
|
this.formatData(res, grpD);
|
});
|
}
|
},
|
formatData(hisD, grpD) {
|
hisD.shift();
|
hisD.push({
|
recrodTime: grpD.recDatetime,
|
groupCurr: grpD.groupCurr,
|
groupVol: grpD.groupVol,
|
onlineVol: grpD.onlineVol,
|
});
|
},
|
// 向父级发送同步页面的指令
|
syncPage() {
|
let batt = this.batt;
|
let search =
|
"?province=" +
|
batt.stationName1 +
|
"&city=" +
|
batt.stationName2 +
|
"&county=" +
|
batt.stationName5 +
|
"&home=" +
|
batt.stationName3 +
|
"&batt=" +
|
batt.battGroupId;
|
let url = "/dataTest/history";
|
if (regEquipType(batt.fbsdeviceId, "LD9")) {
|
url = "/dataTest/historyLD9";
|
}
|
this.$router.push(url + search);
|
},
|
// 停止测试
|
stopTest(type) {
|
if (
|
("stopDisCharge" == type && this.stopDisChargeDisabled) ||
|
("stopCharge" == type && this.stopChargeDisabled)
|
) {
|
return false;
|
}
|
this.$layer.confirm(
|
"停止测试",
|
{
|
icon: 3,
|
},
|
(index) => {
|
// 关闭询问层
|
this.$layer.close(index);
|
// 停止设备
|
this.stopBtsTest(type);
|
}
|
);
|
},
|
// 停止bts测试
|
stopBtsTest(type) {
|
// 开启等待框
|
let loading = this.$layer.loading(1);
|
// 请求后台
|
controllerFBO4830({
|
opCmd: const_fbo4830.cmd[type],
|
devId: this.batt.fbsdeviceId,
|
})
|
.then((res) => {
|
res = res.data;
|
if (res.code && res.data) {
|
// 提示信息
|
this.$layer.msg("停止成功");
|
} else {
|
// 提示信息
|
this.$layer.msg("停止失败!");
|
}
|
// 关闭等待框
|
this.$layer.close(loading);
|
})
|
.catch((error) => {
|
console.log(error);
|
// 关闭等待框
|
this.$layer.close(loading);
|
// 提示信息
|
this.$layer.msg("停止测试失败,停止测试请求异常!");
|
});
|
},
|
// 查询拓扑图状态的显示
|
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.historyStateList.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 = true;
|
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);
|
});
|
}
|
);
|
},
|
// 初始化时lifeFlag传true 页面销毁时传false
|
monitorPage(lifeFlag) {
|
if (!lifeFlag) {
|
return;
|
}
|
let url = this.$route.meta.url || "";
|
if (url == "/dataTest/realTimeFbo4815" && this.acTabs === "eleLine") {
|
this.diagram.update = true;
|
} else {
|
this.diagram.update = false;
|
}
|
// 启动监控
|
requestAnimationFrame(() => {
|
this.monitorPage();
|
});
|
},
|
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;
|
},
|
restartSystem() {
|
let self = this;
|
let batt = this.batt;
|
let resetPwd = "restart123456";
|
this.$prompt("请输入重启密码", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
inputType: "password",
|
})
|
.then(({ value }) => {
|
if (value == resetPwd) {
|
let loading = this.$layer.loading();
|
restart({
|
devId: batt.fbsdeviceId,
|
opCmd: 16,
|
})
|
.then((res) => {
|
res = res.data;
|
if (res.code) {
|
this.$alert("发送重启命令成功", "系统提示");
|
} else {
|
this.$alert("发送重启命令失败!", "系统提示");
|
}
|
this.$layer.close(loading);
|
})
|
.catch((error) => { });
|
} else {
|
this.$layer.msg("密码不正确");
|
}
|
})
|
.catch(() => { });
|
},
|
getLastCapacityTest(res) {
|
if (res) {
|
let batt = this.batt;
|
// res = res.data;
|
if (res.code && res.data) {
|
let data = res.data2;
|
// 上次核容停止原因
|
this.setStateList("stopReason", data.testStoptypeReason);
|
// 核容测试的最后一笔数据
|
let datalist = data.batttestdataList;
|
// 上次核容开始时间
|
this.setStateList("test_starttime", data.testStarttime);
|
// 上次核容测试容量
|
this.setStateList("test_cap", data.testCap.toHold(CAP) + "AH");
|
// 上次核容测试时长
|
this.setStateList("test_timelong", formatSeconds(data.testTimelong));
|
let volArr = [];
|
datalist.forEach((v) => {
|
volArr.push(["#" + v.monNum, v.monVol]);
|
});
|
let batNum = getBarNum(volArr);
|
let avg_curr =
|
data.testTimelong > 0
|
? (data.testCap * 3600) / data.testTimelong
|
: data.testCurr;
|
let over_cap = GetMonomerCap(
|
batt.monCapStd,
|
GetHourRate(batt.monCapStd, avg_curr),
|
data.testCap,
|
batNum.max,
|
batNum.min,
|
batt.monVolStd,
|
0
|
);
|
let real_cap = GetMonomerCap(
|
batt.monCapStd,
|
GetHourRate(batt.monCapStd, avg_curr),
|
data.testCap,
|
batNum.max,
|
batNum.min,
|
batt.monVolStd,
|
1
|
);
|
let xuhang = batt.loadCurr ? real_cap / batt.loadCurr : 0;
|
// 剩余容量
|
this.setStateList("re_cap", over_cap.toHold(CAP) + "AH");
|
// 续航时长
|
this.setStateList(
|
"endurance_time",
|
xuhang ? sethoubeiTime(xuhang) : "---"
|
);
|
}
|
}
|
},
|
getStationPic() {
|
let batt = this.batt;
|
if (sysConfig.clientName.name == "sxty") {
|
this.getQRStationPic();
|
} else {
|
getStationPic(batt.stationId)
|
.then((res) => {
|
let rs = res.data;
|
let data = [];
|
if (rs.code == 1) {
|
data = rs.data ? rs.data : [];
|
}
|
this.stationImages = data;
|
})
|
.catch((error) => {
|
console.log(error);
|
});
|
}
|
},
|
getQRStationPic() {
|
let mId = this.batt.mid;
|
qrCode
|
.battery(mId)
|
.then((res) => {
|
let rs = res.data;
|
let pics = "";
|
if (rs.code == 200) {
|
pics = rs.data.pics;
|
}
|
this.stationImages = pics ? pics.split(",") : [];
|
})
|
.catch((error) => {
|
this.stationImages = [];
|
});
|
},
|
// 导出表格
|
exportFile() {
|
let batt = this.batt;
|
let time = new Date().getTime();
|
if (this.table.datas.length === 0) {
|
this.$message.warning("暂无数据,无需导出");
|
return false;
|
}
|
ExportFile(
|
this.dataHeaders,
|
this.table.datas,
|
batt.stationName + "-电池实时数据(" + time + ")"
|
);
|
},
|
// 查前100笔历史数据
|
getHisData() {
|
this.hisData = [];
|
return serchDate100(this.batt.battGroupId).then((res) => {
|
let { code, data, data2 } = res.data;
|
let list = [];
|
if (code && data) {
|
list = data2;
|
}
|
if (list.length < 100) {
|
let timeStamp = list.length ? new Date(list[0].recrodTime).getTime() : new Date().getTime();
|
for (let i = 0, j = 100 - list.length; i < j; i++) {
|
timeStamp -= 1000;
|
list.unshift({
|
groupCurr: 0,
|
groupVol: 0,
|
onlineVol: 0,
|
recrodTime: new Date(timeStamp).format('yyyy-MM-dd hh:mm:ss')
|
});
|
}
|
}
|
this.hisData = list;
|
return list;
|
});
|
}
|
},
|
computed: {
|
battFullName() {
|
let batt = this.batt;
|
if (batt.stationName && batt.battGroupName) {
|
return batt.stationName + "-" + batt.battGroupName;
|
}
|
return "电池组全称";
|
},
|
backInputs() {
|
let batt = this.batt;
|
let isLd9 = this.isLd9;
|
const obj = {
|
0: "未知",
|
1: "停止",
|
2: "充电",
|
3: "放电",
|
4: "均充",
|
5: "内阻测试",
|
},
|
list = {
|
fbo4830Stopstr: "--",
|
battState: "未知",
|
group_online_vol: "在线:0.000V;组端:0.000V",
|
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 = obj[this.inputs.battState];
|
list.battState = batt_state_text + this.diagram.desc;
|
|
list.group_online_vol =
|
this.fbo4830IsOnline == 1
|
? `在线:${this.inputs.onlineVol.toHold(
|
VOL
|
)}V;组端:${this.inputs.groupVol.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.fbo4830Stopstr = this.inputs.fbo4830Stopstr;
|
|
list.battTestCap = this.inputs.battTestCap.toHold(CAP) + "AH";
|
if (this.inputs.battState === 3) {
|
// 为0是不更新剩余容量
|
if (this.inputs.battRestCap != 0) {
|
list.batt_syrl_cap = this.inputs.battRestCap.toHold(CAP);
|
}
|
} else {
|
list.batt_syrl_cap = "---";
|
}
|
if (this.inputs.battState === 3) {
|
// 为0是不更新续航时长
|
if (this.inputs.battRestCap != 0) {
|
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;
|
}
|
});
|
},
|
showHistoryStateList() {
|
return this.historyStateList.filter((item) => {
|
if (item.show) {
|
return item;
|
}
|
});
|
},
|
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");
|
},
|
isJhgd() {
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, ["BTS9110", "equip61850", "BTS"]);
|
},
|
isSystemSet() {
|
let systemParams = this.control.data.setSystemParams.show;
|
let batt = this.batt;
|
return systemParams && regEquipType(batt.fbsdeviceId, ["equip61850"]);
|
},
|
isRestartCircle() {
|
let restartCircle = this.control.data.circleRestart.show;
|
let batt = this.batt;
|
return restartCircle && regEquipType(batt.fbsdeviceId, ["equip61850"]);
|
},
|
isLd9() {
|
// LD9BTS
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, "LD9");
|
},
|
isTestDev() {
|
let batt = this.batt;
|
let isFalseLoad = regEquipType(batt.fbsdeviceId, "BTS9110");
|
// return !isFalseLoad;
|
return true;
|
},
|
// 设备连接状态1为未连接 0正常
|
isLink() {
|
return this.diagram.type == -1 ? 1 : 0;
|
},
|
dataHeaders() {
|
return this.table.headers;
|
// let tabConfig = this.pageConfig;
|
// let batt = this.batt;
|
// return headers.filter((item) => {
|
// let isShow = item.key1 ? tabConfig[item.key1] : true;
|
// if (item.type) {
|
// isShow = regEquipType(batt.fbsdeviceId, item.type);
|
// }
|
// return isShow;
|
// });
|
},
|
isBTS9140() {
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, "BTS9140");
|
},
|
dischargeDisabled() {
|
let devWorkstate = this.devWorkstate;
|
return 2 != devWorkstate && 1 != devWorkstate && 0 != devWorkstate;
|
},
|
chargeDisabled() {
|
return 0 != this.devWorkstate;
|
},
|
stopDisChargeDisabled() {
|
let devWorkstate = this.devWorkstate;
|
return 1 != devWorkstate && 2 != devWorkstate;
|
},
|
stopChargeDisabled() {
|
let devWorkstate = this.devWorkstate;
|
return 3 != devWorkstate && 4 != devWorkstate;
|
},
|
},
|
mounted() {
|
let battGroupId = this.$route.params.battGroupId;
|
// console.log("mounted======", battGroupId);
|
if (battGroupId) {
|
this.getBattGroupInfo(battGroupId);
|
}
|
// 查询拓扑图状态的显示
|
this.searchStatus();
|
// 查询控制按钮的配置
|
this.searchControl();
|
|
this.$nextTick(() => {
|
this.$G.chartManage.resize(this.acTabs);
|
});
|
// 屏幕缩放时触发
|
window.addEventListener("resize", this.resize);
|
// 监控是否已经切换到当前页面
|
this.monitorPage(true);
|
this.getHisData();
|
// 监听点击事件
|
// 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);
|
this.monitorPage(false);
|
},
|
};
|
</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: 8px;
|
}
|
|
.page-content {
|
position: relative;
|
padding-top: 8px;
|
padding-bottom: 2px;
|
box-sizing: border-box;
|
height: 100%;
|
}
|
|
.box-tools {
|
position: static;
|
line-height: 32px;
|
margin-left: 6px;
|
}
|
|
.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;
|
}
|
|
.dianchigaojing {
|
padding: 5px;
|
height: 100%;
|
}
|
|
.dianchigaojing .borderBox {
|
border: 1px solid #00fefe;
|
padding: 5px;
|
}
|
|
.dianchigaojing .borderBox.box1 {
|
margin-bottom: 5px;
|
height: 110px;
|
}
|
|
.dianchigaojing .borderBox.box2 {
|
height: calc(100% - 140px);
|
}
|
|
.lampImg {
|
height: 28px;
|
}
|
|
.box-header {
|
font-size: 14px;
|
padding: 0;
|
}
|
|
.threeD-dialog>>>.el-dialog {
|
width: 960px;
|
}
|
|
.station-contain {
|
height: 600px;
|
}
|
|
.wx_guides {
|
height: 150px;
|
text-align: center;
|
background-color: #ffffff;
|
padding-top: 15%;
|
}
|
|
.wx_guides p {
|
display: inline-block;
|
margin-right: 10px;
|
}
|
|
.wx_guides p /deep/.el-input__inner {
|
color: #000;
|
}
|
|
.tbl-data-container {
|
display: flex;
|
flex-direction: column;
|
height: 100%;
|
}
|
|
.tbl-data-body {
|
flex: 1;
|
overflow: hidden;
|
}
|
|
.tbl-data-footer {
|
text-align: center;
|
}
|
|
.dialog-params /deep/ .el-dialog__body {
|
padding: 8px;
|
background-color: #ececec;
|
}
|
|
.hdw-menu-item a.disabled.disabled {
|
cursor: not-allowed;
|
}
|
</style>
|