给报表列增加左右拉动的功能

This commit is contained in:
季圣华
2023-03-07 00:19:20 +08:00
parent 9139aaf555
commit a84b9e8c12
13 changed files with 180 additions and 163 deletions

View File

@@ -41,6 +41,7 @@
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:components="handleDrag(columns)"
:pagination="false"
:scroll="scroll"
:loading="loading"
@@ -112,19 +113,19 @@
// 表头
columns: [
{
title: '#', dataIndex: 'rowIndex', width:60, align:"center", fixed: 'left',
title: '#', dataIndex: 'rowIndex', width:60, align:"center",
customRender:function (t,r,index) {
return (t !== '合计') ? (parseInt(index) + 1) : t
}
},
{ title: '账户流水', dataIndex: 'action', align:"center", width: 200, fixed: 'left',
{ title: '账户流水', dataIndex: 'action', align:"center", width: 120,
scopedSlots: { customRender: 'action' }
},
{ title: '名称', dataIndex: 'name', width: 200, fixed: 'left'},
{ title: '编号', dataIndex: 'serialNo'},
{ title: '期初金额', dataIndex: 'initialAmount', sorter: (a, b) => a.initialAmount - b.initialAmount},
{ title: '本月发生额', dataIndex: 'thisMonthAmount', sorter: (a, b) => a.thisMonthAmount - b.thisMonthAmount},
{ title: '当前余额', dataIndex: 'currentAmount', sorter: (a, b) => a.currentAmount - b.currentAmount}
{ title: '名称', dataIndex: 'name', width: 150},
{ title: '编号', dataIndex: 'serialNo', width: 150},
{ title: '期初金额', dataIndex: 'initialAmount', sorter: (a, b) => a.initialAmount - b.initialAmount, width: 100},
{ title: '本月发生额', dataIndex: 'thisMonthAmount', sorter: (a, b) => a.thisMonthAmount - b.thisMonthAmount, width: 100},
{ title: '当前余额', dataIndex: 'currentAmount', sorter: (a, b) => a.currentAmount - b.currentAmount, width: 100}
],
url: {
list: "/account/list",