easyUI---datagrid--显示
$("#MultiPoint").datagrid({
url:"${pageContext.request.contextPath}/TDataMonitoring/TDataMonitoringGrid.do;"+ $.now(),
rownumbers:true,
pageSize:10,
pagination:true,
striped:true,
singleSelect:true,
//fitColumns:true,
fit:true,
queryParams: {
protype:$('#protype').val(),
factorcode:$('#factorcode').val(),
factorname:$('#factorname').val()
},
columns:[[
{field:'psname',title:'企业名称',width:180,align:'center'},
{field:'progressname',title:'工艺类型',width:150,align:'center'},
{field:'mttime',title:'时间',width:180,align:'center'},
{field:'linknet',title:'联网',width:150,align:'center',
formatter: function(value,row,index){
if(value =="1"){
linkRate++;
return "联网";
}else if(value =="2"){
return "断网";
}
}
},
{field:'runstate',title:'运行状态',width:150, align:'center',
formatter: function(value,row,index){
if(value =="1"){
normal++;
return "正常";
}else if(value =="4"){
error++;
return "异常";
}else if(value =="2"){
stop++;
return "停运";
}else if(value =="3"){
steal++;
return "偷排";
} else{
return "超标";
}
}
},
{field: "_",title: "操作", width: 200,align: "center",
formatter: function(value,row,index) {
return "<a href='#' onclick='lookinfo(\""+row.psbaseinfoid+","+row.psname+"\")' >查看</a><span style='font-size:12px;'></span>"; }
}
]],
onLoadSuccess:function(rowData){
$("#normal").empty().append(normal);
$("#stop").empty().append(stop);
$("#error").empty().append(error);
$("#steal").empty().append(steal);
$("#overproof").empty().append(overproof);
onClickRow:function(rowIndex, rowData){
}
});