jeecg-boot框架list查询列表时,用QueryWrapper,默认按创建时间(create_time)倒序排序,若想去掉只需重写前端VUE排序方法即可。
在list.vue中重写getQueryParams()方法并清除排序字段
getQueryParams() {
// 重写查询条件
let sqp = {}
if (this.superQueryParams) {
sqp['superQueryParams'] = encodeURI(this.superQueryParams)
sqp['superQueryMatchType'] = this.superQueryMatchType
}
var param = Object.assign(sqp, this.queryParam, {}, this.filters)
param.field = this.getQueryField()
param.pageNo = this.ipagination.current
param.pageSize = this.ipagination.pageSize
return filterObj(param)
},
附赠后台数据按中文字段排序方法:
// 中文排序
queryWrapper.orderBy(true, true, "CONVERT(name using gbk)");