2025-07-29 23:05:58 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="page-container">
|
|
|
|
|
|
<!-- 顶部6个数据 -->
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<uni-grid class="info-grid" :square="false" :column="2" :showBorder="false">
|
2025-07-29 23:05:58 +08:00
|
|
|
|
<uni-grid-item v-for="(item,index) in runningHeadData" :key="index+'head'">
|
|
|
|
|
|
<view class="grid-item-box">
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<img :src="require('@/static/images/ems/pcs/'+item.img+'.jpg')" class="icon" alt="">
|
2025-07-29 23:05:58 +08:00
|
|
|
|
<view class="title">{{item.title}}</view>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<view class="text">{{runningHeadInfo[item.attr] | formatNumber}}</view>
|
2025-07-29 23:05:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</uni-grid-item>
|
|
|
|
|
|
</uni-grid>
|
|
|
|
|
|
|
|
|
|
|
|
<uni-collapse ref="collapse" accordion v-if="list.length > 0">
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<uni-collapse-item v-for="(item,index) in list" :key="index+'pcs'" :open="index===0"
|
|
|
|
|
|
class="common-collapse-item" :class="{
|
|
|
|
|
|
'timing-collapse-item':!['0','2'].includes(item.workStatus),
|
|
|
|
|
|
'warning-collapse-item':item.workStatus === '2',
|
|
|
|
|
|
'running-collapse-item':item.workStatus === '0'
|
|
|
|
|
|
}">
|
|
|
|
|
|
|
2025-07-29 23:05:58 +08:00
|
|
|
|
<template v-slot:title>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<view class='title-wrapper'>
|
|
|
|
|
|
<view class="top">
|
|
|
|
|
|
<view class="status">{{workStatusOptions[item.workStatus] || '暂无数据'}}</view>
|
|
|
|
|
|
<text class="name">{{item.deviceName}}</text>
|
2025-07-29 23:05:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<view class='content'>
|
|
|
|
|
|
<!-- 设备状态栏 -->
|
|
|
|
|
|
<uni-group mode="card" class="status-card-group no-wrapper-padding">
|
2025-07-29 23:05:58 +08:00
|
|
|
|
<uni-grid :column="4" :showBorder="false">
|
|
|
|
|
|
<uni-grid-item>
|
|
|
|
|
|
<view class="grid-item-box">
|
|
|
|
|
|
<view class="title">工作状态</view>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<text
|
|
|
|
|
|
class="text work-status-color">{{workStatusOptions[item.workStatus] || '-'}}</text>
|
2025-07-29 23:05:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</uni-grid-item>
|
|
|
|
|
|
<uni-grid-item>
|
|
|
|
|
|
<view class="grid-item-box">
|
|
|
|
|
|
<view class="title">并网状态</view>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<text class="text">{{gridStatusOptions[item.gridStatus] || '-'}}</text>
|
2025-07-29 23:05:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</uni-grid-item>
|
|
|
|
|
|
<uni-grid-item>
|
|
|
|
|
|
<view class="grid-item-box">
|
|
|
|
|
|
<view class="title">设备状态</view>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<text class="text">{{deviceStatusOptions[item.deviceStatus] || '-'}}</text>
|
2025-07-29 23:05:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</uni-grid-item>
|
|
|
|
|
|
<uni-grid-item>
|
|
|
|
|
|
<view class="grid-item-box">
|
|
|
|
|
|
<view class="title">控制模式</view>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<text class="text">{{controlModeOptions[item.controlMode] || '-'}}</text>
|
2025-07-29 23:05:58 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</uni-grid-item>
|
|
|
|
|
|
</uni-grid>
|
|
|
|
|
|
</uni-group>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<!-- 设备数据 -->
|
|
|
|
|
|
<uni-group mode="card" class="data-card-group"
|
2025-07-29 23:05:58 +08:00
|
|
|
|
:style="{marginBottom:!item.pcsBranchInfoList || item.pcsBranchInfoList.length === 0 ?'25px' : ''}">
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<uni-row v-for="(infoDataItem,infoDataIndex) in infoData" :key="infoDataIndex+'infoData'"
|
|
|
|
|
|
class="data-row">
|
|
|
|
|
|
<uni-col :span="8">
|
|
|
|
|
|
<view class="title">{{infoDataItem.label}}</view>
|
|
|
|
|
|
</uni-col>
|
|
|
|
|
|
<uni-col :span="16">
|
|
|
|
|
|
<view class="value">{{item[infoDataItem.attr] | formatNumber}}
|
|
|
|
|
|
<text v-if="infoDataItem.unit" v-html="infoDataItem.unit"></text>
|
2025-07-29 23:05:58 +08:00
|
|
|
|
</view>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
</uni-col>
|
|
|
|
|
|
</uni-row>
|
2025-07-29 23:05:58 +08:00
|
|
|
|
</uni-group>
|
|
|
|
|
|
<!-- 支路 -->
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<uni-group class="branch-card-group" :title="`支路${pcsBranchIndex+1}`" mode="card"
|
2025-07-29 23:05:58 +08:00
|
|
|
|
v-for="(pcsBranchItem,pcsBranchIndex) in item.pcsBranchInfoList"
|
|
|
|
|
|
:key="pcsBranchIndex+'pcsBranchInfoList'">
|
2026-01-15 17:51:09 +08:00
|
|
|
|
<uni-grid :column="3" :square="false" :showBorder="false">
|
2025-07-29 23:05:58 +08:00
|
|
|
|
<uni-grid-item>
|
|
|
|
|
|
<view class="grid-item-box">
|
|
|
|
|
|
<view class="title">直流功率</view>
|
|
|
|
|
|
<text class="text">{{pcsBranchItem.dcPower}}kW</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</uni-grid-item>
|
|
|
|
|
|
<uni-grid-item>
|
|
|
|
|
|
<view class="grid-item-box">
|
|
|
|
|
|
<view class="title">直流电压</view>
|
|
|
|
|
|
<text class="text">{{pcsBranchItem.dcVoltage}}V</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</uni-grid-item>
|
|
|
|
|
|
<uni-grid-item>
|
|
|
|
|
|
<view class="grid-item-box">
|
|
|
|
|
|
<view class="title">直流电流</view>
|
|
|
|
|
|
<text class="text">{{pcsBranchItem.dcCurrent}}A</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</uni-grid-item>
|
|
|
|
|
|
</uni-grid>
|
|
|
|
|
|
</uni-group>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</uni-collapse-item>
|
|
|
|
|
|
</uni-collapse>
|
|
|
|
|
|
<view class="no-data" v-else>
|
|
|
|
|
|
暂无数据
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import {
|
|
|
|
|
|
getRunningHeadInfo,
|
|
|
|
|
|
getPcsDetailInfo
|
|
|
|
|
|
} from '@/api/ems/site.js'
|
|
|
|
|
|
import {
|
|
|
|
|
|
mapState
|
|
|
|
|
|
} from 'vuex'
|
|
|
|
|
|
export default {
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
...mapState({
|
|
|
|
|
|
workStatusOptions: (state) =>
|
|
|
|
|
|
state.ems.workStatusOptions,
|
|
|
|
|
|
communicationStatusOptions: (state) =>
|
|
|
|
|
|
state.ems.communicationStatusOptions,
|
|
|
|
|
|
deviceStatusOptions: (state) =>
|
|
|
|
|
|
state.ems.deviceStatusOptions,
|
|
|
|
|
|
gridStatusOptions: (state) =>
|
|
|
|
|
|
state.ems.gridStatusOptions,
|
|
|
|
|
|
controlModeOptions: (state) =>
|
|
|
|
|
|
state.ems.controlModeOptions,
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
runningHeadData: [{
|
|
|
|
|
|
title: '实时有功功率(kW)',
|
|
|
|
|
|
bgColor: '#FFF2CB',
|
2026-01-15 17:51:09 +08:00
|
|
|
|
attr: 'totalActivePower',
|
|
|
|
|
|
img: 'ssyggl'
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
title: '实时无功功率(kVar)',
|
|
|
|
|
|
bgColor: '#CBD6FF',
|
2026-01-15 17:51:09 +08:00
|
|
|
|
attr: 'totalReactivePower',
|
|
|
|
|
|
img: 'sswggl'
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
title: '电池堆SOC',
|
|
|
|
|
|
bgColor: '#DCCBFF',
|
2026-01-15 17:51:09 +08:00
|
|
|
|
attr: 'soc',
|
|
|
|
|
|
img: 'soc'
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
title: '电池堆SOH',
|
|
|
|
|
|
bgColor: '#FFD4CB',
|
2026-01-15 17:51:09 +08:00
|
|
|
|
attr: 'soh',
|
|
|
|
|
|
img: 'soh'
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
title: '今日充电量(kWh)',
|
|
|
|
|
|
bgColor: '#FFD6F8',
|
2026-01-15 17:51:09 +08:00
|
|
|
|
attr: 'dayChargedCap',
|
|
|
|
|
|
img: 'jrcdl'
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}, {
|
|
|
|
|
|
title: '今日放电量(kWh)',
|
|
|
|
|
|
bgColor: '#E1FFCA',
|
2026-01-15 17:51:09 +08:00
|
|
|
|
attr: 'dayDisChargedCap',
|
|
|
|
|
|
img: 'jrfdl'
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}],
|
|
|
|
|
|
runningHeadInfo: {},
|
|
|
|
|
|
list: [],
|
|
|
|
|
|
siteId: '',
|
|
|
|
|
|
infoData: [{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "总交流有功电率",
|
|
|
|
|
|
attr: "totalActivePower",
|
|
|
|
|
|
unit: "kW",
|
|
|
|
|
|
pointName: "总交流有功电率",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "总交流无功电率",
|
|
|
|
|
|
attr: "totalReactivePower",
|
|
|
|
|
|
unit: "kVar",
|
|
|
|
|
|
pointName: "总交流无功电率",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "当天交流充电量",
|
|
|
|
|
|
attr: "dailyAcChargeEnergy",
|
|
|
|
|
|
unit: "kWh",
|
|
|
|
|
|
pointName: "当天交流充电量 (kWh)",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "当天交流放电量",
|
|
|
|
|
|
attr: "dailyAcDischargeEnergy",
|
|
|
|
|
|
unit: "kWh",
|
|
|
|
|
|
pointName: "当天交流放电量 (kWh)",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "A相电压",
|
|
|
|
|
|
attr: "aPhaseVoltage",
|
|
|
|
|
|
unit: "V",
|
|
|
|
|
|
pointName: ""
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "A相电流",
|
|
|
|
|
|
attr: "aPhaseCurrent",
|
|
|
|
|
|
unit: "A",
|
|
|
|
|
|
pointName: "A相电流",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
2025-10-15 18:16:56 +08:00
|
|
|
|
|
2025-07-29 23:05:58 +08:00
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "B相电压",
|
|
|
|
|
|
attr: "bPhaseVoltage",
|
|
|
|
|
|
unit: "V",
|
|
|
|
|
|
pointName: ""
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "B相电流",
|
|
|
|
|
|
attr: "bPhaseCurrent",
|
|
|
|
|
|
unit: "A",
|
|
|
|
|
|
pointName: "B相电流",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "总交流视在功率",
|
|
|
|
|
|
attr: "totalApparentPower",
|
|
|
|
|
|
unit: "kVA",
|
|
|
|
|
|
pointName: "总交流视在功率",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "总交流功率因数",
|
|
|
|
|
|
attr: "totalPowerFactor",
|
|
|
|
|
|
unit: "",
|
|
|
|
|
|
pointName: "总交流功率因数",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "PCS模块温度",
|
|
|
|
|
|
attr: "pcsModuleTemperature",
|
|
|
|
|
|
unit: "℃",
|
|
|
|
|
|
pointName: "",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "PCS环境温度",
|
|
|
|
|
|
attr: "pcsEnvironmentTemperature",
|
|
|
|
|
|
unit: "℃",
|
|
|
|
|
|
pointName: "",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "C相电压",
|
|
|
|
|
|
attr: "cPhaseVoltage",
|
|
|
|
|
|
unit: "V",
|
|
|
|
|
|
pointName: ""
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "C相电流",
|
|
|
|
|
|
attr: "cPhaseCurrent",
|
|
|
|
|
|
unit: "A",
|
|
|
|
|
|
pointName: "C相电流",
|
2025-07-29 23:05:58 +08:00
|
|
|
|
},
|
2025-10-15 18:16:56 +08:00
|
|
|
|
|
2025-07-29 23:05:58 +08:00
|
|
|
|
{
|
2025-10-15 18:16:56 +08:00
|
|
|
|
label: "交流频率",
|
|
|
|
|
|
attr: "acFrequency",
|
|
|
|
|
|
unit: "Hz",
|
|
|
|
|
|
pointName: "交流频率",
|
|
|
|
|
|
},
|
2025-07-29 23:05:58 +08:00
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
uni.showLoading()
|
|
|
|
|
|
this.siteId = this.$route.query.siteId || ''
|
|
|
|
|
|
getRunningHeadInfo({
|
|
|
|
|
|
siteId: this.siteId
|
|
|
|
|
|
}).then(response => {
|
|
|
|
|
|
this.runningHeadInfo = response?.data || {}
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
getPcsDetailInfo({
|
|
|
|
|
|
siteId: this.siteId
|
|
|
|
|
|
}).then(response => {
|
|
|
|
|
|
this.list = response?.data || []
|
|
|
|
|
|
if (this.list.length > 0) {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
|
this.$refs.collapse.resize()
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
}, 100)
|
|
|
|
|
|
})
|
|
|
|
|
|
} else {
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
}
|
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
|
uni.hideLoading()
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
2026-01-15 17:51:09 +08:00
|
|
|
|
.info-grid {
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
padding: 0 20rpx;
|
2025-07-29 23:05:58 +08:00
|
|
|
|
|
2026-01-15 17:51:09 +08:00
|
|
|
|
.uni-grid-item {
|
|
|
|
|
|
padding: 20rpx;
|
2025-07-29 23:05:58 +08:00
|
|
|
|
|
2026-01-15 17:51:09 +08:00
|
|
|
|
.grid-item-box {
|
|
|
|
|
|
box-shadow: 0 0 5px 1px rgba(0, 0, 0, 0.08);
|
|
|
|
|
|
border-radius: 20rpx;
|
2025-07-29 23:05:58 +08:00
|
|
|
|
|
2026-01-15 17:51:09 +08:00
|
|
|
|
.title {
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
margin-top: 10rpx;
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-15 17:51:09 +08:00
|
|
|
|
.text {
|
|
|
|
|
|
color: #000;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
|
text-align: center;
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-01-15 17:51:09 +08:00
|
|
|
|
.icon {
|
|
|
|
|
|
height: 100rpx;
|
|
|
|
|
|
width: 100rpx;
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
|
}
|
2025-07-29 23:05:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
</style>
|