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 +++++++++++++++++++++++++++---------
public/img/mapicon/wd.png | 0
public/img/mapicon/zb.png | 0
public/img/mapicon/ql.png | 0
src/views/space/components/leftContainer.vue | 64 +-----------
public/img/mapicon/kt.png | 0
6 files changed, 143 insertions(+), 106 deletions(-)
diff --git a/public/img/mapicon/kt.png b/public/img/mapicon/kt.png
new file mode 100644
index 0000000..e1e345b
--- /dev/null
+++ b/public/img/mapicon/kt.png
Binary files differ
diff --git a/public/img/mapicon/ql.png b/public/img/mapicon/ql.png
new file mode 100644
index 0000000..4b3293c
--- /dev/null
+++ b/public/img/mapicon/ql.png
Binary files differ
diff --git a/public/img/mapicon/wd.png b/public/img/mapicon/wd.png
new file mode 100644
index 0000000..7f5e0c8
--- /dev/null
+++ b/public/img/mapicon/wd.png
Binary files differ
diff --git a/public/img/mapicon/zb.png b/public/img/mapicon/zb.png
new file mode 100644
index 0000000..598232c
--- /dev/null
+++ b/public/img/mapicon/zb.png
Binary files differ
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`)
diff --git a/src/views/space/components/leftContainer.vue b/src/views/space/components/leftContainer.vue
index 3b7bdcb..a9d6a03 100644
--- a/src/views/space/components/leftContainer.vue
+++ b/src/views/space/components/leftContainer.vue
@@ -2,7 +2,7 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2023-03-10 15:27:59
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2024-11-28 11:35:07
+ * @LastEditTime: 2024-12-24 17:12:17
* @FilePath: \bigScreen\src\views\space\components\leftContainer.vue
* @Description:
*
@@ -17,18 +17,6 @@
data: []
})
-const gawList = ref([
- {
- label: '污水管网',
- value: "3-3-2",
- select: true
- },
- {
- label: '雨水管网',
- value: "3-3-4",
- select: false
- },
-])
const curSelect = ref('')
// 获取下拉字典
@@ -37,7 +25,7 @@
code: code,
}
getDictionary(param).then((res) => {
- resData.data = res.data.data.filter(i => i.dictKey != 7 && i.dictKey != 9 && i.dictKey != 11).map(item => {
+ resData.data = res.data.data.map(item => {
return {
label: item.dictValue,
value: item.dictKey
@@ -51,41 +39,14 @@
const tabClick = (item) => {
EventBus.emit('destroyPop', 'destroyPop')
if (curSelect.value) {
- if (curSelect.value == '3') {
- 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`)
- } else {
- gawList.value.forEach(element => {
- if (element.value == `3-3-2`) {
- element.select = true
- } else {
- element.select = false
- }
- });
- EventBus.emit('restHandleDelChange', `3-${curSelect.value}`)
- }
+ EventBus.emit('restHandleDelChange', `3-${curSelect.value}`)
}
curSelect.value = item.value
- if (item.value == '3') {
- EventBus.emit('restHandleCheckChange', `3-3-2`)
- } else {
- EventBus.emit('restHandleCheckChange', `3-${item.value}`)
- }
+
+ EventBus.emit('restHandleCheckChange', `3-${item.value}`)
+
EventBus.emit('spaceTabChange', item.value)
EventBus.emit('flyToyqfw', 'flyToyqfw')
-}
-
-const tabClickGW = (item) => {
- if (item.select) {
- EventBus.emit('restHandleDelChange', item.value)
- item.select = false
- } else {
- EventBus.emit('restHandleCheckChange', item.value)
- item.select = true
- }
}
const showOn = computed(() => (item) => {
@@ -118,19 +79,6 @@
</div>
</div>
</div>
- <div v-if="curSelect == '3'">
- <div class="cur-container-title">
- <div class="tablist">
- <div class="cursor-p" :class="{ on: item.select }" v-for="item, index in gawList" :key="index"
- @click="tabClickGW(item)">
- <div class="label-box">
- {{ item.label }}
- </div>
- </div>
- </div>
- </div>
- </div>
-
</div>
</template>
--
Gitblit v1.9.3