修改分页参数

This commit is contained in:
liuwu 2023-08-31 10:19:10 +08:00
parent ea633b693a
commit ea06da2cf9
4 changed files with 28 additions and 22 deletions

View File

@ -121,19 +121,21 @@
focusCleanup: true
});
$.ajax({
type: "post",
url: ctx + "base/personnel/deptList",
data: {
},
success: function(data) {
var opt = '<option value="">请选择</option>';
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
$("#deptId")[0].innerHTML=opt;
}
});
$(document).ready(function () {
$.ajax({
type: "post",
url: ctx + "base/personnel/deptList",
data: {
},
success: function(data) {
var opt = '<option value="">请选择</option>';
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
$("#deptId")[0].innerHTML=opt;
}
});
})
function submitHandler() {
if ($.validate.form()) {

View File

@ -115,9 +115,10 @@
focusCleanup: true
});
refresh()
function refresh(){
$(document).ready(function () {
$("#deptId").on("change", function() {
console.log($(this).val())
});
$.ajax({
type: "post",
url: ctx + "base/personnel/deptList",
@ -128,10 +129,10 @@
data.data.forEach(d=>{
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
})
$("#deptId")[0].innerHTML=opt;
$("#deptId").html(opt);
}
});
}
})
function submitHandler() {
if ($.validate.form()) {

View File

@ -22,7 +22,7 @@ public class PageDomain
private String isAsc = "asc";
/** 分页参数合理化 */
private Boolean reasonable = true;
private Boolean reasonable = false;
public String getOrderBy()
{

View File

@ -31,9 +31,12 @@ public class PageUtils extends PageHelper
public static void startPage(Integer pageNum,Integer pageSize)
{
PageDomain pageDomain = TableSupport.buildPageRequest();
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
Boolean reasonable = pageDomain.getReasonable();
PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
{
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
//Boolean reasonable = pageDomain.getReasonable();
PageHelper.startPage(pageNum, pageSize, orderBy);
}
}
/**