1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <%@page contentType="text/html" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <title>角色表</title>
- <!--框架必需start-->
- <%@include file="../../include.jsp" %>
- </head>
- <body>
- <div class="cusBoxContent" style="width:600px;height:520px;overflow:auto">
- <ul id="tree-2" class="ztree"></ul>
- </div>
- <script>
- var fd_objectid="<%=request.getParameter("fd_id")%>";
- /**
- var setting2 = {
- async: {
- enable: true,
- dataType: 'JSON',
- //返回的JSON数据的名字
- dataName: 'treeNodes',
- url:$.pathname() + '/ws/button/ButtonService/getButtonTree4Role',
- autoParam: ["id", "type"],
- otherParam: {
- "role_id": fd_objectid
- }
- },
- check: {
- enable: true,
- chkStyle: "checkbox",
- chkboxType: { "Y": "s", "N": "ps" }
- }
- };
- */
- var zTree;
- $(function(){
- var url = $.pathname() + '/ws/button/ButtonService/getButtonTree4Role'
- var params = {
- id : '1',
- role_id : fd_objectid
- };
- var setting = {
- check: {
- enable: true,
- chkStyle: "checkbox",
- chkboxType: { "Y": "s", "N": "ps" }
- }
- };
- /**/
- $.ajax({
- url : url,
- type : 'post',
- timeout : 15000,
- data : params,
- async:false,
- dataType : 'json',
- success : function(data){
- zTree = $.fn.zTree.init($("#tree-2"),setting, data.treeNodes);//加载树
- }
- })
-
- });
- </script>
- </body>
|