修改OTA待办任务列表排序

This commit is contained in:
范强强
2023-09-18 16:08:49 +08:00
parent 04c0271d6b
commit f2f3a5b7df
@@ -94,6 +94,7 @@
:scroll="{x: '100%',y:'calc(100vh - 140px)'}"
rowKey="id"
:data-source="dataSource"
@change="tableOnChange"
:columns="columns"
>
<span slot="action" slot-scope="text,record">
@@ -138,12 +139,15 @@
url:{
list:'',
},
orderBy: '1',
orderByField: '',
columns: [
{
title: this.$t('softwareversion'),
align: 'left',
dataIndex: 'releaseName',
ellipsis: true,
sorter: true,
width: 170
},
{
@@ -151,6 +155,7 @@
align: 'left',
dataIndex: 'releaseType',
ellipsis: true,
sorter: true,
width: 170
},
{
@@ -158,6 +163,7 @@
align: 'left',
dataIndex: 'vehicle',
ellipsis: true,
sorter: true,
width: 600,
},
{
@@ -165,6 +171,7 @@
align: 'left',
dataIndex: 'releaseDate',
ellipsis: true,
sorter: true,
width: 170,
},
{
@@ -209,6 +216,11 @@
this.pageSize = pageSize
this.getList()
},
tableOnChange(pagination, filters, sorter) {
this.orderBy = sorter.order == 'ascend' ? '1' : '2'
this.orderByField = sorter.columnKey
this.getList()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
@@ -219,6 +231,8 @@
let query = {
pageNo: this.pageNo,
pageSize: this.pageSize,
orderBy: this.orderBy,
orderByField: this.orderByField,
...queryParam
}
this.loading = true