pcs、bms接口联调

This commit is contained in:
白菜
2025-06-28 14:52:49 +08:00
parent 13310948c3
commit d0d4c25377
15 changed files with 455 additions and 306 deletions

View File

@ -3,7 +3,7 @@
<!-- 6个方块-->
<el-row :gutter="10">
<el-col :xs="12" :sm="8" :lg="4" class="single-square-box-container" v-for="(item,index) in singleZdSqaure" :key="index+'singleSquareBox'">
<single-square-box :data="item"></single-square-box>
<single-square-box :data="{...item,value:Object.values(data).length ? data[item.attr] || '-' : '-'}" ></single-square-box>
</el-col>
</el-row>
</template>
@ -14,33 +14,46 @@ import SingleSquareBox from "@/components/Ems/SingleSquareBox/index.vue";
export default {
components:{SingleSquareBox},
props:{
data:{
type:Object,
required:false,
default:()=>{return {}}
},
},
data() {
return {
// 单个电站 四个方块数据
singleZdSqaure:[{
title:'实时有功功率kW',
value:'22.74',
bgColor:'#FFF2CB'
value:'',
bgColor:'#FFF2CB',
attr:'totalActivePower'
},{
title:'实时无功功率kVar',
value:'22.74',
bgColor:'#CBD6FF'
value:'',
bgColor:'#CBD6FF',
attr:'totalReactivePower'
},{
title:'电池催SOC',
value:'22.74',
bgColor:'#DCCBFF'
value:'',
bgColor:'#DCCBFF',
attr:'soc'
},{
title:'电池堆SOH',
value:'22.74',
bgColor:'#FFD4CB'
value:'',
bgColor:'#FFD4CB',
attr:'soh'
},{
title:'今日充电量kWh',
value:'22.74',
bgColor:'#FFD6F8'
value:'',
bgColor:'#FFD6F8',
attr:'dayChargedCap'
},{
title:'今日放电量kWh',
value:'22.74',
bgColor:'#E1FFCA'
value:'',
bgColor:'#E1FFCA',
attr:'dayDisChargedCap'
}]
}
},