<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>登录日志</title>
</head>
<style type="text/css">
	.loginLogHeader {
		padding: 0px 20px;
	}
	.loginLogHeader {
		padding-bottom:0
	}
	.loginLogHeader [class^="col"] {
		padding-left:0;
		padding-right:0
	}
	.loginLogQuery {
		background-color:#3ebee6;
		color:white;
		border-color:#3ebee6;
		text-shadow:none;
	}
	.loginLogQuery:hover {
		background-color:#3ebee6;
		color:white;
		border-color:#3ebee6;
		text-shadow:none
	}
	.loginLogHeader .form-control {
		width:95%
	}
</style>
<body>
	<div id="bankAccountInfoDialog"></div>
	<div class="base-extend">
		<ol class="breadcrumb">
			<i class="icon-chevron-sign-left newBackBtn"></i>
		  	<li>系统管理</li>
		  	<li>登录日志</li>
		  	<li>详情</li>
		</ol>
		<input type="hidden" th:value="${logInId}" id="logInId">
		<div class="loginLogHeader" style="padding:0 !important;">
			<div class="listBackBox">
				<div class="weekmeeting-detail col-xs-12 businessTable" style="padding:0.05rem 0.2rem 0 0.2rem;float:none;">
					<table id="loginLogListView" style="width: 100%;"></table>
					<div id="loginLogListViewPage"></div>
				</div>
			</div>
		</div>
	</div>
</body>
	<script type="text/javascript">
		function usageTime (cellValue,options,rowObject) {
			if(rowObject.usageTime) {
				return rowObject.usageTime+'毫秒'
			}
		}
		function result (cellValue,options,rowObject) {
			if(rowObject.result == "null") {
				return ''
			}else {
				return rowObject.result
			}
		}
		$(function(){
			sxUtil.jqGrid('#loginLogListView',{
				colNames:['日志id','用户ip','操作人','执行时间','请求URL','请求的方法名','操作模块','操作类型','操作说明','请求的参数','请求的结果','创建时间'],
				colModel:[
					{name: 'id', label: '日志ID', hidedlg:true, hidden:true,sortable:false,title:false},
					{name: 'clientIp', label: '用户ip', width:100,sortable:false,title:false},
					{name: 'userCreate', label: '操作人',sortable:false,align:'left',width:90,title:false},
					{name: 'usageTime', label: '执行时间',sortable:false,align:'left',width:90,title:false,formatter:usageTime},
					{name: 'url', label: '请求URL',sortable:false,align:'left',width:130,title:false},
					{name: 'methodName', label: '请求的方法名',sortable:false,align:'left',width:130,title:false},
					{name: 'operationModule', label: '操作模块',sortable:false,align:'left',width:100,title:false},
					{name: 'operationType', label: '操作类型',sortable:false,align:'left',width:90,title:false},
					{name: 'description', label: '操作说明',sortable:false,align:'left',width:100,title:false},
					{name: 'requestParams', label: '请求的参数',sortable:false,align:'left',width:130,title:false},
					{name: 'result', label: '请求的结果',sortable:false,align:'left',width:100,title:false,formatter:result},
					{name: 'gmtModified', label: '创建时间',sortable:false,align:'left',width:170,title:false},
				], 
				height:'auto',
				mtype:'GET',
				url : '/operationLog/findByLoginId',
				pager : "#loginLogListViewPage",
				multiselect: false,
				rownumbers:false,
				postData : {
					'logInId':$('#logInId').val(),
				},
				loadError:function(){
					new $.zui.Messager('列表加载失败', {
							type: 'warning',
							time:1500
					}).show();
				},
				onPaging:function(pgButton){
					console.log(pgButton)
				}
			},true);

			//返回
			$(".newBackBtn").click(function(){
				var localdata=jQuery.parseJSON(localStorage.getItem("localdata"));
				var fastSearch='';
				if( localdata ){
					fastSearch=localdata.search;
				}
				$(".yk_rightcontent").load('/loginLog/list',function(){
					$("#query").val(fastSearch)
				})
			})
		})
	</script>
</html>