aaa1a2e743f30b17168985d9624a0deecdf87712.svn-base 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <title>角色表</title>
  7. <!--框架必需start-->
  8. <%@include file="../../include.jsp" %>
  9. </head>
  10. <body>
  11. <div class="cusBoxContent" style="width:600px;height:520px;overflow:auto">
  12. <ul id="tree-2" class="ztree"></ul>
  13. </div>
  14. <script>
  15. var fd_objectid="<%=request.getParameter("fd_id")%>";
  16. /**
  17. var setting2 = {
  18. async: {
  19. enable: true,
  20. dataType: 'JSON',
  21. //返回的JSON数据的名字
  22. dataName: 'treeNodes',
  23. url:$.pathname() + '/ws/button/ButtonService/getButtonTree4Role',
  24. autoParam: ["id", "type"],
  25. otherParam: {
  26. "role_id": fd_objectid
  27. }
  28. },
  29. check: {
  30. enable: true,
  31. chkStyle: "checkbox",
  32. chkboxType: { "Y": "s", "N": "ps" }
  33. }
  34. };
  35. */
  36. var zTree;
  37. $(function(){
  38. var url = $.pathname() + '/ws/button/ButtonService/getButtonTree4Role'
  39. var params = {
  40. id : '1',
  41. role_id : fd_objectid
  42. };
  43. var setting = {
  44. check: {
  45. enable: true,
  46. chkStyle: "checkbox",
  47. chkboxType: { "Y": "s", "N": "ps" }
  48. }
  49. };
  50. /**/
  51. $.ajax({
  52. url : url,
  53. type : 'post',
  54. timeout : 15000,
  55. data : params,
  56. async:false,
  57. dataType : 'json',
  58. success : function(data){
  59. zTree = $.fn.zTree.init($("#tree-2"),setting, data.treeNodes);//加载树
  60. }
  61. })
  62. });
  63. </script>
  64. </body>