新增字段排序

ywj_dev
anthonywj 2 years ago
parent ecbc552596
commit 78ec4af3f8

@ -49,7 +49,8 @@
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" border>
<el-table v-loading="loading" :data="list" style="width: 100%" border :default-sort="defaultSort"
@sort-change="handleSortChange">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="任务ID" prop="id" width="140" show-overflow-tooltip></el-table-column>
@ -70,7 +71,8 @@
</el-table-column>
<el-table-column label="开始时间" width="180" prop="startTime" show-overflow-tooltip></el-table-column>
<el-table-column label="开始时间" width="180" prop="startTime" show-overflow-tooltip sortable="custom"
:sort-orders="['desc', 'asc']"></el-table-column>
<el-table-column label="结束时间" width="180" prop="endTime" show-overflow-tooltip></el-table-column>
<el-table-column label="同步信息" prop="remark" show-overflow-tooltip></el-table-column>
@ -181,7 +183,8 @@ export default {
syncTime: null,
configParms: {},
syncInfo: null,
syncVisible: false
syncVisible: false,
defaultSort: {prop: 'startTime', order: 'desc'},
};
},
@ -195,7 +198,8 @@ export default {
status: null,
page: 1,
limit: 10,
orderByColumn: null,
isAsc: null,
};
this.syncTime = null;
this.getList();
@ -224,6 +228,13 @@ export default {
});
},
handleSortChange(column, prop, order) {
this.filterQuery.orderBy = column.prop;
this.filterQuery.sort = column.order;
this.getList();
},
getConfig() {
findConfig()
.then((response) => {

Loading…
Cancel
Save