RoadFlow2.1 临时演示

Tree.aspx 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Tree.aspx.cs" Inherits="WebForm.Platform.UserApp.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 method="post">
  10. <div style="margin:3px 0 3px 0;">
  11. <select id="role" onchange="loadTree(this.value);" class="myselect" style="width:100px;">
  12. <%=RoleOptions %>
  13. </select>
  14. </div>
  15. <div id="menu"></div>
  16. </form>
  17. <script type="text/javascript">
  18. var AppID = '<%=Request.QueryString["appid"]%>';
  19. var UserID = '<%=Request.QueryString["id"]%>';
  20. var roadTree = null;
  21. $(function ()
  22. {
  23. loadTree($('#role').val());
  24. });
  25. function loadTree(id)
  26. {
  27. $("#menu").html('');
  28. if (id.length > 0)
  29. {
  30. roadTree = new RoadUI.Tree({ id: "menu", path: "Tree1.aspx?roleid=" + id, refreshpath: "TreeRefresh.aspx?userid=" + UserID, onclick: openUrl });
  31. }
  32. }
  33. function reLoad(id)
  34. {
  35. if (roadTree != null)
  36. {
  37. roadTree.refresh(id);
  38. }
  39. }
  40. function openUrl(json)
  41. {
  42. var url = json.type == 0 ? "Body.aspx" : "Body1.aspx";
  43. parent.frames[1].location = url + "?id=" + json.id + "&appid=" + AppID + "&roleid=" + $("#role").val() + "&userid=" + UserID;
  44. }
  45. </script>
  46. </body>
  47. </html>