Compare commits
3 Commits
5c78cbf39f
...
e1eec995ca
| Author | SHA1 | Date | |
|---|---|---|---|
| e1eec995ca | |||
| b493e331c6 | |||
| b8898311ae |
@ -2,11 +2,7 @@
|
|||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<uni-collapse ref="collapse" accordion v-if="list.length > 0">
|
<uni-collapse ref="collapse" accordion v-if="list.length > 0">
|
||||||
<uni-collapse-item v-for="(item,index) in list" :key="item.deviceId+'bmscc'" :open="index===0"
|
<uni-collapse-item v-for="(item,index) in list" :key="item.deviceId+'bmscc'" :open="index===0"
|
||||||
class="common-collapse-item" :class="{
|
class="common-collapse-item" :class="handleCardClass(item)">
|
||||||
'timing-collapse-item':!['0','2'].includes(item.workStatus),
|
|
||||||
'warning-collapse-item':item.workStatus === '2',
|
|
||||||
'running-collapse-item':item.workStatus === '0'
|
|
||||||
}">
|
|
||||||
|
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<view class='title-wrapper'>
|
<view class='title-wrapper'>
|
||||||
@ -182,6 +178,15 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
handleCardClass(item) {
|
||||||
|
const {
|
||||||
|
workStatus = ''
|
||||||
|
} = item
|
||||||
|
return !['0', '2'].includes(item.workStatus) ? "timing-collapse-item" : workStatus === '2' ?
|
||||||
|
'warning-collapse-item' : 'running-collapse-item'
|
||||||
|
},
|
||||||
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
this.siteId = options.siteId || ''
|
this.siteId = options.siteId || ''
|
||||||
|
|||||||
@ -2,16 +2,12 @@
|
|||||||
<view class="page-container">
|
<view class="page-container">
|
||||||
<uni-collapse ref="collapse" accordion v-if="list.length > 0">
|
<uni-collapse ref="collapse" accordion v-if="list.length > 0">
|
||||||
<uni-collapse-item v-for="(item,index) in list" :key="item.deviceId+'bmszl'" :open="index===0"
|
<uni-collapse-item v-for="(item,index) in list" :key="item.deviceId+'bmszl'" :open="index===0"
|
||||||
class="common-collapse-item" :class="{
|
class="common-collapse-item" :class="handleCardClass(item,index)">
|
||||||
'timing-collapse-item':!['0','2'].includes(item.workStatus),
|
|
||||||
'warning-collapse-item':item.workStatus === '2',
|
|
||||||
'running-collapse-item':item.workStatus === '0'
|
|
||||||
}">
|
|
||||||
|
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<view class='title-wrapper'>
|
<view class='title-wrapper'>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="status">{{workStatusOptions[item.workStatus] || '暂无数据'}}</view>
|
<view class="status">{{STACKWorkStatusOptions[item.workStatus] || '暂无数据'}}</view>
|
||||||
<text class="name">{{item.deviceName}}</text>
|
<text class="name">{{item.deviceName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -24,7 +20,7 @@
|
|||||||
<view class="grid-item-box">
|
<view class="grid-item-box">
|
||||||
<view class="title">工作状态</view>
|
<view class="title">工作状态</view>
|
||||||
<text
|
<text
|
||||||
class="text work-status-color">{{workStatusOptions[item.workStatus] || '-'}}</text>
|
class="text work-status-color">{{STACKWorkStatusOptions[item.workStatus] || '-'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-lists">
|
<view class="flex-lists">
|
||||||
@ -113,8 +109,8 @@
|
|||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
workStatusOptions: (state) =>
|
STACKWorkStatusOptions: (state) =>
|
||||||
state.ems.workStatusOptions,
|
state.ems.STACKWorkStatusOptions,
|
||||||
communicationStatusOptions: (state) =>
|
communicationStatusOptions: (state) =>
|
||||||
state.ems.communicationStatusOptions,
|
state.ems.communicationStatusOptions,
|
||||||
})
|
})
|
||||||
@ -187,6 +183,15 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
handleCardClass(item) {
|
||||||
|
const {
|
||||||
|
workStatus = ''
|
||||||
|
} = item
|
||||||
|
return !Object.keys(this.STACKWorkStatusOptions).find(i => i === workStatus) ? "timing-collapse-item" :
|
||||||
|
workStatus === '9' ? 'warning-collapse-item' : 'running-collapse-item'
|
||||||
|
},
|
||||||
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
this.siteId = options.siteId || ''
|
this.siteId = options.siteId || ''
|
||||||
|
|||||||
@ -16,22 +16,21 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<view class='content' v-if="deviceIdTypeMsg[item.deviceId]">
|
<view class='content'>
|
||||||
<uni-group mode="card" class="data-card-group">
|
<uni-group mode="card" class="data-card-group">
|
||||||
<uni-row v-for="(tempDataItem,tempDataIndex) in
|
<uni-row v-for="(tempDataItem,tempDataIndex) in
|
||||||
deviceIdTypeMsg[item.deviceId]" :key="tempDataIndex+'dbTempData'" class="data-row">
|
(deviceIdTypeMsg[item.deviceId] || otherTypeMsg)" :key="tempDataIndex+'dbTempData'" class="data-row">
|
||||||
<uni-col :span="8">
|
<uni-col :span="8">
|
||||||
<view class="title">{{tempDataItem.name}}</view>
|
<view class="title">{{tempDataItem.name}}</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="16">
|
<uni-col :span="16">
|
||||||
<view class="value">{{item[tempDataItem.attr] | formatNumber}}
|
<view class="value">{{item[tempDataItem.attr] | formatNumber}}
|
||||||
<!-- <text v-if="infoDataItem.unit" v-html="infoDataItem.unit"></text> -->
|
<text v-if="tempDataItem.unit" v-html="tempDataItem.unit"></text>
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</uni-group>
|
</uni-group>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class='unknow-bd-device'>未知的电表数据</view>
|
|
||||||
</uni-collapse-item>
|
</uni-collapse-item>
|
||||||
</uni-collapse>
|
</uni-collapse>
|
||||||
<view class="no-data" v-else>
|
<view class="no-data" v-else>
|
||||||
@ -63,88 +62,122 @@
|
|||||||
'LOAD': [{
|
'LOAD': [{
|
||||||
name: '正向有功电能',
|
name: '正向有功电能',
|
||||||
attr: 'forwardActive',
|
attr: 'forwardActive',
|
||||||
pointName: '正向有功电能'
|
pointName: '正向有功电能',
|
||||||
|
unit: 'kWh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '反向有功电能',
|
name: '反向有功电能',
|
||||||
attr: 'reverseActive',
|
attr: 'reverseActive',
|
||||||
pointName: '反向有功电能'
|
pointName: '反向有功电能',
|
||||||
|
unit: 'kWh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '正向无功电能',
|
name: '正向无功电能',
|
||||||
attr: 'forwardReactive',
|
attr: 'forwardReactive',
|
||||||
pointName: '正向无功电能'
|
pointName: '正向无功电能',
|
||||||
|
unit: 'kvarh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '反向无功电能',
|
name: '反向无功电能',
|
||||||
attr: 'reverseReactive',
|
attr: 'reverseReactive',
|
||||||
pointName: '反向无功电能'
|
pointName: '反向无功电能',
|
||||||
|
unit: 'kvarh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '有功功率',
|
name: '有功功率',
|
||||||
attr: 'activePower',
|
attr: 'activePower',
|
||||||
pointName: '总有功功率'
|
pointName: '总有功功率',
|
||||||
|
unit: 'kW'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '无功功率',
|
name: '无功功率',
|
||||||
attr: 'reactivePower',
|
attr: 'reactivePower',
|
||||||
pointName: '总无功功率'
|
pointName: '总无功功率',
|
||||||
|
unit: 'kvar'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'METE': [{
|
'METE': [{
|
||||||
name: '正向有功电能',
|
name: '正向有功电能',
|
||||||
attr: 'forwardActive',
|
attr: 'forwardActive',
|
||||||
pointName: '正向有功电能'
|
pointName: '正向有功电能',
|
||||||
|
unit: 'kWh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '反向有功电能',
|
name: '反向有功电能',
|
||||||
attr: 'reverseActive',
|
attr: 'reverseActive',
|
||||||
pointName: '反向有功电能'
|
pointName: '反向有功电能',
|
||||||
|
unit: 'kWh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '正向无功电能',
|
name: '正向无功电能',
|
||||||
attr: 'forwardReactive',
|
attr: 'forwardReactive',
|
||||||
pointName: '正向无功电能'
|
pointName: '正向无功电能',
|
||||||
|
unit: 'kvarh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '反向无功电能',
|
name: '反向无功电能',
|
||||||
attr: 'reverseReactive',
|
attr: 'reverseReactive',
|
||||||
pointName: '反向无功电能'
|
pointName: '反向无功电能',
|
||||||
|
unit: 'kvarh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '有功功率',
|
name: '有功功率',
|
||||||
attr: 'activePower',
|
attr: 'activePower',
|
||||||
pointName: '总有功功率'
|
pointName: '总有功功率',
|
||||||
|
unit: 'kW'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '无功功率',
|
name: '无功功率',
|
||||||
attr: 'reactivePower',
|
attr: 'reactivePower',
|
||||||
pointName: '总无功功率'
|
pointName: '总无功功率',
|
||||||
|
unit: 'kvar'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
'METEGF': [{
|
'METEGF': [{
|
||||||
name: '有功电能',
|
name: '有功电能',
|
||||||
attr: 'activeEnergy',
|
attr: 'activeEnergy',
|
||||||
pointName: '有功电能'
|
pointName: '有功电能',
|
||||||
|
unit: 'kWh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '无功电能',
|
name: '无功电能',
|
||||||
attr: 'reactiveEnergy',
|
attr: 'reactiveEnergy',
|
||||||
pointName: '无功电能'
|
pointName: '无功电能',
|
||||||
|
unit: 'kvarh'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '有功功率',
|
name: '有功功率',
|
||||||
attr: 'activePower',
|
attr: 'activePower',
|
||||||
pointName: '总有功功率'
|
pointName: '总有功功率',
|
||||||
|
unit: 'kW'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '无功功率',
|
name: '无功功率',
|
||||||
attr: 'reactivePower',
|
attr: 'reactivePower',
|
||||||
pointName: '总无功功率'
|
pointName: '总无功功率',
|
||||||
|
unit: 'kvar'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
otherTypeMsg: [{
|
||||||
|
name: '正向有功电能',
|
||||||
|
attr: 'forwardActive',
|
||||||
|
pointName: '正向有功电能',
|
||||||
|
unit: 'kWh'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '反向有功电能',
|
||||||
|
attr: 'reverseActive',
|
||||||
|
pointName: '反向有功电能',
|
||||||
|
unit: 'kWh'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '有功功率',
|
||||||
|
attr: 'activePower',
|
||||||
|
pointName: '总有功功率',
|
||||||
|
unit: 'kW'
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<uni-grid class="info-grid" :square="false" :column="2" :showBorder="false">
|
<uni-grid class="info-grid" :square="false" :column="2" :showBorder="false">
|
||||||
<uni-grid-item v-for="(item,index) in runningHeadData" :key="index+'head'">
|
<uni-grid-item v-for="(item,index) in runningHeadData" :key="index+'head'">
|
||||||
<view class="grid-item-box">
|
<view class="grid-item-box">
|
||||||
<image :src="require('@/static/images/ems/pcs/'+item.img+'.jpg')" class="icon" alt="">
|
<image :src="require('@/static/images/ems/pcs/'+item.img+'.jpg')" class="icon" alt=""/>
|
||||||
<view class="title">{{item.title}}</view>
|
<view class="title">{{item.title}}</view>
|
||||||
<view class="text">{{runningHeadInfo[item.attr] | formatNumber}}</view>
|
<view class="text">{{runningHeadInfo[item.attr] | formatNumber}}</view>
|
||||||
</view>
|
</view>
|
||||||
@ -13,16 +13,12 @@
|
|||||||
|
|
||||||
<uni-collapse ref="collapse" accordion v-if="list.length > 0">
|
<uni-collapse ref="collapse" accordion v-if="list.length > 0">
|
||||||
<uni-collapse-item v-for="(item,index) in list" :key="index+'pcs'" :open="index===0"
|
<uni-collapse-item v-for="(item,index) in list" :key="index+'pcs'" :open="index===0"
|
||||||
class="common-collapse-item" :class="{
|
class="common-collapse-item" :class="handleCardClass(item)">
|
||||||
'timing-collapse-item':!['0','2'].includes(item.workStatus),
|
|
||||||
'warning-collapse-item':item.workStatus === '2',
|
|
||||||
'running-collapse-item':item.workStatus === '0'
|
|
||||||
}">
|
|
||||||
|
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
<view class='title-wrapper'>
|
<view class='title-wrapper'>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="status">{{workStatusOptions[item.workStatus] || '暂无数据'}}</view>
|
<view class="status">{{PCSWorkStatusOptions[item.workStatus] || '暂无数据'}}</view>
|
||||||
<text class="name">{{item.deviceName}}</text>
|
<text class="name">{{item.deviceName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -35,7 +31,7 @@
|
|||||||
<view class="grid-item-box">
|
<view class="grid-item-box">
|
||||||
<view class="title">工作状态</view>
|
<view class="title">工作状态</view>
|
||||||
<text
|
<text
|
||||||
class="text work-status-color">{{workStatusOptions[item.workStatus] || '-'}}</text>
|
class="text work-status-color">{{PCSWorkStatusOptions[item.workStatus] || '-'}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-lists">
|
<view class="flex-lists">
|
||||||
@ -119,8 +115,8 @@
|
|||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
workStatusOptions: (state) =>
|
PCSWorkStatusOptions: (state) =>
|
||||||
state.ems.workStatusOptions,
|
state.ems.PCSWorkStatusOptions,
|
||||||
communicationStatusOptions: (state) =>
|
communicationStatusOptions: (state) =>
|
||||||
state.ems.communicationStatusOptions,
|
state.ems.communicationStatusOptions,
|
||||||
deviceStatusOptions: (state) =>
|
deviceStatusOptions: (state) =>
|
||||||
@ -262,6 +258,15 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
handleCardClass(item) {
|
||||||
|
const {
|
||||||
|
workStatus = ''
|
||||||
|
} = item
|
||||||
|
return workStatus === '1' || !Object.keys(this.PCSWorkStatusOptions).find(i => i === workStatus) ?
|
||||||
|
"timing-collapse-item" : workStatus === '2' ? 'warning-collapse-item' : 'running-collapse-item'
|
||||||
|
},
|
||||||
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
uni.showLoading()
|
uni.showLoading()
|
||||||
this.siteId = options.siteId || ''
|
this.siteId = options.siteId || ''
|
||||||
|
|||||||
@ -5,6 +5,21 @@ const ems = {
|
|||||||
'1': '停机',
|
'1': '停机',
|
||||||
'2': '故障'
|
'2': '故障'
|
||||||
}, //工作状态
|
}, //工作状态
|
||||||
|
PCSWorkStatusOptions: {
|
||||||
|
'0': '运行',
|
||||||
|
'1': '停机',
|
||||||
|
'2': '故障',
|
||||||
|
'3': '待机',
|
||||||
|
'4': '充电',
|
||||||
|
'5': '放电'
|
||||||
|
}, //PCS工作状态
|
||||||
|
STACKWorkStatusOptions: {
|
||||||
|
"0": "净置",
|
||||||
|
"1": "充电",
|
||||||
|
"2": "放电",
|
||||||
|
"3": "浮充",
|
||||||
|
'9': "故障"
|
||||||
|
}, //STACKBMS总览工作状态
|
||||||
deviceStatusOptions: {
|
deviceStatusOptions: {
|
||||||
'0': '离线',
|
'0': '离线',
|
||||||
'1': '在线'
|
'1': '在线'
|
||||||
@ -64,6 +79,7 @@ const ems = {
|
|||||||
'2': '待机',
|
'2': '待机',
|
||||||
'3': '放电'
|
'3': '放电'
|
||||||
}, //冲放状态
|
}, //冲放状态
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default ems
|
export default ems
|
||||||
Reference in New Issue
Block a user