RoadFlow2.1 临时演示

Tree.aspx 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Tree.aspx.cs" Inherits="WebForm.Platform.Members.Tree" %>
  2. <!DOCTYPE html>
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head runat="server">
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  6. <title></title>
  7. </head>
  8. <body>
  9. <form id="form1" runat="server">
  10. <div style="margin-bottom:4px;">
  11. <select onchange="treecng(this.value);" id="showtype" class="myselect" style="width:110px;">
  12. <option value="0">组织机构</option>
  13. <option value="1">工作组</option>
  14. </select><input type="button" style="margin-left:5px;" class="mybutton" id="addWg" onclick="parent.frames[1].location = 'WorkGroupAdd.aspx' + '<%=Request.Url.Query%>'" value="添加工作组" style="display:none;" />
  15. </div>
  16. <div id="menu"></div>
  17. </form>
  18. <script type="text/javascript">
  19. var orgTree = null;
  20. var AppID = '<%=Request.QueryString["appid"]%>';
  21. $(function ()
  22. {
  23. treecng($("#showtype").val());
  24. });
  25. function treecng(val)
  26. {
  27. if (!val)
  28. {
  29. val = $("#showtype").val();
  30. }
  31. if ("1" == val)
  32. {
  33. $("#addWg").show();
  34. }
  35. else
  36. {
  37. $("#addWg").hide();
  38. }
  39. orgTree = new RoadUI.Tree({ id: "menu", path: "Tree1.ashx?showtype=" + val, refreshpath: "TreeRefresh.ashx?showtype=" + val, onclick: openurl });
  40. parent.frames[1].location = 'Empty.aspx?appid=' + AppID;
  41. }
  42. function openurl(json)
  43. {
  44. var query = "&appid=" + AppID + "&parentid=" + json.parentID + "&type=" + json.type;
  45. switch (parseInt(json.type))
  46. {
  47. case 1:
  48. case 2:
  49. case 3:
  50. parent.frames[1].location = "Body.aspx?id=" + json.id + query;
  51. break;
  52. case 4:
  53. parent.frames[1].location = "User.aspx?id=" + json.id + query;
  54. break;
  55. case 5:
  56. parent.frames[1].location = "WorkGroup.aspx?id=" + json.id + query;
  57. break;
  58. }
  59. }
  60. function reLoad(id)
  61. {
  62. orgTree.refresh(id);
  63. }
  64. </script>
  65. </body>
  66. </html>