发布v2.5.9版本
This commit is contained in:
22
web/res/js/jquery-changeuser.js
vendored
22
web/res/js/jquery-changeuser.js
vendored
@@ -456,6 +456,7 @@
|
||||
var me = this;
|
||||
this.rand = rand;
|
||||
this.ismobile = false;
|
||||
this.page = 1;
|
||||
this.selvalue = '';
|
||||
|
||||
this._init = function(){
|
||||
@@ -544,21 +545,32 @@
|
||||
};
|
||||
this.showdata=function(a,inb){
|
||||
if(!a)a=[];
|
||||
var ret= a;
|
||||
this.showselectdata(a.selectdata);
|
||||
var len = 0;
|
||||
if(a.totalCount)len=a.totalCount;
|
||||
if(a.rows)a = a.rows;
|
||||
if(len==0)len=a.length;
|
||||
var s='',s1='';
|
||||
var s='',s1='',npid='nextpage_'+this.rand+'';
|
||||
if(len==0){
|
||||
s='<div align="center" style="margin-top:30px;color:#cccccc;font-size:16px">无记录</div>';
|
||||
}else{
|
||||
s = this.showhtml(a);
|
||||
s1='共'+len+'条';
|
||||
if(ret.page && ret.limit){
|
||||
var max = Math.ceil(len/ret.limit);
|
||||
s1+=' ';
|
||||
if(ret.page>1)s1+='<a id="'+npid+'1" class="zhu" href="javascript:;">上页</a>';
|
||||
s1+='('+ret.page+'/'+max+')';
|
||||
if(max>ret.page)s1+='<a id="'+npid+'" class="zhu" href="javascript:;">下页</a>';
|
||||
this.searchajax = true;
|
||||
}
|
||||
}
|
||||
this._getobj('count').html(s1);
|
||||
var o = $('#selectlist_'+rand+'');
|
||||
o.html(s);
|
||||
$('#'+npid+'').click(function(){me.nextpage(1);});
|
||||
$('#'+npid+'1').click(function(){me.nextpage(-1);});
|
||||
if(!inb && len==0)this.loaddata();
|
||||
};
|
||||
this.seldatsse=[];
|
||||
@@ -612,12 +624,19 @@
|
||||
if(s)$('#selectlist_'+rand+'').append(s);
|
||||
};
|
||||
this.reload=function(){
|
||||
this.page = 1;
|
||||
this.loaddata(this.selvalue);
|
||||
};
|
||||
this.nextpage=function(p){
|
||||
this.page = this.page+p;
|
||||
this.loaddata(this.selvalue);
|
||||
};
|
||||
this.loaddata=function(svel){
|
||||
var url = this.url;
|
||||
if(svel)url+='&selvalue='+svel+'';
|
||||
if(url=='')return;
|
||||
url+='&page='+this.page+'';
|
||||
url+='&limit='+this.maxshow+'';
|
||||
$('#selectlist_'+rand+'').html('<div align="center" style="margin-top:30px"><img src="images/mloading.gif"></div>');
|
||||
$.ajax({
|
||||
type:'get',dataType:'json',url:url,
|
||||
@@ -644,6 +663,7 @@
|
||||
this._searchkey = function(bo){
|
||||
var key = $('#changekey_'+this.rand+'').val(),a=[],d=[],d1,len,i,oi=0,s;
|
||||
if(this.searchajax){
|
||||
this.page = 1;
|
||||
this.loaddata(''+this.selvalue+'&key='+jm.base64encode(key)+'');
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user