修改优化
This commit is contained in:
@@ -3,15 +3,15 @@
|
||||
<a-table
|
||||
:columns="column"
|
||||
:data-source="data"
|
||||
:bordered="false"
|
||||
:bordered="true"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 2000, y: 480 }">
|
||||
<template #title>
|
||||
<a-date-picker
|
||||
v-model:value="selectYear"
|
||||
picker="year"
|
||||
@change="changeYearData"
|
||||
valueFormat="YYYY" />
|
||||
<a-date-picker v-model:value="selectYear" picker="year" valueFormat="YYYY" />
|
||||
<span style="margin-left: 30px">
|
||||
<a-button type="primary" @click="changeYearData">查询</a-button>
|
||||
<a-button type="primary" ghost style="margin-left: 6px" @click="reset">重置</a-button>
|
||||
</span>
|
||||
</template>
|
||||
</a-table>
|
||||
<a-pagination
|
||||
@@ -57,11 +57,17 @@
|
||||
queryParams.value.year = selectYear.value;
|
||||
getTableList();
|
||||
};
|
||||
const reset = () => {
|
||||
selectYear.value = dayjs(new Date().getFullYear().toString());
|
||||
queryParams.value.year = selectYear.value.format('YYYY');
|
||||
getTableList();
|
||||
};
|
||||
// 表头
|
||||
const column: TableColumnsType[] = [
|
||||
{
|
||||
title: '排放类型',
|
||||
dataIndex: 'cnValue',
|
||||
width: 130,
|
||||
customCell: (record, rowIndex) => {
|
||||
if (rowIndex == undefined) {
|
||||
return {
|
||||
@@ -84,66 +90,82 @@
|
||||
{
|
||||
title: '能源种类',
|
||||
dataIndex: 'energyType',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '计量单位',
|
||||
dataIndex: 'unitName',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '加权平均',
|
||||
dataIndex: 'averageFactorValue',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '全年',
|
||||
dataIndex: 'carbonYearly',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '1月',
|
||||
dataIndex: 'jan',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '2月',
|
||||
dataIndex: 'feb',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '3月',
|
||||
dataIndex: 'mar',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '4月',
|
||||
dataIndex: 'apr',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '5月',
|
||||
dataIndex: 'may',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '6月',
|
||||
dataIndex: 'jun',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '7月',
|
||||
dataIndex: 'jul',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '8月',
|
||||
dataIndex: 'aug',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '9月',
|
||||
dataIndex: 'sep',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '10月',
|
||||
dataIndex: 'oct',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '11月',
|
||||
dataIndex: 'nov',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '12月',
|
||||
dataIndex: 'dec',
|
||||
width: 80,
|
||||
},
|
||||
];
|
||||
// 合并单元格
|
||||
@@ -189,9 +211,12 @@
|
||||
:deep(.ant-table-container) {
|
||||
padding: 0px 16px;
|
||||
}
|
||||
:deep(.ant-table-cell) {
|
||||
border: 1px solid #f0f0f0;
|
||||
}
|
||||
// :deep(.ant-table-cell) {
|
||||
// border: 1px solid #f0f0f0;
|
||||
// }
|
||||
// :deep(.ant-table-cell::before) {
|
||||
// display: none;
|
||||
// }
|
||||
</style>
|
||||
<style scoped>
|
||||
th.column-money,
|
||||
|
Reference in New Issue
Block a user