easyUI 根据权限隐藏div
$(function(){ //函数开始
var userPower =${ sessionScope.userPower};//取出session中的权限字段
if(userPower==5){
$("#div_user" ).panel('close');//隐藏按钮
}else if(userPower==2){
$("#div_userCenterInfo").panel('close');//隐藏按钮
}else{
$("#div_user" ).panel('open');//显示
}
});//函数结束 */
easyUI datagrid 后台数据格式
{"total":"53701","rows:[{"higherDistributor":"RBGJ0000001","iosDeviceToken":"","pid":14165213}]}
怎样重新加载datagrid数据
function searchCode(codeStatus) {
var row = $('#dg').datagrid('getSelected');
if(row){
var url =$('#dg').datagrid('options').url;
url = "${pageContext.request.contextPath}/operationsCenterInfo/centerOffline?userId=" +row.userId;
$('#dg').datagrid('options').url=url;
$("#dg").datagrid('reload');
}else{
$.messager.alert("系统提示", "请先选中一条编辑数据");
}
}