<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="../../assets/header-all.jsp"%>
<%-- <script type="text/javascript" src="<%=basePath%>/dwr/interface/VpUserOpLogService.js"></script>
<script type="text/javascript" src="<%=basePath%>/dwr/interface/VpMenuService.js"></script> --%>
</head>
<body class="easyui-layout" id="mainLayout">
	<div id="tabs" class="easyui-tabs" data-options="border:false,fit:true">
		<div title="面板1">
			<div class="form-line clearfix">
				<div class="fl">
					<span class="text-content">登录账号：</span> <input id="loginName1"
						class="easyui-textbox">
				</div>
				<div class='fl'>
					<span class="text-content">用户姓名：</span> <input id="userName1"
						class="easyui-textbox">
				</div>
				 
			</div>
			<div class="form-line clearfix">
				<div class="fl">
					<span class="text-content">登录账号：</span> <input id="loginName2"
						class="easyui-textbox">
				</div>
				<div class='fl'>
					<span class="text-content">用户姓名：</span> <input id="userName2"
						class="easyui-textbox">
				</div>
			</div>
			<div class="form-line clearfix">
				<div class="fl">
					<span class="text-content">登录账号：</span> <input id="loginName3"
						class="easyui-textbox">
				</div>
				<div class='fl'>
					<span class="text-content">用户姓名：</span> <input id="userName3"
						class="easyui-textbox">
				</div>
			</div>
			<div class="form-line clearfix">
				<div class="fl">
					<span class="text-content">登录账号：</span> <input id="loginName2"
						class="easyui-textbox">
				</div>
				<div class='fl'>
					<span class="text-content">用户姓名：</span> <input id="userName2"
						class="easyui-textbox">
				</div>
			</div>
			<div class="form-line clearfix">
				<div class="fl">
					<span class="text-content">登录账号：</span> <input id="loginName3"
						class="easyui-textbox">
				</div>
				<div class='fl'>
					<span class="text-content">用户姓名：</span> <input id="userName3"
						class="easyui-textbox">
				</div>
			</div>
			<div class="form-line clearfix">
				<div class="fl">
					<span class="text-content">登录账号：</span> <input id="loginName2"
						class="easyui-textbox">
				</div>
				<div class='fl'>
					<span class="text-content">用户姓名：</span> <input id="userName2"
						class="easyui-textbox">
				</div>
			</div>
			<div class="form-line clearfix">
				<div class="fl">
					<span class="text-content">登录账号：</span> <input id="loginName3"
						class="easyui-textbox">
				</div>
				<div class='fl'>
					<span class="text-content">用户姓名：</span> <input id="userName3"
						class="easyui-textbox">
				</div>
			</div>
			<div class="form-line clearfix">
				<div class="fl">
					<span class="text-content">登录账号：</span> <input id="loginName2"
						class="easyui-textbox">
				</div>
				<div class='fl'>
					<span class="text-content">用户姓名：</span> <input id="userName2"
						class="easyui-textbox">
				</div>
			</div>
		</div>
		<div title="数据表格">
			<div class="easyui-layout" data-options="fit:true">
				<div data-options="region:'north',collapsible:false,border:false" style="height: 38px;">
						 	<div class="form-line clearfix">
										<div class="fl">
											<span class="text-content">开始时间：</span>
											<input id="startTime" class="easyui-datetimebox">
										</div>
										<div class="fl">
											<span class="text-content">登录账号：</span> 
											<input id=loginName  class="easyui-textbox">
										</div>
										<div class="fl">
											<a class="easyui-linkbutton" >查询不换行</a>
										</div>
							</div>
		            </div>	
		           
		             <div data-options="region:'center',split:false,border:false">
						<table id='leftGrid'></table>
					 </div>
			
			</div>
		</div>
		<div title="树形展示">
			<div class="easyui-layout" data-options="fit:true" style="overflow-y:auto;">
				<ul id="rightTree"></ul>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
$(function() {
	initGrid();
	initTree();
});
	
function initTree(){
	$('#rightTree').tree({
        lines:false,
		animate: false, 
    	multiple:false,
    	editable:false,
        checkbox:true,
        lines:false,
    	border:false,
    	parentField:"sjbmbh",  
    	textFiled:"bmmc",  
    	idFiled:"bmbh",
    	onClick:function(node){},
        onBeforeLoad:function(node,data){},
		onDblClick:function(node){
		 	$(this).tree(node.state === 'closed' ? 'expand' : 'collapse', node.target);  
		},
		onLoadSuccess:function(node, data){
			$(this).tree('expandAll',node && node.target ? node.target : null);
		} 
});
	$.ajax({
		url:'../tree.json',
		type:'get',
		dataType:'json',
		success:function(data){
			console.log(data)
			$('#rightTree').tree("loadData",data)
		}
	})
	
}
function initGrid(){
	var toolbar = [{
        text:'查询',
        iconCls:'icon-search',
        handler:function(){}
    },{	
        text:'增加',	
        iconCls:'icon-add',
        handler:function(){}
    }];
	
	$('#leftGrid').datagrid({				
		toolbar: toolbar,						
		url : '',
		columns : [ [
		{ 
			field: 'A',	
			checkbox:'true',
			width:30
		},{
			title: "设备厂商 ",						//列名称
			field: "cjmc",						//对应字段
			width: 120 							//列宽
		}, {
			title: "设备编号",
			field: "sbmc",
			width: 120
		}, {
			title: "类型名称",
			field: "csmc",
			width: 120
		}
/* 		{
			title: "操作类型",
			field: "opcommand",
			width: 180,
			formatter:function(value,record,num){	
				var text = "";						
				if(value == 1) text = '登录';
				if(value == 2) text = '查询列表';
				if(value == 3) text = '增加';
				if(value == 4) text = '修改';
				return text;
			}
		} */
		] ]
	});
	$.ajax({
		url:'../test.json',
		type:'get',
		dataType:'json',
		success:function(data){
			$('#leftGrid').datagrid("loadData",data)
		}
	})
}
</script>
</script>
</html>