任务清单;法规清单;认证参数列表 表格排序问题

This commit is contained in:
zyx.net
2022-12-22 10:18:43 +08:00
parent 82eedb474b
commit 41a066f7b6
2 changed files with 39 additions and 4 deletions
@@ -547,7 +547,23 @@
}, },
tableOnChange(pagination, filters, sorter) { tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2' this.orderBy = sorter.order == 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey if(sorter.columnKey == 'standard'){
this.orderByField = 'serialNumber'
} else if(sorter.columnKey == 'areaOfResponsibility') {
this.orderByField = 'dutyTerritory'
} else if(sorter.columnKey == 'confirmationOfDesignConformity') {
this.orderByField = 'designFlowTaskStatus'
} else if(sorter.columnKey == 'PrehomoConfirmation') {
this.orderByField = 'prehomoFlowTaskStatus'
} else if(sorter.columnKey == 'verificationAndConformityconfirmation') {
this.orderByField = 'verifyFlowTaskStatus'
} else if(sorter.columnKey == 'CertificationProgress') {
this.orderByField = 'certificationProgressName'
} else if(sorter.columnKey == 'CurrentProjectStatusEvaluation') {
this.orderByField = 'projectStatusAssess'
} else{
this.orderByField = sorter.columnKey
}
this.getList() this.getList()
}, },
getList() { getList() {
@@ -163,6 +163,7 @@
align: 'center', align: 'center',
width: 80, width: 80,
ellipsis: true, ellipsis: true,
sorter:true,
dataIndex: 'state' dataIndex: 'state'
}, },
{ {
@@ -177,6 +178,7 @@
align: 'center', align: 'center',
width: 120, width: 120,
ellipsis: true, ellipsis: true,
sorter:true,
dataIndex: 'projectVersion' dataIndex: 'projectVersion'
}, },
{ {
@@ -185,6 +187,7 @@
dataIndex: 'finishTime', dataIndex: 'finishTime',
width: 180, width: 180,
ellipsis: true, ellipsis: true,
sorter:true,
scopedSlots: { customRender: 'collectionCompletionTime' } scopedSlots: { customRender: 'collectionCompletionTime' }
}, },
{ {
@@ -192,6 +195,7 @@
align: 'center', align: 'center',
width: 80, width: 80,
ellipsis: true, ellipsis: true,
sorter:true,
dataIndex: 'version' dataIndex: 'version'
}, },
{ {
@@ -206,6 +210,7 @@
align: 'center', align: 'center',
width: 160, width: 160,
ellipsis: true, ellipsis: true,
sorter:true,
dataIndex: 'createTime' dataIndex: 'createTime'
}, },
{ {
@@ -219,6 +224,8 @@
token: Vue.ls.get(ACCESS_TOKEN), token: Vue.ls.get(ACCESS_TOKEN),
selectedRowKeys: [], selectedRowKeys: [],
queryParam: {}, queryParam: {},
orderBy: '1',
orderByField: '',
url: { url: {
list: 'params/manifest/page', list: 'params/manifest/page',
add: 'params/manifest/add', add: 'params/manifest/add',
@@ -312,9 +319,6 @@
} else { } else {
this.$message.warning(this.$t('thisbuttonCompleted')) this.$message.warning(this.$t('thisbuttonCompleted'))
} }
},
handleTableChange() {
}, },
// 历史版本 // 历史版本
historicalVersion(historicalRow) { historicalVersion(historicalRow) {
@@ -431,11 +435,26 @@
this.pageSize = pageSize this.pageSize = pageSize
this.getlist() this.getlist()
}, },
handleTableChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
if(sorter.columnKey == 'projectVersion'){
this.orderByField = 'project_version'
} else if(sorter.columnKey == 'finishTime') {
this.orderByField = 'finish_time'
} else if(sorter.columnKey == 'createTime') {
this.orderByField = 'create_time'
} else{
this.orderByField = sorter.columnKey
}
this.getlist()
},
getlist() { getlist() {
let query = { let query = {
projectId: this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id, projectId: this.$route.query.parentId ? this.$route.query.parentId : this.$route.query.id,
pageSize: this.pageSize, pageSize: this.pageSize,
pageNo: this.pageNo, pageNo: this.pageNo,
orderBy: this.orderBy,
orderByField: this.orderByField,
...this.queryParam ...this.queryParam
} }
this.loading = true this.loading = true