index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <template>
  2. <div class="big-screen-home-wrap">
  3. <header class="big-screen-home-wrap-top">
  4. <div class="logo-title">
  5. <img
  6. class="logo"
  7. :src="logo"
  8. >
  9. <span>{{ title || 'GCPAAS大屏设计器' }}</span>
  10. </div>
  11. <div class="big-screen-nav-container">
  12. <Nav
  13. :navs="tabList"
  14. @change="changeTab"
  15. />
  16. </div>
  17. </header>
  18. <div class="big-screen-router-view-wrap">
  19. <keep-alive>
  20. <router-view />
  21. </keep-alive>
  22. </div>
  23. </div>
  24. </template>
  25. <script>
  26. import Nav from './NavTop.vue'
  27. // import Nav from './Nav.vue'
  28. export default {
  29. name: 'BigScreenHome',
  30. components: {
  31. Nav
  32. },
  33. props: [],
  34. data () {
  35. return {
  36. // 和此处路由保持一致,将会激活tab,请按需更改
  37. }
  38. },
  39. computed: {
  40. title () {
  41. return window?.BS_CONFIG?.starter?.title
  42. },
  43. logo () {
  44. return window?.BS_CONFIG?.starter?.logo || require('./images/logo.png')
  45. },
  46. tabList () {
  47. return [
  48. {
  49. id: 0,
  50. name: '大屏管理',
  51. path: window?.BS_CONFIG?.routers?.pageListUrl || '/big-screen-list',
  52. icon: 'icon-icon-shujudaping'
  53. },
  54. // {
  55. // id: 1,
  56. // name: '模版管理',
  57. // path: window?.BS_CONFIG?.routers?.templateListUrl || '/big-screen-template',
  58. // icon: 'icon-xiangmuwenjianmobanku_mobanku'
  59. // },
  60. {
  61. id: 1,
  62. name: '资源库',
  63. path: window?.BS_CONFIG?.routers?.sourceUrl || '/big-screen-source',
  64. icon: 'icon-tupian'
  65. },
  66. {
  67. id: 2,
  68. name: '组件库',
  69. path: window?.BS_CONFIG?.routers?.componentUrl || '/big-screen-components',
  70. icon: 'icon-zujian1'
  71. },
  72. {
  73. id: 3,
  74. name: '数据源管理',
  75. path:
  76. window?.BS_CONFIG?.routers?.dataSourceUrl ||
  77. '/big-screen-dataSource',
  78. icon: 'icon-datafull'
  79. },
  80. {
  81. id: 4,
  82. name: '数据集管理',
  83. path: window?.BS_CONFIG?.routers?.dataSetUrl || '/big-screen-dataSet',
  84. icon: 'icon-data'
  85. }
  86. ]
  87. }
  88. },
  89. created () {},
  90. methods: {
  91. changeTab (tab) {
  92. this.$router.push({
  93. path: tab.path
  94. })
  95. }
  96. }
  97. }
  98. </script>
  99. <style lang="scss" scoped>
  100. .big-screen-home-wrap > * {
  101. box-sizing: border-box;
  102. }
  103. .big-screen-home-wrap {
  104. position: relative;
  105. overflow: hidden;
  106. height: 100vh;
  107. .big-screen-home-wrap-top {
  108. position: absolute;
  109. top: 0;
  110. width: 100%;
  111. height: 150px;
  112. background-image: url('./images/nav_img.png');
  113. background-size: 100% 150px;
  114. background-color: #0D0F12;
  115. background-position: center right;
  116. .logo-title {
  117. font-size: 30px;
  118. position: absolute;
  119. z-index: 23;
  120. top: 40px;
  121. left: 40px;
  122. display: flex;
  123. align-items: center;
  124. color: var(--bs-el-color-primary);
  125. .logo {
  126. height: 30px;
  127. }
  128. span {
  129. font-family: Source Han Sans CN;
  130. font-size: 30px;
  131. font-weight: 700;
  132. padding-left: 8px;
  133. -webkit-background-clip: text;
  134. background-size: 400% 400%;
  135. }
  136. }
  137. }
  138. .big-screen-router-view-wrap {
  139. position: absolute;
  140. top: 150px;
  141. overflow: hidden;
  142. // padding-top: 16px;
  143. width: 100%;
  144. height: calc(100vh - 150px);
  145. background-color: var(--bs-background-1);
  146. box-sizing: border-box;
  147. }
  148. }
  149. @keyframes text-animate {
  150. 0% {
  151. background-position: 0 0;
  152. -webkit-background-clip: text;
  153. }
  154. 50% {
  155. background-position: 0 0;
  156. -webkit-background-clip: text;
  157. }
  158. 100% {
  159. background-position: 0 0;
  160. -webkit-background-clip: text;
  161. }
  162. }
  163. </style>