接口联调
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
<el-row type="flex" >
|
||||
<el-card shadow="hover" class="card common-card-container-body-no-padding" v-for="(item,index) in data" :key="index+'zdInfo'" :style="{borderBottomColor:item.color}">
|
||||
<div class="info">{{ item.title }}</div>
|
||||
<div class="num">{{item.num}}</div>
|
||||
<div class="num">{{item.num | formatNumber}}</div>
|
||||
</el-card>
|
||||
</el-row>
|
||||
</template>
|
||||
@ -49,7 +49,7 @@ export default {
|
||||
methods: {
|
||||
setData(res = {}){
|
||||
this.data.forEach((item)=>{
|
||||
item.num =(res[item.attr] || res[item.attr] === 0) ? res[item.attr] : '—'
|
||||
item.num =res[item.attr]
|
||||
})
|
||||
}
|
||||
},
|
||||
|
@ -15,6 +15,7 @@
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import resize from '@/mixins/ems/resize'
|
||||
import {formatNumber} from "@/filters/ems";
|
||||
|
||||
export default {
|
||||
mixins: [resize],
|
||||
@ -45,12 +46,11 @@ export default {
|
||||
siteMonitorDataVo.forEach(item=>{
|
||||
source.push([item.ammeterDate, item.chargedCap,item.disChargedCap])
|
||||
})
|
||||
const filterValue=(num)=>{return num || num === 0 ? num : '-'}
|
||||
this.chart.setOption({
|
||||
title: [
|
||||
// 右上角
|
||||
{
|
||||
text: `电网 实时功率:${filterValue(gridNrtPower)} kW`,
|
||||
text: `电网 实时功率:${formatNumber(gridNrtPower)} kW`,
|
||||
top: 10,
|
||||
right: 10,
|
||||
textStyle:{
|
||||
@ -60,7 +60,7 @@ export default {
|
||||
},
|
||||
// 右下角
|
||||
{
|
||||
text: `负载 实时功率:${filterValue(loadNrtPower)} kW`,
|
||||
text: `负载 实时功率:${formatNumber(loadNrtPower)} kW`,
|
||||
bottom: 10,
|
||||
right: 10,
|
||||
textStyle:{
|
||||
@ -80,7 +80,7 @@ export default {
|
||||
},
|
||||
// 左下角第二行
|
||||
{
|
||||
text: `实时功率:${filterValue(energyStorageNrtPower)} kW`,
|
||||
text: `实时功率:${formatNumber(energyStorageNrtPower)} kW`,
|
||||
bottom: 26,
|
||||
left: 10,
|
||||
textStyle:{
|
||||
@ -90,7 +90,7 @@ export default {
|
||||
},
|
||||
// 左下角第三行
|
||||
{
|
||||
text: `可用电量:${filterValue(energyStorageAvailElec)} kWh`,
|
||||
text: `可用电量:${formatNumber(energyStorageAvailElec)} kWh`,
|
||||
bottom: 10,
|
||||
left: 10,
|
||||
textStyle:{
|
||||
|
@ -10,7 +10,7 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" v-for="(item,index) in sjglData" :key="index+'sjglData'" class="sjgl-data">
|
||||
<div class="sjgl-title">{{item.title}}</div>
|
||||
<div class="sjgl-value">{{item.value}}</div>
|
||||
<div class="sjgl-value">{{item.value | formatNumber}}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -97,7 +97,7 @@ export default {
|
||||
getDzjkHomeView(this.siteId).then(response => {
|
||||
const data = response?.data || {}
|
||||
this.sjglData.forEach(item=>{
|
||||
item.value = (data[item.attr] || data[item.attr] === 0) ? data[item.attr] : '-'
|
||||
item.value =data[item.attr]
|
||||
})
|
||||
this.tableData = data?.siteMonitorHomeAlarmVo || []
|
||||
this.$refs.nllzChart.setOption(data)
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
<template>
|
||||
<div v-loading="loading">
|
||||
<el-card shadow="always" class="common-card-container" :class="zbInfo.emsCommunicationStatus === '0' ? 'cnb-common-card-container' : 'zb-common-card-container'">
|
||||
<el-card shadow="always" class="common-card-container" :class="zbInfo.emsCommunicationStatus === '1' ? 'zb-common-card-container' : 'cnb-common-card-container'">
|
||||
<div slot="header">
|
||||
<span class="large-title">1#总表</span>
|
||||
<div class="status">
|
||||
@ -41,7 +41,7 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-card shadow="always" class="common-card-container" :class="cnbInfo.emsCommunicationStatus === '0' ? 'cnb-common-card-container' : 'zb-common-card-container'">
|
||||
<el-card shadow="always" class="common-card-container" :class="cnbInfo.emsCommunicationStatus === '1' ? 'zb-common-card-container' : 'cnb-common-card-container'">
|
||||
<div slot="header">
|
||||
<span class="large-title">2#储能表</span>
|
||||
<div class="status">
|
||||
|
Reference in New Issue
Block a user