瀏覽代碼

提交断面

zk 1 年之前
父節點
當前提交
85cbcbd688
共有 1 個文件被更改,包括 8 次插入2 次删除
  1. 8 2
      src/views/home/cpns/UnderWater.vue

+ 8 - 2
src/views/home/cpns/UnderWater.vue

@@ -66,6 +66,10 @@ onBeforeUnmount(() => {
 })
 
 const sxdxCurrent = ref('2023.1')
+
+const sxdxCurrentShowDuanmian = ref(false)
+
+
 const currentYear = useDateFormat(useNow(), 'YYYY').value
 
 function initSxdxData() {
@@ -121,7 +125,6 @@ function handleChooseSxdx(i, type) {
   })
 
   addLayerByName(sxdxCurrent.value,true)
-  addLayerByName("pm_"+sxdxCurrent.value,true)
 
 
 }
@@ -148,8 +151,11 @@ const currentType = ref('lashen')
 
 // 打开断面
 function handleChangeType() {
+  sxdxCurrentShowDuanmian.value=!sxdxCurrentShowDuanmian.value
+  addLayerByName("pm_"+sxdxCurrent.value,!sxdxCurrentShowDuanmian.value)
+
+
 
-  addLayerByName("pm_"+sxdxCurrent.value,false)
   // currentType.value = currentType.value==='lashen'? 'pingmian': 'lashen'
 }