LoginLayout.vue 3.2 KB

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