From f2f3a5b7dfaa5aaf9c360f2f5552d79f884eea15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Mon, 18 Sep 2023 16:08:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9OTA=E5=BE=85=E5=8A=9E?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/toDoCenter/OTAToDoTask/index.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/jero-web/src/views/toDoCenter/OTAToDoTask/index.vue b/jero-web/src/views/toDoCenter/OTAToDoTask/index.vue index 15e2d7e23..3de232c83 100644 --- a/jero-web/src/views/toDoCenter/OTAToDoTask/index.vue +++ b/jero-web/src/views/toDoCenter/OTAToDoTask/index.vue @@ -94,6 +94,7 @@ :scroll="{x: '100%',y:'calc(100vh - 140px)'}" rowKey="id" :data-source="dataSource" + @change="tableOnChange" :columns="columns" > @@ -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