修改分页参数
This commit is contained in:
parent
ea633b693a
commit
ea06da2cf9
|
@ -121,19 +121,21 @@
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
|
||||||
$.ajax({
|
$(document).ready(function () {
|
||||||
type: "post",
|
$.ajax({
|
||||||
url: ctx + "base/personnel/deptList",
|
type: "post",
|
||||||
data: {
|
url: ctx + "base/personnel/deptList",
|
||||||
},
|
data: {
|
||||||
success: function(data) {
|
},
|
||||||
var opt = '<option value="">请选择</option>';
|
success: function(data) {
|
||||||
data.data.forEach(d=>{
|
var opt = '<option value="">请选择</option>';
|
||||||
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
|
data.data.forEach(d=>{
|
||||||
})
|
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
|
||||||
$("#deptId")[0].innerHTML=opt;
|
})
|
||||||
}
|
$("#deptId")[0].innerHTML=opt;
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
|
|
|
@ -115,9 +115,10 @@
|
||||||
focusCleanup: true
|
focusCleanup: true
|
||||||
});
|
});
|
||||||
|
|
||||||
refresh()
|
$(document).ready(function () {
|
||||||
|
$("#deptId").on("change", function() {
|
||||||
function refresh(){
|
console.log($(this).val())
|
||||||
|
});
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "post",
|
type: "post",
|
||||||
url: ctx + "base/personnel/deptList",
|
url: ctx + "base/personnel/deptList",
|
||||||
|
@ -128,10 +129,10 @@
|
||||||
data.data.forEach(d=>{
|
data.data.forEach(d=>{
|
||||||
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
|
opt += '<option value="'+d.deptId+'">'+d.deptName+'</option>';
|
||||||
})
|
})
|
||||||
$("#deptId")[0].innerHTML=opt;
|
$("#deptId").html(opt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
})
|
||||||
|
|
||||||
function submitHandler() {
|
function submitHandler() {
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ public class PageDomain
|
||||||
private String isAsc = "asc";
|
private String isAsc = "asc";
|
||||||
|
|
||||||
/** 分页参数合理化 */
|
/** 分页参数合理化 */
|
||||||
private Boolean reasonable = true;
|
private Boolean reasonable = false;
|
||||||
|
|
||||||
public String getOrderBy()
|
public String getOrderBy()
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,9 +31,12 @@ public class PageUtils extends PageHelper
|
||||||
public static void startPage(Integer pageNum,Integer pageSize)
|
public static void startPage(Integer pageNum,Integer pageSize)
|
||||||
{
|
{
|
||||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||||
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
|
if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize))
|
||||||
Boolean reasonable = pageDomain.getReasonable();
|
{
|
||||||
PageHelper.startPage(pageNum, pageSize, orderBy).setReasonable(reasonable);
|
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
|
||||||
|
//Boolean reasonable = pageDomain.getReasonable();
|
||||||
|
PageHelper.startPage(pageNum, pageSize, orderBy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue