bird_view.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. <template>
  2. <div class="birdview">
  3. <img
  4. class="map"
  5. :src="require(`@/assets/images/resource/map/map.jpg`)"
  6. alt=""
  7. />
  8. <div
  9. class="tag"
  10. @click="onBack"
  11. :style="{
  12. top: tagData?.top,
  13. left: tagData?.left,
  14. }"
  15. >
  16. <img
  17. :src="require(`@/assets/images/resource/map/ico_address_active.png`)"
  18. alt=""
  19. />
  20. </div>
  21. <img
  22. class="close"
  23. @click="onBack"
  24. :src="require(`@/assets/images/resource/map/btn_back.png`)"
  25. alt=""
  26. />
  27. <!-- 地图区域 -->
  28. <!-- 壹号公馆 -->
  29. <img
  30. v-show="curArea == 'r_NHFYicvn'"
  31. class="img-yihao"
  32. src="../../assets/images/resource/map/img_yihao.png"
  33. alt=""
  34. />
  35. <!-- 客房区域 -->
  36. <img
  37. v-show="curArea == 'r_bwamjaD1'"
  38. class="img-kefang"
  39. src="../../assets/images/resource/map/img_kefang.png"
  40. alt=""
  41. />
  42. <img
  43. v-show="curArea == 'r_bwamjaD1'"
  44. class="img-kefang2"
  45. src="../../assets/images/resource/map/img_kefang2.png"
  46. alt=""
  47. />
  48. <!-- 酒店公区 -->
  49. <img
  50. v-show="curArea == '100'"
  51. class="img-jiudian"
  52. src="../../assets/images/resource/map/img_jiudian.png"
  53. alt=""
  54. />
  55. <div class="shoqi" @click="isAside = true">
  56. <img :src="require(`@/assets/images/resource/map/ico_up.png`)" alt="" />
  57. </div>
  58. <div class="raside" :class="{ show: isAside }">
  59. <raside @close="isAside = false" />
  60. </div>
  61. </div>
  62. </template>
  63. <script setup>
  64. import { computed, onMounted, ref } from "vue";
  65. import { useRouter, useRoute } from "vue-router";
  66. import { tag_position } from "@/data";
  67. import raside from "./raside.vue";
  68. import appStore from "@/store";
  69. const router = useRouter();
  70. let isAside = ref(true);
  71. const route = useRoute();
  72. const tagData = computed(() => tag_position[route.params.id]);
  73. let onBack = (data) => {
  74. router.replace({ name: "scene", params: { id: route.params.id } });
  75. };
  76. const curArea = ref("");
  77. onMounted(() => {
  78. curArea.value = route.params.area;
  79. console.log(route.params.area,curArea.value);
  80. });
  81. </script>
  82. <style lang="scss" scoped>
  83. $w: 8px;
  84. // 区域
  85. .img-yihao {
  86. position: absolute;
  87. height: 200px !important;
  88. top: 417px;
  89. left: 1067px;
  90. }
  91. .img-kefang {
  92. position: absolute;
  93. height: 220px !important;
  94. left: 585px;
  95. top: 115px;
  96. }
  97. .img-kefang2 {
  98. height: 350px !important;
  99. position: absolute;
  100. bottom: -20px;
  101. left: 45%;
  102. }
  103. .img-jiudian {
  104. position: absolute;
  105. left: 677px;
  106. height: 250px !important;
  107. top: 325px;
  108. }
  109. .birdview {
  110. width: 100%;
  111. height: 100%;
  112. z-index: 400;
  113. display: flex;
  114. justify-content: center;
  115. position: relative;
  116. > img {
  117. height: 100%;
  118. }
  119. .map {
  120. width: 100%;
  121. }
  122. .close {
  123. width: 60px;
  124. height: 60px;
  125. position: absolute;
  126. top: 28px;
  127. left: 20px;
  128. cursor: pointer;
  129. z-index: 99;
  130. }
  131. .shoqi {
  132. width: 60px;
  133. height: 60px;
  134. position: absolute;
  135. top: 28px;
  136. right: 40px;
  137. cursor: pointer;
  138. z-index: 99;
  139. border-radius: 50%;
  140. background: rgba(229, 220, 203, 0.3);
  141. backdrop-filter: blur(46px);
  142. text-align: center;
  143. display: flex;
  144. align-items: center;
  145. justify-content: center;
  146. > img {
  147. width: 24px;
  148. }
  149. }
  150. .tag {
  151. position: absolute;
  152. cursor: pointer;
  153. display: inline-block;
  154. text-align: center;
  155. top: 50%;
  156. left: 50%;
  157. width: 40px;
  158. z-index: 99;
  159. // background: #000;
  160. > img {
  161. width: 100%;
  162. display: inline-block;
  163. position: absolute;
  164. left: 50%;
  165. transform: translate(-50%, 0);
  166. top: 45%;
  167. }
  168. }
  169. .raside {
  170. position: absolute;
  171. right: -368px;
  172. top: 0;
  173. z-index: 101;
  174. width: 368px;
  175. height: 100%;
  176. background: rgba(229, 220, 203, 0.3);
  177. backdrop-filter: blur(46px);
  178. transition: ease 0.3s all;
  179. &.show {
  180. right: 0;
  181. }
  182. }
  183. }
  184. @keyframes upanddown {
  185. 0% {
  186. transform: translate(-50%, 0);
  187. }
  188. 50% {
  189. transform: translate(-50%, -16px);
  190. }
  191. 100% {
  192. transform: translate(-50%, 0);
  193. }
  194. }
  195. </style>