任务清单;法规清单 表格排序问题
This commit is contained in:
@@ -208,6 +208,7 @@
|
||||
:scroll="{x: '100%',y:'calc(100vh - 356px)'}"
|
||||
rowKey="id"
|
||||
:data-source="dataSource"
|
||||
@change="tableOnChange"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:columns="columns"
|
||||
>
|
||||
@@ -488,6 +489,8 @@
|
||||
return {
|
||||
roleSwitchingList: [],
|
||||
listTitle: '',
|
||||
orderBy: '1',
|
||||
orderByField: '',
|
||||
columnsAll: [
|
||||
{
|
||||
title: this.$t('standard'),
|
||||
@@ -495,6 +498,7 @@
|
||||
dataIndex: 'serialNumber',
|
||||
width: 180,
|
||||
fixed: 'left',
|
||||
sorter:true,
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{
|
||||
@@ -517,11 +521,13 @@
|
||||
align: 'center',
|
||||
dataIndex: 'inventoryAffirmStatusName',
|
||||
width: 240,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('taskAffirmStatus'),
|
||||
align: 'center',
|
||||
sorter:true,
|
||||
dataIndex: 'taskAffirmStatusName',
|
||||
width: 240,
|
||||
ellipsis: true
|
||||
@@ -578,6 +584,7 @@
|
||||
align: 'center',
|
||||
dataIndex: 'attestationRank_dictText',
|
||||
width: 180,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
@@ -592,12 +599,14 @@
|
||||
align: 'center',
|
||||
dataIndex: 'wvtaId',
|
||||
width: 180,
|
||||
sorter:true,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
title: this.$t('areaOfResponsibility'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
dataIndex: 'dutyTerritory_dictText',
|
||||
width: 180
|
||||
},
|
||||
@@ -605,6 +614,7 @@
|
||||
title: this.$t('regulatoryEngineer'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
dataIndex: 'regulationOwnerName',
|
||||
width: 180
|
||||
},
|
||||
@@ -612,6 +622,7 @@
|
||||
title: this.$t('certifiedEngineer'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
dataIndex: 'homologationEngineerName',
|
||||
width: 180
|
||||
},
|
||||
@@ -619,6 +630,7 @@
|
||||
title: this.$t('engineeringInterfacePerson'),
|
||||
align: 'center',
|
||||
ellipsis: true,
|
||||
sorter:true,
|
||||
dataIndex: 'engineeringInterfacePersonName',
|
||||
width: 180
|
||||
},
|
||||
@@ -1495,6 +1507,15 @@
|
||||
this.queryParamQuery = sqp
|
||||
this.getList()
|
||||
},
|
||||
tableOnChange(pagination, filters, sorter) {
|
||||
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||
if(sorter.columnKey == 'attestationRank_dictText'){
|
||||
this.orderByField = 'attestationRank'
|
||||
} else{
|
||||
this.orderByField = sorter.columnKey
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
let roleCode
|
||||
if (this.isDisplay) {
|
||||
@@ -1520,6 +1541,8 @@
|
||||
...this.queryParamQuery,
|
||||
...queryParam,
|
||||
projectLibraryId: this.$route.query.id,
|
||||
orderBy: this.orderBy,
|
||||
orderByField: this.orderByField,
|
||||
roleCode: roleCode
|
||||
}
|
||||
this.loading = true
|
||||
|
||||
Reference in New Issue
Block a user