mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-27 18:59:26 +08:00
设备统计分析页面表格接口修改
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<div class="treetable" ref="treetable">
|
||||
<a-table
|
||||
bordered
|
||||
|
||||
:loading="loading"
|
||||
:scroll="tableOption.scroll"
|
||||
:columns="columns"
|
||||
|
||||
@@ -73,23 +73,6 @@ export default {
|
||||
},
|
||||
stationId: undefined,
|
||||
renderKey: 0,
|
||||
categoryArr: [
|
||||
{
|
||||
type: 1,
|
||||
label: '储能设备',
|
||||
infoKey: 'energy'
|
||||
},
|
||||
{
|
||||
type: 2,
|
||||
label: '充电设备',
|
||||
infoKey: 'charge'
|
||||
},
|
||||
{
|
||||
type: 3,
|
||||
label: '光伏设备',
|
||||
infoKey: 'pv'
|
||||
}
|
||||
],
|
||||
paramsDate: {},
|
||||
searchOptions: [
|
||||
{
|
||||
@@ -169,61 +152,6 @@ export default {
|
||||
chartDatav: {}
|
||||
},
|
||||
2: {
|
||||
chartOptions: [
|
||||
{
|
||||
title: '发电电量分析',
|
||||
type: 'bar',
|
||||
dataKey: 'sales',
|
||||
infoKeys: [{ key: 'storage_elect_in', label: '日发电电量', lineColor: '#2A82E4' }]
|
||||
},
|
||||
{
|
||||
title: '运行状态分析',
|
||||
type: 'bar',
|
||||
dataKey: 'users',
|
||||
infoKeys: [
|
||||
{ key: 'storage_num_err', label: '日故障次数', lineColor: '#0CDAF5' },
|
||||
{ key: 'key3', label: '日发电时长', lineColor: '#5AABF2' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '今日电压与电流分析',
|
||||
type: 'line',
|
||||
dataKey: 'stock',
|
||||
infoKeys: [
|
||||
{
|
||||
key: 'V',
|
||||
label: '电压',
|
||||
lineColor: '#3F80F2',
|
||||
colorStart: ' rgba(10, 250, 106, 0.15)',
|
||||
colorEnd: ' rgba(171, 255, 249, 0.3)'
|
||||
},
|
||||
{
|
||||
key: 'I',
|
||||
label: '电流',
|
||||
lineColor: '#A9A6FF',
|
||||
colorStart: ' rgba(10, 250, 106, 0.15)',
|
||||
colorEnd: ' rgba(171, 255, 249, 0.3)'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '今日功率分析',
|
||||
type: 'line',
|
||||
dataKey: 'yearly',
|
||||
infoKeys: [
|
||||
{
|
||||
key: 'P',
|
||||
label: '功率',
|
||||
lineColor: '#00FFFB',
|
||||
colorStart: ' rgba(10, 250, 106, 0.15)',
|
||||
colorEnd: ' rgba(171, 255, 249, 0.3)'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
chartData: {}
|
||||
},
|
||||
3: {
|
||||
chartOptions: [
|
||||
{
|
||||
title: '充电分析',
|
||||
@@ -278,6 +206,61 @@ export default {
|
||||
}
|
||||
],
|
||||
chartData: {}
|
||||
},
|
||||
3: {
|
||||
chartOptions: [
|
||||
{
|
||||
title: '发电电量分析',
|
||||
type: 'bar',
|
||||
dataKey: 'sales',
|
||||
infoKeys: [{ key: 'storage_elect_in', label: '日发电电量', lineColor: '#2A82E4' }]
|
||||
},
|
||||
{
|
||||
title: '运行状态分析',
|
||||
type: 'bar',
|
||||
dataKey: 'users',
|
||||
infoKeys: [
|
||||
{ key: 'storage_num_err', label: '日故障次数', lineColor: '#0CDAF5' },
|
||||
{ key: 'key3', label: '日发电时长', lineColor: '#5AABF2' }
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '今日电压与电流分析',
|
||||
type: 'line',
|
||||
dataKey: 'stock',
|
||||
infoKeys: [
|
||||
{
|
||||
key: 'V',
|
||||
label: '电压',
|
||||
lineColor: '#3F80F2',
|
||||
colorStart: ' rgba(10, 250, 106, 0.15)',
|
||||
colorEnd: ' rgba(171, 255, 249, 0.3)'
|
||||
},
|
||||
{
|
||||
key: 'I',
|
||||
label: '电流',
|
||||
lineColor: '#A9A6FF',
|
||||
colorStart: ' rgba(10, 250, 106, 0.15)',
|
||||
colorEnd: ' rgba(171, 255, 249, 0.3)'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '今日功率分析',
|
||||
type: 'line',
|
||||
dataKey: 'yearly',
|
||||
infoKeys: [
|
||||
{
|
||||
key: 'P',
|
||||
label: '功率',
|
||||
lineColor: '#00FFFB',
|
||||
colorStart: ' rgba(10, 250, 106, 0.15)',
|
||||
colorEnd: ' rgba(171, 255, 249, 0.3)'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
chartData: {}
|
||||
}
|
||||
},
|
||||
activeKey: 1,
|
||||
@@ -289,38 +272,17 @@ export default {
|
||||
},
|
||||
|
||||
{
|
||||
key: 3,
|
||||
key: 2,
|
||||
name: '充电设备'
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
key: 3,
|
||||
name: '光伏设备'
|
||||
}
|
||||
],
|
||||
tableList: {
|
||||
1: {
|
||||
columns: [
|
||||
{
|
||||
title: '设备ID',
|
||||
dataIndex: 'ID',
|
||||
key: 'ID',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
dataIndex: 'key2',
|
||||
key: 'key2',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '设备类型',
|
||||
dataIndex: 'key3',
|
||||
key: 'key3',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '充电电量',
|
||||
dataIndex: 'storage_elect_in',
|
||||
@@ -328,24 +290,46 @@ export default {
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '放电电量',
|
||||
dataIndex: 'storage_elect_out',
|
||||
key: 'storage_elect_out',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '充电次数',
|
||||
dataIndex: 'storage_num_in',
|
||||
key: 'storage_num_in',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '放电次数',
|
||||
dataIndex: 'storage_num_out',
|
||||
key: 'storage_num_out',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '充电时长',
|
||||
dataIndex: 'key5',
|
||||
key: 'key5',
|
||||
dataIndex: 'storage_t_in',
|
||||
key: 'storage_t_in',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '放电时长',
|
||||
dataIndex: 'key6',
|
||||
key: 'key6',
|
||||
dataIndex: 'storage_t_out',
|
||||
key: 'storage_t_out',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
|
||||
{
|
||||
title: '放电电量',
|
||||
dataIndex: 'storage_elect_out',
|
||||
key: 'storage_elect_out',
|
||||
title: '利用率',
|
||||
dataIndex: 'storage_usage',
|
||||
key: 'storage_usage',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
@@ -375,44 +359,37 @@ export default {
|
||||
2: {
|
||||
columns: [
|
||||
{
|
||||
title: '设备ID',
|
||||
dataIndex: 'ID',
|
||||
key: 'ID',
|
||||
title: '充电电量',
|
||||
dataIndex: 'charge_elect',
|
||||
key: 'charge_elect',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
dataIndex: 'key2',
|
||||
key: 'key2',
|
||||
title: '充电次数',
|
||||
dataIndex: 'charge_num',
|
||||
key: 'charge_num',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '设备类型',
|
||||
dataIndex: 'key3',
|
||||
key: 'key3',
|
||||
title: '充电时长',
|
||||
dataIndex: 'charge_t',
|
||||
key: 'charge_t',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '发电电量',
|
||||
dataIndex: 'storage_elect_in',
|
||||
key: 'storage_elect_in',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '发电时长',
|
||||
dataIndex: 'key5',
|
||||
key: 'key5',
|
||||
title: '利用率',
|
||||
dataIndex: 'charge_usage',
|
||||
key: 'charge_usage',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '故障次数',
|
||||
dataIndex: 'key6',
|
||||
key: 'key6',
|
||||
dataIndex: 'charge_num_err',
|
||||
key: 'charge_num_err',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
@@ -436,54 +413,41 @@ export default {
|
||||
3: {
|
||||
columns: [
|
||||
{
|
||||
title: '设备ID',
|
||||
dataIndex: 'ID',
|
||||
key: 'ID',
|
||||
title: '发电电量',
|
||||
dataIndex: 'solar_elect_gen',
|
||||
key: 'solar_elect_gen',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '设备名称',
|
||||
dataIndex: 'key2',
|
||||
key: 'key2',
|
||||
title: '入网电量',
|
||||
dataIndex: 'solar_elect_grid',
|
||||
key: 'solar_elect_grid',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '设备类型',
|
||||
dataIndex: 'key3',
|
||||
key: 'key3',
|
||||
title: '发电时长',
|
||||
dataIndex: 'solar_t',
|
||||
key: 'solar_t',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '充电电量',
|
||||
dataIndex: 'storage_elect_in',
|
||||
key: 'storage_elect_in',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '充电时长',
|
||||
dataIndex: 'key5',
|
||||
key: 'key5',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '充电次数',
|
||||
dataIndex: 'key6',
|
||||
key: 'key6',
|
||||
title: '利用率',
|
||||
dataIndex: 'solar_usage',
|
||||
key: 'solar_usage',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: '故障次数',
|
||||
dataIndex: 'key6',
|
||||
key: 'key6',
|
||||
dataIndex: 'solar_num_err',
|
||||
key: 'solar_num_err',
|
||||
width: 120,
|
||||
ellipsis: true
|
||||
},
|
||||
|
||||
{
|
||||
title: '日期',
|
||||
dataIndex: 'dt',
|
||||
@@ -492,6 +456,7 @@ export default {
|
||||
ellipsis: true
|
||||
}
|
||||
],
|
||||
|
||||
geturl: '',
|
||||
tableData: [],
|
||||
pageOption: {
|
||||
@@ -512,13 +477,15 @@ export default {
|
||||
this.resetDataForInactiveKey()
|
||||
|
||||
// 并行加载新数据
|
||||
Promise.all([this.getStationList(),this.getEchartsListForActiveKey(), this.getTableListForActiveKey()]).then(
|
||||
() => {
|
||||
Promise.all([
|
||||
this.getStationList(),
|
||||
this.getEchartsListForActiveKey(),
|
||||
this.getTableListForActiveKey()
|
||||
]).then(() => {
|
||||
this.$nextTick(() => {
|
||||
this.getStatCharts()
|
||||
})
|
||||
}
|
||||
)
|
||||
})
|
||||
},
|
||||
immediate: true // 添加立即执行
|
||||
}
|
||||
@@ -593,7 +560,7 @@ export default {
|
||||
}
|
||||
|
||||
try {
|
||||
const res = await getReq('/queryStatDayList', query)
|
||||
const res = await getReq('/queryStatDetailList', query)
|
||||
if (res.errcode === 0) {
|
||||
this.tableList[this.activeKey].tableData = res.data.list || res.data
|
||||
this.tableList[this.activeKey].pageOption.count = res.data.count || 0
|
||||
@@ -660,7 +627,6 @@ export default {
|
||||
this.getStatCharts()
|
||||
},
|
||||
|
||||
|
||||
async getStatCharts() {
|
||||
const currentInfo = this.echartsInfo[this.activeKey]
|
||||
const query = {
|
||||
@@ -684,8 +650,6 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user