接口联调

This commit is contained in:
白菜
2025-06-30 18:56:33 +08:00
parent 3a6c668476
commit 62fff8c9f4
4 changed files with 11 additions and 11 deletions

View File

@ -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:{