layout.ejs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. <title><%= ctx.menu.name === undefined ? '主页' : ctx.menu.name %>-计量支付</title>
  7. <link rel="stylesheet" href="/public/css/bootstrap/bootstrap.min.css">
  8. <link rel="stylesheet" href="/public/css/main.css">
  9. <link rel="stylesheet" href="/public/css/toast.css">
  10. <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
  11. <link rel="stylesheet" type="text/css" href="/public/css/jquery-ui/jquery-ui.min.css">
  12. <link rel="stylesheet" href="/public/css/spreadjs/sheets/gc.spread.sheets.excelsmartcost.css">
  13. <link rel="stylesheet" href="/public/css/jquery-contextmenu/jquery.contextMenu.min.css">
  14. <link rel="stylesheet" href="/public/css/ztree/zTreeStyle.css" type="text/css">
  15. <link rel="stylesheet" href="/public/css/datepicker/datepicker.min.css" type="text/css">
  16. <link rel="stylesheet" href="/public/css/toastr.css">
  17. <link rel="shortcut icon" href="/public/images/favicon.ico">
  18. <!-- JS. -->
  19. <% for (const file of jsFiles) { %>
  20. <script type="text/javascript" src="<%- file %>"></script>
  21. <% } %>
  22. </head>
  23. <body oncontextmenu="return false;"> 屏蔽input鼠标右键
  24. <div>
  25. </div>
  26. <div class="main">
  27. <% include ./menu.ejs %>
  28. <div class="main-panel">
  29. <%- content %>
  30. </div>
  31. </div>
  32. <div class="toast" style="text-align: center">
  33. <i class="icon fa"></i>
  34. <span class="message"></span>
  35. </div>
  36. <!-- 遮罩层 -->
  37. <div id="hide-all" style="display:none;position: absolute;width: 100%;height: 100%;top:0;left: 0;z-index:10000000">
  38. </div>
  39. <%- modal %>
  40. <script type="text/javascript">
  41. toastr.options = {
  42. "closeButton": false,
  43. "debug": false,
  44. "newestOnTop": false,
  45. "progressBar": false,
  46. "positionClass": "toast-top-center",
  47. "preventDuplicates": false,
  48. "onclick": null,
  49. "showDuration": "300",
  50. "hideDuration": "1000",
  51. "timeOut": "5000",
  52. "extendedTimeOut": "1000",
  53. "showEasing": "swing",
  54. "hideEasing": "linear",
  55. "showMethod": "fadeIn",
  56. "hideMethod": "fadeOut"
  57. };
  58. let toastInfo = '<%- message %>';
  59. try {
  60. toastInfo = toastInfo !== '' && toastInfo !== 'null' ? JSON.parse(toastInfo) : '';
  61. } catch (error) {
  62. toastInfo = '';
  63. }
  64. if (toastInfo !== '') {
  65. toastr[toastInfo.type](toastInfo.message);
  66. }
  67. const userID = <%- ctx.session.sessionUser.accountId %>;
  68. let user = '<%= ctx.session.sessionUser.name %>';
  69. <% if (ctx.app.config.is_debug) { %>
  70. const is_debug = true;
  71. <% } %>
  72. </script>
  73. </body>
  74. </html>