Commit be43654a7f094cdfcbdefa5859a1289b68244199

Authored by lizhuojun
1 parent 5c428af7

用户管理调整搜索状态默认可用,分页问题

src/main/resources/static/pages/permission/user/list.html
@@ -55,7 +55,7 @@ @@ -55,7 +55,7 @@
55 <td> 55 <td>
56 <select class="form-control form-filter " name="enabled_eq"> 56 <select class="form-control form-filter " name="enabled_eq">
57 <option value="">请选择...</option> 57 <option value="">请选择...</option>
58 - <option value="true">可用</option> 58 + <option value="true" selected = "selected">可用</option>
59 <option value="false">禁用</option> 59 <option value="false">禁用</option>
60 </select> 60 </select>
61 </td> 61 </td>
@@ -131,7 +131,7 @@ $(function(){ @@ -131,7 +131,7 @@ $(function(){
131 increaseArea: '20%' 131 increaseArea: '20%'
132 }; 132 };
133 133
134 - jsDoQuery(null,true); 134 + jsDoQuery({'enabled_eq':true},true);
135 135
136 //重置 136 //重置
137 $('tr.filter .filter-cancel').on('click', function(){ 137 $('tr.filter .filter-cancel').on('click', function(){
@@ -216,11 +216,21 @@ $(function(){ @@ -216,11 +216,21 @@ $(function(){
216 if(initPagination){ 216 if(initPagination){
217 initPagination = false; 217 initPagination = false;
218 return; 218 return;
219 - }  
220 -  
221 -  
222 - page = num - 1;  
223 - jsDoQuery(null, false); 219 + }
  220 + var cells = $('tr.filter')[0].cells
  221 + ,params = {}
  222 + ,name;
  223 + $.each(cells, function(i, cell){
  224 + var items = $('input,select', cell);
  225 + for(var j = 0, item; item = items[j++];){
  226 + name = $(item).attr('name');
  227 + if(name){
  228 + params[name] = $(item).val();
  229 + }
  230 + }
  231 + });
  232 + page = num - 1;
  233 + jsDoQuery(params, false);
224 } 234 }
225 }); 235 });
226 } 236 }