divTreeDisplay.jsp 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <%@ page contentType="text/html; charset=UTF-8" language="java"%>
  2. <%@ page language="java" import="model.setup.constant.ConstantTree" %>
  3. <%@ page import ="com.sysmodel.datamodel.xmlmodel.ModelFactory,
  4. com.sysmodel.datamodel.xmlmodel.able.MdpConstant,com.toolkit.tree.TreeNode"%>
  5. <html>
  6. <%
  7. String nodeURL = request.getParameter("nodeURL");
  8. nodeURL = nodeURL == null ? "/admin/setup/constantinit/tree/NodeContent.jsp" : nodeURL;
  9. String path =request.getContextPath();
  10. String codeName = request.getParameter("codeName") == null ? "TB_BM$_CONFIGURATION" : request.getParameter("codeName");
  11. ConstantTree myTree = new ConstantTree(codeName,path,"dataCollection",nodeURL);
  12. MdpConstant constant = ModelFactory.getSysmodel().getMdpConstantByName(codeName);
  13. String rootfrom = constant.getRootFrom();
  14. TreeNode treeNode = myTree.getCurrentTreeNode(rootfrom);
  15. String target = myTree.getLinkTarget();
  16. String str = myTree.getJsonByNodeId(codeName,myTree,target);
  17. %>
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  20. <title>����</title>
  21. <style type="text/css">
  22. body {
  23. font-size: 9pt;
  24. }
  25. a {
  26. color:#000564;
  27. font-family: "����";
  28. text-decoration:none;
  29. margin: 0pt;
  30. padding:0pt;
  31. cursor:pointer;
  32. cursor:hand;
  33. font-size: 12px
  34. }
  35. img {
  36. vertical-align: middle;
  37. border-width:0pt;
  38. margin: 0pt;
  39. padding:0pt
  40. }
  41. div{
  42. padding-left:18px;
  43. padding-right:0px;
  44. padding-top:10px;
  45. padding-bottom:0px
  46. }
  47. DivSurfaceCss{
  48. padding-left:4px;
  49. padding-right:0px;
  50. padding-top:10px;
  51. padding-bottom:0px
  52. }
  53. </style>
  54. <!--<link rel="stylesheet" href="../../../styles/css.css" type="text/css">
  55. <SCRIPT language="JavaScript" src="../../../scripts/divtree.js"></SCRIPT>
  56. <link rel="stylesheet" type="text/css" href="../../../../scripts/easyui/themes/default/easyui.css">
  57. <link rel="stylesheet" type="text/css" href="../../../../scripts/easyui/themes/icon.css">
  58. <link rel="stylesheet" type="text/css" href="../../../../scripts/easyui/demo/demo.css">
  59. <script type="text/javascript" src="../../../../scripts/easyui/jquery.min.js"></script>
  60. <script type="text/javascript" src="../../../../scripts/easyui/jquery.easyui.min.js"></script>
  61. <script type="text/javascript" src="../../../../scripts/easyui/locale/easyui-lang-zh_CN.js"></script> -->
  62. <link rel="stylesheet" href="../../../../scripts/zTree/css/demo.css" type="text/css">
  63. <link rel="stylesheet" href="../../../../scripts/zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
  64. <script type="text/javascript" src="../../../../scripts/zTree/js/jquery-1.4.4.min.js"></script>
  65. <script type="text/javascript" src="../../../../scripts/zTree/js/jquery.ztree.core-3.5.js"></script>
  66. <%-- <script language="JavaScript">
  67. var treeImagePath = "<%=path%>/admin/images/tree_images/";
  68. var url = "<%=path%>/admin/setup/constantinit/tree/divTreeService.jsp?codeName=<%=codeName%>&nodeURL=<%=nodeURL%>";
  69. var treeCloseImg = "plus.gif";
  70. var treeOpenImg = "minus.gif";
  71. </script> --%>
  72. <SCRIPT type="text/javascript">
  73. <!--
  74. var setting = {
  75. data: {
  76. simpleData: {
  77. enable: true
  78. }
  79. }
  80. };
  81. var zNodes ='<%=str %>';
  82. var obj = eval('(' + zNodes + ')');
  83. $(document).ready(function(){
  84. $.fn.zTree.init($("#treeDemo"), setting, obj);
  85. });
  86. //-->
  87. </SCRIPT>
  88. </head>
  89. <body bgcolor="#FFFFFF" oncontextmenu="if(!event.ctrlKey){return false} else {return true}" topmargin="0" leftmargin="0" onselectstart="return false">
  90. <%-- <div class="easyui-panel" style="padding:5px;height:500px;">
  91. <ul id="tt" class="easyui-tree" data-options="
  92. url: 'json_data.jsp?codeName=<%=codeName %>',
  93. method: 'get',
  94. animate: true
  95. "></ul>
  96. </div> --%>
  97. <div class="zTreeDemoBackground left">
  98. <ul id="treeDemo" class="ztree"></ul>
  99. </div>
  100. </body>
  101. </html>