对碳排管理进行优化
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="height: 100%">
|
||||
<a-table
|
||||
v-if="data && data.length > 0"
|
||||
:columns="column"
|
||||
:data-source="data"
|
||||
:bordered="true"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1700, y: 480 }">
|
||||
:scroll="{ x: 1700 }">
|
||||
<template #title>
|
||||
<a-date-picker
|
||||
v-model:value="selectYear"
|
||||
@@ -17,10 +18,28 @@
|
||||
<a-button type="primary" style="margin-left: 6px" @click="clickSelect">搜索</a-button>
|
||||
</span>
|
||||
</template>
|
||||
<template #bodyCell="{ column, text }">
|
||||
<span>{{ text || '-' }}</span>
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'averageFactorValue'">
|
||||
<span v-if="record.averageFactorValue !== undefined">
|
||||
{{ record.averageFactorValue + record.measurement + '/' + record.unitName }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ '-' }}
|
||||
</span>
|
||||
</template>
|
||||
<span v-else>{{ text || '-' }}</span>
|
||||
</template>
|
||||
</a-table>
|
||||
<a-empty
|
||||
v-else
|
||||
style="
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
" />
|
||||
<!-- <a-pagination
|
||||
:current="queryParams.pageNum"
|
||||
:total="total"
|
||||
@@ -77,6 +96,7 @@
|
||||
title: '排放类型',
|
||||
dataIndex: 'cnValue',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
customCell: (record, rowIndex) => {
|
||||
if (rowIndex == undefined) {
|
||||
return {
|
||||
@@ -100,81 +120,97 @@
|
||||
title: '能源种类',
|
||||
dataIndex: 'energyType',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '计量单位',
|
||||
dataIndex: 'unitName',
|
||||
dataIndex: 'measurement',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '加权平均',
|
||||
dataIndex: 'averageFactorValue',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '全年',
|
||||
dataIndex: 'carbonYearly',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '1月',
|
||||
dataIndex: 'jan',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '2月',
|
||||
dataIndex: 'feb',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '3月',
|
||||
dataIndex: 'mar',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '4月',
|
||||
dataIndex: 'apr',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '5月',
|
||||
dataIndex: 'may',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '6月',
|
||||
dataIndex: 'jun',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '7月',
|
||||
dataIndex: 'jul',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '8月',
|
||||
dataIndex: 'aug',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '9月',
|
||||
dataIndex: 'sep',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '10月',
|
||||
dataIndex: 'oct',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '11月',
|
||||
dataIndex: 'nov',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '12月',
|
||||
dataIndex: 'dece',
|
||||
width: 100,
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
// 合并单元格
|
||||
@@ -220,6 +256,10 @@
|
||||
:deep(.ant-table-container) {
|
||||
margin: 0px 16px;
|
||||
}
|
||||
:deep(.ant-table-container) {
|
||||
height: 64vh;
|
||||
overflow: auto;
|
||||
}
|
||||
// :deep(.ant-table-cell) {
|
||||
// border: 1px solid #f0f0f0;
|
||||
// }
|
||||
|
Reference in New Issue
Block a user