12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- $(function(){
- initWidget();
- });
- function initWidget(){
- $('#apiLogGrid').datagrid({
- url:$.common.urlByBizAction("ApiLogAction_queryApiLogInfo"),
- rownumbers:true,
- columns:[[{field:'apiName',title:'API名称',align:'center',width:$(this).width()*0.2},
- {field:'operator',title:'操作人',align:'center',width:$(this).width()*0.2},
- {field:'operateTime',title:'操作时间',align:'center',width:$(this).width()*0.2,formatter:function(value,row,index){
- var opDate = new Date(value.time);
- return opDate.getFullYear()+'-'+opDate.getMonth()+'-'+opDate.getDate()+' '+opDate.getHours()+':'+opDate.getMinutes()+':'+opDate.getSeconds();
- }},
- {field:'operateContent',title:'操作内容',align:'center',width:$(this).width()*0.4,formatter:function(value,row,index){
- return JSON.stringify(value);
- }}]],
- onBeforeLoad: function(param){
- param.api = $("#txtApi").val();
- param.operateor = $("#txtOperator").val();
- param.startTime = $("#txtOperateTimeStart").datebox('getValue');
- param.endTime = $("#txtOperateTimeEnd").datebox('getValue');
- },
- onClickRow:function(rowIndex, rowData){
- $("#txtLogContent").val( JSON.stringify(rowData.operateContent));
- $("#apiLogInfoDialog").dialog('open');
- },
- toolbar:'#toolbar',
- pagination: true,
- pageList:[8,10,12,15,20],
- pageSize:12,
- method:'post',
- fit:true,
- fitColumns: true,
- striped: true,
- singleSelect:true,
- loadMsg:"正在加载...",
- loadFilter:function(data)
- {
- //console.log(data);
- return data;
- }
- });
- }
- function loadDataGrid(){
- $('#apiLogGrid').datagrid('reload');
- }
|