在jsp界面中通过点击查询按钮,触发query()方法
function query(){
(“.syeque”).removeClass(“hide”);
(
“
.
s
y
e
q
u
e
”
)
.
r
e
m
o
v
e
C
l
a
s
s
(
“
h
i
d
e
”
)
;
(‘#queryDataList’).datagrid({
title: “待办任务列表”,
loadMsg:’加载数据中…’,
queryParams:$(‘#fm’).serializeObject(),
fitColumns:false,
pageList:pageListArrJS,
pageNumber:1,
nowrap: false,
autoRowHeight: true,
striped: true,
collapsible:false,
url:portalURL,
sortName: ‘flowInTime’,
sortOrder: ‘desc’,
remoteSort: false,
singleSelect:false,
selectOnCheck: true,
checkOnSelect: true,
scrollbarSize:180,
columns:[arrays],
pagination:true,
rownumbers:true,
***onLoadSuccess: function (data) {
document.getElementById(“totalPage”).value=data.total;
document.getElementById(“totalPage”).innerText=”待办数量:”+data.total+”条”;
}*//添加onLoadSuccess方法,即可获取后台返回给easyui框架得数据
});
$('#queryDataList').datagrid('clearSelections');
}
后台代码
@RequestMapping("drawPendingTask4NormalPortal")
public @ResponseBody String drawPendingTask4NormalPortal(HttpServletRequest request,Page page,@RequestParam Map map){
//处理session失效问题
String sysPortalType=request.getParameter("sysPortalType");
request.setAttribute("sysPortalType", sysPortalType);
HttpSession session=request.getSession();
PrpDuser user=(PrpDuser) session.getAttribute("user");
UtiUserGradePowerUtil utiUserGradePowerUtil=new UtiUserGradePowerUtil();
List<String> gradeList = utiUserGradePowerUtil.getGrade(user.getUserCode(), false);
AccAdminCenterBranch accAdminCenterBranch = accAdminCenterBranchService.getAccAdminCenterBranch(user.getComCode());
pendingCallParamVo.setComcode(user.getComCode());
pendingCallParamVo.setCenterCode(accAdminCenterBranch.getCenterCode());
pendingCallParamVo.setGroupIds(gradeList);
pendingCallParamVo.setApprover(user.getUserCode());
List<ActivitiPendingTask> list = workFlatPendingService.pendingCallTask4Invoiceapply(pendingCallParamVo, page);
Map<String, Object> jsonMap = new HashMap<String, Object>();
jsonMap.put("total", page.getTotal());//在onLoadSuccess方法中即可获得该数据
jsonMap.put("rows", list);
return JSONObject.fromObject(jsonMap).toString();
}