From b67f46b4a768b4cd72d4e463c5dffefe977ddeb7 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 02 Dec 2024 22:04:27 +0800
Subject: [PATCH] 应急空间及全局图层去除废水处理站、污水池
---
src/pages/map/components/scomponents/layersControl.vue | 119 ++++++++++++++++++++++++++++++++++++++---------------------
1 files changed, 77 insertions(+), 42 deletions(-)
diff --git a/src/pages/map/components/scomponents/layersControl.vue b/src/pages/map/components/scomponents/layersControl.vue
index f70e95f..a999140 100644
--- a/src/pages/map/components/scomponents/layersControl.vue
+++ b/src/pages/map/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2024-10-31 10:47:29
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-12-02 21:12:23
+ * @LastEditTime: 2024-12-02 22:04:17
* @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
* @Description:
*
@@ -79,6 +79,8 @@
import EventBus from 'utils/bus'
import { usePointStore } from 'store/usepoint'
const pointStore = usePointStore()
+import { useRouter } from 'vue-router'
+const router = useRouter()
const { VITE_APP_BASE } = import.meta.env
// , '7',
@@ -167,14 +169,13 @@
const { attrParams } = e.overlay
// 删除
destroy()
- if (!attrParams.imageUrl) {
- return
- }
+ // if (!attrParams.imageUrl) {
+ // return
+ // }
addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
window.$viewer.addLayer(addPupoLayers[attrParams.name])
let iconEl = `<div class="marsBlueGradientPnl">
<div>${attrParams.fullName}</div>
- <img src="${attrParams.imageUrl}" />
</div>`
let divIcon = new DC.DivIcon(
new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
@@ -413,22 +414,22 @@
showPanel: false,
layerName: 'gouqu'
},
- {
- id: '3-9',
- label: '废水处理站',
- type: 'layer',
- subType: 'labelPoint',
- method: getList,
- params: {
- type: 9,
- size: 1000
- // name: '吉水县绿源污水处理厂',
- },
- backgroundIcon: VITE_APP_BASE + 'img/mapicon/wsclc.png',
- className: 'xfs-box',
- showPanel: false,
- layerName: 'fsclz'
- },
+ // {
+ // id: '3-9',
+ // label: '废水处理站',
+ // type: 'layer',
+ // subType: 'labelPoint',
+ // method: getList,
+ // params: {
+ // type: 9,
+ // size: 1000
+ // // name: '吉水县绿源污水处理厂',
+ // },
+ // backgroundIcon: VITE_APP_BASE + 'img/mapicon/wsclc.png',
+ // className: 'xfs-box',
+ // showPanel: false,
+ // layerName: 'fsclz'
+ // },
{
id: '3-10',
label: '排水口',
@@ -444,21 +445,21 @@
showPanel: false,
layerName: 'psk'
},
- {
- id: '3-11',
- label: '污水池',
- type: 'layer',
- subType: 'labelPoint',
- method: getList,
- params: {
- type: 11,
- size: 1000
- },
- backgroundIcon: VITE_APP_BASE + 'img/mapicon/wsc.png',
- className: 'xfs-box',
- showPanel: false,
- layerName: 'wsc'
- }
+ // {
+ // id: '3-11',
+ // label: '污水池',
+ // type: 'layer',
+ // subType: 'labelPoint',
+ // method: getList,
+ // params: {
+ // type: 11,
+ // size: 1000
+ // },
+ // backgroundIcon: VITE_APP_BASE + 'img/mapicon/wsc.png',
+ // className: 'xfs-box',
+ // showPanel: false,
+ // layerName: 'wsc'
+ // }
]
},
@@ -488,8 +489,7 @@
addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
window.$viewer.addLayer(addPupoLayers[attrParams.name])
let iconEl = `<div class="marsBlueGradientPnl">
- <li>${attrParams.firmName || ''}</li>
- <li>${attrParams.riskLevelName || ''}</li>
+ <li>${attrParams.name || ''}</li>
</div>`
let divIcon = new DC.DivIcon(
new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
@@ -525,9 +525,8 @@
destroy()
addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
window.$viewer.addLayer(addPupoLayers[attrParams.name])
- let iconEl = `<div class="marsBlueGradientPnl">
- <li>${attrParams.firmName || ''}</li>
- <li>${attrParams.riskLevelName || ''}</li>
+ let iconEl = `<div class="marsBlueGradientPnl">
+ <li>${attrParams.name || ''}</li>
</div>`
let divIcon = new DC.DivIcon(
new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
@@ -914,7 +913,7 @@
onMounted(() => {
setTimeout(() => {
- handleCheckChange(data.filter(i => indexPoint.value.includes(i.id)))
+ // handleCheckChange(data.filter(i => indexPoint.value.includes(i.id)))
}, 3000)
})
@@ -922,6 +921,42 @@
// watch(sharedData, (newValue) => {
// });
+// 关闭所有选中的,除了倾斜,园区分布,空中全景
+const closeAll = () => {
+ EventBus.emit('restHandleDelChange', `2`)
+ EventBus.emit('restHandleDelChange', `3`)
+ EventBus.emit('restHandleDelChange', `3-1`)
+ EventBus.emit('restHandleDelChange', `3-2`)
+ EventBus.emit('restHandleDelChange', `3-3`)
+ EventBus.emit('restHandleDelChange', `3-3-1`)
+ EventBus.emit('restHandleDelChange', `3-3-2`)
+ EventBus.emit('restHandleDelChange', `3-3-3`)
+ EventBus.emit('restHandleDelChange', `3-3-4`)
+ EventBus.emit('restHandleDelChange', `3-4`)
+ EventBus.emit('restHandleDelChange', `3-5`)
+ EventBus.emit('restHandleDelChange', `3-6`)
+ EventBus.emit('restHandleDelChange', `3-7`)
+ EventBus.emit('restHandleDelChange', `3-8`)
+ EventBus.emit('restHandleDelChange', `3-9`)
+ EventBus.emit('restHandleDelChange', `4`)
+ EventBus.emit('restHandleDelChange', `4-1`)
+ EventBus.emit('restHandleDelChange', `4-2`)
+ EventBus.emit('restHandleDelChange', `8`)
+ destroy()
+}
+
+// const sharedData = computed(() => pointStore.sharedData);
+// watch(sharedData, (newValue) => {
+// });
+// 监听当前路由路径的变化
+watch(() => router.currentRoute.value.path,
+ (newPath, oldPath) => {
+ console.log(`Current path changed from ${oldPath} to ${newPath}`)
+ closeAll()
+ },
+ { immediate: true }
+)
+
// 销毁
function destroy () {
let arr = Object.keys(addPupoLayers)
--
Gitblit v1.9.3