2025-06-21 23:59:01 +08:00
< template >
<!-- 6 个方块 -- >
< el-row :gutter = "10" >
2025-08-11 17:34:39 +08:00
< el-col :xs = "12" :sm = "8" :lg = "4" style = "margin-bottom: 10px;" class = "single-square-box-container" v-for = "(item,index) in singleZdSqaure" :key="index+'singleSquareBox'" >
2025-06-30 17:57:09 +08:00
< single-square-box :data = "{...item,value:formatNumber(data[item.attr])}" > < / single-square-box >
2025-06-21 23:59:01 +08:00
< / el-col >
< / el-row >
< / template >
< script >
import SingleSquareBox from "@/components/Ems/SingleSquareBox/index.vue" ;
2025-06-30 17:57:09 +08:00
import { formatNumber } from '@/filters/ems'
2025-06-21 23:59:01 +08:00
export default {
components : { SingleSquareBox } ,
2025-06-28 14:52:49 +08:00
props : {
data : {
type : Object ,
required : false ,
default : ( ) => { return { } }
} ,
} ,
2025-06-30 17:57:09 +08:00
methods : { formatNumber } ,
2025-06-21 23:59:01 +08:00
data ( ) {
return {
// 单个电站 四个方块数据
singleZdSqaure : [ {
title : '实时有功功率( kW) ' ,
2025-06-28 14:52:49 +08:00
value : '' ,
bgColor : '#FFF2CB' ,
attr : 'totalActivePower'
2025-06-21 23:59:01 +08:00
} , {
title : '实时无功功率( kVar) ' ,
2025-06-28 14:52:49 +08:00
value : '' ,
bgColor : '#CBD6FF' ,
attr : 'totalReactivePower'
2025-06-21 23:59:01 +08:00
} , {
2025-06-30 14:18:32 +08:00
title : '电池堆SOC' ,
2025-06-28 14:52:49 +08:00
value : '' ,
bgColor : '#DCCBFF' ,
attr : 'soc'
2025-06-21 23:59:01 +08:00
} , {
title : '电池堆SOH' ,
2025-06-28 14:52:49 +08:00
value : '' ,
bgColor : '#FFD4CB' ,
attr : 'soh'
2025-06-21 23:59:01 +08:00
} , {
title : '今日充电量( kWh) ' ,
2025-06-28 14:52:49 +08:00
value : '' ,
bgColor : '#FFD6F8' ,
attr : 'dayChargedCap'
2025-06-21 23:59:01 +08:00
} , {
title : '今日放电量( kWh) ' ,
2025-06-28 14:52:49 +08:00
value : '' ,
bgColor : '#E1FFCA' ,
attr : 'dayDisChargedCap'
2025-06-21 23:59:01 +08:00
} ]
}
} ,
}
< / script >
< style scoped lang = "scss" >
< / style >