1、解决前端排序BUG

pull/254/head
xjs 4 years ago
parent d388634a23
commit 7268d7dbfc

@ -327,6 +327,9 @@ export default {
//
defaultSort: {prop: 'createTime', order: 'descending'},
//BUG
sortStatus: true,
//
rulesEdit: {
englishWord: [
@ -413,9 +416,6 @@ export default {
this.queryParams.endCreateTime = this.daterangeCreateTime[1];
}
// this.queryParams.orderByColumn=this.defaultSort.prop
// this.queryParams.isAsc=this.defaultSort.order
listWord(this.queryParams).then(response => {
this.loading = false;
this.wordList = response.data.records;
@ -453,6 +453,11 @@ export default {
this.daterangeCreateTime = [];
this.queryParams.createTime = null
this.queryParams.endCreateTime = null
this.sortStatus=false
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
this.sortStatus=true
this.resetForm("queryForm");
this.handleQuery();
},
@ -474,9 +479,16 @@ export default {
},
/** 排序触发事件 */
handleSortChange(column, prop, order) {
handleSortChange(column) {
this.queryParams.isAsc = column.order;
this.queryParams.orderByColumn = column.prop;
console.log(column)
//
if (this.sortStatus) {
this.getList();
}
},
/** 修改按钮操作 */

@ -195,7 +195,10 @@ export default {
//
form: {},
//
rules: {}
rules: {},
//BUG
sortStatus: true,
};
},
created() {
@ -222,7 +225,10 @@ export default {
/** 排序触发事件 */
handleSortChange(column, prop, order) {
this.queryParams.isAsc = column.order;
//
if (this.sortStatus) {
this.getList();
}
},
//
@ -242,6 +248,11 @@ export default {
this.daterangeCreateTime = [];
this.queryParams.createTime = null
this.queryParams.endCreateTime = null
this.sortStatus=false
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
this.sortStatus=true
this.resetForm("queryForm");
this.handleQuery();
},

@ -32,6 +32,8 @@ public class MyBaseController<T> extends BaseController {
}
String orderByColumn = pageDomain.getOrderByColumn();
if (StringUtils.isNotNull(orderByColumn)) {
//获取排序字段
String orderBy = SqlUtil.escapeOrderBySql(StringUtils.toUnderScoreCase(orderByColumn));
if (pageDomain.getIsAsc().equals("asc")) {

@ -47,7 +47,7 @@
SELECT
t.min_id
FROM
( SELECT min( id ) AS min_id FROM webmagic_weixin_sougou GROUP BY url ) AS t
( SELECT min( id ) AS min_id FROM webmagic_weixin_sougou GROUP BY content ) AS t
)
</delete>
</mapper>
Loading…
Cancel
Save