index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <script setup lang="ts">
  2. import ItemWrap from "@/components/item-wrap";
  3. import LeftTop from "./left-top.vue";
  4. import LeftCenter from "./left-center.vue";
  5. import LeftBottom from "./left-bottom.vue";
  6. import CenterMap from "./center-map.vue";
  7. import CenterBottom from "./center-bottom.vue";
  8. import RightTop from "./right-top.vue";
  9. import RightCenter from "./right-center.vue";
  10. import RightBottom from "./right-bottom.vue";
  11. import User from "./user.vue";
  12. </script>
  13. <template>
  14. <div class="index-box">
  15. <div class="contetn_left">
  16. <!-- <div class="pagetab">
  17. <div class="item">实时监测</div>
  18. <div class="item">统计分析</div>
  19. </div> -->
  20. <ItemWrap class="contetn_left-top contetn_lr-item" title="档案在位情况">
  21. <LeftTop />
  22. </ItemWrap>
  23. <ItemWrap class="contetn_left-center contetn_lr-item" title="馆藏统计">
  24. <LeftCenter />
  25. </ItemWrap>
  26. <ItemWrap class="contetn_left-bottom contetn_lr-item" title="设备提醒" style="padding: 0 10px 16px 10px">
  27. <LeftBottom />
  28. </ItemWrap>
  29. </div>
  30. <div class="contetn_center">
  31. <!-- <CenterMap class="contetn_center_top" title="设备分布图" />
  32. <ItemWrap class="contetn_center-bottom" title="安装计划">
  33. <CenterBottom />
  34. </ItemWrap> -->
  35. </div>
  36. <div class="contetn_bottom">
  37. <el-button type="primary" @click="this.$router.push('/')" class="tech-button">数据中心</el-button>
  38. <el-button type="primary" class="tech-button">消息中心</el-button>
  39. <el-button type="primary" class="tech-button">档案管理</el-button>
  40. <el-button type="primary" class="tech-button">设备管理</el-button>
  41. <el-button type="primary" class="tech-button">实时监控</el-button>
  42. <el-button type="primary" class="tech-button">报表管理</el-button>
  43. <el-button type="primary" class="tech-button" @click="this.$router.push('/user')">用户管理</el-button>
  44. <el-button type="primary" class="tech-button">系统设置</el-button>
  45. </div>
  46. <div class="contetn_right">
  47. <ItemWrap class="contetn_left-bottom contetn_lr-item" title="温湿度实时曲线">
  48. <RightTop />
  49. </ItemWrap>
  50. <ItemWrap class="contetn_left-bottom contetn_lr-item" title="实时环境" style="padding: 0 10px 16px 10px">
  51. <RightCenter />
  52. </ItemWrap>
  53. <ItemWrap class="contetn_left-bottom contetn_lr-item" title="系统消息">
  54. <RightBottom />
  55. </ItemWrap>
  56. </div>
  57. </div>
  58. </template>
  59. <style scoped lang="scss">
  60. .index-box {
  61. width: 100%;
  62. display: flex;
  63. min-height: calc(100% - 64px);
  64. justify-content: space-between;
  65. align-items: stretch;
  66. }
  67. //左边 右边 结构一样
  68. .contetn_left,
  69. .contetn_right {
  70. display: flex;
  71. flex-direction: column;
  72. justify-content: space-around;
  73. position: relative;
  74. width: 440px;
  75. box-sizing: border-box;
  76. flex-shrink: 0;
  77. margin: 0 -20px;
  78. }
  79. .contetn_center {
  80. flex: 1;
  81. margin: 0 54px;
  82. display: flex;
  83. flex-direction: column;
  84. justify-content: space-around;
  85. .contetn_center-bottom {
  86. height: 315px;
  87. }
  88. }
  89. .contetn_lr-item {
  90. height: 310px;
  91. }
  92. .contetn_bottom {
  93. width: 100%;
  94. /* 占据整个宽度 */
  95. margin-top: auto;
  96. /* 使用margin-top:auto来将内容推到最底部 */
  97. position: absolute;
  98. bottom: 0;
  99. left: 24%;
  100. }
  101. .tech-button {
  102. transition: all 0.3s;
  103. background-color: rgba(41, 58, 151, 0.5);
  104. /* 使用RGBA,降低不透明度 */
  105. color: #31abe3;
  106. border: 2px solid transparent;
  107. /* 添加透明边框 */
  108. padding: 10px 20px;
  109. min-width: 56px;
  110. min-height: 48px;
  111. font-size: large;
  112. text-shadow: 0 0 10px rgb(0, 204, 255, 0.5), 0 0 20px rgba(13, 91, 247, 0.5);
  113. &:hover {
  114. background-color: rgba(48, 63, 159, 0.8);
  115. /* 同样使用RGBA */
  116. box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  117. }
  118. &::before {
  119. content: "";
  120. position: absolute;
  121. z-index: -1;
  122. width: calc(100% + 4px);
  123. /* 边框宽度的两倍 */
  124. height: calc(100% + 4px);
  125. left: -2px;
  126. top: -2px;
  127. background: linear-gradient(to right, rgba(65, 91, 237, 0.8), rgba(48, 63, 159, 0.8));
  128. /* 渐变也使用RGBA */
  129. transform: scale3d(1, 1, 1);
  130. transition: transform 0.3s ease-out;
  131. }
  132. &:hover::before {
  133. transform: scale3d(1.2, 1.2, 1);
  134. }
  135. }
  136. </style>