Browse Source

水深断面增加年份调用参数

sbj 7 months ago
parent
commit
967eafab4d

File diff suppressed because it is too large
+ 10584 - 27
package-lock.json


+ 5 - 4
src/utils/UIInteractions.js

@@ -378,10 +378,10 @@ export function ueCallCloseRlt() {    // 关闭轮渡客流
 
 
 
-export function ueCallChangeMi (consmi) {    //更改米深
+export function ueCallChangeMi (year,consmi) {    //更改米深
   callUIInteractionFormat({
     "ActionName":"change_mi",
-    "Parameters":{"mi":consmi}
+    "Parameters":{"year":year, "mi":consmi}
 
   })
 }
@@ -390,9 +390,10 @@ export function ueCallCloseMi () {    //更改米深
     "ActionName":"close_mi"
   })
 }
-export function ueCallShowAllMi () {
+export function ueCallShowAllMi (year) {
   callUIInteractionFormat({
-    "ActionName":"showAll_mi"
+    "ActionName":"showAll_mi",
+    "Parameters":{"year":year}
   })
 }
 

+ 6 - 1
src/views/home/Header.vue

@@ -137,7 +137,12 @@ function handleToggleLayer(index) {
           if (clickWeeather.value) {
             miForChangeShow.value = true
             subList.data[index].status = true
-            ueCallShowAllMi()
+              let sxdxCurrentVal = null
+              // 获取水下地形版本号
+              bus.emit('toggle_sxdxCurrent', (data)=> {
+                  sxdxCurrentVal = data
+              })
+            ueCallShowAllMi(sxdxCurrentVal)
           } else {
             subList.data[index].status = false
           }

+ 7 - 2
src/views/home/cpns/MiForChange.vue

@@ -23,6 +23,7 @@ import {
   ueCallChangeMi
 } from '@/utils/UIInteractions'
 import {reactive} from "vue";
+import bus from "@/utils/bus";
 
 const hightLightSomeOne = reactive([
   // { name: '50m', status: false },
@@ -37,8 +38,12 @@ function showMi(mi,index){
       item.status = false
     }
   })
-
-  ueCallChangeMi(mi.name)
+    let sxdxCurrentVal = null
+    // 获取水下地形版本号
+    bus.emit('toggle_sxdxCurrent', (data)=> {
+        sxdxCurrentVal = data
+    })
+  ueCallChangeMi(sxdxCurrentVal,mi.name)
 }
 
 </script>

+ 4 - 0
src/views/home/cpns/UnderWater.vue

@@ -67,6 +67,10 @@ onBeforeUnmount(() => {
 const sxdxCurrent = ref('2023.1')
 const currentYear = useDateFormat(useNow(), 'YYYY').value
 
+bus.on('toggle_sxdxCurrent', (callback) => {
+    callback(sxdxCurrent.value)
+})
+
 function initSxdxData() {
   for(let i=Number(currentYear); i>=2020; i--) {
     let usable1 = true