LoginLayout.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <div class="fluid-dashboard">
  3. <div class="frame-top">
  4. <div class="title glow-text" :data-text="brand.title">{{ brand.title }}</div>
  5. <div class="top-right-actions">
  6. <FullscreenToggle />
  7. </div>
  8. </div>
  9. <div class="frame-bottom"></div>
  10. <slot name="background"></slot>
  11. <div class="ui-layer">
  12. <main class="main-layout" :class="layoutClass">
  13. <slot name="main"></slot>
  14. </main>
  15. </div>
  16. </div>
  17. </template>
  18. <script>
  19. import FullscreenToggle from '@/components/ui/FullscreenToggle.vue';
  20. import brand from '@/utils/brand';
  21. export default {
  22. name: 'LoginLayout',
  23. mixins: [],
  24. components: {
  25. FullscreenToggle,
  26. },
  27. props: {
  28. // 接收外部传入的 class,用于动态切换 CSS 网格布局
  29. // 例如传入 "special-situation-monitoring"
  30. layoutClass: {
  31. type: String,
  32. default: ''
  33. }
  34. },
  35. data() {
  36. return {
  37. brand,
  38. }
  39. },
  40. methods: {
  41. }
  42. }
  43. </script>
  44. <style scoped>
  45. /* ================= 根容器 ================= */
  46. .fluid-dashboard {
  47. width: 100vw;
  48. height: 100vh;
  49. position: relative;
  50. overflow: hidden;
  51. background: #050a17;
  52. /* 兜底深色背景 */
  53. }
  54. /* ================= 大屏装饰边框 ================= */
  55. .frame-top,
  56. .frame-left,
  57. .frame-right,
  58. .frame-bottom {
  59. position: absolute;
  60. pointer-events: none;
  61. /* 【核心】鼠标事件穿透,不挡底层交互 */
  62. z-index: 50;
  63. /* 层级高于 UI,低于弹窗 */
  64. }
  65. .frame-top {
  66. top: 0;
  67. left: 0;
  68. width: 100%;
  69. height: 100px;
  70. background: url('@/assets/images/layout-top.png') no-repeat center top;
  71. background-size: 100% 100%;
  72. }
  73. .top-right-actions {
  74. position: absolute;
  75. top: 2px;
  76. right: 50px;
  77. pointer-events: auto;
  78. z-index: 100;
  79. display: flex;
  80. align-items: center;
  81. gap: 12px;
  82. height: 45px;
  83. }
  84. .frame-top .title {
  85. font-family: var(--title-font-family);
  86. font-size: 48px;
  87. color: #ffffff;
  88. line-height: 63px;
  89. text-align: center;
  90. font-style: normal;
  91. text-transform: none;
  92. }
  93. .frame-left {
  94. top: 10px;
  95. left: 0;
  96. width: 16px;
  97. height: calc(100% - 10px - 40px);
  98. background: url('@/assets/images/layout-left.png') no-repeat left center;
  99. background-size: 100% 100%;
  100. }
  101. .frame-right {
  102. top: 10px;
  103. right: 0;
  104. width: 16px;
  105. height: calc(100% - 10px - 40px);
  106. background: url('@/assets/images/layout-right.png') no-repeat right center;
  107. background-size: 100% 100%;
  108. }
  109. .frame-bottom {
  110. bottom: 0;
  111. left: 0;
  112. width: 100%;
  113. height: 17px;
  114. /* background: url('@/assets/images/layout-bottom.png') no-repeat center bottom; */
  115. background-size: 100% 100%;
  116. }
  117. /* ================= UI 层与网格布局 ================= */
  118. .ui-layer {
  119. position: absolute;
  120. top: 0;
  121. left: 0;
  122. width: 100%;
  123. height: 100%;
  124. z-index: 2;
  125. pointer-events: none;
  126. /* 让鼠标穿透点到下层的地图 */
  127. display: grid;
  128. grid-template-rows: 80px 1fr;
  129. /* 头部 80px,其余给主体 */
  130. }
  131. /* --- 主体网格 --- */
  132. .main-layout {
  133. height: 100%;
  134. box-sizing: border-box;
  135. pointer-events: none;
  136. }
  137. .main-layout > * {
  138. pointer-events: auto;
  139. }
  140. </style>