📄 assistant.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'manager.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
<script type="text/javascript" src="ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
var root=new Ext.tree.TreeNode(
{
text:'管理目录',
allowDrag:true,
expanded:true
}
);
var lease=new Ext.tree.TreeNode(
{
id:"lease",
text:"租约管理",
allowDrag:true
}
);
var invoice=new Ext.tree.TreeNode(
{
id:"invoice",
text:"账单管理",
allowDrag:true
}
);
var inspection=new Ext.tree.TreeNode(
{
id:"inspectioin",
text:"检查管理",
allowDrag:true
}
);
var student=new Ext.tree.TreeNode(
{
id:"student",
text:"学生管理",
allowDrag:true
}
);
var department=new Ext.tree.TreeNode(
{
id:"department",
text:"公寓管理",
allowDrag:true
}
);
var staff=new Ext.tree.TreeNode(
{
id:"staff",
text:"职员管理",
allowDrag:true
}
);
root.appendChild(lease,invoice,inspection,student,department,staff);
lease.appendChild(
new Ext.tree.TreeNode({id:'lease1',text:'添加租约',allowDrag:true,url:"<%=basePath%>/jsp/insert_lease.jsp"}),
new Ext.tree.TreeNode({id:'lease2',text:'查看租约',allowDrag:true,url:"<%=basePath%>/jsp/lease_list.jsp"})
);
invoice.appendChild(
new Ext.tree.TreeNode({id:'invoice1',text:'添加账单',allowDrag:true,url:"<%=basePath%>/jsp/insert_invoice.jsp"}),
new Ext.tree.TreeNode({id:'invoice2',text:'查看账单',allowDrag:true,url:"<%=basePath%>/jsp/invoice_list.jsp"})
);
inspection.appendChild(
new Ext.tree.TreeNode({id:'inspection1',text:'添加检查结果',allowDrag:true,url:"<%=basePath%>/jsp/insert_inspection.jsp"}),
new Ext.tree.TreeNode({id:'inspection2',text:'查看检查结果',allowDrag:true,url:"<%=basePath%>/jsp/inspection_list.jsp"})
);
student.appendChild(
new Ext.tree.TreeNode({id:'student1',text:'添加学生信息',allowDrag:true,url:"<%=basePath%>/jsp/studentManage/insert_student.jsp"}),
new Ext.tree.TreeNode({id:'student2',text:'快速定位',allowDrag:true,url:"<%=basePath%>/jsp/studentManage/fast_get.jsp"}),
new Ext.tree.TreeNode({id:'student3',text:'高级搜索',allowDrag:true,url:"<%=basePath%>/jsp/studentManage/advance_search.jsp"}),
new Ext.tree.TreeNode({id:'student4',text:'类别搜索',allowDrag:true,url:"<%=basePath%>/jsp/studentManage/category_search.jsp"})
);
department.appendChild(
new Ext.tree.TreeNode({id:'department1',text:'公寓信息管理',allowDrag:true,url:"<%=basePath%>/jsp/department_list.jsp"}),
new Ext.tree.TreeNode({id:'department2',text:'添加床位信息',allowDrag:true,url:"<%=basePath%>/jsp/insert_place.jsp"})
);
staff.appendChild(
new Ext.tree.TreeNode({id:'staff2',text:'职员信息查询',allowDrag:true,url:"<%=basePath%>jsp/staffManage/staff_get.jsp"})
);
var tree=new Ext.tree.TreePanel(
{
autoScroll:true,
animate:true,
enableDD:true,
containerScroll: true,
title:'管理目录',
border:false,
root:root
}
);
var viewport = new Ext.Viewport({
layout:'border',
items:
[
{
border:true,
region:'north',
contentEl:'north-div',
height:20,
html:'<div align="right"><a href="/logout.do">登出</a></div>'
},
{
title: 'west',
region: 'west',
contentEl: 'west-div',
split: true,
border: true,
collapsible: true,
width: 150,
minSize: 120,
maxSize: 200,
layout:'accordion',
//layoutConfig:{animate:true},
items:[
tree
]
},
{
region: 'center',
contentEl: 'center-div',
split: true,
border: false,
layout:'fit',
items:[
{
baseCls:'x-plain',
layout:'fit',
columnWidth:1,
bodyStyle:'padding:0px 0px 0px 0px',
items:[
{
title:'content',
id:'content',
html:'<iframe id="content-iframe" frameborder="no" src="<%=basePath%>jsp/index.jsp" style="width:100%;height:100%"></iframe>'
}
]
}
]
}
]
});
tree.on('click', function (node){
if(node.attributes.url){
//alert(Ext.getCmp('content').title);
Ext.util.CSS.swapStyleSheet('theme','css/xtheme-black.css');
Ext.get('content-iframe').dom.src = node.attributes.url;
//define grid;
return true;
}else{
node.toggle();
}
});
});
</script>
</head>
<body>
<div id="north-div">north</div>
<div id="south-div">south</div>
<div id="east-div"></div>
<div id="west-div"><div id="tb"></div></div>
<div id="center-div">center</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -