- 注册时间
- 2014-3-5
- 最后登录
- 2014-4-29
- 阅读权限
- 10
- 积分
- 108
- 精华
- 0
- 帖子
- 27
|
lost 发表于 2014-3-14 14:53
是不是树节点和tabs对应的页面名称重复了,所有会出现一个页面重复。
你仔细看下你的节点和对应页面的名 ... 代码那个地方是没有重复的<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
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>
<title>myindex.html</title>
<link href="../demo/demo.css" rel="stylesheet" type="text/css" />
<!-- <script src="../../minijs/index.js" type="text/javascript">-->
</script>
<script src="../scripts/boot.js" type="text/javascript">
</script>
<script type="text/javascript">
</script>
<style type="text/css">
body {
margin: 0;
padding: 0;
border: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
.header {
background: url(../header.gif) repeat-x 0 -1px;
}
</style>
</head>
<!-- 加载f()方法 -->
<body>
<div id="layout1" class="mini-layout"
style="width: 100%; height: 100%;">
<div class="header" region="north" height="34" showSplit="false"
showHeader="false">
<table width="96%">
<tr>
<td width="25%">
</td>
<td align=left width="35%">
<img src="../images/6.jpg" width="600px" height="20px">
<!-- <img src="../images/xws_title.jpg" > -->
</td>
<td width="7%" align="left">
</td>
<td width="10%">
</td>
<td align="left" width="20%">
</td>
</tr>
</table>
</div>
<div title="center" region="center" bodyStyle="overflow:hidden;">
<!--Splitter-->
<div class="mini-splitter" style="width: 100%; height: 100%;"
borderStyle="border:0;">
<!--OutlookTree-->
<div size="180" maxSize="250" minSize="100"
showCollapseButton="true" style="border: 0;">
<div id="leftTree" class="mini-outlooktree"
url="../TreeController/getTree.do"
textField="text" idField="id" parentField="pid">
</div>
</div>
<div showCollapseButton="false" style="border: 0;">
<!--Tabs-->
<div id="mainTabs" class="mini-tabs" activeIndex="2"
style="width: 100%; height: 100%;" plain="true">
<!-- <div title="证书查询"-->
<!-- url="../pagesarch.html">-->
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
mini.parse();
var tree = mini.get("leftTree");
var skin = mini.Cookie.get("miniuiSkin");
if (skin) {
var selectSkin = document.getElementById("selectSkin");
selectSkin.value = skin;
} else {
onSkinChange('blue');
}
function sd(){
window.location
}
var tree = mini.get("leftTree");
function showTab(node) {
var tabs = mini.get("mainTabs");
var id = "tab$" + node.id;
//添加注销
if ("tab$133" == id) {
mini.open( {
url : bootPATH + "../pages/page.html",
title : "注销",
width : 250,
height : 180
});
} else {
var tab = tabs.getTab(id);
if (!tab) {
tab = {};
tab.name = id;
tab.title = node.text;
tab.showCloseButton = true;
//这里拼接了url,实际项目,应该从后台直接获得完整的url地址
//tab.url = mini_JSPath + "../../docs/api/" + node.id + ".html";
//tab.url = mini_JSPath + "../../pages/search.html";
tab.url = mini_JSPath + "../../" + node.url;
tabs.addTab(tab);
}
tabs.activeTab(tab);
}
}
function onNodeSelect(e) {
var node = e.node;
var isLeaf = e.isLeaf;
if (isLeaf) {
showTab(node);
}
}
//设置默认页面
function f() {
var tabs = mini.get("mainTabs");
var tab = tabs.getTab('tab$111');
if (!tab) {
tab = {};
tab.name = 'tab$111';
tab.title = "备案查询";
tab.showCloseButton = true;
tab.url = mini_JSPath + "../../pages/applySearch.jsp";
tabs.addTab(tab);
}
loginIsno();
tabs.activeTab(tab);
}
function onClick(e) {
var text = this.getText();
alert(text);
}
function onQuickClick(e) {
tree.expandPath("datagrid");
tree.selectNode("datagrid");
}
function shift(type) {
var types;
types = type;
if (types == '1') {
types = "zh_CN"
} else if (types == '2') {
types = "en_US"
}
var url = "../InternationalizationControl/InternationalShift.do?type="
+ types;
$.ajax( {
url : url,
type : "get",
success : function(text) {
window.location.href = "../pages/index.jsp";
}
});
}
function onSkinChange(skin) {
mini.Cookie.set('miniuiSkin', skin, 100);//100天过期的话,可以保持皮肤切换
window.location.reload()
}
function loginIsno(){
window.location.href="../LoginController/loginIsnot.do";
}
</script>
</body>
</html>
|
|