83d7831e6c98925c7626c18b2da544474bb85789.svn-base 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title></title>
  6. <!--框架必需start-->
  7. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
  9. <script type="text/javascript" src="../../libs/js/framework.js"></script>
  10. <link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="../../"/>
  12. <link rel="stylesheet" type="text/css" id="customSkin"/>
  13. <!--框架必需end-->
  14. <!-- 树组件start -->
  15. <script type="text/javascript" src="../../libs/js/tree/ztree/ztree.js"></script>
  16. <link type="text/css" rel="stylesheet" href="../../libs/js/tree/ztree/ztree.css"></link>
  17. <!-- 树组件end -->
  18. <!-- 树形双选器start -->
  19. <script type="text/javascript" src="../../libs/js/form/listerTree.js"></script>
  20. <!-- 树形双选器end -->
  21. <!-- 树形下拉框start -->
  22. <script type="text/javascript" src="../../libs/js/form/selectTree.js"></script>
  23. <!-- 树形下拉框end -->
  24. </head>
  25. <body>
  26. <div class="box1" panelWidth="800">
  27. <table class="tableStyle" formMode="line">
  28. <tr>
  29. <td>选择用户1:</td>
  30. <td><input type="text" onclick="showPersonList()" readOnly="true" id="userName"/> &nbsp; &nbsp; (用户数量大时使用这种方式)</td>
  31. </tr>
  32. <tr>
  33. <td>选择用户2:</td>
  34. <td><div class="selectTree" id="selectTree1"></div>&nbsp; &nbsp; &nbsp; (用户数量小时使用这种方式)</td>
  35. </tr>
  36. <tr>
  37. <td>分配权限:</td>
  38. <td><div class="listerTree" id="listerTree1" listerHeight="300"></div></td>
  39. </tr>
  40. <tr>
  41. <td colspan="2">
  42. <input type="button" value="确定"/>
  43. <input type="button" value="取消"/>
  44. </td>
  45. </tr>
  46. </table>
  47. </div>
  48. <script>
  49. var selectData ={"fromList":[
  50. { id:1, parentId:0, name:"栏目1", open: true,"oldParentId":"null","drag":"false",icon:"../../libs/icons/list.gif"},
  51. { id:11, parentId:1, name:"资源1","oldParentId":"1",icon:"../../libs/icons/mark.gif"},
  52. { id:12, parentId:1, name:"资源2","oldParentId":"1",icon:"../../libs/icons/mark.gif"},
  53. { id:13, parentId:1, name:"资源3","oldParentId":"1",icon:"../../libs/icons/mark.gif"},
  54. { id:2, parentId:0, name:"栏目2", open: true,"oldParentId":"null","drag":"false",icon:"../../libs/icons/list.gif"},
  55. { id:21, parentId:2, name:"资源4","oldParentId":"2",icon:"../../libs/icons/mark.gif"},
  56. { id:22, parentId:2, name:"资源5","oldParentId":"2",icon:"../../libs/icons/mark.gif"},
  57. { id:23, parentId:2, name:"资源6","oldParentId":"2",icon:"../../libs/icons/mark.gif"}
  58. ],"toList":[]};
  59. var userData ={"treeNodes":[
  60. { id:1, parentId:0, name:"部门1", open: true,icon:"../../libs/icons/user_group.gif"},
  61. { id:11, parentId:1, name:"员工1",icon:"../../libs/icons/user.gif"},
  62. { id:12, parentId:1, name:"员工2",icon:"../../libs/icons/user.gif"},
  63. { id:13, parentId:1, name:"员工3",icon:"../../libs/icons/user.gif"},
  64. { id:2, parentId:0, name:"部门2", open: true,icon:"../../libs/icons/user_group.gif"},
  65. { id:21, parentId:2, name:"员工4",icon:"../../libs/icons/user.gif"},
  66. { id:22, parentId:2, name:"员工5",icon:"../../libs/icons/user.gif"},
  67. { id:23, parentId:2, name:"员工6",icon:"../../libs/icons/user.gif"}
  68. ]};
  69. function initComplete(){
  70. $("#selectTree1").data("data",userData);
  71. $("#selectTree1").render();
  72. $("#listerTree1").data("data",selectData);
  73. $("#listerTree1").render();
  74. }
  75. function showPersonList(){
  76. var diag = new top.Dialog();
  77. diag.Title = "选择用户";
  78. diag.ID="a1",
  79. diag.OKEvent = function(){
  80. top.document.getElementById("_DialogFrame_a1").contentWindow.selectUser();
  81. };
  82. diag.CancelEvent = function(){
  83. diag.close();
  84. };
  85. diag.URL = "../../sample_skin/normal/user-assignment-content.html";
  86. diag.Width=610;
  87. diag.ShowButtonRow=true;
  88. diag.show();
  89. }
  90. </script>
  91. </body>
  92. </html>