//加载完成
$(function(){var sherchkey='${positioninfo.name}';
savePosition();//保存修改方法
getPeopleList(1,5,sherchkey);//获取人才列表
//getPageList(); //分页方法
});//自己封装获取数据方法
functiongetPeopleList(crr,lmt,searchKey){//获取人才列表
$.ajax({
url:'${ctx}/recruit/peoplelist',
type:'post',
data:{"curr":crr||1,"pageSize":lmt||5,"searchKey":searchKey
},
dataType:'json',
success:function(res){if(res.success=="success"){
console.log(res);
count=res.data.totalElements;//总记录
curr=res.data.number; //当前页
limit=res.data.size; //每页几个
var rclist=res.data.content;var html='';var len=rclist.length;for (var i=0; i
'
'+rclist[i].name+''+'
'+rclist[i].edu+''+'
'+rclist[i].skill+''+'
'+rclist[i].exp+''+'
'+rclist[i].add+''+'
'+rclist[i].tel+''+'';
html=html+htmlbuf;
}
$("#rcktb").html(html);//调用分页方法
getPageList(count,curr,limit,searchKey);
}else{
layer.alert(res.message);
}
},
error:function(){
layer.msg("网络故障");
}
})
}//自己封装分页方法
functiongetPageList(count,curr,limit,searchKey){//分页方法
layui.use(['laypage', 'layer'], function(){var laypage =layui.laypage
,layer=layui.layer;//完整功能
laypage.render({
elem:'pagefenye',
count: count||0,
theme:'#009587',
limit : limit||3,
limits:[5, 10, 20, 30, 40],
curr : curr||1,
layout: ['count', 'prev', 'page', 'next', 'refresh', 'skip'],
jump:function(obj,first){//debugger;
if(!first){//window.location.href = "?curr="+obj.curr+"&pageSize="+obj.limit+"&enterId="+'${enterId}';
getPeopleList (obj.curr,obj.limit,searchKey);
}
}
});
});
}