mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
统计分析接口联调
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {processData} from '@/utils/dealWithData'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
props: {
|
||||
@@ -18,14 +20,14 @@ export default {
|
||||
curList: [
|
||||
{
|
||||
name: '日充电电量',
|
||||
key: 'key1',
|
||||
key: 'storage_elect_in',
|
||||
lineColor: '#9BD801',
|
||||
value: 0,
|
||||
d: 'kW·h'
|
||||
},
|
||||
{
|
||||
name: '日放电电量',
|
||||
key: 'key2',
|
||||
key: 'storage_elect_out',
|
||||
lineColor: '#3DFEFA',
|
||||
value: 0,
|
||||
d: 'kW·h'
|
||||
@@ -66,25 +68,11 @@ export default {
|
||||
this.disChargeChart.resize()
|
||||
}
|
||||
},
|
||||
processData(data, keys) {
|
||||
data.sort((a, b) => {
|
||||
return new Date(a.date) - new Date(b.date)
|
||||
})
|
||||
const dates = data.map((item) => item.dt)
|
||||
const values = []
|
||||
keys.forEach((item, index) => {
|
||||
values[index] = data.map((dataValue) => dataValue[keys[index]])
|
||||
})
|
||||
|
||||
return {
|
||||
dates,
|
||||
values
|
||||
}
|
||||
},
|
||||
getDisChargeData() {
|
||||
const arr = this.curList
|
||||
const keyList = this.curList.map((item) => item.key)
|
||||
const result = this.processData(this.propsInfo, keyList)
|
||||
const result = processData(this.propsInfo, keyList)
|
||||
|
||||
this.disChargeChartData.xdata = result.dates
|
||||
arr.forEach((item, index) => {
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {processData} from '@/utils/dealWithData'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
props: {
|
||||
@@ -19,7 +21,7 @@ export default {
|
||||
curList: [
|
||||
{
|
||||
name: '日收益',
|
||||
key: 'key1',
|
||||
key: 'incomeTotal',
|
||||
lineColor: '#00BBA3',
|
||||
colorStart: ' rgba(10, 250, 106, 0.15)',
|
||||
colorEnd: ' rgba(171, 255, 249, 0.3)',
|
||||
@@ -64,26 +66,11 @@ export default {
|
||||
this.revenueChart.resize()
|
||||
}
|
||||
},
|
||||
processData(data, keys) {
|
||||
data.sort((a, b) => {
|
||||
return new Date(a.date) - new Date(b.date)
|
||||
})
|
||||
const dates = data.map((item) => item.dt)
|
||||
const values=[]
|
||||
keys.forEach((item,index)=>{
|
||||
|
||||
values[index]= data.map((dataValue)=>dataValue[keys[index]])
|
||||
})
|
||||
|
||||
return {
|
||||
dates,
|
||||
values,
|
||||
}
|
||||
},
|
||||
|
||||
getRevenueData() {
|
||||
const arr=this.curList
|
||||
const keyList=this.curList.map((item)=>item.key)
|
||||
const result = this.processData(this.propsInfo, keyList)
|
||||
const result = processData(this.propsInfo, keyList)
|
||||
|
||||
this.RevenueChartData.xdata = result.dates
|
||||
arr.forEach((item, index) => {
|
||||
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
return {
|
||||
list: [
|
||||
{
|
||||
key: 'tianshu',
|
||||
key: 'runDays',
|
||||
value: 26,
|
||||
d: '天',
|
||||
label: '场站运行天数',
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
iconPath: require('@/assets/home/wendu.png')
|
||||
},
|
||||
{
|
||||
key: 'shouyi',
|
||||
key: 'storage_elect_in',
|
||||
value: 25,
|
||||
d: 'Kw·h',
|
||||
label: '储能充电量',
|
||||
@@ -45,7 +45,7 @@ export default {
|
||||
iconPath: require('@/assets/home/shidu.png')
|
||||
},
|
||||
{
|
||||
key: 'shuliang',
|
||||
key: 'storage_elect_out',
|
||||
value: 24,
|
||||
d: 'Kw·h',
|
||||
label: '储能放电量',
|
||||
@@ -53,15 +53,15 @@ export default {
|
||||
iconPath: require('@/assets/home/dianya.png')
|
||||
},
|
||||
{
|
||||
key: 'shuliang',
|
||||
key: 'incomeTotal',
|
||||
value: 26,
|
||||
d: '万元',
|
||||
d: '元',
|
||||
label: '场站累计收益',
|
||||
class: 'item-4',
|
||||
iconPath: require('@/assets/home/dianliu.png')
|
||||
},
|
||||
{
|
||||
key: 'fadianliang',
|
||||
key: 'usage_rate',
|
||||
value: 20,
|
||||
d: '%',
|
||||
label: '设备利用率',
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {processData} from '@/utils/dealWithData'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
props: {
|
||||
@@ -18,9 +20,8 @@ export default {
|
||||
curList: [
|
||||
{
|
||||
name: '日设备利用率',
|
||||
key: 'key1',
|
||||
key: 'usage_rate',
|
||||
lineColor: '#F69B52',
|
||||
|
||||
value: 0,
|
||||
d: 'kW·h'
|
||||
}
|
||||
@@ -60,25 +61,11 @@ export default {
|
||||
this.utilizationChart.resize()
|
||||
}
|
||||
},
|
||||
processData(data, keys) {
|
||||
data.sort((a, b) => {
|
||||
return new Date(a.date) - new Date(b.date)
|
||||
})
|
||||
const dates = data.map((item) => item.dt)
|
||||
const values = []
|
||||
keys.forEach((item, index) => {
|
||||
values[index] = data.map((dataValue) => dataValue[keys[index]])
|
||||
})
|
||||
|
||||
return {
|
||||
dates,
|
||||
values
|
||||
}
|
||||
},
|
||||
getUtilizationData() {
|
||||
const arr = this.curList
|
||||
const keyList = this.curList.map((item) => item.key)
|
||||
const result = this.processData(this.propsInfo, keyList)
|
||||
const result = processData(this.propsInfo, keyList)
|
||||
|
||||
this.utilizationChartData.xdata = result.dates
|
||||
arr.forEach((item, index) => {
|
||||
|
||||
Reference in New Issue
Block a user