EasyUi dataGrid JavaBean

来源:互联网 发布:网络抓包原理 编辑:程序博客网 时间:2024/06/06 01:45

1. 如果 datagrid 中返回的数据中 带有引入类型,可以通过 datagrid中colum 中的formate 来获取到


$('#extendLogDatagrid').datagrid({url:'loadListDatas_ExchangeLogAction.action',rownumbers: true,fitColumns: true,pagination:true,pageSize: 20,striped:false,sortName:'operation_time',sortOrder:'desc',columns:[[ {field:'doc_name',title:'文件名称',width:100,align:'center',sortable:true}, {field:'operation_time',title:'操作时间',width:100,align:'center',sortable:true,order:'desc',formatter: function(value,row){        return getFormatDateByLong(Number(value),'yyyy-MM-dd hh:mm:ss');        },width:100,align:'center'},        {field:'operation_man',title:'操作人',width:100,align:'center',formatter: function(value,row){return (value==null?"":value.name);        }},// {field:'qrcode',title:'二维码唯一标识',width:100,align:'center'},{field:'doc_secretlevel',title:'文件密级',width:100,formatter: function(value,row){return value.name;        }},{field:'boxIp',title:'箱子Ip地址',width:100,align:'center',sortable:true},{field:'opState',title:'操作状态',width:100,align:'center',sortable:true,formatter: function(value,row){var htmlStr ='';if(value=="取件"){// htmlStr ='<font  color="red">'+value+'</font>';htmlStr ="<a  class=\"form_pickup\">"+value+"</a>";}else if(value=="存件"){htmlStr ="<a  class=\"form_storage\">"+value+"</a>";}return htmlStr;        }}]] ,onLoadSuccess:function(index,field,value){$('.form_pickup').linkbutton({ iconCls: 'icon-log_get',plain:true}); $('.form_storage').linkbutton({iconCls: 'icon-log_put',plain:true});  }}); 


0 0
原创粉丝点击