<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="showEsVideoDialog"
|
></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>
|
<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-warning"
|
@click="goToBattWarnSetting"
|
></i>
|
</el-tooltip>
|
</div>
|
<flex-layout :no-bg="true">
|
<div class="content-header" slot="header" :model="inputs">
|
<div class="table-layout" v-if="cdshStatus == 'cdsh'">
|
<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>
|
<div class="table-row">
|
<div class="table-cell text-right w80">单体电池数量:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.monCount"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
<div class="table-cell text-right w80">标称单体电压:</div>
|
<div class="table-cell">
|
<el-input
|
:value="backInputs.monVolStd"
|
size="small"
|
:disabled="true"
|
></el-input>
|
</div>
|
</div>
|
</div>
|
<div class="table-layout" v-else>
|
<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"
|
>
|
<button
|
class="hdw-btn transparentBtn"
|
@click="guidesDialog = true"
|
v-if="
|
(acTabs == 'vol' ||
|
acTabs == 'res' ||
|
acTabs == 'temp' ||
|
acTabs == 'conduct' ||
|
acTabs == 'leakVol') &&
|
cdshStatus == 'cdsh'
|
"
|
>
|
<span class="light-color">设置参考线</span>
|
</button>
|
<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="startTest" href="javascript:void(0);"
|
>启动核容测试</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="isSxty">
|
<a @click="confirmStartResTest" 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="isSystemSet">
|
<a
|
@click="systemDialog.show = true"
|
href="javascript:void(0);"
|
>系统参数设置</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="false">
|
<a href="javascript:void(0);" @click="jcParamsDialog = true"
|
>均充参数设置</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="isLithium">
|
<a @click="dcdcWorkDialog = true" href="javascript:void(0);"
|
>DCDC工作参数</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="isLithium">
|
<a @click="workPlanDialog = true" href="javascript:void(0);"
|
>削峰填谷计划</a
|
>
|
</li>
|
<li
|
class="hdw-menu-item"
|
v-if="isShowJunHeng && control.data.juheng.show"
|
>
|
<a
|
@click="balanceControlDialog = 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);" @click="stopOutLineCuring"
|
>停止离线养护</a
|
>
|
</li>
|
<!-- <li class="hdw-menu-item" v-if="isRestartCircle">
|
<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);" @click="restartSystem"
|
>重启设备</a
|
>
|
</li>
|
<li class="hdw-menu-item" v-if="isCanUpdateTime">
|
<a @click="updateDevTime" href="javascript:void(0);"
|
>同步设备时间</a
|
>
|
</li>
|
<li class="hdw-menu-item">
|
<a @click="regularTestRes" href="javascript:void(0);"
|
>周期内阻测试设置
|
</a>
|
</li>
|
<li class="hdw-menu-item">
|
<a @click="alarmParamsShow" 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 && tabConfigFromBattInf.eleLine"
|
>
|
<div style="position: absolute; top: 8px; left: 8px">
|
<science-box
|
style="position: relative"
|
no-header
|
v-show="stateListState && batt.fbsdeviceId"
|
>
|
<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>
|
</science-box>
|
<science-box
|
style="position: relative"
|
no-header
|
v-show="isBTS9140 && 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>
|
</science-box>
|
<science-box
|
style="position: relative; margin-top: 8px"
|
no-header
|
v-show="
|
stateListState &&
|
batt.fbsdeviceId &&
|
showHistoryStateList.length
|
"
|
>
|
<div class="hdw-state-list table-layout">
|
<div
|
v-for="state in showHistoryStateList"
|
: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>
|
</science-box>
|
<!-- 重庆定制 -->
|
<science-box
|
style="margin-top: 8px; position: relative;"
|
no-header
|
v-show="isCqdz && is61850"
|
>
|
<div class="hdw-state-list table-layout">
|
<div class="table-row">
|
<div class="table-cell text-right">交流A相电压:</div>
|
<div class="table-cell">{{ acin1Vola }}</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right">交流B相电压:</div>
|
<div class="table-cell">{{ acin1Volb }}</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right">交流C相电压:</div>
|
<div class="table-cell">{{ acin1Volc }}</div>
|
</div>
|
</div>
|
</science-box>
|
<!-- 上次核容测试信息 -->
|
<science-box
|
style="position: relative; margin-top: 8px"
|
title="上一次核容测试信息"
|
v-show="(stateListState || isBTS9140) && batt.fbsdeviceId"
|
>
|
<div class="hdw-state-list table-layout">
|
<div
|
v-for="state in lastCapacityTest.filter(
|
(item) => item.show
|
)"
|
:key="state.text"
|
class="table-row"
|
:class="state.type"
|
>
|
<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 v-if="isSxty && isInflow" class="table-row">
|
<div class="table-cell text-right">流程状态:</div>
|
<div class="table-cell">
|
{{ flowInfo.workflowLink.dealDesc }}
|
</div>
|
</div>
|
<!-- 申请已经通过的 显示开始放电按钮 -->
|
<div v-if="isSxty && canDischarge && isCanTest" class="table-row">
|
<div class="table-cell text-right">申请通过:</div>
|
<div class="table-cell">
|
<el-button
|
size="mini"
|
:disabled="isLink || inputs.battState != 1"
|
type="primary"
|
@click="showSend"
|
>开始放电</el-button
|
>
|
</div>
|
</div>
|
</div>
|
<!-- 本年已放电 提示酌情申请 -->
|
<div v-if="isSxty && needApply && isCanTest" class="row-info">
|
<div class="info">
|
<!-- 本年度已核容 若需放电需 -->
|
若需放电需
|
<el-button
|
size="mini"
|
type="primary"
|
@click="dischargeDialog.show = true"
|
>申请</el-button
|
>
|
</div>
|
</div>
|
</science-box>
|
</div>
|
<div
|
style="position: absolute; top: 8px; left: 8px; z-index: 1"
|
v-if="isLithium"
|
v-show="batt.fbsdeviceId"
|
>
|
<science-box style="position: relative" no-header>
|
<div class="hdw-state-list table-layout">
|
<div class="table-row">
|
<div class="table-cell text-right">设备状态:</div>
|
<div class="table-cell">{{ backInputs.battState }}</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right">电池电流:</div>
|
<div class="table-cell">{{ backInputs.groupCurr }}</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right">测试容量:</div>
|
<div class="table-cell">
|
{{ backInputs.battTestCap }}
|
</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right">剩余容量:</div>
|
<div class="table-cell">
|
{{ backInputs.batt_syrl_cap }}
|
</div>
|
</div>
|
</div>
|
</science-box>
|
</div>
|
<div
|
style="position: absolute; top: 8px; left: 8px; z-index: 1"
|
v-if="isBTS9612"
|
v-show="batt.fbsdeviceId"
|
>
|
<science-box style="position: relative" no-header>
|
<div class="hdw-state-list table-layout">
|
<div class="table-row">
|
<div class="table-cell text-right">工作状态:</div>
|
<div class="table-cell">{{ state9612.workState }}</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right">设备温度:</div>
|
<div class="table-cell">{{ state9612.devTemp }}℃</div>
|
</div>
|
<div class="table-row">
|
<div class="table-cell text-right">放电终止原因:</div>
|
<div class="table-cell">{{ state9612.stopReason }}</div>
|
</div>
|
</div>
|
</science-box>
|
</div>
|
<circuit-diagram
|
v-show="batt.fbsdeviceId"
|
:batt="batt"
|
:calc-load-curr="calcLoadCurr"
|
: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"
|
:dev-type="diagram.devType"
|
:charge-mon="chargeMon"
|
:discharge-mon="dischargeMon"
|
:buscouple-switch="buscoupleSwitch"
|
:bypass="diagram.bypass"
|
:temp="diagram.devTemperature"
|
:hum="diagram.devHumidity"
|
></circuit-diagram>
|
</el-tab-pane>
|
<el-tab-pane
|
key="vol"
|
label="电压"
|
name="vol"
|
v-if="tabsConfig.vol && pageConfig.vol && tabConfigFromBattInf.vol"
|
>
|
<bar-chart
|
ref="vol"
|
id="vol"
|
unit="V"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane
|
key="lithiumPack"
|
label="锂电池信息"
|
name="lithiumPack"
|
v-if="isLithiumPack"
|
>
|
<lithium-pack-tab
|
ref="lithiumPack"
|
:update="acTabs == 'lithiumPack'"
|
:change-flag="dataChangeFlag"
|
:mon-vols="monVols"
|
:mon-temps="monTemps"
|
:pack-vols="packVols"
|
:pack-currs="packCurrs"
|
></lithium-pack-tab>
|
</el-tab-pane>
|
<el-tab-pane
|
key="res"
|
label="内阻"
|
name="res"
|
v-if="tabsConfig.res && pageConfig.res && tabConfigFromBattInf.res"
|
>
|
<bar-chart
|
ref="res"
|
id="res"
|
unit="mΩ"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
<!-- max-color="red"
|
min-color="green" -->
|
</el-tab-pane>
|
<el-tab-pane
|
key="temp"
|
label="温度"
|
name="temp"
|
v-if="tabsConfig.temp && pageConfig.temp && tabConfigFromBattInf.temp"
|
>
|
<bar-chart
|
ref="temp"
|
id="temp"
|
unit="℃"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
<!-- max-color="red"
|
min-color="green" -->
|
</el-tab-pane>
|
<el-tab-pane
|
key="conduct"
|
label="电导"
|
name="conduct"
|
v-if="tabsConfig.conduct && pageConfig.conduct && tabConfigFromBattInf.conduct"
|
>
|
<bar-chart
|
ref="conduct"
|
id="conduct"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane
|
key="monConnRes"
|
label="链接条阻值"
|
name="monConnRes"
|
v-if="tabsConfig.monConnRes && pageConfig.monConnRes && tabConfigFromBattInf.monConnRes"
|
>
|
<bar-chart
|
ref="monConnRes"
|
id="monConnRes"
|
unit="mΩ"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane
|
key="curr"
|
label="均衡电流"
|
name="curr"
|
v-if="tabsConfig.curr && pageConfig.curr && tabConfigFromBattInf.curr"
|
>
|
<bar-chart
|
ref="curr"
|
id="curr"
|
unit="A"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
>
|
</bar-chart>
|
</el-tab-pane>
|
<el-tab-pane
|
key="leakVol"
|
label="漏液电压"
|
name="leakVol"
|
v-if="tabsConfig.leakVol && pageConfig.leakVol && tabConfigFromBattInf.leakVol"
|
>
|
<bar-chart
|
ref="leakVol"
|
id="leakVol"
|
unit="V"
|
:show-tools="true"
|
@right-click="chartRightCLick"
|
></bar-chart>
|
</el-tab-pane>
|
<el-tab-pane
|
key="tblData"
|
label="数据表格"
|
name="tblData"
|
class="el-table-wrapper"
|
v-if="pageConfig.tblData && !isLithiumPack && tabConfigFromBattInf.tblData"
|
>
|
<div class="tbl-data-container">
|
<div class="tbl-data-body">
|
<el-table
|
stripe
|
size="small"
|
:data="table.datas"
|
:row-class-name="setTableRowClass"
|
height="100%"
|
>
|
<el-table-column
|
v-for="header in dataHeaders"
|
:key="header.prop"
|
:prop="header.prop"
|
:label="header.label"
|
:width="header.width"
|
:sortable="header.sortable"
|
align="center"
|
></el-table-column>
|
</el-table>
|
</div>
|
<div class="tbl-data-footer">
|
<el-button
|
type="primary"
|
size="mini"
|
round
|
@click="exportFile"
|
>导出</el-button
|
>
|
</div>
|
</div>
|
</el-tab-pane>
|
<el-tab-pane
|
key="dianchigaojing"
|
label="电池告警"
|
name="dianchigaojing"
|
class="el-table-wrapper"
|
v-if="tabsConfig.dianchigaojing && pageConfig.dianchigaojing && tabConfigFromBattInf.dianchigaojing"
|
>
|
<batt-group-alarm9612
|
:table1="table3"
|
:table2="table4"
|
v-if="isBTS9612"
|
></batt-group-alarm9612>
|
<batt-group-alarm
|
:table1="table1"
|
:table2="table2"
|
v-else
|
></batt-group-alarm>
|
</el-tab-pane>
|
<el-tab-pane
|
key="niBianInfoTab"
|
label="逆变信息"
|
name="niBianInfoTab"
|
v-if="isNiBian && pageConfig.niBianInfoTab && tabConfigFromBattInf.niBianInfoTab"
|
>
|
<ni-bian-info-tab
|
ref="niBianInfoTab"
|
:name="acTabs"
|
:devId="batt.fbsdeviceId"
|
:mask-show="maskShow"
|
>
|
</ni-bian-info-tab>
|
</el-tab-pane>
|
<el-tab-pane
|
label="均衡供电"
|
name="jggdInfoTab"
|
v-if="isJhgd && pageConfig.jggdInfoTab && tabConfigFromBattInf.jggdInfoTab"
|
>
|
<!-- <jggd-info-tab :devId="batt.fbsdeviceId"></jggd-info-tab> -->
|
<balance-supply-module
|
:devId="batt.fbsdeviceId"
|
:name="acTabs"
|
></balance-supply-module>
|
</el-tab-pane>
|
<el-tab-pane
|
label="电价统计分析"
|
name="elePrice"
|
v-if="isLithium && pageConfig.elePrice && tabConfigFromBattInf.elePrice"
|
>
|
<ele-price-tpl
|
ref="elePriceTpl"
|
:devId="batt.fbsdeviceId"
|
:name="acTabs"
|
:batt="batt"
|
:update="acTabs == 'elePriceTpl'"
|
></ele-price-tpl>
|
</el-tab-pane>
|
<el-tab-pane
|
label="BMS信息"
|
name="bmsInfo"
|
v-if="isLithium || isLithiumPack && tabConfigFromBattInf.bmsInfo"
|
v-show="false"
|
>
|
<bms-info
|
ref="bmsInfo"
|
:batt="batt"
|
:real-update="acTabs == 'bmsInfo'"
|
></bms-info>
|
</el-tab-pane>
|
<el-tab-pane
|
label="交直流监控屏数据"
|
name="acdcSecuity"
|
v-if="acdcSecuityFlag && tabConfigFromBattInf.acdcSecuity"
|
>
|
<acdc-secuity-info :info="acdcInfo"></acdc-secuity-info>
|
</el-tab-pane>
|
<el-tab-pane label="资产信息" name="asset" v-if="tabConfigFromBattInf.asset">
|
<div class="center-box">
|
<batt-asset-info
|
:batt="batt"
|
title="当前电池资产信息"
|
></batt-asset-info>
|
<batt-asset-info
|
v-for="(item, key) in battRecords.slice(0, 2)"
|
:key="'key' + key"
|
:batt="item"
|
:title="item.recordTime + '-变更记录'"
|
></batt-asset-info>
|
</div>
|
</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"
|
:is-request="isRequest"
|
:batt="batt"
|
:calc-load-curr="calcLoadCurr"
|
@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>
|
<!-- <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>-->
|
<modal
|
name="videoModal"
|
:draggable="true"
|
height="auto"
|
:clickToClose="false"
|
>
|
<div class="modal-title-wrapper">
|
<div class="modal-title-content">视频监控</div>
|
<div class="modal-title-tools">
|
<i class="el-icon-close" @click="closeEsVideoDialog"></i>
|
</div>
|
</div>
|
<ez-video v-if="esVideoDialog" :sn="esVideoSn"></ez-video>
|
</modal>
|
<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>
|
<!-- 均衡参数设置 -->
|
<el-dialog
|
title="均衡控制参数设置"
|
width="auto"
|
:visible.sync="balanceControlDialog"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<balance-control-params
|
v-if="balanceControlDialog"
|
:batt="batt"
|
></balance-control-params>
|
</el-dialog>
|
|
<!-- 均充参数设置 -->
|
<el-dialog
|
title="均充参数设置"
|
width="auto"
|
:visible.sync="jcParamsDialog"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<jc-params v-if="jcParamsDialog" :batt="batt"> </jc-params>
|
</el-dialog>
|
|
<!-- DCDC工作参数设置 -->
|
<el-dialog
|
title="DCDC工作参数设置"
|
width="auto"
|
:visible.sync="dcdcWorkDialog"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<dc-work-params
|
v-if="dcdcWorkDialog"
|
:visible.sync="dcdcWorkDialog"
|
:batt="batt"
|
></dc-work-params>
|
</el-dialog>
|
|
<!-- 锂电池削峰填谷 -->
|
<el-dialog
|
title="削峰填谷计划"
|
width="auto"
|
:visible.sync="workPlanDialog"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<work-plan
|
v-if="workPlanDialog"
|
:visible.sync="workPlanDialog"
|
:batt="batt"
|
></work-plan>
|
</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>
|
<!-- 设置参考线 -->
|
<el-dialog
|
title="设置参考线"
|
width="600px"
|
:visible.sync="guidesDialog"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<div class="wx_guides">
|
<p>参考线:</p>
|
<p><el-input v-model="guidesVal"></el-input></p>
|
<el-button type="primary" @click="setGuidesAlert()">设置</el-button>
|
<el-button type="info" @click="guidesDialog = false">取消</el-button>
|
</div>
|
<!-- <div class="table-row wx_guides">
|
<div class="table-cell text-right">参考线:</div>
|
<div class="table-cell">
|
<el-input
|
:value="guidesVal"
|
size="small"
|
></el-input>
|
</div>
|
</div> -->
|
</el-dialog>
|
<stop-outline-curing
|
:dev-id="batt.fbsdeviceId"
|
:stop-time="stopTime"
|
></stop-outline-curing>
|
|
<!-- 设置参考线 -->
|
<el-dialog
|
title="同步设备时间"
|
:visible.sync="updateDevTimeInfo.visible"
|
width="auto"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<div class="update-dev-form-container">
|
<el-date-picker
|
v-model="updateDevTimeInfo.date"
|
type="datetime"
|
placeholder="选择日期时间"
|
>
|
</el-date-picker>
|
<div class="update-dev-form-footer">
|
<el-button @click="confirmUpdateDevTime" type="primary" size="mini"
|
>确定</el-button
|
>
|
<el-button
|
@click="updateDevTimeInfo.visible = false"
|
type="info"
|
size="mini"
|
>取消</el-button
|
>
|
</div>
|
</div>
|
</el-dialog>
|
|
<!-- 周期启动内阻测试 -->
|
<el-dialog
|
title="周期启动内阻测试设置"
|
:visible.sync="regularTestResInfo.visible"
|
width="auto"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<regular-test-res-params
|
v-if="regularTestResInfo.visible"
|
:batt="batt"
|
:visible.sync="regularTestResInfo.visible"
|
></regular-test-res-params>
|
</el-dialog>
|
<!-- 重启设备使用人脸识别 -->
|
<el-dialog
|
title="人脸校验"
|
width="480px"
|
:visible.sync="restartFaceShow"
|
:close-on-click-modal="false"
|
top="0"
|
:modal="false"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
:destroy-on-close="true"
|
>
|
<check-face
|
v-if="restartFaceShow"
|
@checkSuccess="restartFaceSuccess"
|
></check-face>
|
</el-dialog>
|
<!-- 设备告警参数设置 -->
|
<el-dialog
|
title="设备告警参数设置"
|
:visible.sync="alarmParamsInfo.visible"
|
width="auto"
|
top="0"
|
class="dialog-center"
|
:close-on-press-escape="false"
|
:modal-append-to-body="false"
|
>
|
<dev-alarm-params
|
v-if="alarmParamsInfo.visible"
|
:batt="batt"
|
:visible.sync="alarmParamsInfo.visible"
|
></dev-alarm-params>
|
</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 stopOutlineCuring from "./components/stopOutlineCuring";
|
// import HomeList from "./components/HomeList";
|
import HomeList from "./movingRingSystem/HomeList";
|
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 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/bmsInfo";
|
import LithiumPackTab from "./components/lithiumPackTab";
|
import qrCode from "@/assets/js/outside/qrCode";
|
import sysConfig from "@/assets/js/config";
|
import acdcSecuityInfo from "./components/acdcSecuityInfo.vue";
|
import {
|
btsControl,
|
clearWarn,
|
dev9612Control,
|
getGuidesData,
|
getStationPic,
|
ld9Control,
|
outlineControl as restart,
|
realTimeAdd,
|
realTimeAlarm,
|
realTimeNot,
|
searchInfo,
|
setGuidesData,
|
startResTest,
|
stopLd6,
|
updateDevTimeApi,
|
} from "./js/realTime";
|
import {
|
getBattGroupInfo,
|
getBattRecords,
|
getStationBattInfo,
|
} from "../dataMager/js/battGroupMager";
|
import {
|
formatSeconds,
|
getBarNum,
|
getConduct,
|
getDevType,
|
GetHourRate,
|
GetMonomerCap,
|
isHasPermit,
|
lithium as lithiumInfo,
|
regEquipType,
|
sethoubeiTime,
|
} from "@/assets/js/tools";
|
|
import {
|
const_61850,
|
const_9100,
|
const_ld_nine,
|
const_system,
|
} from "@/assets/js/const";
|
import getMarkLineData from "@/components/chart/js/getMarkLineDataPlus";
|
|
import getTblHeader from "./js/getTblHeader";
|
import ThreeStation from "@/components/threeStation";
|
|
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";
|
import const_digit from "@/assets/js/const/const_digit";
|
import FlexBox from "@/components/FlexBox.vue";
|
import BattAssetInfo from "@/views/dataMager/components/battAssetInfo.vue";
|
import { checkUserPwd } from "@/views/login/js/api";
|
import BattGroupAlarm from "@/views/dataTest/components/battGroupAlarm.vue";
|
import BattGroupAlarm9612 from "@/views/dataTest/components/battGroupAlarm9612.vue";
|
import { getBit } from "@/assets/js/const/const_storage";
|
import getItemByKey from "@/assets/js/tools/getItemByKey";
|
import const_9612 from "@/assets/js/const/const_9612";
|
import RegularTestResParams from "@/views/dataTest/components/RegularTestResParams.vue";
|
import CheckFace from "@/components/checkFace.vue";
|
import const_61852 from "@/assets/js/const/const_61852";
|
import DevAlarmParams from "@/views/dataTest/components/DevAlarmParams.vue";
|
import getXuHang from "@/assets/js/tools/getXuHang";
|
|
const WSMixin = createWs("RealTime");
|
|
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;
|
let tblData = [];
|
export default {
|
name: "movingRingSysteRrealTime",
|
mixins: [WSMixin],
|
components: {
|
DevAlarmParams,
|
CheckFace,
|
RegularTestResParams,
|
BattGroupAlarm9612,
|
BattGroupAlarm,
|
BattAssetInfo,
|
FlexBox,
|
JcParams,
|
HomeImageList,
|
stopOutlineCuring,
|
BmsInfo,
|
ElePriceTpl,
|
ezVideo,
|
ContentBox,
|
HomeList,
|
BarChart,
|
CircuitDiagram,
|
ScienceBox,
|
DischargeDialogContent,
|
SystemParams,
|
CuringParams,
|
OutlineCuringParams,
|
// RestartPlanParams,
|
HistoryRealtimeData,
|
RightMenu,
|
NiBian,
|
StopCuring,
|
NiBianInfoTab,
|
HdwLight,
|
historyRes,
|
BalanceSupplyModule,
|
BalanceControlParams,
|
dcWorkParams,
|
workPlan,
|
ThreeStation,
|
LithiumPackTab,
|
acdcSecuityInfo,
|
},
|
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 {
|
acin1Vola: 0,
|
acin1Volb: 0,
|
acin1Volc: 0,
|
calcLoadCurr: 0,
|
tabConfigFromBattInf: {},
|
restartFaceShow: false,
|
regularTestResInfo: {
|
visible: false,
|
},
|
updateDevTimeInfo: {
|
visible: false,
|
date: "2020-10-01 00:00:00",
|
},
|
alarmParamsInfo: {
|
visible: false,
|
},
|
// isRequest: 0,
|
testNumber: 0,
|
flowInfo: null,
|
battRecords: [],
|
lastTimeTestInfo: {
|
realCap: 0,
|
xuHang: 0,
|
},
|
workState: "",
|
cdshStatus: this.cdshFan(),
|
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,
|
stopTime: 0,
|
stationImages: [],
|
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 /* 电池状态 */,
|
devTemperature: 0, // 环境温度
|
devHumidity: 0, // 环境湿度
|
},
|
chargeMon: "",
|
dischargeMon: "",
|
acTabs: "eleLine",
|
table: {
|
headers: [
|
{
|
prop: "num1",
|
label: "单体编号",
|
width: "",
|
key1: "",
|
sortable: false,
|
},
|
{
|
prop: "vol1",
|
label: "电压(V)",
|
width: "",
|
sortable: true,
|
key1: "vol",
|
},
|
{
|
prop: "res1",
|
label: "内阻(mΩ)",
|
width: "",
|
sortable: true,
|
key1: "res",
|
},
|
{
|
prop: "temp1",
|
label: "温度(℃)",
|
sortable: true,
|
width: "",
|
key1: "temp",
|
},
|
{
|
prop: "conduct1",
|
label: "电导",
|
width: "",
|
key1: "conduct",
|
sortable: false,
|
},
|
{
|
prop: "monConnRes",
|
label: "链接条阻值",
|
width: "",
|
key1: "monConnRes",
|
sortable: false,
|
},
|
{
|
prop: "curr1",
|
label: "均衡电流(A)",
|
width: "",
|
key1: "curr",
|
sortable: false,
|
},
|
{
|
prop: "leakVol1",
|
label: "漏液电压(V)",
|
width: "",
|
key1: "leakVol",
|
sortable: false,
|
},
|
],
|
datas: [],
|
},
|
table1: {
|
datas: [
|
{
|
battGroupId: 0,
|
recordTime: 0,
|
groupVolAlarm: 0,
|
testEndVol: 0,
|
testEndCap: 0,
|
testTimeLong: 0,
|
},
|
],
|
},
|
table2: {
|
datas: [
|
{
|
battGroupId: 0,
|
recordTime: 0,
|
monNum: 0,
|
monVolAlarm: 0,
|
monTempAlarm: 0,
|
monResAlarm: 0,
|
monRestCapAlarm: 0,
|
},
|
],
|
},
|
table3: {
|
datas: [
|
{
|
battGroupId: 0,
|
recordTime: 0,
|
groupAlarm: "无",
|
},
|
],
|
},
|
table4: {
|
datas: [
|
{
|
battGroupId: 0,
|
monNum: 0,
|
commFail: -1, // 通信故障
|
volHigh: -1, // 过压
|
volLow: -1, // 欠压
|
tempHigh: -1, // 超温
|
resHigh: -1, // 内阻高
|
posLeak: -1, // 正极漏液
|
negLeak: -1, // 负极漏液
|
tempError: -1, // 温度故障
|
resError: -1, // 内阻故障
|
battBulging: -1, // 电池鼓胀
|
junHengError: -1, // 均衡维护故障
|
monTempLow: -1, // 单体温度超下限
|
battMainting: -1, // 电池处于维护中
|
},
|
],
|
},
|
batt: {},
|
stateListShow: false,
|
stateList: stateList,
|
historyStateList: historyStateList,
|
lastCapacityTest: lastCapacityTest,
|
diagram: {
|
update: true,
|
type: -1,
|
desc: "",
|
powerCut: 1,
|
temp: 0, // 设备温度
|
contactRes: 0, // 接触器阻抗
|
dropVol: 0, // 导通压降
|
devType: 0, // 设备类型
|
bypass: {
|
drynodeCommst: 0xaaaa, // 干接点通信状态(0xAAAA-正常 0xBBBB-异常)
|
k1CheckSt: 0xaaaa, // 接触器k1检测状态(0xAAAA-正常 0xBBBB-异常)
|
k1St: 0xaaaa, // 接触器k1状态(0-断开 1-闭合)
|
urgentswitchSt: 0xaaaa, // 急停状态(0xAAAA-未触发 0xBBBB-触发)
|
bypassswitchSt: 0xaaaa, // 旁路状态(0xAAAA-未接入 0xBBBB-接入旁路)
|
},
|
devHumidity: 0, // 湿度
|
devTemperature: 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,
|
// 单体电压信息
|
monVols: [],
|
// 单体温度信息
|
monTemps: [],
|
// 包电压
|
packVols: [],
|
packCurrs: [],
|
station: {
|
show: false,
|
data: {
|
stationId: 0,
|
info: null,
|
},
|
},
|
state9612: {
|
workState: "未知",
|
devTemp: 0,
|
stopReason: "无",
|
},
|
// 交直流监控屏标志
|
acdcSecuityFlag: false,
|
acdcInfo: {},
|
};
|
},
|
methods: {
|
showEsVideoDialog() {
|
this.esVideoDialog = true;
|
this.$nextTick(() => {
|
this.$modal.show("videoModal");
|
});
|
},
|
closeEsVideoDialog() {
|
this.$modal.hide("videoModal");
|
this.$nextTick(() => {
|
this.esVideoDialog = false;
|
});
|
},
|
// 成都石化判断
|
cdshFan: function () {
|
return this.$CFG.clientName.name;
|
},
|
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;
|
}
|
// else if (this.acTabs == "dianchigaojing") {
|
// this.loadDevAla();
|
// }
|
});
|
},
|
loadDevAla(rtalarm, rsalarm) {
|
if (rtalarm) {
|
let res = rtalarm;
|
let list = [];
|
if (res.code && res.data) {
|
list = res.data2.list.map((v) => {
|
return {
|
num: v.num,
|
recordTime: v.recordTime,
|
monVolAlarm: v.monvolAlm,
|
monTempAlarm: v.montmpAlm,
|
monRestCapAlarm: v.monrestcapAlm,
|
monResAlarm: v.monresAlm,
|
monNum: v.monNum,
|
battGroupId: v.BattGroupId,
|
};
|
});
|
}
|
this.table2.datas = list;
|
}
|
if (rsalarm) {
|
let res = rsalarm;
|
let list = [];
|
if (res.code && res.data) {
|
list = res.data2.list.map((v) => {
|
return {
|
recordTime: v.recordTime,
|
groupVolAlarm: v.groupvolAlm,
|
testTimeLong: v.testTimelong,
|
battGroupId: v.BattGroupId,
|
testEndVol: v.testEndVol.toHold(VOL),
|
testEndCap: v.testEndCap.toHold(CAP),
|
};
|
});
|
}
|
this.table1.datas = list;
|
}
|
},
|
toggleChange() {
|
this.resize();
|
},
|
resize() {
|
if (this.acTabs === "powerInfo") {
|
this.powerInfoChartResize();
|
} else if (this.acTabs === "niBianInfoTab") {
|
this.$refs.niBianInfoTab.resize();
|
} else if (this.isLithium && this.acTabs == "elePrice") {
|
// 锂电池显示电价分析图
|
this.$refs.elePriceTpl.resize();
|
} else if (this.acTabs == "bmsInfo") {
|
this.$refs.bmsInfo.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();
|
});
|
},
|
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: [],
|
markLine: {
|
data: getMarkLineData(),
|
},
|
},
|
],
|
};
|
|
// 内阻
|
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: "最大值=0A;最小值=0A;平均值=0A",
|
x: "center",
|
textStyle: {
|
fontSize: "14",
|
},
|
},
|
series: [
|
{
|
name: "均衡电流",
|
type: "bar",
|
data: [],
|
},
|
],
|
};
|
|
// 链接条阻值
|
monConnRes = {
|
title: {
|
show: true,
|
text: "最大值=0mΩ;最小值=0mΩ;平均值=0mΩ",
|
x: "center",
|
textStyle: {
|
fontSize: "14",
|
},
|
},
|
series: [
|
{
|
name: "链接条阻值",
|
type: "bar",
|
data: [],
|
},
|
],
|
};
|
// 设置配置项
|
this.setChart();
|
},
|
setChart() {
|
let acTabs = this.acTabs;
|
if (!this.$refs[acTabs]) {
|
return;
|
}
|
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;
|
case "monConnRes":
|
this.$refs.monConnRes.setOption(monConnRes);
|
break;
|
}
|
},
|
onWSOpen() {
|
this.$nextTick(() => {
|
this.sendMessage();
|
});
|
},
|
sendMessage() {
|
let batt = this.batt;
|
let pageType = sysConfig.clientName.name === "dbs" ? "dbs" : "standard";
|
// 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,
|
powerDeviceId: 0,
|
groupNum: batt.groupIndexInFBSDevice,
|
pageType, // standard-标准,dbs-多宝山
|
};
|
if (this.isCqdz && this.is61850) {
|
params.stationId = batt.stationId;
|
}
|
// 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.acdcSecuityFlag = res.data.data2.acdcSecuityFlag ==1;
|
this.realTimeGroupss(data.rtstate, res.data.data2);
|
this.realTimeLd9Data(data.ld9);
|
this.realTimePowerOffs(data.f9100state);
|
this.realTimeSearch(data.rtdata);
|
|
this.realTimeStateList(data.fod);
|
this.loadDevAla(data.rtalarm, data.rsalarm);
|
this.getLithiumAnalog(data.li9130); // 锂电池模拟量
|
this.inversionData(data.fbs9100sBuscoupleState);
|
this.setBts9150Dev(data.fbs9150Res);
|
// 最后一次核容数据
|
this.getLastCapacityTest(data.tinfdata);
|
// 处理是否需要申请放电 或者申请状态
|
if (this.isSxty) {
|
this.checkDischarge(data.testNumber, data.Fbs9100SetParamTemp);
|
}
|
if (this.isCqdz && this.is61850) {
|
let pwrdevAcdc = data.pwrdevAcdc?.data2;
|
let _obj = {};
|
if (pwrdevAcdc?.list.length) {
|
_obj = pwrdevAcdc.list[0];
|
}
|
this.acin1Vola = _obj.acin1Vola;
|
this.acin1Volb = _obj.acin1Volb;
|
this.acin1Volc = _obj.acin1Volc;
|
this.calcLoadCurr = _obj.loaderCurr;
|
}
|
this.dataChangeFlag = Math.random(); // 数据更新
|
if (this.acdcSecuityFlag) {
|
this.acdcInfo = data.acdcSecuity.data2;
|
}
|
},
|
checkDischarge(testNumber, params) {
|
if (
|
testNumber &&
|
testNumber.code &&
|
testNumber.data &&
|
testNumber.data2
|
) {
|
// 年度已放过电
|
this.testNumber = testNumber.data2;
|
} else {
|
this.testNumber = 0;
|
}
|
if (params && params.code && params.data) {
|
this.flowInfo = params.data2;
|
} else {
|
this.flowInfo = null;
|
}
|
},
|
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.setTabConfigFromBattInf(data);
|
this.diagram.desc = "";
|
// 查询机房电池组信息(3D用)
|
this.getStationBattInfo(data.stationId);
|
this.realTimeAlarmss();
|
this.getBattRecords(data.battGroupId);
|
// this.realTimeXuHang(); // 预估续航时长
|
this.diagram.devType = getDevType(data.chargeType, data.buscoupleState);
|
this.esVideoSn = data.videoUrl;
|
this.table.headers = getTblHeader(data.fbsdeviceId);
|
// 如果是61850, BTS9110 则查询最后一次放电数据
|
if (regEquipType(data.fbsdeviceId, ["equip61850", "BTS9110"])) {
|
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;
|
// 初始化查询参考线
|
if (this.cdshStatus == "cdsh") {
|
this.getGuides(res);
|
} else {
|
this.setLin(res);
|
}
|
});
|
},
|
// 设置高低线参考线
|
setLin: function (res) {
|
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
|
);
|
|
// 漏液电压
|
this.setChartMarkLine(
|
leakVol,
|
"leakVol",
|
"Batt_Alarm_Type_MonLYVol",
|
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":
|
// 单体电阻
|
// 单位内阻告警基准值从电池信息中取标称内阻值来计算 20240428
|
// let std_mon_res =
|
// (1 * (batt.monVolStd / 2)) / (batt.monCapStd / 100);
|
let std_mon_res = batt.monResStd;
|
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;
|
}
|
|
// 单体电压柱状图添加标称电压横线
|
if (name === "Voltage") {
|
chartData.series[0].markLine.data.push({
|
name: "浮充电压",
|
yAxis: (batt.monVolStd / 2) * 2.25,
|
lineStyle: {
|
width: 2,
|
color: "#073ff6",
|
},
|
label: {
|
color: "#ffffff",
|
fontSize: 16,
|
formatter: "{b}:{c}V",
|
position: "insideEndTop",
|
padding: [6, 4, 2, 4],
|
backgroundColor: "#073ff680",
|
borderWidth: 2,
|
borderColor: "#ffffff80",
|
},
|
emphasis: {
|
type: "dashed",
|
},
|
});
|
}
|
break;
|
}
|
}
|
},
|
// 获取电池组参考线
|
getGuides: function (resdata) {
|
let vm = this;
|
let batt = this.batt;
|
let obj = {
|
battGroupId: batt.battGroupId,
|
};
|
getGuidesData(obj).then((res) => {
|
let rs = res.data;
|
if (rs.code == 1) {
|
vm.guidesData = rs.data;
|
//console.log(vm.guidesData);
|
vm.setLin(resdata);
|
}
|
//console.log(vm.guidesData);
|
});
|
},
|
// 设置参考线弹窗
|
setGuidesAlert: function () {
|
let vm = this;
|
let params = (function () {
|
let obj = {};
|
for (const key in vm.guidesData) {
|
if (key == "id") {
|
if (vm.guidesData[key] != null) {
|
obj[key] = vm.guidesData[key];
|
}
|
} else {
|
obj[key] = vm.guidesData[key];
|
}
|
}
|
return obj;
|
})();
|
if (params.battGroupId == null) {
|
params.battGroupId = vm.batt.battGroupId;
|
}
|
if (vm.guidesVal != "") {
|
switch (vm.acTabs) {
|
case "vol": //电压
|
params.monVol = vm.guidesVal;
|
break;
|
case "res": //内阻
|
params.monRes = vm.guidesVal;
|
break;
|
case "temp": //温度
|
params.monTemp = vm.guidesVal;
|
break;
|
case "conduct": //电导
|
params.monConduct = vm.guidesVal;
|
break;
|
case "leakVol": //漏液电压
|
params.leakVol = vm.guidesVal;
|
break;
|
}
|
setGuidesData(params).then((rs) => {
|
let res = rs.data;
|
if (res.code == 1) {
|
if (res.data) {
|
vm.$message({
|
message: res.msg,
|
type: "success",
|
});
|
vm.guidesVal = "";
|
vm.guidesDialog = false;
|
vm.realTimeAlarmss();
|
} else {
|
vm.$message.error(res.msg);
|
}
|
} else {
|
vm.$message.error(res.msg);
|
}
|
});
|
} else {
|
vm.$message({
|
message: "请先填写参考线值!",
|
type: "warning",
|
});
|
}
|
},
|
/* 实时组端信息 */
|
realTimeGroupss(res, res2) {
|
let vm = this;
|
if (res) {
|
//res = res.data;
|
if (res.code && res.data) {
|
vm.inputs = res.data2;
|
this.diagram.devHumidity = res.data2.devHumidity;
|
this.diagram.devTemperature = res.data2.devTemperature;
|
// 开启模拟数据
|
if (sysConfig.analogData.value) {
|
vm.inputs.recDatetime = new Date().format("yyyy-MM-dd hh:mm:ss");
|
}
|
if (vm.cdshStatus == "cdsh") {
|
for (const key in res2) {
|
vm.inputs[key] = res2[key];
|
}
|
}
|
}
|
}
|
},
|
// realStateTimeData() {
|
// let batt = this.batt;
|
// if (regEquipType(batt.fbsdeviceId, ["LD9"])) {
|
// this.realTimeLd9Data();
|
// } else {
|
// this.realTimePowerOffs();
|
// }
|
// },
|
realTimeLd9Data(res) {
|
if (res) {
|
// res = res.data;
|
if (res.code && res.data) {
|
let data = res.data2;
|
// 判断是否超时
|
let outTime = 2 * 60; //设备超时时间(2分钟)
|
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.desc = "";
|
// 0-在线监测,1-核容测试,2-测试状态状态停止,3-内阻测试
|
switch (data.sysState) {
|
case 0:
|
this.diagram.type = 0;
|
break;
|
case 1:
|
let chargeMon = this.chargeMon;
|
let dischargeMon = this.dischargeMon;
|
// 存在放电和充电单体
|
if (dischargeMon != "" && chargeMon != "") {
|
this.diagram.type = 6;
|
} else if (chargeMon != "") {
|
// 存在充电单体
|
this.diagram.type = 2;
|
} else {
|
this.diagram.type = 1;
|
}
|
break;
|
case 2:
|
this.diagram.type = 0;
|
break;
|
case 3:
|
this.diagram.type = 3;
|
this.diagram.desc = "(内阻测试)";
|
break;
|
}
|
}
|
} else {
|
this.disconnect();
|
}
|
}
|
},
|
/* 查询电路图开关状态和信息 */
|
realTimePowerOffs(res) {
|
let batt = this.batt;
|
// 设备为61850,BTS9110显示右侧的面板
|
if (regEquipType(batt.fbsdeviceId, ["equip61850", "BTS9110"])) {
|
this.stateListShow = true;
|
} else {
|
this.stateListShow = false;
|
}
|
// 查询后台数据
|
if (res) {
|
// res = res.data;
|
let outTime = 2 * 60; //设备超时时间(2分钟)
|
if (res.code && res.data) {
|
let data = res.data2;
|
// 设置版本号
|
this.devVersion = data.devVersion;
|
// 基础信息
|
this.setEquipBase(data);
|
|
// 判断是否超时
|
let nowTime = new Date(data.note).getTime(); //当前时间
|
let record = new Date(data.recordDatetime).getTime();
|
// 开启模拟
|
if (sysConfig.analogData.value) {
|
nowTime = 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",
|
"lithium",
|
"LD9",
|
"lithiumPack",
|
"BTS9140",
|
"equip4016",
|
"BTS9150",
|
])
|
) {
|
this.setEquipBTS(data);
|
} else if (regEquipType(devId, ["BTS9605", "BTS9611", "BTS9612"])) {
|
this.setEquip9605(data);
|
} else {
|
this.disconnect();
|
}
|
}
|
} else {
|
// 设置版本号
|
this.devVersion = "";
|
// 设备处于未连接
|
this.disconnect();
|
}
|
}
|
},
|
setBts9150Dev(res) {
|
// 非9150设备直接返回不进行处理
|
if (!res) {
|
return;
|
}
|
let index = Number(this.batt.groupIndexInFBSDevice);
|
if (res.code === 1 && res.data) {
|
this.diagram.bypass = res.data2;
|
if (index === 1) {
|
this.diagram.bypass.k1St = res.data2.k2St;
|
this.diagram.bypass.k1CheckSt = res.data2.k2CheckSt;
|
}
|
} else {
|
this.diagram.bypass = {
|
drynodeCommst: 0xaaaa, // 干接点通信状态(0xAAAA-正常 0xBBBB-异常)
|
k1CheckSt: 0xaaaa, // 接触器k1检测状态(0xAAAA-正常 0xBBBB-异常)
|
k1St: 0, // 接触器k1状态(0-断开 1-闭合)
|
urgentswitchSt: 0xaaaa, // 急停状态(0xAAAA-未触发 0xBBBB-触发)
|
bypassswitchSt: 0xaaaa, // 旁路状态(0xAAAA-未接入 0xBBBB-接入旁路)
|
};
|
}
|
},
|
disconnect() {
|
// 设备未连接
|
this.diagram.type = -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("stopReasonIm", "未知");
|
// 操作失败原因
|
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;
|
// 电路图类型
|
let workstatus = parseInt(data.devWorkstate); //[0:'在线监测',1:'放电测试',2:'充电测试',3:'内阻测试',4:'未知'];
|
if (this.isBTS9140) {
|
this.workState = const_9100.workstates[data.devWorkstate];
|
}
|
this.diagram.desc = "";
|
let battstate = this.inputs.battState;
|
let alarmstatus = data.devAlarmstate;
|
|
// 是否为锂电池
|
let isLithium = regEquipType(batt.fbsdeviceId, "lithium");
|
|
// 设置停电放电状态
|
if (data.devOnlinevollow) {
|
if(this.inputs.groupCurr>0) {
|
this.inputs.battState = 1;
|
this.diagram.type = 1;
|
if (this.isBTS9140) {
|
this.workState = "直连充电";
|
}
|
}else {
|
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 += "(内阻测试)";
|
}
|
|
// 锂电池详细描述为空
|
if (isLithium) {
|
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;
|
this.maskShow = true;
|
break;
|
}
|
|
// 锂电池详细描述为空
|
if (isLithium) {
|
this.diagram.desc = "";
|
}
|
},
|
// 61850设备信息
|
setEquip61850(data) {
|
// 电路图类型
|
let workstatus = parseInt(data.devWorkstate); //[0:'在线监测',1:'充电测试',2:'放电测试',3:'内阻测试',4:'未知'];
|
this.diagram.desc = "";
|
// 关闭遮罩层
|
this.maskShow = false;
|
// 设置停电放电状态
|
// 如果电流是为正(充电)。那么平台的拓扑电流流向为直连充电的流向,并且显示的设备状态为直连充电
|
// 如果电流是为负(放电),那么那么平台的拓扑电流流向为停电放电的流向,并且显示的设备状态为停电放电。
|
if (data.devOnlinevollow) {
|
if(this.inputs.groupCurr>0) {
|
this.inputs.battState = 1;
|
this.diagram.type = 0;
|
this.diagram.desc = "(开关闭合)";
|
// 修改读到的状态为直连充电
|
data.devWorkstate = 0;
|
}else {
|
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: // 停电放电放电状态拓扑图
|
if(this.inputs.groupCurr>0) {
|
this.diagram.type = 0;
|
// 修改读到的状态为直连充电
|
data.devWorkstate = 0;
|
}else {
|
this.diagram.type = 5;
|
}
|
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 = "(未知)";
|
this.maskShow = true;
|
break;
|
}
|
|
// 设备工作状态
|
let workStates = const_61850.workstates;
|
this.setStateList("workState", workStates[data.devWorkstate]);
|
// 核容终止原因
|
let stopReasons = const_61850.stopreasons;
|
if (data.devWorkstate == 2) {
|
this.setStateList("stopReasonIm", "未知");
|
} else {
|
this.setStateList(
|
"stopReasonIm",
|
stopReasons[data.devLastCaptestStopType]
|
);
|
}
|
|
// 操作失败原因
|
let failReasons = const_61850.failreasons;
|
// 校验61852设备
|
let pattern = /^61852/;
|
if (pattern.test(data.devId)) {
|
failReasons = const_61852.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;
|
// 关闭遮罩层
|
this.maskShow = false;
|
// 电路图类型
|
let workstatus = parseInt(data.devWorkstate); //[0:'在线监测',1:'放电测试',2:'充电测试',3:'内阻测试',4:'未知'];
|
// 特殊设备类型
|
if (this.isBTS9612) {
|
if (workstatus === 2) {
|
workstatus = 1;
|
} else if (workstatus === 4) {
|
workstatus = 2;
|
} else {
|
workstatus = 0;
|
}
|
let workState9612 = getItemByKey(
|
data.devWorkstate,
|
const_9612.workStates
|
);
|
this.state9612.workState = workState9612 ? workState9612.label : "未知";
|
this.state9612.devTemp = data.devTemp;
|
this.state9612.stopReason = data.devLastCaptestStopTypeReason;
|
}
|
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;
|
this.maskShow = true;
|
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) {
|
//console.log(res);
|
if (res) {
|
let diagramType = this.diagram.type;
|
// res = res.data;
|
let data = [];
|
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.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),
|
monConnRes: item.monConnRes.toHold(RES),
|
monCap: item.monCap.toHold(CAP),
|
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,
|
};
|
});
|
}
|
|
let table4 = []; // 电池告警
|
if (res.code && res.data) {
|
res.data2.list.map((item) => {
|
table4.push(
|
this.getMonStates(item.battGroupId, item.monNum, item.monState)
|
);
|
});
|
}
|
// 电池告警信息
|
this.table4.datas = table4;
|
|
// 添加正在测试的单体
|
this.chargeMon = chargeMon;
|
this.dischargeMon = dischargeMon;
|
|
// 更新表格
|
if (this.acTabs == "tblData") {
|
this.table.datas = data;
|
} else {
|
tblData = data;
|
}
|
|
// 电压值
|
let volTempVol = [];
|
if (res.code && res.data) {
|
volTempVol = res.data2.list.map((item) => {
|
let value = diagramType == -1 ? 0 : item.monVol.toHold(VOL);
|
return ["#" + item.monNum, value];
|
});
|
}
|
|
// 设置电压值
|
this.monVols = volTempVol.map((item) => {
|
return item[1];
|
});
|
|
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) => {
|
let value = diagramType == -1 ? 0 : item.monRes.toHold(RES);
|
return ["#" + item.monNum, value];
|
});
|
}
|
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) => {
|
let value = diagramType == -1 ? 0 : item.monTmp.toHold(TEMP);
|
return ["#" + item.monNum, value];
|
});
|
}
|
|
this.monTemps = volTempte.map((item) => {
|
return item[1];
|
});
|
|
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) => {
|
let value =
|
diagramType == -1 ? 0 : getConduct(item.monRes, item.monVol);
|
return ["#" + item.monNum, value];
|
});
|
}
|
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) => {
|
let value = diagramType == -1 ? 0 : item.monJhCurr.toHold(CURR);
|
return ["#" + item.monNum, value];
|
});
|
}
|
let currBarNum = getBarNum(currTemp);
|
currChart.title.text =
|
"最大值=" +
|
currBarNum.max.toHold(CURR) +
|
"A 最小值=" +
|
currBarNum.min.toHold(CURR) +
|
"A 平均值=" +
|
currBarNum.avg.toHold(CURR) +
|
"A";
|
currChart.series[0].data = currTemp;
|
// 漏液电压
|
let leakVolTemp = [];
|
if (res.code && res.data) {
|
leakVolTemp = res.data2.list.map((item) => {
|
let value = diagramType == -1 ? 0 : item.monLyVol.toHold(VOL);
|
return ["#" + item.monNum, value];
|
});
|
}
|
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;
|
|
// 链接条阻值
|
let monConnResData = [];
|
if (res.code && res.data) {
|
monConnResData = res.data2.list.map((item) => {
|
let value = diagramType == -1 ? 0 : item.monConnRes.toHold(RES);
|
return ["#" + item.monNum, value];
|
});
|
}
|
let connResBarNum = getBarNum(monConnResData);
|
monConnRes.title.text =
|
"最大值=" +
|
connResBarNum.max.toHold(RES) +
|
"mΩ 最小值=" +
|
connResBarNum.min.toHold(RES) +
|
"mΩ 平均值=" +
|
connResBarNum.avg.toHold(RES) +
|
"mΩ";
|
monConnRes.series[0].data = monConnResData;
|
// 更新电压图表
|
this.setChart();
|
}
|
},
|
getMonStates(battGroupId, monNum, monState) {
|
return {
|
battGroupId,
|
monNum,
|
commFail: getBit(monState, 0), // 通信故障
|
volHigh: getBit(monState, 1), // 过压
|
volLow: getBit(monState, 2), // 欠压
|
tempHigh: getBit(monState, 3), // 超温
|
resHigh: getBit(monState, 4), // 内阻高
|
posLeak: getBit(monState, 5), // 正极漏液
|
negLeak: getBit(monState, 6), // 负极漏液
|
tempError: getBit(monState, 7), // 温度故障
|
resError: getBit(monState, 8), // 内阻故障
|
battBulging: getBit(monState, 9), // 电池鼓胀
|
junHengError: getBit(monState, 10), // 均衡维护故障
|
monTempLow: getBit(monState, 11), // 单体温度超下限
|
battMainting: getBit(monState, 12), // 电池处于维护中
|
};
|
},
|
// 向父级发送同步页面的指令
|
syncPage() {
|
let batt = this.batt;
|
let search =
|
"?province=" +
|
batt.stationName1 +
|
"&city=" +
|
batt.stationName2 +
|
"&county=" +
|
batt.stationName5 +
|
"&home=" +
|
batt.stationName3 +
|
"&batt=" +
|
batt.battGroupId +
|
"&pageFlag=" +
|
Math.random();
|
let url = "/dataTest/history";
|
if (regEquipType(batt.fbsdeviceId, "LD9")) {
|
url = "/dataTest/historyLD9";
|
}
|
this.$router.push(url + 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",
|
"lithium",
|
"BTS9140",
|
"lithiumPack",
|
"BTS9611",
|
"equip4016",
|
"BTS9150",
|
])
|
) {
|
// 停止设备
|
this.stopBtsTest();
|
} else if (regEquipType(this.batt.fbsdeviceId, "LD9")) {
|
this.stopLD9();
|
} else if (regEquipType(this.batt.fbsdeviceId, "equip4016")) {
|
this.stopLD6();
|
} else if (regEquipType(this.batt.fbsdeviceId, "BTS9612")) {
|
this.stop9612();
|
} else {
|
// 提示信息
|
this.$layer.msg("未知设备类型,暂无法停止测试!");
|
}
|
}
|
);
|
},
|
// 停止LD9测试
|
stopLD9() {
|
// 开启等待框
|
let loading = this.$layer.loading(1);
|
// 请求后台
|
ld9Control({
|
num: const_ld_nine.cmd.stop,
|
devId: this.batt.fbsdeviceId,
|
})
|
.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("停止测试失败,停止测试请求异常!");
|
});
|
},
|
// 停止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 && res.data2) {
|
// 提示信息
|
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("停止测试失败,停止测试请求异常!");
|
});
|
},
|
// 停止LD6设备
|
stopLD6() {
|
// 开启等待框
|
let loading = this.$layer.loading(1);
|
// 请求后台
|
stopLd6({
|
devId: this.batt.fbsdeviceId,
|
})
|
.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("停止测试失败,停止测试请求异常!");
|
});
|
},
|
// 停止9612设备
|
stop9612() {
|
// 开启等待框
|
let loading = this.$layer.loading(1);
|
// 请求后台
|
dev9612Control(this.batt.fbsdeviceId, const_9612.cmd.stop, 0)
|
.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("停止测试失败,停止测试请求异常!");
|
});
|
},
|
// 查询拓扑图状态的显示
|
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;
|
},
|
/**
|
* 读取锂电池信息 暂定读取组一的
|
*/
|
getLithiumAnalog(res) {
|
if (res) {
|
// res = res.data;
|
if (res.code && res.data) {
|
// 剩余容量进行累加
|
let restCap = 0;
|
let packVols = [];
|
let packCurrs = [];
|
res.data2.map((item) => {
|
restCap += item.restCap;
|
packVols.push(item.sumVol);
|
packCurrs.push(item.current);
|
});
|
this.packVols = packVols;
|
this.packCurrs = packCurrs;
|
let data = res.data2[0];
|
data.restCap = restCap;
|
this.lithiumParams.analog = data;
|
} else {
|
this.lithiumParams.analog = lithiumInfo.analog().params;
|
}
|
}
|
},
|
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) {
|
// 获取剩余天数,工作模式,组端电压,峰值电压
|
// let batt = this.batt;
|
// 仅有编号不做任何操作
|
if (this.fodHeaders.length == 1) {
|
return;
|
}
|
if (res) {
|
// res = res.data;
|
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;
|
}
|
}
|
},
|
// 初始化时lifeFlag传true 页面销毁时传false
|
monitorPage(lifeFlag) {
|
if (!lifeFlag) {
|
return;
|
}
|
let url = this.$route.meta.url || "";
|
if (url == "/dataTest/realTime" && this.acTabs === "eleLine") {
|
this.diagram.update = true;
|
} else {
|
this.diagram.update = false;
|
}
|
// 启动监控
|
requestAnimationFrame(() => {
|
this.monitorPage(true);
|
});
|
},
|
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() {
|
if (sysConfig.restartDevByFace.value) {
|
this.restartFaceShow = true;
|
} else {
|
let resetPwd = "restart123456";
|
this.$prompt("请输入重启密码", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
inputType: "password",
|
})
|
.then(({ value }) => {
|
if (value == resetPwd) {
|
this.restartSystemReq();
|
} else {
|
this.$layer.msg("密码不正确");
|
}
|
})
|
.catch(() => {});
|
}
|
},
|
restartFaceSuccess() {
|
this.restartFaceShow = false;
|
this.restartSystemReq();
|
},
|
restartSystemReq() {
|
let loading = this.$layer.loading();
|
let batt = this.batt;
|
restart({
|
devId: batt.fbsdeviceId,
|
opCmd: 16,
|
})
|
.then((res) => {
|
res = res.data;
|
if (res.code && res.data) {
|
this.$alert("发送重启命令成功", "系统提示");
|
} else {
|
this.$alert("发送重启命令失败!", "系统提示");
|
}
|
this.$layer.close(loading);
|
})
|
.catch((error) => {});
|
},
|
getLastCapacityTest(res) {
|
if (res) {
|
let batt = this.batt;
|
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 = getXuHang(real_cap, batt.loadCurr);
|
this.lastTimeTestInfo.realCap = real_cap.toHold(CAP) + "Ah";
|
this.lastTimeTestInfo.xuHang = xuHang ? sethoubeiTime(xuHang) : "---";
|
// 剩余容量
|
this.setStateList("re_cap", real_cap.toHold(CAP) + "AH");
|
// 续航时长
|
this.setStateList(
|
"endurance_time",
|
xuHang ? sethoubeiTime(xuHang) : "---"
|
);
|
}
|
}
|
},
|
stopOutLineCuring() {
|
this.stopTime = new Date().getTime();
|
console.log(this.stopTime);
|
},
|
updateDevTime() {
|
this.updateDevTimeInfo.date = new Date().format("yyyy-MM-dd hh:mm:ss");
|
this.updateDevTimeInfo.visible = true;
|
},
|
regularTestRes() {
|
this.regularTestResInfo.visible = true;
|
},
|
alarmParamsShow() {
|
this.alarmParamsInfo.visible = true;
|
},
|
confirmUpdateDevTime() {
|
this.$confirm("确定更新设备时间?", "提示", {
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
})
|
.then(async () => {
|
let loading = this.$layer.loading();
|
try {
|
const devId = this.batt.fbsdeviceId;
|
const date = new Date(this.updateDevTimeInfo.date).format(
|
"yyyy-MM-dd hh:mm:ss"
|
);
|
const res = await updateDevTimeApi(devId, date);
|
this.$layer.close(loading);
|
const rs = res.data;
|
if (rs.code === 1 && rs.data) {
|
this.updateDevTimeInfo.visible = false;
|
this.$message.success("更新成功!!!");
|
} else {
|
this.$message.error("更新失败,请检查网络。");
|
}
|
} catch (e) {
|
this.$layer.close(loading);
|
console.log(e);
|
this.$message.error("更新失败, 请检查网络。");
|
}
|
})
|
.catch(() => {
|
this.$message({
|
type: "info",
|
message: "更新失败",
|
});
|
});
|
},
|
inversionData(res) {
|
// 是逆变的设备
|
if (res && regEquipType(this.batt.fbsdeviceId, ["BTS9120", "BTS9110"])) {
|
// res = res.data;
|
let data = {
|
commustate: -1, // 通讯状态
|
fanglei_state: -1, // 防雷状态
|
rlayworkmode: -1, // 空开状态
|
};
|
if (res.code && res.data) {
|
data = res.data2;
|
}
|
if (data.rlayworkmode == 1 || data.rlayworkmode == 3) {
|
this.buscoupleSwitch = 0;
|
} else {
|
this.buscoupleSwitch = 1;
|
}
|
} else {
|
this.buscoupleSwitch = 0;
|
}
|
},
|
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 + ")"
|
);
|
},
|
goToBattWarnSetting() {
|
let batt = this.batt;
|
let fbsdeviceId = batt.fbsdeviceId;
|
const search =
|
"?fbsdeviceId=" + fbsdeviceId + "&pageFlag=" + Math.random();
|
// 电源参数设置界面
|
this.$router.push(
|
"/alarmMager/devicepaSetting" + search + "&fromType=fromIndex"
|
);
|
},
|
getBattRecords(battGroupId) {
|
// 查询
|
getBattRecords(battGroupId)
|
.then((res) => {
|
let { code, data, data2 } = res.data;
|
let list = [];
|
if (code && data) {
|
list = data2;
|
}
|
//console.log(list);
|
this.battRecords = list;
|
})
|
.catch((err) => {
|
console.log(err);
|
});
|
},
|
showSend() {
|
// this.isRequest = 1;
|
this.dischargeDialog.show = true;
|
},
|
startTest() {
|
if (this.isSxty && this.isInflow) {
|
this.$message.error("流程审批中, 暂时无法放电");
|
return false;
|
}
|
this.dischargeDialog.show = true;
|
},
|
confirmStartResTest() {
|
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.startResTest();
|
} else {
|
this.$layer.msg("启动口令错误!");
|
}
|
})
|
.catch((error) => {
|
console.log(error);
|
this.$layer.msg("网络请求异常");
|
});
|
}
|
);
|
},
|
async startResTest() {
|
let loading = this.$layer.loading(1);
|
let batt = this.batt;
|
try {
|
const res = await startResTest(
|
batt.fbsdeviceId,
|
batt.groupIndexInFBSDevice + 1
|
);
|
this.$layer.close(loading);
|
const rs = res.data;
|
if (rs.code && rs.data) {
|
// 提示信息
|
this.$layer.msg("启动测试成功");
|
} else {
|
// 提示信息
|
this.$layer.msg("启动测试失败!");
|
}
|
} catch (e) {
|
console.log(e);
|
this.$layer.close(loading);
|
// 提示信息
|
this.$layer.msg("启动测试失败, 请检查网络!");
|
}
|
},
|
refreshFN() {
|
// 如果是跳过来放电 则要验证条件 1 通讯正常 2 状态为停止
|
let disCharge = this.$route.query.disCharge;
|
if (disCharge) {
|
this.checkLink();
|
}
|
},
|
checkLink() {
|
setTimeout(() => {
|
if (this.dataChangeFlag) {
|
// console.log(this.isLink, this.inputs.battState == 1, '====', Date.now());
|
if (this.isLink) {
|
this.$message.error("当前设置未连接, 无法放电");
|
} else if (this.inputs.battState != 1) {
|
this.$message.error("当前状态不能直接放电");
|
} else {
|
this.dischargeDialog.show = true;
|
}
|
return false;
|
}
|
this.checkLink();
|
}, 500);
|
},
|
setTabConfigFromBattInf(batt) {
|
let labelCfg = batt.labelCfg;
|
let cfg = {
|
eleLine: true,
|
vol: true,
|
res: true,
|
temp: true,
|
conduct: true,
|
monConnRes: true,
|
curr: true,
|
leakVol: true,
|
tblData: true,
|
dianchigaojing: true,
|
niBianInfoTab: true,
|
jggdInfoTab: true,
|
elePrice: true,
|
bmsInfo: true,
|
acdcSecuity: true,
|
asset: true,
|
};
|
if(labelCfg) {
|
let tabValue = labelCfg.split(',');
|
Object.keys(cfg).forEach((key)=>{
|
cfg[key] = tabValue.indexOf(key) !== -1;
|
});
|
}
|
this.tabConfigFromBattInf = cfg;
|
},
|
},
|
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;
|
let lastTimeTestInfo = this.lastTimeTestInfo;
|
const obj = {
|
0: "未知",
|
1: "浮充",
|
2: "充电",
|
3: "放电",
|
4: "均充",
|
5: "内阻测试",
|
};
|
const list = {
|
battState: "未知",
|
group_online_vol: "在线:0.000V;组端:0.000V",
|
groupCurr: "0.0A",
|
recDatetime: "1982-01-01 00:00:00",
|
battTestTlong: formatSeconds(0),
|
battTestCap: "0Ah",
|
batt_syrl_cap: "---",
|
sysc: "------",
|
};
|
if (this.cdshStatus == "cdsh") {
|
list.monCount = "0";
|
list.monVolStd = "0V";
|
}
|
if (this.diagram.type == -1) {
|
list.batt_syrl_cap = lastTimeTestInfo.realCap;
|
list.sysc = lastTimeTestInfo.xuHang;
|
return list;
|
}
|
let batt_state_text =
|
this.diagram.powerCut && !isLd9
|
? "停电放电"
|
: 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.cdshStatus == "cdsh") {
|
list.monCount = this.inputs.monCount;
|
list.monVolStd = this.inputs.monVolStd + "V";
|
}
|
let testTimeLong = 10 * 60; // 10分钟
|
if (
|
this.inputs.battState === 3 &&
|
this.inputs.battTestTlong > testTimeLong
|
) {
|
// 为0是不更新剩余容量
|
if (this.inputs.battRestCap != 0) {
|
list.batt_syrl_cap = this.inputs.battRestCap.toHold(CAP);
|
}
|
} else {
|
list.batt_syrl_cap = lastTimeTestInfo.realCap;
|
}
|
if (
|
this.inputs.battState === 3 &&
|
this.inputs.battTestTlong > testTimeLong
|
) {
|
// 为0是不更新续航时长
|
if (this.inputs.battRestCap != 0) {
|
list.sysc = sethoubeiTime(
|
parseFloat(this.inputs.battRestCap) /
|
parseFloat(this.inputs.groupCurr)
|
);
|
}
|
} else {
|
list.sysc = lastTimeTestInfo.xuHang;
|
}
|
|
// 如果当前为锂电池
|
let isLithium = regEquipType(batt.fbsdeviceId, [
|
"lithium",
|
"lithiumPack",
|
]);
|
if (isLithium) {
|
list.batt_syrl_cap =
|
this.lithiumParams.analog.restCap.toHold(CAP) + "AH";
|
}
|
return list;
|
},
|
showStateList() {
|
return this.stateList.filter((item) => {
|
if (item.show) {
|
return item;
|
}
|
});
|
},
|
showHistoryStateList() {
|
return this.historyStateList.filter((item) => {
|
if (item.show) {
|
return item;
|
}
|
});
|
},
|
dischargeDialogTitle() {
|
let batt = this.batt;
|
if (1 == this.isRequest) {
|
return "申请核容放电";
|
}
|
if (
|
regEquipType(batt.fbsdeviceId, [
|
"equip61850",
|
"LD9",
|
"BTS9140",
|
"equip4016",
|
"BTS9612",
|
])
|
) {
|
return "放电参数设置";
|
} else if (
|
regEquipType(batt.fbsdeviceId, [
|
"BTS",
|
"BTS9110",
|
"BTS9120",
|
"BTS9605",
|
"lithium",
|
"lithiumPack",
|
])
|
) {
|
return "BTS设备放电参数设置";
|
} else if (regEquipType(batt.fbsdeviceId, ["BTS9611", "BTS9605"])) {
|
return "内阻测试";
|
} else {
|
return "未知设备(待开发)";
|
}
|
},
|
stateListState() {
|
return this.stateListShow && this.showStateList.length && !this.isLd9;
|
},
|
historyStateListState() {
|
return this.stateListShow && this.showHistoryStateList.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");
|
},
|
isJhgd() {
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, ["BTS9110", "equip61850", "BTS"]);
|
},
|
isBTS9612() {
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, ["BTS9612"]);
|
},
|
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"]);
|
},
|
isLithium() {
|
// 锂电BTS
|
let batt = this.batt;
|
if (!batt.fbsdeviceId) {
|
return false;
|
}
|
return regEquipType(batt.fbsdeviceId, ["lithium"]);
|
},
|
isLithiumPack() {
|
// 锂电包
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, ["lithiumPack"]);
|
},
|
isLd9() {
|
// LD9BTS
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, "LD9");
|
},
|
isShowJunHeng() {
|
let batt = this.batt;
|
let isLithium = regEquipType(batt.fbsdeviceId, ["lithium"]);
|
return !isLithium;
|
},
|
tabsConfig() {
|
let batt = this.batt;
|
let isLithium = regEquipType(batt.fbsdeviceId, ["lithium"]);
|
let isLithiumPack = regEquipType(batt.fbsdeviceId, ["lithiumPack"]);
|
if (isLithium) {
|
return {
|
vol: true,
|
res: false,
|
temp: true,
|
conduct: false,
|
curr: false,
|
leakVol: false,
|
dianchigaojing: false,
|
monConnRes: false,
|
};
|
} else if (isLithiumPack) {
|
return {
|
vol: false,
|
res: false,
|
temp: false,
|
conduct: false,
|
curr: false,
|
leakVol: false,
|
dianchigaojing: false,
|
monConnRes: false,
|
};
|
} else if (!batt.fbsdeviceId) {
|
return {
|
vol: false,
|
res: false,
|
temp: false,
|
conduct: false,
|
curr: false,
|
leakVol: false,
|
dianchigaojing: false,
|
monConnRes: false,
|
};
|
} else {
|
return {
|
vol: true,
|
res: true,
|
temp: true,
|
conduct: true,
|
curr: true,
|
leakVol: true,
|
dianchigaojing: true,
|
monConnRes: true,
|
};
|
}
|
},
|
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() {
|
let headers = 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");
|
},
|
// 山西太原供电局
|
isSxty() {
|
return this.$CFG.clientName.name === "sxty";
|
},
|
isCqdz() {
|
return this.$CFG.clientName.name === "cqdz";
|
},
|
is61850() {
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, "equip61850");
|
},
|
isCanUpdateTime() {
|
let batt = this.batt;
|
return regEquipType(batt.fbsdeviceId, "equip61850") && !this.isSxty;
|
},
|
// 是否需要申请
|
needApply() {
|
// 没有放电记录 修改为所有放电都需要申请
|
// if (!this.testNumber) {
|
// return false;
|
// // 有放电记录
|
// } else {
|
// 没有提交申请
|
if (!this.flowInfo) {
|
return true;
|
} else {
|
let res = false;
|
switch (this.flowInfo.workflowMain.status) {
|
case 1:
|
// 审批中
|
res = false;
|
break;
|
case 2:
|
// 通过
|
res = !!this.flowInfo.isCharge;
|
break;
|
case 3:
|
// 驳回
|
res = true;
|
break;
|
case 4:
|
// 撤销
|
res = true;
|
break;
|
default:
|
res = true;
|
break;
|
}
|
return res;
|
}
|
// }
|
},
|
// 是否审批中
|
isInflow() {
|
return this.flowInfo && this.flowInfo.workflowMain.status == 1;
|
},
|
// 是否审批通过可以放电
|
canDischarge() {
|
return (
|
this.flowInfo &&
|
this.flowInfo.workflowMain.status == 2 &&
|
!this.flowInfo.isCharge
|
);
|
},
|
isRequest() {
|
if (this.isSxty) {
|
if (this.needApply) {
|
return 1;
|
}
|
if (this.canDischarge) {
|
return 2;
|
}
|
return 0;
|
} else {
|
return 0;
|
}
|
},
|
},
|
mounted() {
|
let battGroupId = this.$route.params.battGroupId;
|
// console.log("mounted======", battGroupId);
|
if (battGroupId) {
|
this.getBattGroupInfo(battGroupId);
|
}
|
// 查询拓扑图状态的显示
|
this.searchStatus();
|
// 查询控制按钮的配置
|
this.searchControl();
|
// 初始化图表
|
this.initChart();
|
|
this.$nextTick(() => {
|
this.$G.chartManage.resize(this.acTabs);
|
});
|
// 屏幕缩放时触发
|
window.addEventListener("resize", this.resize);
|
// 监控是否已经切换到当前页面
|
this.monitorPage(true);
|
// 监听点击事件
|
// 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;
|
}
|
.center-box {
|
display: flex;
|
height: 100%;
|
align-items: center;
|
justify-content: center;
|
}
|
.row-info {
|
font-size: 14px;
|
color: #00fefe;
|
}
|
</style>
|
|
<style scoped lang="less">
|
.update-dev-form-container {
|
background-color: #ffffff;
|
padding: 8px;
|
text-align: center;
|
.update-dev-form-footer {
|
padding-top: 8px;
|
text-align: right;
|
}
|
}
|
|
.modal-title-wrapper {
|
background-color: #00fefe;
|
color: #003d64;
|
font-weight: bold;
|
display: flex;
|
padding: 8px 0;
|
.modal-title-content {
|
flex: 1;
|
padding: 0 8px;
|
cursor: move;
|
}
|
.modal-title-tools {
|
padding: 0 8px;
|
cursor: pointer;
|
}
|
}
|
</style>
|