From 722f87fb9221542588a9593855bb3cbcc6d55f74 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Tue, 24 Dec 2024 17:17:52 +0800
Subject: [PATCH] 图层配置调整
---
src/pages/map/components/scomponents/layersControl.vue | 185 ++++++++++++++++++++++++++++++++++------------
1 files changed, 137 insertions(+), 48 deletions(-)
diff --git a/src/pages/map/components/scomponents/layersControl.vue b/src/pages/map/components/scomponents/layersControl.vue
index 36397f2..d90e07e 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-24 17:04:32
+ * @LastEditTime: 2024-12-24 17:17:34
* @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
* @Description:
*
@@ -269,6 +269,22 @@
},
{
+ id: '3-4',
+ label: '闸坝',
+ type: 'layer',
+ subType: 'labelPoint',
+ method: getList,
+ params: {
+ type: 4,
+ size: 1000
+ },
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/zb.png',
+ className: 'sk-box',
+ showPanel: false,
+ layerName: 'zb'
+ },
+
+ {
parentId: '3',
id: '3-5',
label: '水库',
@@ -308,6 +324,80 @@
divIcon.on(DC.MouseEventType.CLICK, incident)
addPopLayers[attrParams.name].addOverlay(divIcon)
}
+ },
+
+ {
+ parentId: '3',
+ id: '3-6',
+ label: '坑塘',
+ type: 'layer',
+ subType: 'labelPoint',
+ method: getList,
+ params: {
+ type: 6,
+ size: 1000
+ },
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/kt.png',
+ className: 'sk-box',
+ showPanel: false,
+ layerName: 'kt',
+ incident: (e) => {
+ const { attrParams } = e.overlay
+ // 删除
+ destroyPop()
+ if (!attrParams.firmName) {
+ return
+ }
+ addPopLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
+ window.$viewer.addLayer(addPopLayers[attrParams.name])
+ let iconEl = `<div class="marsBlueGradientPnl">
+ <div>企业名称:${attrParams.firmName}</div>
+ <div>作用:${attrParams.mainFuncName}</div>
+ </div>`
+ let divIcon = new DC.DivIcon(
+ new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
+ `<div class="public-map-popup-two">
+ ${iconEl}
+ </div>`
+ )
+ let incident = () => {
+ destroyPop()
+ }
+ divIcon.on(DC.MouseEventType.CLICK, incident)
+ addPopLayers[attrParams.name].addOverlay(divIcon)
+ }
+ },
+
+ {
+ id: '3-7',
+ label: '洼地',
+ type: 'layer',
+ subType: 'labelPoint',
+ method: getList,
+ params: {
+ type: 7,
+ size: 1000
+ },
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/wd.png',
+ className: 'xfs-box',
+ showPanel: false,
+ layerName: 'wd'
+ },
+
+ {
+ id: '3-8',
+ label: '桥梁',
+ type: 'layer',
+ subType: 'labelPoint',
+ method: getList,
+ params: {
+ type: 8,
+ size: 1000
+ },
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/ql.png',
+ className: 'xfs-box',
+ showPanel: false,
+ layerName: 'ql'
},
]
},
@@ -396,46 +486,47 @@
addPopLayers[attrParams.name].addOverlay(divIcon)
}
},
- {
- parentId: '4',
- id: '4-9',
- label: '暂定',
- type: 'layer',
- subType: 'labelPoint',
- method: getRiskList,
- params: {
- riskLevel: 9,
- size: 1000
- },
- showParams: 'category',
- className: 'fxy-zd',
- backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd.png',
- showPanel: false,
- layerName: 'fxyZdLarger',
- incident: (e) => {
- const { attrParams } = e.overlay
- // 删除
- destroyPop()
- addPopLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
- window.$viewer.addLayer(addPopLayers[attrParams.name])
- let iconEl = `<div class="marsBlueGradientPnl">
- <li>${attrParams.firmName || ''}</li>
- <li>${attrParams.name || ''}</li>
- <li>${attrParams.riskLevelName || ''}</li>
- </div>`
- let divIcon = new DC.DivIcon(
- new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
- `<div class="public-map-popup-three">
- ${iconEl}
- </div>`
- )
- let incident = () => {
- destroyPop()
- }
- divIcon.on(DC.MouseEventType.CLICK, incident)
- addPopLayers[attrParams.name].addOverlay(divIcon)
- }
- }
+
+ // {
+ // parentId: '4',
+ // id: '4-9',
+ // label: '暂定',
+ // type: 'layer',
+ // subType: 'labelPoint',
+ // method: getRiskList,
+ // params: {
+ // riskLevel: 9,
+ // size: 1000
+ // },
+ // showParams: 'category',
+ // className: 'fxy-zd',
+ // backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd.png',
+ // showPanel: false,
+ // layerName: 'fxyZdLarger',
+ // incident: (e) => {
+ // const { attrParams } = e.overlay
+ // // 删除
+ // destroyPop()
+ // addPopLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
+ // window.$viewer.addLayer(addPopLayers[attrParams.name])
+ // let iconEl = `<div class="marsBlueGradientPnl">
+ // <li>${attrParams.firmName || ''}</li>
+ // <li>${attrParams.name || ''}</li>
+ // <li>${attrParams.riskLevelName || ''}</li>
+ // </div>`
+ // let divIcon = new DC.DivIcon(
+ // new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
+ // `<div class="public-map-popup-three">
+ // ${iconEl}
+ // </div>`
+ // )
+ // let incident = () => {
+ // destroyPop()
+ // }
+ // divIcon.on(DC.MouseEventType.CLICK, incident)
+ // addPopLayers[attrParams.name].addOverlay(divIcon)
+ // }
+ // }
]
},
@@ -476,7 +567,8 @@
panoramaShow.value = true
}
},
- {
+
+ /* {
id: '8',
label: '地面全景分布',
type: 'layer',
@@ -503,7 +595,7 @@
panoramaUrl.value = attrParams.url
panoramaShow.value = true
}
- },
+ }, */
]
// let modellayer = new DC.VectorLayer("modellayer").addTo(window.$viewer)
@@ -871,16 +963,13 @@
EventBus.emit('restHandleDelChange', `2`)
EventBus.emit('restHandleDelChange', `3-1`)
EventBus.emit('restHandleDelChange', `3-2`)
- // 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-3`)
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-1`)
EventBus.emit('restHandleDelChange', `4-2`)
EventBus.emit('restHandleDelChange', `4-9`)
--
Gitblit v1.9.3