MainPageTop.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. <template>
  2. <div class="main-page-top">
  3. <div class="content-wrapper">
  4. <div class="content">
  5. <div class="image-container">
  6. <img src="../../../../../assets/imgs/上海.png" alt="上海天际线"/>
  7. </div>
  8. <div class="sidebar" >
  9. <button @click="goToPage('/visualizationHome/planningPlan')" class="sidebar-1 button-with-arrow">规划计划</button>
  10. <button @click="goToPage('/visualizationHome/projectManagement')" class="sidebar-2 button-with-arrow">项目管理</button>
  11. <button @click="goToPage('/visualizationHome/device')" class="sidebar-3 button-with-arrow">设备设施监测</button>
  12. <button @click="goToPage('/visualizationHome/effect')" class="sidebar-4 button-with-arrow">成效评估</button>
  13. <button @click="goToPage('/visualizationHome/knowledgdBase')" class="sidebar-5 button-with-arrow">知识库</button>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. export default {
  21. name: "MainPageTop",
  22. methods: {
  23. goToPage(path) {
  24. this.$router.push({ path: path});
  25. }
  26. }
  27. }
  28. </script>
  29. <style scoped>
  30. .main-page-top {
  31. display: flex;
  32. flex-direction: column;
  33. background-color: #F5F5F5;
  34. padding-top: 30px;
  35. padding-bottom: 30px;
  36. }
  37. .content-wrapper {
  38. display: flex;
  39. justify-content: center; /* 居中对齐 */
  40. }
  41. .content {
  42. display: flex;
  43. align-items: flex-start;
  44. }
  45. .image-container {
  46. flex-shrink: 0;
  47. }
  48. .image-container img {
  49. width: 920px; /* 设定图片的最大宽度 */
  50. height: 520px;
  51. }
  52. .sidebar {
  53. display: flex;
  54. flex-direction: column;
  55. width: 200px;
  56. margin-left: 20px;
  57. }
  58. .sidebar button {
  59. display: block;
  60. width: 270px;
  61. height: 96px;
  62. padding: 29px;
  63. margin-bottom: 10px;
  64. border: none;
  65. cursor: pointer;
  66. border-radius: 4px;
  67. font-weight: bold;
  68. font-family: "MicrosoftYaHei-Bold", sans-serif;
  69. text-align: left;
  70. font-size: 20px;
  71. background-color: #FFFFFF;
  72. color: #333333;
  73. /* 其他样式 */
  74. box-shadow: none; /* 移除阴影效果 */
  75. }
  76. .sidebar button:focus {
  77. outline: none; /* 移除聚焦时的默认边框 */
  78. }
  79. .sidebar-1{
  80. background-image: url("../../../../../assets/imgs/mainPage/ghjh1.png");
  81. background-size: cover;
  82. }
  83. .sidebar-1:hover{
  84. background-image: url("../../../../../assets/imgs/mainPage/ghjh2.png");
  85. background-size: cover;
  86. }
  87. .sidebar-2{
  88. background-image: url("../../../../../assets/imgs/mainPage/xmgl1.png");
  89. background-size: cover;
  90. }
  91. .sidebar-2:hover{
  92. background-image: url("../../../../../assets/imgs/mainPage/xmgl2.png");
  93. background-size: cover;
  94. }
  95. .sidebar-3{
  96. background-image: url("../../../../../assets/imgs/mainPage/sbss1.png");
  97. background-size: cover;
  98. pointer-events: none;
  99. cursor: not-allowed
  100. }
  101. .sidebar-3:hover{
  102. background-image: url("../../../../../assets/imgs/mainPage/sbss2.png");
  103. background-size: cover;
  104. }
  105. .sidebar-4{
  106. background-image: url("../../../../../assets/imgs/mainPage/cxpg1.png");
  107. background-size: cover;
  108. }
  109. .sidebar-4:hover{
  110. background-image: url("../../../../../assets/imgs/mainPage/cxpg2.png");
  111. background-size: cover;
  112. }
  113. .sidebar-5{
  114. background-image: url("../../../../../assets/imgs/mainPage/zzk1.png");
  115. background-size: cover;
  116. pointer-events: none;
  117. }
  118. .sidebar-5:hover{
  119. background-image: url("../../../../../assets/imgs/mainPage/zzs2.png");
  120. background-size: cover;
  121. }
  122. .sidebar button:disabled {
  123. background-color: #F5F5F5;
  124. }
  125. .button-with-arrow {
  126. position: relative;
  127. padding-right: 10px; /* 调整箭头与按钮文本之间的间距 */
  128. }
  129. .button-with-arrow::after {
  130. content: '→'; /* 使用Unicode编码或者直接使用箭头字符 */
  131. position: absolute;
  132. top: 50%;
  133. right: 30px; /* 箭头与按钮右侧的距离 */
  134. transform: translateY(-50%);
  135. font-size: 28px; /* 调整箭头的大小 */
  136. color: #B3B3B3; /* 箭头的颜色 */
  137. }
  138. .button-with-arrow:hover{
  139. color: #0080FF; /* 箭头的颜色 */
  140. }
  141. .button-with-arrow:hover::after {
  142. color: #0080FF; /* 箭头悬停时的颜色 */
  143. }
  144. </style>