From e2b519bd1011d2ffba8f47a6f59ed9d9a0551d4f Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 20 Nov 2024 09:12:06 +0800
Subject: [PATCH] 应急物质添加联系人
---
src/pages/layout/components/scomponents/layersControl.vue | 180 ++++++++++++++++++++++++++++++++++-------------------------
1 files changed, 104 insertions(+), 76 deletions(-)
diff --git a/src/pages/layout/components/scomponents/layersControl.vue b/src/pages/layout/components/scomponents/layersControl.vue
index c0611fa..0abf1a7 100644
--- a/src/pages/layout/components/scomponents/layersControl.vue
+++ b/src/pages/layout/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-11-12 18:15:54
+ * @LastEditTime: 2024-11-19 15:53:37
* @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue
* @Description:
*
@@ -120,6 +120,7 @@
size: 1000
},
backgroundIcon: VITE_APP_BASE + 'img/mapicon/qy.png',
+ className: 'qyfb-box',
showPanel: false,
layerName: 'qyfb'
},
@@ -138,6 +139,9 @@
type: 1,
size: 1000
},
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
+ className: 'yjc-box',
+ showPanel: false,
layerName: 'yjc'
},
{
@@ -150,20 +154,58 @@
type: 2,
size: 1000
},
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/ysf.png',
+ className: 'ysf-box',
+ showPanel: false,
layerName: 'fm'
},
{
id: '3-3',
label: '公共管网',
- type: 'layer',
- subType: 'labelPoint',
- method: getList,
- params: {
- type: 3,
- size: 1000
- },
- layerName: 'gggw'
+ children: [
+ // 给水管网、污水管网、燃气管网、雨水管网
+ {
+ id: '3-3-1',
+ label: '给水管网',
+ type: 'layer',
+ subType: 'geojsonPipe',
+ layerName: 'gsgw',
+ source: gsgw,
+ color: DC.Color.BLUE,
+ height: 65,
+ },
+ {
+ id: '3-3-2',
+ label: '污水管网',
+ type: 'layer',
+ subType: 'geojsonPipe',
+ layerName: 'wsgw',
+ source: wsgw,
+ color: DC.Color.BLACK,
+ height: 68,
+ },
+ {
+ id: '3-3-3',
+ label: '燃气管网',
+ type: 'layer',
+ subType: 'geojsonPipe',
+ layerName: 'rqgw',
+ source: rqgw,
+ color: DC.Color.RED,
+ height: 71,
+ },
+ {
+ id: '3-3-4',
+ label: '雨水管网',
+ type: 'layer',
+ subType: 'geojsonPipe',
+ layerName: 'ysgw',
+ source: ysgw,
+ color: DC.Color.CYAN,
+ height: 75,
+ },
+ ]
},
{
@@ -189,6 +231,9 @@
type: 5,
size: 1000
},
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/sk.png',
+ className: 'sk-box',
+ showPanel: false,
layerName: 'sk'
},
@@ -202,6 +247,9 @@
type: 6,
size: 1000
},
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjb.png',
+ className: 'yjb-box',
+ showPanel: false,
layerName: 'yjb'
},
@@ -215,6 +263,9 @@
type: 7,
size: 1000
},
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/xfs.png',
+ className: 'xfs-box',
+ showPanel: false,
layerName: 'xfs'
}
]
@@ -223,16 +274,40 @@
{
id: '4',
label: '风险源',
- type: 'layer',
- subType: 'labelPoint',
- method: getRiskList,
- params: {
- size: 1000
- },
- showParams: 'category',
- backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png',
- showPanel: false,
- layerName: 'fxy'
+ children: [
+ {
+ id: '4-1',
+ label: '一般',
+ type: 'layer',
+ subType: 'labelPoint',
+ method: getRiskList,
+ params: {
+ riskLevel: 1,
+ size: 1000
+ },
+ showParams: 'category',
+ className: 'fxy-ordinary',
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png',
+ showPanel: false,
+ layerName: 'fxyOrdinary',
+ },
+ {
+ id: '4-2',
+ label: '较大',
+ type: 'layer',
+ subType: 'labelPoint',
+ method: getRiskList,
+ params: {
+ riskLevel: 2,
+ size: 1000
+ },
+ showParams: 'category',
+ className: 'fxy-larger',
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png',
+ showPanel: false,
+ layerName: 'fxyLarger',
+ }
+ ]
},
{
@@ -242,55 +317,6 @@
subType: 'geojsonWall',
layerName: 'yqfw',
source: yqfw
- },
-
- {
- id: '6',
- label: '地下管网',
- children: [
- // 给水管网、污水管网、燃气管网、雨水管网
- {
- id: '6-1',
- label: '给水管网',
- type: 'layer',
- subType: 'geojsonPipe',
- layerName: 'gsgw',
- source: gsgw,
- color: DC.Color.BLUE,
- height: 5,
- },
- {
- id: '6-2',
- label: '污水管网',
- type: 'layer',
- subType: 'geojsonPipe',
- layerName: 'wsgw',
- source: wsgw,
- color: DC.Color.BLACK,
- height: 10,
- },
- {
- id: '6-3',
- label: '燃气管网',
- type: 'layer',
- subType: 'geojsonPipe',
- layerName: 'rqgw',
- source: rqgw,
- color: DC.Color.RED,
- height: 15,
- },
- {
- id: '6-4',
- label: '雨水管网',
- type: 'layer',
- subType: 'geojsonPipe',
- layerName: 'ysgw',
- source: ysgw,
- color: DC.Color.CYAN,
- height: 20,
- },
-
- ]
},
{
@@ -374,7 +400,7 @@
collectNodesWithFlag(data)
collectedNodes.value.forEach(item => {
- if (options.some(i => i.id == item.id)) {
+ if (options?.some(i => i.id == item.id)) {
// const Cesium = DC
if (item.subType == '3Dtile') {
@@ -417,8 +443,8 @@
}
let divIcon = new DC.DivIcon(
- new DC.Position(i.lng, i.lat, 0),
- `<div class="public-map-popup">
+ new DC.Position(i.lng, i.lat, 64),
+ `<div class="public-map-popup ${item.className || ''}">
${iconEl}
</div>`
)
@@ -465,7 +491,7 @@
function computeCircle(radius) {
var positions = []
- for (var i = 0; i < 1080; i++) {
+ for (var i = 0; i < 360; i++) {
var radians = DC.Math.toRadians(i)
positions.push({
x: radius * Math.cos(radians),
@@ -478,7 +504,7 @@
item.source.features.forEach(i => {
let polylineVolume = new DC.PolylineVolume(
i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
- computeCircle(0.3)
+ computeCircle(2)
)
polylineVolume.setStyle({
@@ -532,7 +558,7 @@
const restHandleCheckChange = (key) => {
let checkIds = treeRef.value?.getCheckedKeys()
- if (checkIds.some(i => i == key)) {
+ if (checkIds && checkIds.some(i => i == key)) {
return
}
@@ -543,11 +569,13 @@
const restHandleDelChange = (key) => {
let checkIds = treeRef.value?.getCheckedKeys()
- if (!checkIds.some(i => i == key)) {
+ console.log(checkIds, key)
+
+ if (checkIds && !checkIds.some(i => i == key)) {
return
}
- treeRef.value?.setCheckedKeys(checkIds.filter(i => i != key))
+ treeRef.value?.setCheckedKeys(checkIds.filter(i => i.indexOf(key)))
handleCheckChange([findObjectById(data, key)])
}
--
Gitblit v1.9.3