Commit a127b7f2 by liuyongshuai

修改查询的bug

parent a579aecd
......@@ -331,7 +331,7 @@
layui.use('table', function () {
var table = layui.table;
//方法级渲染
table.render({
var tableIns = table.render({
id: "id",
elem: '#userTable',
limit: 50,//默认采用10
......@@ -350,35 +350,39 @@
},
height: 319
});
var $ = layui.$, active = {
reload: function () {
$('.queryUserList').on('click', function () {
//这里以搜索为例
var username = cheNull($('#username').val());
var trueName = cheNull($('#trueName').val());
var openFlag = cheNull($('#openFlag').val());
var policemanid = cheNull($('#policemanid').val());
var unitcode = cheNull($('#unitcode').val());
var roleName = cheNull($('#roleName').val());
table.reload('testReload', {
tableIns.reload({
where: {
username: username,
trueName: trueName,
openFlag: openFlag,
policemanid: policemanid,
unitcode: unitcode,
roleName: roleName
openFlag:openFlag,
policemanid:policemanid,
unitcode:unitcode,
roleName:roleName
},
page: {
curr: 1 //重新从第 1 页开始
},
done: function (res, curr, count) {
this.where = {};
done: function(res, curr, count){
console.log("进入2层")
console.log(unitcode+";"+roleName);
this.where={
username: username,
trueName: trueName,
openFlag:openFlag,
policemanid:policemanid,
unitcode:unitcode,
roleName:roleName
};
}
});
}
};
$('.queryUserList').on('click', function () {
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
});
function cheNull(str) {
......
......@@ -231,7 +231,7 @@
layui.use('table', function(){
var table = layui.table;
//方法级渲染
table.render({
var tableIns = table.render({
id:"id",
elem: '#userTable',
limit: 50 ,//默认采用10
......@@ -254,16 +254,15 @@
height: 480
});
var $ = layui.$, active = {
reload: function(){
$('.queryUserList').on('click', function(){
//这里以搜索为例
var username = cheNull($('#username').val());
var trueName = cheNull($('#trueName').val());
var openFlag = cheNull($('#openFlag').val());
var policemanid = cheNull($('#policemanid').val());
var unitcode = cheNull($('#unitcode').val());
var roleName = cheNull($('#roleName').val());
table.reload('testReload', {
tableIns.reload({
where: {
username: username,
trueName: trueName,
......@@ -276,15 +275,18 @@
curr: 1 //重新从第 1 页开始
},
done: function(res, curr, count){
this.where={};
console.log("进入2层")
console.log(unitcode+";"+roleName);
this.where={
username: username,
trueName: trueName,
openFlag:openFlag,
policemanid:policemanid,
unitcode:unitcode,
roleName:roleName
};
}
});
}
};
$('.queryUserList').on('click', function(){
var type = $(this).data('type');
active[type] ? active[type].call(this) : '';
});
});
function cheNull(str) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment