- 注册时间
- 2012-11-7
- 最后登录
- 2018-4-2
- 阅读权限
- 10
- 积分
- 28
- 精华
- 0
- 帖子
- 5
|
说也说不明白 直接上代码-结果图片:
上代码:
- <%@page language="java" pageEncoding="UTF-8" isELIgnored="false"%>
- <%@include file="/global/jsloader/jsloader.jsp"%>
- <%@ taglib uri="/tags/spsoft" prefix="sp"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <script src="${pageContext.request.contextPath}/globalpt/scripts/boot.js" type="text/javascript"></script>
- <script type="text/javascript">
- </script>
- </head>
-
- <body>
- <div id="layout-wrap">
- <div id="layout-breadcrumb">
- 当前角色名称:安环部部长
- </div>
- <div id="layout-sidebar">
- <div id="control-area" class="border1">
- <ul id="tree2" class="mini-tree"
- showTreeIcon="true" textField="text" idField="id" parentField="pid" resultAsTree="false"
- showCheckBox="true" checkRecursive="true" autoCheckParent="true"
- onbeforenodecheck="onBeforeNodeCheck" allowSelect="false" enableHotTrack="false"
- >
- </ul>
- </div>
- </div>
- <script type="text/javascript">
- mini.parse();
- var list = [
- <%=request.getAttribute("roleTree")%>
- ];
- var tree2 = mini.get("tree2");
- tree2.loadList(list, "id", "pid");
- tree2.setValue("<%=request.getAttribute("treeStr")%>");
- function getCheckedNodes() {
- var tree = mini.get("tree2");
- var value = tree.getValue();
- return value;
- }
- //--------------------------------
- function onBeforeNodeCheck(e) {
- var tree = e.sender;
- var node = e.node;
- if (tree.hasChildren(node)) {
- //e.cancel = true;
- }
- }
- </script>
- <div id="layout-content" >
- </div>
- </div>
- </body>
- </html>
复制代码
神马情况?
|
|