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