根据文档优化
This commit is contained in:
@@ -50,7 +50,12 @@
|
||||
</div>
|
||||
<div style="display: flex; margin-top: 20px; height: calc(85% - 20px)">
|
||||
<div class="detailTable">
|
||||
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" :scroll="{ x: 1280 }">
|
||||
<ns-view-list-table
|
||||
class="content-table"
|
||||
v-bind="tableConfig"
|
||||
:model="data"
|
||||
ref="mainRef"
|
||||
:scroll="{ x: 1280 }">
|
||||
<template #bodyCell="{ column, text, record }">
|
||||
<template v-if="column.dataIndex === 'accountType'">
|
||||
<span v-if="record.accountType">{{ record.accountType.label }}</span>
|
||||
@@ -76,9 +81,6 @@
|
||||
<a-table :columns="totalColumns" :data-source="totalData" bordered :pagination="false">
|
||||
<template #bodyCell="{ column, text }">
|
||||
<span>{{ text || '-' }}</span>
|
||||
<!-- <template v-if="column.dataIndex === 'name'">
|
||||
<a>{{ text }}</a>
|
||||
</template> -->
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -209,6 +211,7 @@
|
||||
transactionTypeValue.value = selectedOptions.flatMap((group) =>
|
||||
group.flatMap((node) => [node.value, ...(node.children?.map((child) => child.value) || [])]),
|
||||
);
|
||||
// transactionTypeValue.value = value.flat()
|
||||
};
|
||||
const searchTableList = () => {
|
||||
year.value = queryParams.value.year;
|
||||
@@ -481,50 +484,77 @@
|
||||
title: '资产类别',
|
||||
dataIndex: 'accountType',
|
||||
width: 100,
|
||||
customRender: (text: any) => {
|
||||
return text.text !== undefined ? text : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '交易方式',
|
||||
dataIndex: 'transactionTypeName',
|
||||
width: 100,
|
||||
customRender: (text: any) => {
|
||||
return text.text !== undefined ? text : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '交易日期',
|
||||
dataIndex: 'transactionDate',
|
||||
width: 100,
|
||||
sorter: (a, b) => a.transactionDate - b.transactionDate,
|
||||
customRender: (text: any) => {
|
||||
return text.text !== undefined ? text : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '本期收入(tCO2)',
|
||||
dataIndex: 'income',
|
||||
width: 150,
|
||||
sorter: (a, b) => a.income - b.income,
|
||||
customRender: (text: any) => {
|
||||
return text.text !== undefined ? text : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '本期支出(tCO2)',
|
||||
dataIndex: 'expenditure',
|
||||
width: 150,
|
||||
sorter: (a, b) => a.expenditure - b.expenditure,
|
||||
customRender: (text: any) => {
|
||||
return text.text !== undefined ? text : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '发生金额(¥)',
|
||||
width: 150,
|
||||
dataIndex: 'amountIncurredValue',
|
||||
customRender: (text: any) => {
|
||||
return text.text !== undefined ? text : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '交易对象',
|
||||
width: 100,
|
||||
dataIndex: 'tradingPartner',
|
||||
customRender: (text: any) => {
|
||||
return text.text !== '' ? text : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '更新人',
|
||||
width: 100,
|
||||
dataIndex: 'updateUser',
|
||||
customRender: (text: any) => {
|
||||
return text.text !== undefined ? text : '-';
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
width: 150,
|
||||
ellipsis: true,
|
||||
dataIndex: 'updateTime',
|
||||
customRender: (text: any) => {
|
||||
return text.text !== undefined ? text : '-';
|
||||
},
|
||||
},
|
||||
],
|
||||
columnActions: {
|
||||
|
||||
Reference in New Issue
Block a user