layout.ejs 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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><%= ctx.menu.name === undefined ? '主页' : ctx.menu.name %>-计量支付</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/toast.css">
  11. <link rel="stylesheet" href="/public/css/font-awesome/font-awesome.min.css">
  12. <link rel="stylesheet" type="text/css" href="/public/css/jquery-ui/jquery-ui.min.css">
  13. <link rel="stylesheet" href="/public/css/spreadjs/sheets/gc.spread.sheets.excelsmartcost.css">
  14. <link rel="stylesheet" href="/public/css/jquery-contextmenu/jquery.contextMenu.min.css">
  15. <link rel="stylesheet" href="/public/css/ztree/zTreeStyle.css" type="text/css">
  16. <link rel="stylesheet" href="/public/css/datepicker/datepicker.min.css" type="text/css">
  17. <link rel="stylesheet" href="/public/css/toastr.css">
  18. <!-- JS. -->
  19. <% for (const file of jsFiles) { %>
  20. <script type="text/javascript" src="<%- file %>"></script>
  21. <% } %>
  22. </head>
  23. <body>
  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="position: absolute; z-index: 10000;text-align: center">
  33. <i class="icon fa"></i>
  34. <span class="message"></span>
  35. </div>
  36. <%- modal %>
  37. <script type="text/javascript">
  38. toastr.options = {
  39. "closeButton": false,
  40. "debug": false,
  41. "newestOnTop": false,
  42. "progressBar": false,
  43. "positionClass": "toast-top-center",
  44. "preventDuplicates": false,
  45. "onclick": null,
  46. "showDuration": "300",
  47. "hideDuration": "1000",
  48. "timeOut": "5000",
  49. "extendedTimeOut": "1000",
  50. "showEasing": "swing",
  51. "hideEasing": "linear",
  52. "showMethod": "fadeIn",
  53. "hideMethod": "fadeOut"
  54. };
  55. let toastInfo = '<%- message %>';
  56. try {
  57. toastInfo = toastInfo !== '' && toastInfo !== 'null' ? JSON.parse(toastInfo) : '';
  58. } catch (error) {
  59. toastInfo = '';
  60. }
  61. if (toastInfo !== '') {
  62. toastr[type](toastInfo.message);
  63. }
  64. let user = '<%= ctx.session.sessionUser.name %>';
  65. </script>
  66. </body>
  67. </html>