layout.ejs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <meta http-equiv="x-ua-compatible" content="ie=edge">
  7. <title>纵横造价指标系统</title>
  8. <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
  9. <link rel="stylesheet" href="/public/css/main.css">
  10. <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
  11. <!--zTree-->
  12. <link rel="stylesheet" href="/public/css/ztree/zTreeStyle.css" type="text/css">
  13. <!--spreadJs-->
  14. <link rel="stylesheet" href="/public/css/spreadjs/sheets/gc.spread.sheets.excelsmartcost.css">
  15. <!--jquery-contextmenu-->
  16. <link rel="stylesheet" href="/public/css/jquery-contextmenu/jquery.contextMenu.min.css">
  17. <!--toastr-->
  18. <link rel="stylesheet" href="/public/css/toastr.css">
  19. <script src="/public/js/jquery/jquery-3.2.1.min.js"></script>
  20. <script src="/public/js/popper/popper.min.js"></script>
  21. <script src="/public/js/bootstrap/bootstrap.min.js"></script>
  22. <script type="text/javascript" src="/public/js/ztree/jquery.ztree.core.js"></script>
  23. <script type="text/javascript" src="/public/js/ztree/jquery.ztree.excheck.js"></script>
  24. <!--jquery-contextmenu-->
  25. <script src="/public/js/jquery-contextmenu/jquery.ui.position.min.js"></script>
  26. <script src="/public/js/jquery-contextmenu/jquery.contextMenu.min.js"></script>
  27. <!--toastr-->
  28. <script src="/public/js/toastr.min.js"></script>
  29. </head>
  30. <body>
  31. <div class="header">
  32. <h1 class="logo"><a>公路造价指标系统</a></h1>
  33. <div class="poj-name">
  34. <span class="name"><%= ctx.title %></span>
  35. </div>
  36. <div class="header-box">
  37. <div class="header-nav"></div>
  38. <div class="header-user pull-right">
  39. <div class="avatar btn-group">
  40. <a class="dropdown-toggle" data-toggle="dropdown">
  41. <span class="pic"><img src="/public/images/avatar.png"></span>
  42. <span><%= ctx.session.userSession.username %></span>
  43. <span class="caret"></span>
  44. </a>
  45. <div class="dropdown-menu">
  46. <a href="/logout" class="dropdown-item">退出登录</a>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="main">
  53. <div class="main-nav">
  54. <div class="nav-top">
  55. <ul class="nav nav-pills flex-column bg-nav">
  56. <% for (const index in ctx.menuList) { %>
  57. <% if (ctx.menuList[index].display === undefined || !ctx.menuList[index].display) { continue } %>
  58. <li class="nav-item <% if (ctx.controllerName === index) { %> active <% }%>">
  59. <a href="<%= ctx.menuList[index].url %>" title="<%= ctx.menuList[index].name %>">
  60. <i class="fa <%= ctx.menuList[index].icon %>"></i> <%= ctx.menuList[index].name %>
  61. </a>
  62. </li>
  63. <% } %>
  64. </ul>
  65. </div>
  66. </div>
  67. <div class="main-panel">
  68. <%- content %>
  69. </div>
  70. </div>
  71. <%- modal %>
  72. <script src="/public/js/cookies<%= min %>.js"></script>
  73. <script src="/public/js/global.js"></script>
  74. <script type="text/javascript">
  75. autoFlashHeight();
  76. toastr.options = {
  77. "closeButton": false,
  78. "debug": false,
  79. "newestOnTop": false,
  80. "progressBar": false,
  81. "positionClass": "toast-top-center",
  82. "preventDuplicates": false,
  83. "onclick": null,
  84. "showDuration": "300",
  85. "hideDuration": "1000",
  86. "timeOut": "5000",
  87. "extendedTimeOut": "1000",
  88. "showEasing": "swing",
  89. "hideEasing": "linear",
  90. "showMethod": "fadeIn",
  91. "hideMethod": "fadeOut"
  92. };
  93. let toastInfo = '<%- JSON.stringify(message) %>';
  94. try {
  95. toastInfo = toastInfo !== '' && toastInfo !== 'null' ? JSON.parse(toastInfo) : '';
  96. } catch (error) {
  97. toastInfo = '';
  98. }
  99. if (toastInfo !== '') {
  100. toastr[toastInfo.type](toastInfo.message);
  101. }
  102. </script>
  103. </body>
  104. </html>