index.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <template>
  2. <div class="application-create-top-wrap">
  3. <header class="application-create-top">
  4. <div class="top-center">
  5. <el-tabs
  6. v-model="activeName"
  7. @tab-click="handleClick"
  8. >
  9. <el-tab-pane
  10. v-for="tab in tabList"
  11. :key="tab.path"
  12. :label="tab.name"
  13. :name="tab.path"
  14. />
  15. </el-tabs>
  16. </div>
  17. </header>
  18. <div class="router-view-wrap">
  19. <router-view />
  20. </div>
  21. <div />
  22. </div>
  23. </template>
  24. <script>
  25. export default {
  26. name: 'ApplicationCreateTop',
  27. props: [],
  28. data () {
  29. return {
  30. logo: require('./static/app.png'),
  31. activeName: 'pageManagement',
  32. app: {
  33. id: '',
  34. name: '',
  35. visibility: '',
  36. code: '',
  37. icon: ''
  38. },
  39. // 和此处路由保持一致,将会激活tab,请按需更改
  40. tabList: [
  41. {
  42. name: '大屏管理',
  43. path: window.BS_CONFIG?.routers?.pageManagementUrl || '/pages'
  44. },
  45. {
  46. name: '数据集管理',
  47. path: window.BS_CONFIG?.routers?.dsManageUrl || '/data-sources'
  48. }
  49. ]
  50. }
  51. },
  52. created () {
  53. },
  54. methods: {
  55. handleClick (tab) {
  56. this.$router.push({
  57. path: tab.name
  58. })
  59. }
  60. }
  61. }
  62. </script>
  63. <style lang="scss">
  64. .header-new-drop {
  65. ::v-deep .el-dropdown-menu__item {
  66. height: 50px !important;
  67. }
  68. }
  69. </style>
  70. <style lang="scss" scoped>
  71. .application-create-top-wrap {
  72. overflow: hidden;
  73. height: 100vh;
  74. .application-create-top {
  75. height: 40px;
  76. display: flex;
  77. align-items: center;
  78. background-color: var(--bs-el-color-primary) !important;
  79. .top-left {
  80. display: flex;
  81. align-items: center;
  82. .log-img,
  83. .logo-text {
  84. margin-left: 25px;
  85. width: 100px;
  86. overflow: hidden;
  87. white-space: nowrap;
  88. text-overflow: ellipsis;
  89. }
  90. .log-img {
  91. width: 18px;
  92. height: 18px;
  93. cursor: pointer;
  94. }
  95. .logo-text {
  96. font-size: 14px;
  97. /*font-weight: bold;*/
  98. color: #ffffff;
  99. overflow: hidden;
  100. white-space: nowrap;
  101. text-overflow: ellipsis;
  102. }
  103. }
  104. .top-center {
  105. flex: 1;
  106. display: flex;
  107. align-items: center;
  108. justify-content: center;
  109. ::v-deep .el-tabs__header {
  110. margin: 0;
  111. ::v-deep .el-tabs__item {
  112. height: 51px;
  113. line-height: 51px;
  114. color: #ffffff;
  115. &:hover {
  116. background-color: hsla(0, 0%, 100%, 0.1) !important;
  117. }
  118. }
  119. }
  120. ::v-deep .el-tabs__header {
  121. margin: 0 !important;
  122. }
  123. ::v-deep .el-tabs__item {
  124. height: 40px !important;
  125. line-height: 40px !important;
  126. padding:0 10px!important;
  127. box-sizing: border-box;
  128. }
  129. ::v-deep .el-tabs__active-bar {
  130. width: 0 !important;
  131. }
  132. ::v-deep .el-tabs__item.is-active {
  133. color: #ffffff !important;
  134. background-color: hsla(0, 0%, 100%, 0.1) !important;
  135. }
  136. ::v-deep .el-tabs__item:hover {
  137. color: #fff !important;
  138. cursor: pointer;
  139. background-color: hsla(0, 0%, 100%, 0.1) !important;
  140. }
  141. ::v-deep .el-tabs__item {
  142. color: #fff !important;
  143. }
  144. }
  145. .top-right {
  146. display: flex;
  147. width: 150px;
  148. align-items: center;
  149. margin-right: 20px;
  150. justify-content: flex-end;
  151. ::v-deep .el-dropdown {
  152. padding: 4px 8px;
  153. border-radius: 4px;
  154. }
  155. .el-dropdown:hover {
  156. padding: 4px 8px;
  157. background-color: rgba(255, 255, 255, 0.1) !important;
  158. }
  159. span {
  160. cursor: pointer;
  161. font-size: 14px;
  162. color: #fff;
  163. font-weight: 500;
  164. }
  165. }
  166. }
  167. .router-view-wrap {
  168. box-sizing: border-box;
  169. // overflow: auto;
  170. overflow-y: auto;
  171. overflow-x: hidden;
  172. height: calc(100% - 40px);
  173. }
  174. .pt16 {
  175. padding-top: 16px;
  176. }
  177. .padding16 {
  178. padding: 16px;
  179. }
  180. ::v-deep .el-tabs__nav-wrap::after {
  181. width: 0 !important;
  182. }
  183. }
  184. </style>