1.将筛选条件保存到session中
session.setAttribute("query",queryMap);
2.用EL表达式取出session中的值,显示到原筛选条件
<input id="member_name" name="member_name" placeholder="请输入姓名" autocomplete="off" class="layui-input" value="${query.name}">
3.自动加载页面
$(function () {
table.reload('idTest', {
url :"${pageContext.request.contextPath}/visit/getVisitList",
page :true,
limit :30,
method:'POST',
where : {
name :$("#member_name").val(),
phone :$("#phone").val(),
searchTimeType :$('#searchTimeType').val(),
searchStartTime :$("#searchStartTime").val(),
searchEndTime :$("#searchEndTime").val()
}
});
});
4.如果有下拉框选择框,可用下面方法赋值显示
$(function(){
$('#searchTimeType').val(${query.searchTimeType});
form.render("select");
});