Files
emsfront/src/views/ems/dzjk/sbjk/bmszl/index.vue

203 lines
8.2 KiB
Vue
Raw Normal View History

<template>
2025-06-28 14:52:49 +08:00
<div v-loading="loading">
<div v-for="(baseInfo,index) in baseInfoList" :key="index+'bmszlContainer'" style="margin-bottom:25px;">
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding common-card-container-no-title-bg">
<div slot="header">
<span class="large-title">{{index+1}}#{{baseInfo.deviceName}}</span>
</div>
<div class="descriptions-main">
<el-descriptions direction="vertical" :column="3" :colon="false">
2025-06-30 17:32:04 +08:00
<el-descriptions-item labelClassName="descriptions-label" :contentClassName="`descriptions-direction ${baseInfo.workStatus === '0' ? 'save' :'danger'}`" :span="1" label="工作状态" >{{$store.state.ems.workStatusOptions[baseInfo.workStatus]}}</el-descriptions-item>
<el-descriptions-item labelClassName="descriptions-label" contentClassName="descriptions-direction" :span="1" label="与PCS通信">{{$store.state.ems.communicationStatusOptions[baseInfo.pcsCommunicationStatus]}}</el-descriptions-item>
<el-descriptions-item labelClassName="descriptions-label" contentClassName="descriptions-direction" :span="1" label="与EMS通信">{{$store.state.ems.communicationStatusOptions[baseInfo.emsCommunicationStatus]}}</el-descriptions-item>
2025-06-28 14:52:49 +08:00
</el-descriptions>
</div>
<div class="descriptions-main descriptions-main-bg-color">
<el-descriptions direction="vertical" :column="3" :colon="false">
2025-09-13 20:36:46 +08:00
<el-descriptions-item labelClassName="descriptions-label" contentClassName="descriptions-direction" v-for="(item,index) in infoData" :key="index+'pcsInfoData'" :span="1" :label="item.label">
<span class="pointer" @click="showChart(item.pointName || '','电池堆',baseInfo.deviceId)">
{{baseInfo[item.attr] | formatNumber}}<span v-if="item.unit" v-html="item.unit"></span>
</span>
</el-descriptions-item>
2025-06-28 14:52:49 +08:00
</el-descriptions>
<!-- 进度-->
<div class="process-container">
<div class="process-line-bg">
<div class="process-line" :style="{height:baseInfo.stackSoc+'%'}"></div>
2025-06-28 14:52:49 +08:00
</div>
2025-09-13 20:36:46 +08:00
<div class="process pointer" @click="showChart('当前SOC','电池堆',baseInfo.deviceId)">当前SOC : {{baseInfo.stackSoc}}%</div>
</div>
</div>
2025-06-28 14:52:49 +08:00
<el-table
class="common-table"
:data="baseInfo.batteryDataList"
stripe
max-height="500"
style="width: 100%;margin-top:25px;">
<el-table-column
prop="clusterId"
label="簇号">
</el-table-column>
<el-table-column
label="簇电压"
>
<template slot-scope="scope">
2025-09-13 20:36:46 +08:00
<span class="pointer" @click="showChart('簇电压','电池簇',scope.row.clusterId)">{{scope.row.clusterVoltage}} V</span>
2025-06-28 14:52:49 +08:00
</template>
</el-table-column>
<el-table-column
label="簇电流">
<template slot-scope="scope">
2025-09-13 20:36:46 +08:00
<span class="pointer" @click="showChart('簇电流','电池簇',scope.row.clusterId)">{{scope.row.clusterCurrent}} A</span>
2025-06-28 14:52:49 +08:00
</template>
</el-table-column>
<el-table-column
label="簇SOC">
<template slot-scope="scope">
2025-09-13 20:36:46 +08:00
<span class="pointer" @click="showChart('当前SOC','电池簇',scope.row.clusterId)">{{scope.row.currentSoc}} %</span>
2025-06-28 14:52:49 +08:00
</template>
</el-table-column>
<el-table-column
prop="maxVoltage"
label="单体最高电压">
<template slot-scope="scope">
2025-09-13 20:36:46 +08:00
<span class="pointer" @click="showChart('最高单体电压','电池簇',scope.row.clusterId)">{{scope.row.maxCellVoltage}} V</span>
2025-06-28 14:52:49 +08:00
</template>
</el-table-column>
2025-08-11 17:34:39 +08:00
<el-table-column
2025-08-11 21:50:38 +08:00
prop="maxCellVoltageId"
2025-08-11 17:34:39 +08:00
label="电池号码">
</el-table-column>
2025-06-28 14:52:49 +08:00
<el-table-column
prop="minVoltage"
label="单体最低电压">
<template slot-scope="scope">
2025-09-13 20:36:46 +08:00
<span class="pointer" @click="showChart('最低单体电压','电池簇',scope.row.clusterId)">{{scope.row.minCellVoltage}} V</span>
2025-06-28 14:52:49 +08:00
</template>
</el-table-column>
2025-08-11 17:34:39 +08:00
<el-table-column
2025-08-11 21:50:38 +08:00
prop="minCellVoltageId"
2025-08-11 17:34:39 +08:00
label="电池号码">
</el-table-column>
2025-06-28 14:52:49 +08:00
<el-table-column
label="单体最高温度">
<template slot-scope="scope">
2025-09-13 20:36:46 +08:00
<span class="pointer" @click="showChart('最高单体温度','电池簇',scope.row.clusterId)">{{scope.row.maxCellTemp}} &#8451;</span>
2025-06-28 14:52:49 +08:00
</template>
</el-table-column>
2025-08-11 17:34:39 +08:00
<el-table-column
2025-08-11 21:50:38 +08:00
prop="maxCellTempId"
2025-08-11 17:34:39 +08:00
label="电池号码">
</el-table-column>
2025-06-28 14:52:49 +08:00
<el-table-column
prop="minTemperature"
label="单体最低温度">
<template slot-scope="scope">
2025-09-13 20:36:46 +08:00
<span class="pointer" @click="showChart('最低单体温度','电池簇',scope.row.clusterId)">{{scope.row.minCellTemp}} &#8451;</span>
2025-06-28 14:52:49 +08:00
</template>
</el-table-column>
2025-08-11 17:34:39 +08:00
<el-table-column
2025-08-11 21:50:38 +08:00
prop="minCellTempId"
2025-08-11 17:34:39 +08:00
label="电池号码">
</el-table-column>
2025-06-24 23:50:29 +08:00
2025-06-28 14:52:49 +08:00
</el-table>
</el-card>
</div>
<el-empty v-show="baseInfoList.length<=0" :image-size="200"></el-empty>
2025-09-13 20:36:46 +08:00
<point-chart ref="pointChart" :site-id="siteId"/>
</div>
</template>
<script>
2025-06-28 14:52:49 +08:00
import {getBMSOverView} from '@/api/ems/dzjk'
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
2025-09-10 09:54:29 +08:00
import intervalUpdate from "@/mixins/ems/intervalUpdate";
2025-09-13 20:36:46 +08:00
import pointChart from "./../PointChart.vue";
export default {
2025-06-24 23:50:29 +08:00
name:'DzjkSbjkBmszl',
2025-09-13 20:36:46 +08:00
components: {pointChart,},
2025-09-10 09:54:29 +08:00
mixins:[getQuerySiteId,intervalUpdate],
data() {
return {
2025-06-28 14:52:49 +08:00
loading:false,
baseInfoList:[],
infoData:[
2025-09-13 20:36:46 +08:00
{label:'电池堆总电压',attr:'stackVoltage',unit:'V',pointName:'电池堆电压'},
{label:'可充电量',attr:'availableChargeCapacity',unit:'kWh',pointName:'可充电量'},
{label:'累计充电量',attr:'totalChargeCapacity',unit:'kWh',pointName:'累计充电量'},
{label:'电池堆总电流',attr:'stackCurrent',unit:'A',pointName:'电池堆总电流'},
{label:'可放电量',attr:'availableDischargeCapacity',unit:'kWh',pointName:'可放电量'},
{label:'累计放电量',attr:'totalDischargeCapacity',unit:'kWh',pointName:'累计放电量'},
{label:'SOH',attr:'stackSoh',unit:'%',pointName:'SOH'},
{label:'平均温度',attr:'operatingTemp',unit:'&#8451;',pointName:'平均温度'},
{label:'绝缘电阻',attr:'stackInsulationResistance',unit:'&Omega;',pointName:'绝缘电阻'},
]
}
},
2025-06-28 14:52:49 +08:00
methods:{
2025-09-13 20:36:46 +08:00
//todo 后续需要新增设备id
showChart(pointName,categoryName,deviceId){
console.log('点击查询图表',pointName,categoryName,deviceId)
pointName && this.$refs.pointChart.showChart({pointName,categoryName,deviceId})
},
2025-09-10 09:54:29 +08:00
updateData(){
this.loading = true
2025-06-28 14:52:49 +08:00
getBMSOverView(this.siteId).then(response => {
this.baseInfoList = JSON.parse(JSON.stringify(response?.data || []));
}).finally(() => {this.loading = false})
2025-09-10 09:54:29 +08:00
},
init(){
this.updateData()
this.updateInterval(this.updateData)
2025-06-28 14:52:49 +08:00
}
2025-06-28 14:52:49 +08:00
}
}
</script>
<style scoped lang="scss">
::v-deep {
//描述列表样式
.descriptions-main {
padding: 24px 300px 24px 24px;
.descriptions-main-bg-color {
padding: 14px 300px 14px 24px;
}
}
}
// 进度条样式
.process-container{
width:100px;
position: absolute;
right:70px;
top:50%;
transform: translateY(-50%);
.process-line-bg{
position: relative;
width:100%;
height: 110px;
background-color:#fff2cb ;
border-radius: 6px;
box-shadow: 0 0 10px #fff2cb, 0 0 0 rgba(255, 242, 203, 0.5);
.process-line{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
2025-06-28 14:52:49 +08:00
height: 0;
background-color: #fc6c6c;
border-radius: 0 0 6px 6px;
box-shadow: 0 0 10px rgb(252 108 108), 0 0 0 rgba(252, 108, 108, 0.5);
}
}
.process{
margin-top:15px;
color:#666666;
}
}
</style>