参数模板管理;未符合项;参数导出模板管理 表格排序问题

This commit is contained in:
zyx.net
2022-12-23 10:59:20 +08:00
parent 4f8f1626b6
commit 8c0b7bf0c0
4 changed files with 60 additions and 0 deletions
@@ -56,6 +56,7 @@
:pagination="false"
:scroll="{x: '100%'}"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="tableOnChange"
:data-source="dataSource"
:columns="columns"
>
@@ -91,6 +92,8 @@
return {
queryParam: {},
loading: false,
orderBy: '1',
orderByField: '',
dataSource: [],
selectedRowKeys: [],
columns: [
@@ -100,6 +103,7 @@
dataIndex: 'serialNumber',
scopedSlots: { customRender: 'standard' },
ellipsis: true,
sorter:true,
width: 180
},
{
@@ -115,6 +119,7 @@
align: 'center',
dataIndex: 'flowType',
ellipsis: true,
sorter:true,
width: 180
},
{
@@ -122,6 +127,7 @@
align: 'center',
dataIndex: 'dutyTerritory',
ellipsis: true,
sorter:true,
width: 180
},
{
@@ -129,6 +135,7 @@
align: 'center',
dataIndex: 'problemType',
ellipsis: true,
sorter:true,
width: 180
},
{
@@ -136,6 +143,7 @@
align: 'center',
dataIndex: 'initiator',
ellipsis: true,
sorter:true,
width: 140
},
{
@@ -143,6 +151,7 @@
align: 'center',
dataIndex: 'duty',
ellipsis: true,
sorter:true,
width: 140
}
],
@@ -218,11 +227,18 @@
}
downloadFilePost(this.url.exportData, this.$t('NonConformance') + '.xls', query, this.Deselect)
},
tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.getList()
},
getList() {
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
projectLibraryId: this.$route.query.id,
orderBy: this.orderBy,
orderByField: this.orderByField,
...this.queryParam
}
this.loading = true