ZhHeader.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <!--标题logo-->
  3. <div class="header">
  4. <router-link to="/home/Map3d">
  5. <div :class="[yztTitle?'YztTitle':'YztXzTitle']" @click="slideTitle('YztTitle')"></div>
  6. </router-link>
  7. <router-link to="/home/table">
  8. <div :class="[sqTitle?'SqTitle':'SqXzTitle']" @click="slideTitle('SqTitle')"></div>
  9. </router-link>
  10. <div :class="[ggTitle?'GgTitle':'GgXzTitle']" @click="slideTitle('GgTitle')"></div>
  11. <div :class="[ywTitle?'YwTitle':'YwXzTitle']" @click="slideTitle('YwTitle')"></div>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. name: "ZhHeader",
  17. data() {
  18. return {
  19. yztTitle: true,
  20. sqTitle: true,
  21. ggTitle: true,
  22. ywTitle: true
  23. }
  24. },
  25. methods: {
  26. slideTitle(val) {
  27. if (val == 'YztTitle') {
  28. this.yztTitle = false;
  29. this.sqTitle = true;
  30. this.ggTitle = true;
  31. this.ywTitle = true;
  32. }
  33. if (val == 'SqTitle') {
  34. this.sqTitle = false;
  35. this.yztTitle = true;
  36. this.ggTitle = true;
  37. this.ywTitle = true;
  38. }
  39. if (val == 'GgTitle') {
  40. this.ggTitle = false;
  41. this.yztTitle = true;
  42. this.sqTitle = true;
  43. this.ywTitle = true;
  44. }
  45. if (val == 'YwTitle') {
  46. this.ywTitle = false;
  47. this.yztTitle = true;
  48. this.sqTitle = true;
  49. this.ggTitle = true;
  50. }
  51. }
  52. },
  53. }
  54. </script>
  55. <style lang="scss" scoped>
  56. $fullsize: calc(100% - 0px);
  57. .header {
  58. width: 1920rem;
  59. height: 90rem;
  60. background: url(src/assets/images/logo2.png) no-repeat;
  61. background-repeat: no-repeat;
  62. background-size: contain;
  63. position: absolute;
  64. z-index: 999;
  65. }
  66. .YztTitle {
  67. left: 10%;
  68. top: 40%;
  69. width: 246rem;
  70. height: 54rem;
  71. background: url(src/assets/images/yztTitie.png) no-repeat;
  72. background-size: 100% 100%;
  73. position: absolute;
  74. }
  75. .YztXzTitle {
  76. left: 10%;
  77. top: 40%;
  78. width: 246rem;
  79. height: 54rem;
  80. background: url(src/assets/images/yztXzTitie.png) no-repeat;
  81. background-size: 100% 100%;
  82. position: absolute;
  83. }
  84. .SqTitle {
  85. left: 23%;
  86. top: 40%;
  87. width: 246rem;
  88. height: 54rem;
  89. background: url(src/assets/images/sqTitle.png) no-repeat;
  90. background-size: 100% 100%;
  91. position: absolute;
  92. }
  93. .SqXzTitle {
  94. left: 23%;
  95. top: 40%;
  96. width: 246rem;
  97. height: 54rem;
  98. background: url(src/assets/images/sqXzTitle.png) no-repeat;
  99. background-size: 100% 100%;
  100. position: absolute;
  101. }
  102. .GgTitle {
  103. left: 65%;
  104. top: 40%;
  105. width: 246rem;
  106. height: 54rem;
  107. background: url(src/assets/images/ggTitle.png) no-repeat;
  108. background-size: 100% 100%;
  109. position: absolute;
  110. }
  111. .GgXzTitle {
  112. left: 65%;
  113. top: 40%;
  114. width: 246rem;
  115. height: 54rem;
  116. background: url(src/assets/images/ggXzTitle.png) no-repeat;
  117. background-size: 100% 100%;
  118. position: absolute;
  119. }
  120. .YwTitle {
  121. left: 78%;
  122. top: 40%;
  123. width: 246rem;
  124. height: 54rem;
  125. background: url(src/assets/images/ywTitle.png) no-repeat;
  126. background-size: 100% 100%;
  127. position: absolute;
  128. }
  129. .YwXzTitle {
  130. left: 80%;
  131. top: 40%;
  132. width: 246rem;
  133. height: 54rem;
  134. background: url(src/assets/images/ywXzTitle.png) no-repeat;
  135. background-size: 100% 100%;
  136. position: absolute;
  137. }
  138. </style>