任务清单;法规清单 表格排序问题
This commit is contained in:
@@ -109,6 +109,7 @@
|
|||||||
:scroll="{x: true,y:'calc(100vh - 335px)'}"
|
:scroll="{x: true,y:'calc(100vh - 335px)'}"
|
||||||
:data-source="dataSource"
|
:data-source="dataSource"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
@change="tableOnChange"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
>
|
>
|
||||||
@@ -255,12 +256,14 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'standard',
|
dataIndex: 'standard',
|
||||||
width: 202,
|
width: 202,
|
||||||
|
sorter:true,
|
||||||
scopedSlots: { customRender: 'standardInformation' }
|
scopedSlots: { customRender: 'standardInformation' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('areaOfResponsibility'),
|
title: this.$t('areaOfResponsibility'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 180,
|
width: 180,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'areaOfResponsibility',
|
dataIndex: 'areaOfResponsibility',
|
||||||
scopedSlots: { customRender: 'areaOfResponsibility' }
|
scopedSlots: { customRender: 'areaOfResponsibility' }
|
||||||
},
|
},
|
||||||
@@ -268,6 +271,7 @@
|
|||||||
title: this.$t('confirmationOfDesignConformity'),
|
title: this.$t('confirmationOfDesignConformity'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 240,
|
width: 240,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'confirmationOfDesignConformity',
|
dataIndex: 'confirmationOfDesignConformity',
|
||||||
scopedSlots: { customRender: 'confirmationOfDesignConformity' }
|
scopedSlots: { customRender: 'confirmationOfDesignConformity' }
|
||||||
},
|
},
|
||||||
@@ -275,6 +279,7 @@
|
|||||||
title: this.$t('PrehomoConfirmation'),
|
title: this.$t('PrehomoConfirmation'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 240,
|
width: 240,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'PrehomoConfirmation',
|
dataIndex: 'PrehomoConfirmation',
|
||||||
scopedSlots: { customRender: 'PrehomoConfirmation' }
|
scopedSlots: { customRender: 'PrehomoConfirmation' }
|
||||||
},
|
},
|
||||||
@@ -282,6 +287,7 @@
|
|||||||
title: this.$t('verificationAndConformityconfirmation'),
|
title: this.$t('verificationAndConformityconfirmation'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 240,
|
width: 240,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'verificationAndConformityconfirmation',
|
dataIndex: 'verificationAndConformityconfirmation',
|
||||||
scopedSlots: { customRender: 'verificationAndConformityconfirmation' }
|
scopedSlots: { customRender: 'verificationAndConformityconfirmation' }
|
||||||
},
|
},
|
||||||
@@ -289,6 +295,7 @@
|
|||||||
title: this.$t('CertificationProgress'),
|
title: this.$t('CertificationProgress'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'CertificationProgress',
|
dataIndex: 'CertificationProgress',
|
||||||
scopedSlots: { customRender: 'CertificationProgress' }
|
scopedSlots: { customRender: 'CertificationProgress' }
|
||||||
},
|
},
|
||||||
@@ -296,11 +303,14 @@
|
|||||||
title: this.$t('CurrentStatus'),
|
title: this.$t('CurrentStatus'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150,
|
width: 150,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'CurrentProjectStatusEvaluation',
|
dataIndex: 'CurrentProjectStatusEvaluation',
|
||||||
scopedSlots: { customRender: 'CurrentProjectStatusEvaluation' }
|
scopedSlots: { customRender: 'CurrentProjectStatusEvaluation' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
|
orderBy: '1',
|
||||||
|
orderByField: '',
|
||||||
|
|
||||||
status: {
|
status: {
|
||||||
'NotDone': '待办',
|
'NotDone': '待办',
|
||||||
@@ -535,7 +545,11 @@
|
|||||||
CertificationDirectory() {
|
CertificationDirectory() {
|
||||||
this.$refs.certificationDirectoryRef.addModel()
|
this.$refs.certificationDirectoryRef.addModel()
|
||||||
},
|
},
|
||||||
|
tableOnChange(pagination, filters, sorter) {
|
||||||
|
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
|
||||||
|
this.orderByField = sorter.columnKey
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
getList() {
|
getList() {
|
||||||
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
|
||||||
Object.keys(queryParam).forEach(val => {
|
Object.keys(queryParam).forEach(val => {
|
||||||
@@ -548,6 +562,8 @@
|
|||||||
}
|
}
|
||||||
let query = {
|
let query = {
|
||||||
projectLibraryId: this.$route.query.id,
|
projectLibraryId: this.$route.query.id,
|
||||||
|
orderBy: this.orderBy,
|
||||||
|
orderByField: this.orderByField,
|
||||||
...queryParam
|
...queryParam
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
@@ -208,6 +208,7 @@
|
|||||||
:scroll="{x: '100%',y:'calc(100vh - 356px)'}"
|
:scroll="{x: '100%',y:'calc(100vh - 356px)'}"
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:data-source="dataSource"
|
:data-source="dataSource"
|
||||||
|
@change="tableOnChange"
|
||||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
>
|
>
|
||||||
@@ -488,6 +489,8 @@
|
|||||||
return {
|
return {
|
||||||
roleSwitchingList: [],
|
roleSwitchingList: [],
|
||||||
listTitle: '',
|
listTitle: '',
|
||||||
|
orderBy: '1',
|
||||||
|
orderByField: '',
|
||||||
columnsAll: [
|
columnsAll: [
|
||||||
{
|
{
|
||||||
title: this.$t('standard'),
|
title: this.$t('standard'),
|
||||||
@@ -495,6 +498,7 @@
|
|||||||
dataIndex: 'serialNumber',
|
dataIndex: 'serialNumber',
|
||||||
width: 180,
|
width: 180,
|
||||||
fixed: 'left',
|
fixed: 'left',
|
||||||
|
sorter:true,
|
||||||
scopedSlots: { customRender: 'standard' }
|
scopedSlots: { customRender: 'standard' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -517,11 +521,13 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'inventoryAffirmStatusName',
|
dataIndex: 'inventoryAffirmStatusName',
|
||||||
width: 240,
|
width: 240,
|
||||||
|
sorter:true,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('taskAffirmStatus'),
|
title: this.$t('taskAffirmStatus'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'taskAffirmStatusName',
|
dataIndex: 'taskAffirmStatusName',
|
||||||
width: 240,
|
width: 240,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
@@ -578,6 +584,7 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'attestationRank_dictText',
|
dataIndex: 'attestationRank_dictText',
|
||||||
width: 180,
|
width: 180,
|
||||||
|
sorter:true,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -592,12 +599,14 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'wvtaId',
|
dataIndex: 'wvtaId',
|
||||||
width: 180,
|
width: 180,
|
||||||
|
sorter:true,
|
||||||
ellipsis: true
|
ellipsis: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('areaOfResponsibility'),
|
title: this.$t('areaOfResponsibility'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'dutyTerritory_dictText',
|
dataIndex: 'dutyTerritory_dictText',
|
||||||
width: 180
|
width: 180
|
||||||
},
|
},
|
||||||
@@ -605,6 +614,7 @@
|
|||||||
title: this.$t('regulatoryEngineer'),
|
title: this.$t('regulatoryEngineer'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'regulationOwnerName',
|
dataIndex: 'regulationOwnerName',
|
||||||
width: 180
|
width: 180
|
||||||
},
|
},
|
||||||
@@ -612,6 +622,7 @@
|
|||||||
title: this.$t('certifiedEngineer'),
|
title: this.$t('certifiedEngineer'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'homologationEngineerName',
|
dataIndex: 'homologationEngineerName',
|
||||||
width: 180
|
width: 180
|
||||||
},
|
},
|
||||||
@@ -619,6 +630,7 @@
|
|||||||
title: this.$t('engineeringInterfacePerson'),
|
title: this.$t('engineeringInterfacePerson'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
sorter:true,
|
||||||
dataIndex: 'engineeringInterfacePersonName',
|
dataIndex: 'engineeringInterfacePersonName',
|
||||||
width: 180
|
width: 180
|
||||||
},
|
},
|
||||||
@@ -1495,6 +1507,15 @@
|
|||||||
this.queryParamQuery = sqp
|
this.queryParamQuery = sqp
|
||||||
this.getList()
|
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() {
|
getList() {
|
||||||
let roleCode
|
let roleCode
|
||||||
if (this.isDisplay) {
|
if (this.isDisplay) {
|
||||||
@@ -1520,6 +1541,8 @@
|
|||||||
...this.queryParamQuery,
|
...this.queryParamQuery,
|
||||||
...queryParam,
|
...queryParam,
|
||||||
projectLibraryId: this.$route.query.id,
|
projectLibraryId: this.$route.query.id,
|
||||||
|
orderBy: this.orderBy,
|
||||||
|
orderByField: this.orderByField,
|
||||||
roleCode: roleCode
|
roleCode: roleCode
|
||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
|||||||
Reference in New Issue
Block a user