监控中心 - 能耗监测 表格字段居中

This commit is contained in:
fks-yangshouda
2024-08-13 17:19:53 +08:00
parent 3d9cf0d94c
commit 7799bac74a
2 changed files with 15 additions and 1 deletions

View File

@@ -36,53 +36,65 @@
{
title: '设备/节点',
dataIndex: 'name',
align: 'center',
},
{
title: '统计值',
dataIndex: 'value',
align: 'center',
},
{
title: '同比',
align: 'center',
children: [
{
title: '△差值',
dataIndex: 'yoyDiff',
align: 'center',
},
{
title: '增长率',
dataIndex: 'yoyRate',
align: 'center',
},
],
},
{
title: '环比',
align: 'center',
children: [
{
title: '△差值',
dataIndex: 'momDiff',
align: 'center',
},
{
title: '增长率',
dataIndex: 'momRate',
align: 'center',
},
],
},
{
title: '纵向对比',
align: 'center',
children: [
{
title: '△差值',
dataIndex: 'zongxiangDiff',
align: 'center',
},
{
title: '增长率',
dataIndex: 'zongxiangRate',
align: 'center',
},
],
},
{
title: '操作',
align: 'center',
// dataIndex: 'date',
},
];

View File

@@ -89,6 +89,7 @@
{
title: '设备/组名',
dataIndex: 'name',
align: 'center',
customCell: (record, rowIndex) => {
if (rowIndex == undefined) {
return {
@@ -110,6 +111,7 @@
},
{
title: '参数名称',
align: 'center',
dataIndex: 'selectedValueName',
customCell: (record, rowIndex) => {
if (rowIndex == undefined) {
@@ -144,7 +146,7 @@
let columnA: any[] = [...column];
let columnB: any[] = [];
pageData.graphTableColumns.forEach((item) => {
columnB.push({ title: item, dataIndex: item });
columnB.push({ title: item, dataIndex: item, align: 'center' });
});
columnA.push(...columnB);
columns.value = columnA;