Jquery EasyUI datagrid分页
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
<table id="people_datagrid"></table>
</body>
</html>//显示人员列表的方法
function peopleList(buildingId, selectFloor, selectRoom, pSex,peopleNameOrIdentity) {
$('#people_datagrid').datagrid({
title : '人员列表',
nowrap : true,// 在数据满行 后是否自动截取
height : 360,
rownumbers : true,// 显示行数
pageSize : 10,// 显示多少条记录
striped : true,
// fitColumns:true, //适度列宽
singleSelect : true,
collapsible : true,
// url:ctxPath+'/peopleController/searchFloorPeople.action?id='+buildingId+'&selectFloor='+selectFloor+'&selectRoom='+selectRoom+'&pSex='+pSex+'&peopleNameOrIdentity='+peopleNameOrIdentity,
url : ctxPath
+ '/peopleController/searchFloorPeople.action?id='
+ encodeURI(buildingId) + '&selectFloor='
+ encodeURI(selectFloor) + '&selectRoom='
+ encodeURI(selectRoom) + '&pSex='
+ encodeURI(pSex) + '&peopleNameOrIdentity='
+ encodeURI(peopleNameOrIdentity),
remoteSort : false,
idField : 'id',
pagination : true,
striped : true,
sortName : 'id',
sortOrder : 'asc',
onLoadSuccess : function(data) {
if (data.total == 0) {
/*
* $.messager.show({ title:'信息提示',
* msg:'没有找到相应信息!', showType:'show' });
*/
}
},
columns : [ [
{
title : '姓名',
field : 'NAME',
width : 48,
sortable : true,
align : 'left'
},
{
title : '性别',
field : 'SEX',
width : 30,
sortable : true,
align : 'left'
},
{
title : '身份证',
field : 'IDENTITY_CARD',
width : 120,
sortable : true,
align : 'left'
},
{
title : '出生日期',
field : 'BIRTHDAY',
width : 67,
sortable : true,
align : 'left'
},
{
title : '民族',
field : 'NATION',
width : 38,
sortable : true,
align : 'left'
},
{
title : '联系电话',
field : 'LINK_TEL',
width : 70,
sortable : true,
align : 'left'
},
{
title : '定位',
field : 'ID',
align : 'center',
formatter : function(value, rowData,
rowIndex) {
return '<span style="color:blue"><a style="text-decoration: none;" href="javascript:peopleloc('
+ buildingId
+ ','
+ value
+ ');">详细信息</a>';
},
width : 60,
align : 'left'
} ] ]
});
} 相关推荐
83540198 2014-10-06
JeWangZhe 2013-04-08
89427412 2020-02-13
morexyoung 2019-12-20
EdwardSiCong 2015-04-11
ningwentao 2015-10-21
zderam的私人 2019-09-02
shanhuijava 2016-08-17
wndong 2016-03-04
AngelicaA 2015-12-22
xiaobozhu 2015-10-27
yypiao 2015-10-21
小策一喋 2015-09-17
小仙儿 2015-06-15
huzai 2015-06-03
huzai 2015-04-22
zhangmingming 2015-03-11
大数据实战派 2015-02-04