光伏功能逻辑代码及BUG修改
This commit is contained in:
@ -20,7 +20,7 @@
|
||||
<charts v-else id="pcsChart" :options="curve_option"></charts>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box" style="margin-bottom: 0;">
|
||||
<!-- <view class="box" style="margin-bottom: 0;">
|
||||
<Section :title="$t('homePage.device.deviceData')" />
|
||||
<zero-loading v-if="stationLoading" position="absolute"></zero-loading>
|
||||
<view v-else class="group-box">
|
||||
@ -32,13 +32,13 @@
|
||||
<image src="/static/aidex/images/zjrl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.outputPower | kWFormat }}
|
||||
<view class="item-num">{{ panelData.pvActivePower | kWFormat }}
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.home.batVoltage')}}(kVar)</view>
|
||||
<view class="item-title">{{$t('homePage.home.batVoltage')}}(V)</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="group-item border-right"
|
||||
@click="showHistory($t('homePage.home.batCurrent'), 'reactivePowerPCS', 'pcs', 'kVar', '')">
|
||||
@click="showHistory($t('homePage.home.batCurrent'), 'reactivePowerPCS', 'pcs', 'V', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
@ -46,7 +46,7 @@
|
||||
<image src="/static/aidex/images/zjrl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.reactivePowerPCS }}
|
||||
<view class="item-num">{{ panelData.lowV }}
|
||||
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.home.batCurrent')}}(A)</view>
|
||||
@ -61,10 +61,10 @@
|
||||
<image src="/static/aidex/images/dqgl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.grid | isNull }}
|
||||
<view class="item-num">{{ panelData.lowI | isNull }}
|
||||
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.home.busVoltage')}}(kVar)</view>
|
||||
<view class="item-title">{{$t('homePage.home.busVoltage')}}(V)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -76,132 +76,15 @@
|
||||
<image src="/static/aidex/images/zfdl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.volA | isNull }}
|
||||
<view class="item-num">{{ panelData.highV | isNull }}
|
||||
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.home.busCurrent')}}(A)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="group-item border-right" @click="showHistory($t('homePage.home.dc'), 'volB', 'pcs', 'V', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
<view class="item-icon">
|
||||
<image src="/static/aidex/images/zfdl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.volB | isNull }}
|
||||
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.home.dc')}}(A)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="group-item" @click="showHistory($t('homePage.home.dcVoltage'), 'volC', 'pcs', 'V', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
<view class="item-icon">
|
||||
<image src="/static/aidex/images/zfdl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.volC | isNull }}
|
||||
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.home.dcVoltage')}}(kVar)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="group-item border-right" @click="showHistory($t('homePage.device.acur'), 'currentA', 'pcs', 'A', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
<view class="item-icon">
|
||||
<image src="/static/aidex/images/rfdl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.currentA | isNull }}
|
||||
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.device.acur')}}(A)</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- <view class="group-item border-right" @click="showHistory($t('homePage.device.bcur'), 'currentB', 'pcs', 'A', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
<view class="item-icon">
|
||||
<image src="/static/aidex/images/rfdl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.currentB | isNull }}
|
||||
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.device.bcur')}}(A)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="group-item" @click="showHistory($t('homePage.device.ccur'), 'currentC', 'pcs', 'A', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
<view class="item-icon">
|
||||
<image src="/static/aidex/images/rfdl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.currentC | isNull }}
|
||||
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.device.ccur')}}(A)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="group-item border-right" @click="showHistory($t('homePage.device.DCPower'), 'dcPower', 'pcs', 'kW', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
<view class="item-icon">
|
||||
<image src="/static/aidex/images/dqgl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.dcPower | kWFormat }}</view>
|
||||
<view class="item-title">{{$t('homePage.device.DCPower')}}({{ panelData.dcPower | kwUnitFormat}})</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="group-item border-right" @click="showHistory($t('homePage.device.DCVol'), 'dcInputVol', 'pcs', 'V', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
<view class="item-icon">
|
||||
<image src="/static/aidex/images/zfdl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.dcInputVol | isNull }}
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.device.DCVol')}}(V)</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="group-item" @click="showHistory($t('homePage.device.DCCurrent'), 'dcCurrent', 'pcs', 'A', '')">
|
||||
<view class="history-icon">
|
||||
<image src="/static/aidex/images/history-icon.png"></image>
|
||||
</view>
|
||||
<view class="item-icon">
|
||||
<image src="/static/aidex/images/rfdl.png"></image>
|
||||
</view>
|
||||
<view class="item-con">
|
||||
<view class="item-num">{{ panelData.dcCurrent | isNull }}
|
||||
</view>
|
||||
<view class="item-title">{{$t('homePage.device.DCCurrent')}}(A)</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
<historyModal :is-show.sync="histroyShow" :title="chartTitle" :params="hisParams" />
|
||||
<u-action-sheet :list="actionSheetList" v-model="timeShow" @click="actionSheetCallback" @close="closeTimeAction"
|
||||
:mask-close-able="false"></u-action-sheet>
|
||||
@ -234,62 +117,80 @@
|
||||
stationId: null,
|
||||
srcId: null,
|
||||
hnStationId: [417, 398, 416, 415, 405, 485],
|
||||
actionSheetList: this.$t('homePage.device.timesArr'),
|
||||
sampleTime:this.$t('homePage.device.timesArr')[0].label,
|
||||
actionSheetList: Object.values(this.$t('homePage.home.timesArr')),
|
||||
sampleTime:this.$t('homePage.home.timesArr')[0].text,
|
||||
canvasData: [],
|
||||
textCanvasData: [
|
||||
{
|
||||
type: "text",
|
||||
coord: [
|
||||
[144, 240]
|
||||
],
|
||||
font: [{
|
||||
text:this.$t('homePage.home.activePowerpcs'),
|
||||
size: 12,
|
||||
color: "#999",
|
||||
},
|
||||
{
|
||||
text: "",
|
||||
size: 12,
|
||||
color: "#000",
|
||||
offsetX: 0
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
coord: [
|
||||
[144, 260]
|
||||
],
|
||||
font: [{
|
||||
text:this.$t('homePage.home.highV') + ':',
|
||||
size: 12,
|
||||
color: "#999",
|
||||
},
|
||||
{
|
||||
text: "",
|
||||
size: 12,
|
||||
color: "#000",
|
||||
offsetX: 0
|
||||
},
|
||||
],
|
||||
},
|
||||
//2
|
||||
{
|
||||
type: "text",
|
||||
coord: [
|
||||
[200, 200]
|
||||
[144, 280]
|
||||
],
|
||||
font: [{
|
||||
text:this.$t('homePage.device.vol') + ":",
|
||||
text:this.$t('homePage.home.lowV') + ':',
|
||||
size: 12,
|
||||
color: "#999",
|
||||
},
|
||||
{
|
||||
text: "3.265 kVar",
|
||||
text: "",
|
||||
size: 12,
|
||||
color: "#000",
|
||||
left: 35
|
||||
offsetX: 0
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
coord: [
|
||||
[200, 220]
|
||||
[144, 300]
|
||||
],
|
||||
font: [{
|
||||
text:this.$t('homePage.device.current') + ":",
|
||||
text:this.$t('homePage.home.lowI') + ':',
|
||||
size: 12,
|
||||
color: "#999",
|
||||
},
|
||||
{
|
||||
text: "3.98 A",
|
||||
text: "",
|
||||
size: 12,
|
||||
color: "#000",
|
||||
left: 35
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "text",
|
||||
coord: [
|
||||
[200, 180]
|
||||
],
|
||||
font: [{
|
||||
text:this.$t('homePage.home.pvPower') + ":",
|
||||
size: 12,
|
||||
color: "#999",
|
||||
},
|
||||
{
|
||||
text: "12.9 kW",
|
||||
size: 12,
|
||||
color: "#000",
|
||||
left: 50
|
||||
offsetX: 0
|
||||
},
|
||||
],
|
||||
},
|
||||
@ -299,6 +200,26 @@
|
||||
coord: [
|
||||
[3, 120]
|
||||
],
|
||||
font: [{
|
||||
text: this.$t('homePage.device.gridMode') + ':',
|
||||
size: 14,
|
||||
color: "#999999",
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
text: "",
|
||||
size: 14,
|
||||
color: "#000",
|
||||
left: 80
|
||||
},
|
||||
],
|
||||
},
|
||||
//6
|
||||
{
|
||||
type: "text",
|
||||
coord: [
|
||||
[3, 140]
|
||||
],
|
||||
font: [{
|
||||
text: this.$t('homePage.device.runState') + ':',
|
||||
size: 14,
|
||||
@ -306,10 +227,10 @@
|
||||
width: 50,
|
||||
},
|
||||
{
|
||||
text: this.$t('homePage.device.offGrid'),
|
||||
text: "",
|
||||
size: 14,
|
||||
color: "#000",
|
||||
left: 80
|
||||
offsetX: 0
|
||||
},
|
||||
],
|
||||
}
|
||||
@ -384,7 +305,7 @@
|
||||
self.chartLoading = true;
|
||||
return new Promise((resolve, reject) => {
|
||||
self.$u.api.deviceList
|
||||
.GetPCSCurve({
|
||||
.GetPvCurve({
|
||||
stationId: this.stationId,
|
||||
sampleTime: this.time,
|
||||
srcId: this.srcId,
|
||||
@ -406,12 +327,12 @@
|
||||
},
|
||||
initChargeChart(val) {
|
||||
const gonglv = [];
|
||||
const soc = [];
|
||||
// const soc = [];
|
||||
const xAxis = [];
|
||||
val.forEach((v) => {
|
||||
xAxis.push(v.data);
|
||||
gonglv.push(v.pcsRealTimeCurve);
|
||||
soc.push(v.inCoreDataCurve);
|
||||
gonglv.push(v.planCurve);
|
||||
// soc.push(v.inCoreDataCurve);
|
||||
});
|
||||
this.curve_option = {
|
||||
color: ["#BFE49F"],
|
||||
@ -548,7 +469,6 @@
|
||||
}
|
||||
],
|
||||
};
|
||||
|
||||
},
|
||||
openTimeAction() {
|
||||
this.timeShow = true;
|
||||
@ -556,90 +476,50 @@
|
||||
getStatus() {
|
||||
this.stationLoading = true
|
||||
const self = this;
|
||||
|
||||
this.$u.api.deviceList
|
||||
.GetNewValue({
|
||||
stationId: this.stationId,
|
||||
srcId: this.srcId,
|
||||
colList: [
|
||||
"runState",
|
||||
"remoteInPlace",
|
||||
"onGrid",
|
||||
"offGrid",
|
||||
"stateCharging",
|
||||
"stateDischarging",
|
||||
"deviceStateStand",
|
||||
"deviceStateFault",
|
||||
"deviceStateFull",
|
||||
"deviceStateEmpty",
|
||||
"acBreaker",
|
||||
"dcBreaker",
|
||||
"soc",
|
||||
"outputPower",
|
||||
"reactivePowerPCS",
|
||||
"grid",
|
||||
"volA",
|
||||
"volB",
|
||||
"volC",
|
||||
"currentA",
|
||||
"currentB",
|
||||
"currentC",
|
||||
"dcPower",
|
||||
"dcInputVol",
|
||||
"dcCurrent",
|
||||
colList: ["lowV", "highV", "lowI",
|
||||
"pvActivePower","runState","remoteInPlace",
|
||||
"onGrid","offGrid","stateCharging",
|
||||
"stateDischarging","deviceStateStand","deviceStateFault",
|
||||
"deviceStateFull","deviceStateEmpty","dcBreaker",
|
||||
"eStop","soc","grid",
|
||||
"outputPower",
|
||||
// "reactivePowerPCS",
|
||||
// ,,
|
||||
// "volA",
|
||||
// "volB",
|
||||
// "volC",
|
||||
// "currentA",
|
||||
// "currentB",
|
||||
// "currentC",
|
||||
// "dcPower",
|
||||
// "dcInputVol",
|
||||
// "dcCurrent",
|
||||
],
|
||||
})
|
||||
.then((res) => {
|
||||
const battery = self.updateBattery(res.data.soc?.value ? res.data.soc.value : 0);
|
||||
this.panelData = {
|
||||
outputPower: res.data.outputPower?.value ? res.data.outputPower?.value : 0,
|
||||
reactivePowerPCS: res.data.reactivePowerPCS?.value ? res.data.reactivePowerPCS?.value :
|
||||
0,
|
||||
grid: res.data.grid?.value ? res.data.grid?.value : 0,
|
||||
volA: res.data.volA?.value ? res.data.volA?.value : 0,
|
||||
volB: res.data.volB?.value ? res.data.volB?.value : 0,
|
||||
volC: res.data.volC?.value ? res.data.volC?.value : 0,
|
||||
currentA: res.data.currentA?.value ? res.data.currentA?.value : 0,
|
||||
currentB: res.data.currentB?.value ? res.data.currentB?.value : 0,
|
||||
currentC: res.data.currentC?.value ? res.data.currentC?.value : 0,
|
||||
dcPower: res.data.dcPower?.value ? res.data.dcPower?.value : 0,
|
||||
dcInputVol: res.data.dcInputVol?.value ? res.data.dcInputVol?.value : 0,
|
||||
dcCurrent: res.data.dcCurrent?.value ? res.data.dcCurrent?.value : 0,
|
||||
lowV: res.data.lowV?.value ? res.data.lowV?.value : 0,
|
||||
highV: res.data.highV?.value ? res.data.highV?.value : 0,
|
||||
lowI: res.data.lowI?.value ? res.data.lowI?.value : 0,
|
||||
pvActivePower: res.data.pvActivePower?.value ? res.data.pvActivePower?.value : 0
|
||||
};
|
||||
// this.textCanvasData[2].font[1].text = res.data.soc?.value ? res.data.soc.value + "%" : 0 + "%";
|
||||
// this.textCanvasData[3].font[1].text = this.workStatus(res.data.runState?.value);
|
||||
// if (this.stationId === 349 || this.stationId === 362 || this.stationId === 363) {
|
||||
// if (res.data.remoteInPlace?.value === 0) {
|
||||
// this.textCanvasData[4].font[1].text = this.$t('homePage.device.localAutomatic')
|
||||
// }
|
||||
// if (res.data.remoteInPlace?.value === 1) {
|
||||
// this.textCanvasData[4].font[1].text = this.$t('homePage.device.localManual')
|
||||
// }
|
||||
// if (res.data.remoteInPlace?.value === 2) {
|
||||
// this.textCanvasData[4].font[1].text = this.$t('homePage.device.distance')
|
||||
// }
|
||||
|
||||
// } else {
|
||||
// if (res.data.remoteInPlace?.value === 0) {
|
||||
// this.textCanvasData[4].font[1].text = this.$t('homePage.device.local')
|
||||
// }
|
||||
// if (res.data.remoteInPlace?.value === 1) {
|
||||
// this.textCanvasData[4].font[1].text = this.$t('homePage.device.distance')
|
||||
// }
|
||||
// }
|
||||
|
||||
// this.textCanvasData[5].font[1].text = res.data.onGrid?.value ?
|
||||
// this.$t('homePage.device.grid') :
|
||||
// this.$t('homePage.device.offGrid');
|
||||
// if(res.data.outputPower?.value){
|
||||
// this.textCanvasData[6].font[1].text = this.getFlowDirection(res.data.outputPower?.value, res
|
||||
// .data.flowDirection)
|
||||
// }
|
||||
|
||||
|
||||
this.canvasData = [...this.textCanvasData, ...this.imageCanvasData, ...this
|
||||
.lineCanvasData
|
||||
]
|
||||
this.textCanvasData[0].font[1].text = res.data.pvActivePower?.value ? res.data.pvActivePower.value + " kW" : 0 + " kW";
|
||||
this.textCanvasData[1].font[1].text = res.data.highV?.value ? res.data.highV.value + " V" : 0 + " V";
|
||||
this.textCanvasData[2].font[1].text = res.data.lowV?.value ? res.data.lowV.value + " V" : 0 + " V";
|
||||
this.textCanvasData[3].font[1].text = res.data.lowI?.value ? res.data.lowI.value + " A" : 0 + " A";
|
||||
this.textCanvasData[5].font[1].text = res.data.onGrid?.value ?
|
||||
this.$t('homePage.device.grid') :
|
||||
this.$t('homePage.device.offGrid');
|
||||
if(res.data.outputPower?.value){
|
||||
this.textCanvasData[6].font[1].text = this.getFlowDirection(res.data.outputPower?.value, res
|
||||
.data.flowDirection)
|
||||
}
|
||||
this.canvasData = [...this.textCanvasData, ...this.imageCanvasData, ...this.lineCanvasData]
|
||||
})
|
||||
.finally((res) => {
|
||||
this.stationLoading = false;
|
||||
|
||||
@ -236,8 +236,8 @@
|
||||
stationId: null,
|
||||
srcId: null,
|
||||
hnStationId: [417, 398, 416, 415, 405, 485],
|
||||
actionSheetList: this.$t('homePage.device.timesArr'),
|
||||
sampleTime:this.$t('homePage.device.timesArr')[0].label,
|
||||
actionSheetList: Object.values(this.$t('homePage.home.timesArr')),
|
||||
sampleTime:this.$t('homePage.home.timesArr')[0].text,
|
||||
canvasData: [],
|
||||
textCanvasData: [
|
||||
//0
|
||||
|
||||
@ -87,7 +87,6 @@
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
|
||||
this.Devicetype = options.type
|
||||
if (this.Devicetype === 'storage' || this.Devicetype === 'anything') {
|
||||
this.list = [{
|
||||
@ -194,6 +193,7 @@
|
||||
|
||||
methods: {
|
||||
device(val) {
|
||||
console.log(val);
|
||||
this.Devicetype = val
|
||||
},
|
||||
changeTab(type) {
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
type = "storage";
|
||||
} else if (item.deviceType?.includes("basic") ) {
|
||||
type = "anything"
|
||||
} else if (item.deviceType?.includes("mttp") ) {
|
||||
} else if (item.deviceType?.includes("mttp") || item.deviceType?.includes("mppt")) {
|
||||
type = "mttp"
|
||||
}
|
||||
|
||||
|
||||
@ -1,28 +1,38 @@
|
||||
<template>
|
||||
<view class="p_container">
|
||||
<u-navbar :is-back="true" :background="background" :border-bottom="false" :custom-back="toback">
|
||||
|
||||
<u-navbar :is-back="true" :background="background" :border-bottom="false">
|
||||
<!-- <u-navbar :is-back="true" :background="background" :border-bottom="false" :custom-back="toback"> -->
|
||||
<view class="slot-wrap">
|
||||
<stationDropdow disabled style="width: 100%" ref="dropdow" />
|
||||
</view>
|
||||
</u-navbar>
|
||||
<zero-loading v-if="loading"></zero-loading>
|
||||
<!-- <zero-loading v-if="loading"></zero-loading> -->
|
||||
|
||||
<view v-else style="height: calc(100% - 100rpx);">
|
||||
<!-- <view v-else style="height: calc(100% - 100rpx);"> -->
|
||||
<view style="height: calc(100% - 100rpx);">
|
||||
<!-- <view class="search">
|
||||
<luyj-tree-search :placeholder="$t('homePage.home.revenue')">
|
||||
</luyj-tree-search>
|
||||
</view> -->
|
||||
<view class="p_content">
|
||||
<view class="selectContent">
|
||||
<view class="p_box selectItem" v-for="(item,index) in labeArr" :key="index" @click="toUrl(item)">
|
||||
<view class="p_box selectItem" @click="toUrl(labeArr[0])">
|
||||
<view >
|
||||
<image :src="item.icon" mode="" style="height: 48rpx; width: 48rpx;" class="selectIcon"></image>
|
||||
<image :src="labeArr[0].icon" mode="" style="height: 48rpx; width: 48rpx;" class="selectIcon"></image>
|
||||
</view>
|
||||
<view class="">
|
||||
{{ item.label}}
|
||||
{{ labeArr[0].label}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="p_box selectItem" v-if="inverterFlag === 1" @click="toUrl(labeArr[1])">
|
||||
<view >
|
||||
<image :src="labeArr[1].icon" mode="" style="height: 48rpx; width: 48rpx;" class="selectIcon"></image>
|
||||
</view>
|
||||
<view class="">
|
||||
{{ labeArr[1].label}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -59,6 +69,9 @@
|
||||
currentStation() {
|
||||
return this.vuex_currentStation;
|
||||
},
|
||||
inverterFlag(){
|
||||
return this.vuex_inverterFlag;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toUrl(val) {
|
||||
|
||||
@ -6,8 +6,15 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
time: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
stationId:'',
|
||||
chartData: {},
|
||||
//您可以通过修改 config-ucharts.js 文件中下标为 ['column'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
|
||||
opts: {
|
||||
@ -23,10 +30,10 @@
|
||||
disableGrid: true,
|
||||
rotateLabel: true,
|
||||
rotateAngle: 30,
|
||||
|
||||
titleOffsetY: 20,
|
||||
titleOffsetX: 5,
|
||||
marginTop: 5
|
||||
marginTop: 5,
|
||||
labelCount: 7
|
||||
},
|
||||
yAxis: {
|
||||
data: [{
|
||||
@ -44,32 +51,53 @@
|
||||
};
|
||||
},
|
||||
created() {
|
||||
console.log("runChart onReady");
|
||||
this.getServerData();
|
||||
this.GetPvMonthData();
|
||||
},
|
||||
computed: {
|
||||
currentStation() {
|
||||
return this.vuex_currentStation;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentStation: {
|
||||
handler(val) {
|
||||
this.stationId = val.id;
|
||||
},
|
||||
deep: true,
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
getServerData() {
|
||||
let _this = this;
|
||||
//模拟从服务器获取数据时的延时
|
||||
setTimeout(() => {
|
||||
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
||||
let res = {
|
||||
categories: ["2025-10-17", "2025-10-18", "2025-10-19", "2025-10-20", "2025-10-21",
|
||||
"2025-10-22"
|
||||
],
|
||||
series: [
|
||||
|
||||
{
|
||||
name:this.$t('homePage.home.powerGeneration'),
|
||||
textColor: "#FFFFFF",
|
||||
data: [18, 27, 21, 24, 6, 28]
|
||||
}
|
||||
]
|
||||
};
|
||||
this.chartData = JSON.parse(JSON.stringify(res));
|
||||
|
||||
}, 500);
|
||||
},
|
||||
async GetPvMonthData(){
|
||||
try {
|
||||
const res = await this.$u.api.enrnings.GetPvMonthData({
|
||||
stationId: this.stationId,
|
||||
time: this.time,
|
||||
});
|
||||
let resdata = {
|
||||
categories:[],
|
||||
series:[{
|
||||
name:this.$t('homePage.home.powerGeneration'),
|
||||
textColor: "#FFFFFF",
|
||||
data: []
|
||||
}]
|
||||
}
|
||||
if (res.data.length) {
|
||||
res.data.forEach((el) => {
|
||||
resdata.categories.push(el.date)
|
||||
resdata.series[0].data.push(el.powerGenerate)
|
||||
});
|
||||
console.log(JSON.parse(JSON.stringify(resdata)));
|
||||
this.chartData = JSON.parse(JSON.stringify(resdata));
|
||||
} else {
|
||||
this.chargeArr = [];
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -27,42 +27,57 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="power-generation">
|
||||
<Section :title="$t('homePage.earning.changeDischargePro')" />
|
||||
<Section :title="$t('homePage.home.powerGenerationStatus')" />
|
||||
<view class="power-generation-detail">
|
||||
<view class="value-box">
|
||||
<view class="icon zjry"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.capacity") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.capacity | isNull }}
|
||||
</view>
|
||||
<view class="unit"> kWh </view>
|
||||
</view>
|
||||
|
||||
<view class="value-box">
|
||||
<view class="icon byzc"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.monthTotalCharge") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.totalChargeElec | isNull }}
|
||||
</view>
|
||||
<view class="unit"> kWh </view>
|
||||
</view>
|
||||
<view class="value-box">
|
||||
<view class="icon zjry">
|
||||
|
||||
<view class="value-box">
|
||||
<view class="icon byzf"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.monthTotalDischarge") }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.totalDischargeElec | isNull }}
|
||||
</view>
|
||||
<view class="unit"> kWh </view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t('homePage.home.currentMonthlyPowerGeneration') }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.monthReleaseElec | isNull }}
|
||||
</view>
|
||||
<view class="unit">
|
||||
kWh
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="value-box">
|
||||
<view class="value-box">
|
||||
<view class="icon byzc">
|
||||
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t('homePage.home.cumulativePowerGeneration') }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.totalReleaseElec | isNull }}
|
||||
</view>
|
||||
<view class="unit">
|
||||
kWh
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="value-box">
|
||||
<view class="icon byzf">
|
||||
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t('homePage.home.ratedPowernokw') }}
|
||||
</view>
|
||||
<view class="value">
|
||||
{{ totalData.pvPower | isNull }}
|
||||
</view>
|
||||
<view class="unit">
|
||||
kW
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- <view class="value-box">
|
||||
<view class="icon yxtzhl"> </view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.earning.monthEff") }}
|
||||
@ -101,13 +116,13 @@
|
||||
{{ totalData.totalConvRate | isNull }}
|
||||
</view>
|
||||
<view class="unit"> % </view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="month-power">
|
||||
<Section :title="$t('homePage.home.projectMonthlyPower')" />
|
||||
<view class="power-generation-detail">
|
||||
<run-chart />
|
||||
<run-chart :time="time" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="month-power">
|
||||
@ -120,19 +135,17 @@
|
||||
<view class="power-detail">
|
||||
<view class="left-value">
|
||||
<view class="value">
|
||||
{{ totalData.totalChargePrice | isNull }}
|
||||
{{ totalData.monthIncone | isNull }}
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.home.enmonthTotalChargePrice") }}
|
||||
{{ $t("homePage.home.monthlyIncome") }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-value t-fdzl"> </view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="power-detail"
|
||||
style="margin: 0 !important; padding-bottom: 0 !important"
|
||||
>
|
||||
<!-- <view class="power-detail"
|
||||
style="margin: 0 !important; padding-bottom: 0 !important" >
|
||||
<view class="left-value">
|
||||
<view class="value">
|
||||
{{ totalData.totalDisChargePrice | isNull }}
|
||||
@ -142,22 +155,32 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-value t-swdl"> </view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="value-box">
|
||||
<view class="value">
|
||||
<view class="left">
|
||||
<view class="power-detail">
|
||||
<view class="left-value">
|
||||
<view class="value">
|
||||
{{ totalData.income | isNull }}
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.home.totalRevenue") }}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="right-value t-fdzl"> </view> -->
|
||||
<view class="right-value bg"> </view>
|
||||
<!-- <view class="value">
|
||||
{{ totalData.income | isNull }}
|
||||
</view>
|
||||
<view class="title">
|
||||
{{ $t("homePage.home.enearnings") }}
|
||||
{{ $t("homePage.home.totalRevenue") }}
|
||||
</view>
|
||||
<view class="bg"> </view>
|
||||
<view class="bg"> </view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="report-detail">
|
||||
<!-- <view class="report-detail">
|
||||
<Section
|
||||
:title="$t('homePage.earning.earningsDetail')"
|
||||
style="margin-bottom: 30rpx"
|
||||
@ -224,7 +247,7 @@
|
||||
{{ $t("homePage.earning.noDisChargeData") }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<u-picker
|
||||
v-model="TimeShow"
|
||||
@ -430,7 +453,7 @@ export default {
|
||||
}
|
||||
|
||||
.power-generation {
|
||||
height: 760rpx;
|
||||
height: 380rpx;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||
margin-left: 30rpx;
|
||||
@ -643,9 +666,6 @@ export default {
|
||||
.left {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx;
|
||||
padding-top: 0rpx;
|
||||
padding-bottom: 0rpx;
|
||||
@ -654,9 +674,8 @@ export default {
|
||||
.power-detail {
|
||||
background-color: rgba(254, 131, 15, 0.05);
|
||||
width: 100%;
|
||||
height: 180rpx;
|
||||
height: 100%;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 22rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@ -685,6 +704,13 @@ export default {
|
||||
right: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.bg {
|
||||
width: 194rpx;
|
||||
height: 188rpx;
|
||||
background-image: url("/static/aidex/images/total-sy.png");
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.t-fdzl {
|
||||
width: 121rpx;
|
||||
height: 119rpx;
|
||||
|
||||
Reference in New Issue
Block a user