gr 1 anno fa
parent
commit
a60ef5e2c7
2 ha cambiato i file con 30 aggiunte e 2 eliminazioni
  1. 1 1
      src/views/home/Tab.vue
  2. 29 1
      src/views/home/cpns/UnderWater.vue

+ 1 - 1
src/views/home/Tab.vue

@@ -36,7 +36,7 @@ export default {
 <script setup>
   import { reactive, watch, nextTick, ref, onBeforeMount } from 'vue';
   import { useRouter } from 'vue-router'
-  import { ueCallfullExtent, ueCallFlyToHsx, ueCallFlyToSXDX } from '@/utils/UIInteractions'
+  import { ueCallfullExtent, ueCallFlyToHsx } from '@/utils/UIInteractions'
   import UnderWater from './cpns/UnderWater.vue';
   import bus from '@/utils/bus'
 

+ 29 - 1
src/views/home/cpns/UnderWater.vue

@@ -2,6 +2,9 @@
   <div class="tab-sxdx">
     <i class="sxdx-scroll scroll-left" @click="handleSxdxScroll('left')"></i>
     <i class="sxdx-scroll scroll-right" @click="handleSxdxScroll('right')"></i>
+    <i class="view-switch" @click="handleChangeView()">
+      <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="M118.656 438.656a32 32 0 0 1 0-45.248L416 96l4.48-3.776A32 32 0 0 1 461.248 96l3.712 4.48a32.064 32.064 0 0 1-3.712 40.832L218.56 384H928a32 32 0 1 1 0 64H141.248a32 32 0 0 1-22.592-9.344zM64 608a32 32 0 0 1 32-32h786.752a32 32 0 0 1 22.656 54.592L608 928l-4.48 3.776a32.064 32.064 0 0 1-40.832-49.024L805.632 640H96a32 32 0 0 1-32-32z"></path></svg>
+    </i>
     <el-carousel
       trigger="click"
       class="sxdx-list-wrapper"
@@ -40,7 +43,7 @@ import { ElCarousel, ElCarouselItem } from 'element-plus'
 import 'element-plus/es/components/carousel/style/css'
 import 'element-plus/es/components/carousel-item/style/css'
 import { useNow, useDateFormat } from '@vueuse/core'
-import { ueCallCloseWater, ueCallOpenWater, ueCallChangeShuishen, ueCallFlyToSXDX, ueCallChangeTime, ueCallGetNowTime } from '@/utils/UIInteractions'
+import { ueCallCloseWater, ueCallOpenWater, ueCallChangeShuishen, ueCallFlyToSXDX, ueCallFlyToSXDXNew, ueCallChangeTime, ueCallGetNowTime } from '@/utils/UIInteractions'
 import bus from '@/utils/bus'
 
 
@@ -112,6 +115,18 @@ function handleChooseSxdx(i, type) {
 
 const sxdxData = reactive({value: []})
 
+const currentView = ref('up')
+
+function handleChangeView() {
+  if(currentView.value==='up') {
+    ueCallFlyToSXDXNew()
+    currentView.value = 'down'
+  } else {
+    ueCallFlyToSXDX()
+    currentView.value = 'up'
+  }
+}
+
 
 </script>
 
@@ -128,6 +143,19 @@ const sxdxData = reactive({value: []})
   background: url('@/assets/imgs/navi/bg-sxdx.png') no-repeat;
   background-size: 701px 70px;
   background-position: bottom;
+  .view-switch {
+    display: block;
+    position: absolute;
+    left: 50%;
+    top: -2.5vh;
+    transform: translateX(-50%);
+    width: 25px;
+    height: 25px;
+    cursor: pointer;
+    &:hover {
+      filter: brightness(1.1);
+    }
+  }
 
   .sxdx-list-wrapper {
     width: 100%;