智慧园区前端大屏
shuishen
2025-08-18 f5f2445d7f5c102734ef8d86e9c8ec828374adc3
突发事件模拟相关调整处理
4 files modified
1 files added
3734 ■■■■■ changed files
src/assets/json/dispose.json 74 ●●●●● patch | view | raw | blame | history
src/assets/json/qysgwslx.json 1002 ●●●●● patch | view | raw | blame | history
src/pages/map/components/scomponents/layersControl.vue 2145 ●●●● patch | view | raw | blame | history
src/styles/element/index.scss 230 ●●●●● patch | view | raw | blame | history
src/views/pd/components/dynamicPanel.vue 283 ●●●● patch | view | raw | blame | history
src/assets/json/dispose.json
New file
@@ -0,0 +1,74 @@
{
    "categoryTypeData": [
        {
            "type": 1,
            "processFlowData": [
                {
                    "message": "202X年某月某日某时,化工园区某企业泄漏事故。立即启动应急预案。",
                    "type": 0
                },
                {
                    "message": "关闭雨水/污水排口手动阀。",
                    "type": 7
                },
                {
                    "message": "利用围堰或收集系统拦截污水。",
                    "type": 0
                },
                {
                    "message": "调用应急物资,组织队伍处置泄漏源。",
                    "type": 0
                },
                {
                    "message": "将污水导入事故应急池或初期雨水池。",
                    "type": 0
                },
                {
                    "message": "事件通报:当企业发生突发环境事件且自身应急池容量不足时,立即向相邻企业和园区管委会通报事件情况。",
                    "type": 0
                },
                {
                    "message": "应急空间调配:通过管道将事故污水转输至相邻企业的应急设施中,利用片区内形成的应急空间进行储存和处理。",
                    "type": 0
                },
                {
                    "message": "协同处置:相邻企业的应急救援队伍和物资根据需要进行支援,协同处理事故污水,确保事故得到有效控制。",
                    "type": 0
                },
                {
                    "message": "信息共享:在事件处理过程中,各企业和园区管委会应保持信息畅通,及时共享事故处理进展和监测数据。",
                    "type": 0
                }
            ]
        },
        {
            "type": 2,
            "processFlowData": [
                {
                    "message": "事件响应:当园区内发生突发环境事件且企业级和企间级防控体系未能有效控制事故污水时,园区应急指挥部立即启动园区级应急预案。",
                    "type": 0
                },
                {
                    "message": "闸坝控制:根据事故发生的位置和污水流向,关闭相关闸坝,拦截上游来水,形成蓄污空间,防止事故污水流出园区。",
                    "type": 4
                },
                {
                    "message": "应急池利用:将事故污水引入园区公共应急池进行储存,并启动相应的处理设施对污水进行处理。",
                    "type": 0
                },
                {
                    "message": "应急物资与队伍调配:调用园区环境应急物资库中的物资和应急救援队伍,进行现场处置和救援工作。",
                    "type": 0
                },
                {
                    "message": "监测与决策:利用数字化监管平台对事故污水的扩散范围、水质情况等进行实时监测,根据监测数据制定科学的处理方案,进行综合协调指挥和智慧辅助决策。",
                    "type": 0
                },
                {
                    "message": "事后处理:事件处理完毕后,对事故原因进行调查分析,总结经验教训,对园区防控体系进行评估和改进,同时对受影响的环境进行修复。",
                    "type": 0
                }
            ]
        }
    ]
}
src/assets/json/qysgwslx.json
@@ -1 +1,1001 @@
{"type":"FeatureCollection","crs":{"type":"name","properties":{"name":"EPSG:4490"}},"features":[{"type":"Feature","id":9,"geometry":{"type":"LineString","coordinates":[[115.60438871383667,29.811934405061905,0],[115.60443699359894,29.814191812678956,0],[115.60400784015656,29.814201121470827,0],[115.60402393,29.814303519999999,0]]},"properties":{"FID":9,"O_Name":"惠城1","O_Com":" ","O_LClr":16711680,"O_LWidth":1,"O_LAlpha":100,"O_LType":0,"O_SType":5,"O_TType":0}}]}
{
    "type": "FeatureCollection",
    "crs": {
        "type": "name",
        "properties": {
            "name": "EPSG:4490"
        }
    },
    "features": [
        {
            "type": "Feature",
            "id": 0,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.6064574,
                        29.810441640000001,
                        0
                    ],
                    [
                        115.60645669698715,
                        29.810358843982005,
                        0
                    ],
                    [
                        115.60646206140505,
                        29.810228515808895,
                        0
                    ],
                    [
                        115.60773611,
                        29.810272730000001,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 0,
                "O_Name": "浩普1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 1,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.6068429350853,
                        29.810565972335851,
                        0
                    ],
                    [
                        115.6068442761898,
                        29.810241315905042,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 1,
                "O_Name": "浩普流向2",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 2,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60694620013237,
                        29.810567135977077,
                        0
                    ],
                    [
                        115.6068429350853,
                        29.810565972335851,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 2,
                "O_Name": "浩普3",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 3,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60694888234138,
                        29.81031113458128,
                        0
                    ],
                    [
                        115.6068442761898,
                        29.810312298225462,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 3,
                "O_Name": "浩普4",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 4,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.6059604883194,
                        29.808257281482092,
                        0
                    ],
                    [
                        115.60691803693771,
                        29.808261936154363,
                        0
                    ],
                    [
                        115.60690462589264,
                        29.808860059739221,
                        0
                    ],
                    [
                        115.60755103826523,
                        29.808855405094786,
                        0
                    ],
                    [
                        115.6075456738472,
                        29.809113737533405,
                        0
                    ],
                    [
                        115.60777098,
                        29.809097449999999,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 4,
                "O_Name": "海德森流向1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 5,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60681074857712,
                        29.808373648223974,
                        0
                    ],
                    [
                        115.60691803693771,
                        29.808375975557439,
                        0
                    ],
                    [
                        115.6069153547287,
                        29.808375975557439,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 5,
                "O_Name": "海德森2",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 6,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60652643442154,
                        29.80897642577974,
                        0
                    ],
                    [
                        115.60653448104858,
                        29.808862387061357,
                        0
                    ],
                    [
                        115.60690462589264,
                        29.808860059739221,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 6,
                "O_Name": "海德森3",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 7,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.6071862578392,
                        29.808950825262446,
                        0
                    ],
                    [
                        115.60719162225723,
                        29.808857732417032,
                        0
                    ],
                    [
                        115.60719162225723,
                        29.808862387061357,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 7,
                "O_Name": "海德森4",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 8,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60744911432266,
                        29.809102100951424,
                        0
                    ],
                    [
                        115.6075456738472,
                        29.809113737533405,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 8,
                "O_Name": "海德森5",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 9,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60438871383667,
                        29.811934405061905,
                        0
                    ],
                    [
                        115.60443699359894,
                        29.814191812678956,
                        0
                    ],
                    [
                        115.60400784015656,
                        29.814201121470827,
                        0
                    ],
                    [
                        115.60402393,
                        29.814303519999999,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 9,
                "O_Name": "惠城1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 10,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60414731502533,
                        29.813475033101906,
                        0
                    ],
                    [
                        115.60441553592682,
                        29.813479687531327,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 10,
                "O_Name": "惠城2",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 11,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60391664505005,
                        29.814177849489514,
                        0
                    ],
                    [
                        115.60401588507827,
                        29.814252320735413,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 11,
                "O_Name": "惠城3",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 12,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60430824756622,
                        29.812297455499102,
                        0
                    ],
                    [
                        115.60438334941864,
                        29.812288146529998,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 12,
                "O_Name": "惠城4",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 13,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60240924358368,
                        29.818003690463456,
                        0
                    ],
                    [
                        115.60243606567383,
                        29.815094761455835,
                        0
                    ],
                    [
                        115.60322999954224,
                        29.815062180971676,
                        0
                    ],
                    [
                        115.60324609279633,
                        29.815066835327194,
                        0
                    ],
                    [
                        115.60322463512421,
                        29.815076144037612,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 13,
                "O_Name": "建衡1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 14,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60326755046844,
                        29.816351429171185,
                        0
                    ],
                    [
                        115.60244143009186,
                        29.816360737761993,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 14,
                "O_Name": "建衡2",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 15,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60636281967163,
                        29.827856185875092,
                        0
                    ],
                    [
                        115.6065559387207,
                        29.819199817513827,
                        0
                    ],
                    [
                        115.60770392000001,
                        29.81936271,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 15,
                "O_Name": "新洋丰1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 16,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.6061053276062,
                        29.82733496340213,
                        0
                    ],
                    [
                        115.60638427734375,
                        29.827362886103536,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 16,
                "O_Name": "新洋丰2",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 17,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60486078262329,
                        29.8229696184695,
                        0
                    ],
                    [
                        115.60648083686829,
                        29.822960310494079,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 17,
                "O_Name": "新洋丰3",
                "O_Com": " ",
                "O_LClr": 65535,
                "O_LWidth": 3,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 18,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.61106204986572,
                        29.828489095223151,
                        0
                    ],
                    [
                        115.61095476150513,
                        29.815104070163649,
                        0
                    ],
                    [
                        115.60837984085083,
                        29.815085452747155,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 18,
                "O_Name": "理文化工1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 19,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.61803579330444,
                        29.824747425880204,
                        0
                    ],
                    [
                        115.6181001663208,
                        29.820298193950755,
                        0
                    ],
                    [
                        115.61546087265015,
                        29.820298193950755,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 19,
                "O_Name": "理文造纸1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 20,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.61301469802856,
                        29.812311418951129,
                        0
                    ],
                    [
                        115.61297178268433,
                        29.814098724712526,
                        0
                    ],
                    [
                        115.61436653137207,
                        29.814042871891065,
                        0
                    ],
                    [
                        115.6181001663208,
                        29.820298193950755,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 20,
                "O_Name": "理文造纸2",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 21,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.61226367950439,
                        29.813447106520879,
                        0
                    ],
                    [
                        115.61297178268433,
                        29.813447106520879,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 21,
                "O_Name": "理文造纸3",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 22,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.61292886734009,
                        29.812032149540045,
                        0
                    ],
                    [
                        115.61298251152039,
                        29.80846674152,
                        0
                    ],
                    [
                        115.61461328999999,
                        29.808508629999999,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 22,
                "O_Name": "瑞易德1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 23,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.61420559883118,
                        29.809369741994452,
                        0
                    ],
                    [
                        115.61299324035645,
                        29.809379051235233,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 23,
                "O_Name": "瑞易德2",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 24,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.60965657234192,
                        29.80230377831916,
                        0
                    ],
                    [
                        115.61287522315979,
                        29.797900099223128,
                        0
                    ],
                    [
                        115.61218857765198,
                        29.797481134454525,
                        0
                    ],
                    [
                        115.61233878,
                        29.797360099999999,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 24,
                "O_Name": "天际1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 25,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.62846958637238,
                        29.802336362959974,
                        0
                    ],
                    [
                        115.62819063663483,
                        29.802736687680806,
                        0
                    ],
                    [
                        115.62498807907104,
                        29.801461228921465,
                        0
                    ],
                    [
                        115.62493443,
                        29.801568289999999,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 25,
                "O_Name": "中建材1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 26,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.62394201755524,
                        29.806134728352237,
                        0
                    ],
                    [
                        115.62506318092346,
                        29.806400049956888,
                        0
                    ],
                    [
                        115.62465012073517,
                        29.807619589332525,
                        0
                    ],
                    [
                        115.62449454999999,
                        29.807708030000001,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 26,
                "O_Name": "熠亮1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        },
        {
            "type": "Feature",
            "id": 27,
            "geometry": {
                "type": "LineString",
                "coordinates": [
                    [
                        115.62273502349854,
                        29.804905861215001,
                        0
                    ],
                    [
                        115.6233412027359,
                        29.805050160789971,
                        0
                    ],
                    [
                        115.62374353408813,
                        29.803951616850156,
                        0
                    ],
                    [
                        115.62301397323608,
                        29.803728182707971,
                        0
                    ],
                    [
                        115.62345385551453,
                        29.802420151987597,
                        0
                    ],
                    [
                        115.62248826026917,
                        29.802192059470094,
                        0
                    ]
                ]
            },
            "properties": {
                "FID": 27,
                "O_Name": "荣联环保1",
                "O_Com": " ",
                "O_LClr": 16711680,
                "O_LWidth": 1,
                "O_LAlpha": 100,
                "O_LType": 0,
                "O_SType": 5,
                "O_TType": 0
            }
        }
    ]
}
src/pages/map/components/scomponents/layersControl.vue
@@ -2,51 +2,52 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-31 10:47:29
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-02-19 11:42:40
 * @LastEditTime: 2025-08-18 18:49:54
 * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
 * @Description:
 *
 * Copyright (c) 2024 by shuishen, All Rights Reserved.
-->
<template>
  <public-box v-show="showLayerControl">
    <template #name>
      <div class="name"><i class="fa fa-tasks"></i>&nbsp;图层</div>
    </template>
    <public-box v-show="showLayerControl">
        <template #name>
            <div class="name"><i class="fa fa-tasks"></i>&nbsp;图层</div>
        </template>
    <template #close>
      <div class="close cursor-p" @click="emit('close', 'layers')"><i class="fa fa-close"></i></div>
    </template>
        <template #close>
            <div class="close cursor-p" @click="emit('close', 'layers')"><i class="fa fa-close"></i></div>
        </template>
    <template #content>
      <div class="tree-content">
        <el-tree ref="treeRef" :data="data" draggable="" show-checkbox node-key="id" default-expand-all
          :default-checked-keys="indexPoint" :props="defaultProps" :indent="treeProps['indent']"
          @check="handleCheckChange">
          <template v-slot:default="{ node }">
            <element-tree-line :node="node" :showLabelLine="treeProps['showLabelLine']" :indent="treeProps['indent']">
              <!-- 自定义label的slot -->
              <template v-slot:node-label>
                <span style="font-size: 12px">
                  {{ node.label }}
                  <i class="el-icon-eleme"></i></span>
              </template>
              <!-- 在右边追加内容的slot -->
              <!-- <template v-slot:after-node-label>
        <template #content>
            <div class="tree-content">
                <el-tree ref="treeRef" :data="data" draggable="" show-checkbox node-key="id" default-expand-all
                    :default-checked-keys="indexPoint" :props="defaultProps" :indent="treeProps['indent']"
                    @check="handleCheckChange">
                    <template v-slot:default="{ node }">
                        <element-tree-line :node="node" :showLabelLine="treeProps['showLabelLine']"
                            :indent="treeProps['indent']">
                            <!-- 自定义label的slot -->
                            <template v-slot:node-label>
                                <span style="font-size: 12px">
                                    {{ node.label }}
                                    <i class="el-icon-eleme"></i></span>
                            </template>
                            <!-- 在右边追加内容的slot -->
                            <!-- <template v-slot:after-node-label>
                <span style="padding-right: 10px">
                  <el-button type="primary" size="mini" @click.stop="openDrawer(node)">新增子节点</el-button>
                  <el-button type="primary" size="mini" @click.stop="openDrawer(node)">修改</el-button>
                  <el-button type="danger" size="mini" @click.stop="openDialog">删除</el-button></span>
              </template> -->
            </element-tree-line>
          </template>
        </el-tree>
      </div>
    </template>
  </public-box>
                        </element-tree-line>
                    </template>
                </el-tree>
            </div>
        </template>
    </public-box>
  <panorama v-show="panoramaShow" :title="panoramaTitle" :url="panoramaUrl" @closePanoramaPopup="closePanoramaPopup">
  </panorama>
    <panorama v-show="panoramaShow" :title="panoramaTitle" :url="panoramaUrl" @closePanoramaPopup="closePanoramaPopup">
    </panorama>
</template>
<script setup>
@@ -59,11 +60,11 @@
window.$viewer.addLayer(planToBuild)
const {
  show: showLayerControl
    show: showLayerControl
} = defineProps({
  show: {
    default: false
  }
    show: {
        default: false
    }
})
const emit = defineEmits(['close'])
@@ -91,7 +92,7 @@
import { useRouter } from 'vue-router'
const router = useRouter()
import {
  ElMessage
    ElMessage
} from 'element-plus'
const { VITE_APP_BASE } = import.meta.env
@@ -101,8 +102,8 @@
const treeRef = ref(null)
const treeProps = {
  indent: 16,
  showLabelLine: true,
    indent: 16,
    showLabelLine: true,
}
// 全景相关
@@ -110,616 +111,618 @@
const panoramaTitle = ref('')
const panoramaUrl = ref('')
const closePanoramaPopup = () => {
  panoramaShow.value = false
    panoramaShow.value = false
}
const baseRcImages = new window.$Cesium.WebMapTileServiceImageryProvider({
  url: '/arcgis117/rest/services/DTFW/rcgyyyx/MapServer/WMTS',
  layer: 'DTFW_rcgyyyx',
  style: 'default',
  format: 'image/png',
  tileMatrixSetID: 'default028mm',
  tilingScheme: new window.$Cesium.GeographicTilingScheme(),
  tileMatrixLabels: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19']
    url: '/arcgis117/rest/services/DTFW/rcgyyyx/MapServer/WMTS',
    layer: 'DTFW_rcgyyyx',
    style: 'default',
    format: 'image/png',
    tileMatrixSetID: 'default028mm',
    tilingScheme: new window.$Cesium.GeographicTilingScheme(),
    tileMatrixLabels: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19']
})
const data = [
  {
    id: '1',
    label: '园区倾斜摄影',
    type: 'layer',
    subType: '3Dtile',
    urlData: [
      {
        url: '/3Dtile/rcmx_t/part1/tileset.json',
        label: 'part1'
      },
      {
        url: '/3Dtile/rcmx_t/part2/tileset.json',
        label: 'part2'
      },
    {
        id: '1',
        label: '园区倾斜摄影',
        type: 'layer',
        subType: '3Dtile',
        urlData: [
            {
                url: '/3Dtile/rcmx_t/part1/tileset.json',
                label: 'part1'
            },
            {
                url: '/3Dtile/rcmx_t/part2/tileset.json',
                label: 'part2'
            },
    ],
    layerName: 'hgyq'
  },
  {
    id: '2',
    label: '企业分布',
    type: 'layer',
    subType: 'labelPoint',
    method: getPage,
    params: {
      size: 1000
        ],
        layerName: 'hgyq'
    },
    backgroundIcon: VITE_APP_BASE + 'img/mapicon/qy.png',
    className: 'qyfb-box',
    showPanel: false,
    layerName: 'qyfb'
  },
  {
    id: '3',
    label: '应急空间',
    children: [
      {
        parentId: '3',
        id: '3-1',
        label: '雨水池',
    {
        id: '2',
        label: '企业分布',
        type: 'layer',
        subType: 'labelPoint',
        method: getList,
        method: getPage,
        params: {
          type: 1,
          size: 1000,
            size: 1000
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
        className: 'yjc-box',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/qy.png',
        className: 'qyfb-box',
        showPanel: false,
        layerName: 'cq-yssjc',
        incident: (e) => {
          const { attrParams } = e.overlay
          // 删除
          destroyPop()
          if (!attrParams.firmName) {
            return
          }
          addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
          window.$viewer.addLayer(addPopLayers[attrParams.id])
          let iconEl = `<div class="marsBlueGradientPnl">
        layerName: 'qyfb'
    },
    {
        id: '3',
        label: '应急空间',
        children: [
            {
                parentId: '3',
                id: '3-1',
                label: '雨水池',
                type: 'layer',
                subType: 'labelPoint',
                method: getList,
                params: {
                    type: 1,
                    size: 1000,
                },
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
                className: 'yjc-box',
                showPanel: false,
                layerName: 'cq-yssjc',
                incident: (e) => {
                    const { attrParams } = e.overlay
                    // 删除
                    destroyPop()
                    if (!attrParams.firmName) {
                        return
                    }
                    addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
                    window.$viewer.addLayer(addPopLayers[attrParams.id])
                    let iconEl = `<div class="marsBlueGradientPnl">
            <div>企业名称:${attrParams.firmName}</div>
            <div>作用:${attrParams.mainFuncName}</div>
            <div>容量:${attrParams.capacity}(m³)</div>
                </div>`
          let divIcon = new DC.DivIcon(
            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
            `<div class="public-map-popup-two">
                    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.id].addOverlay(divIcon)
        }
      },
                    )
                    let incident = () => {
                        destroyPop()
                    }
                    divIcon.on(DC.MouseEventType.CLICK, incident)
                    addPopLayers[attrParams.id].addOverlay(divIcon)
                }
            },
      {
        parentId: '3',
        id: '3-2',
        label: '应急池',
        type: 'layer',
        subType: 'labelPoint',
        method: getList,
        params: {
          type: 2,
          size: 1000,
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
        className: 'yjc-box',
        showPanel: false,
        layerName: 'sg-yjc',
        incident: (e) => {
          const { attrParams } = e.overlay
          // 删除
          destroyPop()
          if (!attrParams.firmName) {
            return
          }
          addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
          window.$viewer.addLayer(addPopLayers[attrParams.id])
          let iconEl = `<div class="marsBlueGradientPnl">
            {
                parentId: '3',
                id: '3-2',
                label: '应急池',
                type: 'layer',
                subType: 'labelPoint',
                method: getList,
                params: {
                    type: 2,
                    size: 1000,
                },
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
                className: 'yjc-box',
                showPanel: false,
                layerName: 'sg-yjc',
                incident: (e) => {
                    const { attrParams } = e.overlay
                    // 删除
                    destroyPop()
                    if (!attrParams.firmName) {
                        return
                    }
                    addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
                    window.$viewer.addLayer(addPopLayers[attrParams.id])
                    let iconEl = `<div class="marsBlueGradientPnl">
            <div>企业名称:${attrParams.firmName}</div>
            <div>作用:${attrParams.mainFuncName}</div>
            <div>容量:${attrParams.capacity}(m³)</div>
                </div>`
          let divIcon = new DC.DivIcon(
            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
            `<div class="public-map-popup-two">
                    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.id].addOverlay(divIcon)
        }
      },
                    )
                    let incident = () => {
                        destroyPop()
                    }
                    divIcon.on(DC.MouseEventType.CLICK, incident)
                    addPopLayers[attrParams.id].addOverlay(divIcon)
                }
            },
      {
        parentId: '3',
        id: '3-3',
        label: '切断阀',
        type: 'layer',
        subType: 'labelPoint',
        method: getList,
        params: {
          type: 3,
          size: 1000
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/ysf.png',
        className: 'ysf-box',
        showPanel: false,
        layerName: 'qdf',
        incident: (e) => {
          const { attrParams } = e.overlay
          // 删除
          destroyPop()
          if (!attrParams.firmName) {
            return
          }
          addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
          window.$viewer.addLayer(addPopLayers[attrParams.id])
          let iconEl = `<div class="marsBlueGradientPnl">
            {
                parentId: '3',
                id: '3-3',
                label: '切断阀',
                type: 'layer',
                subType: 'labelPoint',
                method: getList,
                customWx: true,
                params: {
                    type: 3,
                    size: 1000
                },
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/ysf.png',
                className: 'ysf-box',
                showPanel: false,
                layerName: 'qdf',
                incident: (e) => {
                    const { attrParams } = e.overlay
                    // 删除
                    destroyPop()
                    if (!attrParams.firmName) {
                        return
                    }
                    addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
                    window.$viewer.addLayer(addPopLayers[attrParams.id])
                    let iconEl = `<div class="marsBlueGradientPnl">
            <div>企业名称:${attrParams.firmName}</div>
            <div>作用:${attrParams.mainFuncName}</div>
            <div>容量:${attrParams.capacity}(m³)</div>
                </div>`
          let divIcon = new DC.DivIcon(
            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
            `<div class="public-map-popup-two">
                    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.id].addOverlay(divIcon)
        }
      },
                    )
                    let incident = () => {
                        destroyPop()
                    }
                    divIcon.on(DC.MouseEventType.CLICK, incident)
                    addPopLayers[attrParams.id].addOverlay(divIcon)
                }
            },
      {
        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'
      },
            {
                id: '3-4',
                label: '闸坝',
                type: 'layer',
                subType: 'labelPoint',
                method: getList,
                params: {
                    type: 4,
                    size: 1000
                },
                customWx: true,
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/zb.png',
                className: 'sk-box',
                showPanel: false,
                layerName: 'zb'
            },
      {
        parentId: '3',
        id: '3-5',
        label: '湿地',
        type: 'layer',
        subType: 'labelPoint',
        method: getList,
        params: {
          type: 5,
          size: 1000
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/sd.png',
        className: 'xfs-box',
        showPanel: false,
        layerName: 'sd',
        incident: (e) => {
          const { attrParams } = e.overlay
          // 删除
          destroyPop()
          if (!attrParams.firmName) {
            return
          }
          addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
          window.$viewer.addLayer(addPopLayers[attrParams.id])
          let iconEl = `<div class="marsBlueGradientPnl">
            {
                parentId: '3',
                id: '3-5',
                label: '湿地',
                type: 'layer',
                subType: 'labelPoint',
                method: getList,
                params: {
                    type: 5,
                    size: 1000
                },
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/sd.png',
                className: 'xfs-box',
                showPanel: false,
                layerName: 'sd',
                incident: (e) => {
                    const { attrParams } = e.overlay
                    // 删除
                    destroyPop()
                    if (!attrParams.firmName) {
                        return
                    }
                    addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
                    window.$viewer.addLayer(addPopLayers[attrParams.id])
                    let iconEl = `<div class="marsBlueGradientPnl">
      <div>企业名称:${attrParams.firmName}</div>
      <div>作用:${attrParams.mainFuncName}</div>
      <div>容量:${attrParams.capacity}(m³)</div>
          </div>`
          let divIcon = new DC.DivIcon(
            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
            `<div class="public-map-popup-two">
                    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.id].addOverlay(divIcon)
        }
      },
                    )
                    let incident = () => {
                        destroyPop()
                    }
                    divIcon.on(DC.MouseEventType.CLICK, incident)
                    addPopLayers[attrParams.id].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">
            {
                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>容量:${attrParams.capacity}(m³)</div>
                </div>`
          let divIcon = new DC.DivIcon(
            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
            `<div class="public-map-popup-two">
                    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)
        }
      },
                    )
                    let incident = () => {
                        destroyPop()
                    }
                    divIcon.on(DC.MouseEventType.CLICK, incident)
                    addPopLayers[attrParams.name].addOverlay(divIcon)
                }
            },
      {
        parentId: '3',
        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'
      },
            {
                parentId: '3',
                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'
            },
      {
        parentId: '3',
        id: '3-9',
        label: '雨水管网',
        type: 'layer',
        subType: 'geojsonPipe',
        layerName: 'ysgw',
        source: ysgw,
        color: DC.Color.CYAN.withAlpha(0.9),
        height: 30,
      },
      {
        parentId: '3',
        id: '3-10',
        label: '排洪渠',
        type: 'layer',
        subType: 'geojsonPolygon',
        layerName: 'track',
        source: track,
        color: DC.Color.BLUE.withAlpha(0.9),
        height: 30,
      },
      {
        parentId: '3',
        id: '3-11',
        label: '企业级连接管网',
        type: 'layer',
        subType: 'geojsonPipe',
        layerName: 'qyjgx',
        source: qyjgx,
        color: DC.Color.CYAN.withAlpha(0.9),
        height: 30,
      },
    ]
  },
            {
                parentId: '3',
                id: '3-9',
                label: '雨水管网',
                type: 'layer',
                subType: 'geojsonPipe',
                layerName: 'ysgw',
                source: ysgw,
                color: DC.Color.CYAN.withAlpha(0.9),
                height: 30,
            },
            {
                parentId: '3',
                id: '3-10',
                label: '排洪渠',
                type: 'layer',
                subType: 'geojsonPolygon',
                layerName: 'track',
                source: track,
                color: DC.Color.BLUE.withAlpha(0.9),
                height: 30,
            },
            {
                parentId: '3',
                id: '3-11',
                label: '企业级连接管网',
                type: 'layer',
                subType: 'geojsonPipe',
                layerName: 'qyjgx',
                source: qyjgx,
                color: DC.Color.CYAN.withAlpha(0.9),
                height: 30,
            },
        ]
    },
  {
    id: '4',
    label: '风险源',
    children: [
      {
        parentId: '4',
        id: '4-1',
        label: '一般',
        type: 'layer',
        subType: 'labelPoint',
        method: getRiskList,
        params: {
          riskLevel: 1,
          size: 1000
        },
        showParams: 'firmName',
        className: 'fxy-ordinary',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-yb.png',
        showPanel: false,
        layerName: 'fxyOrdinary',
        customWx: true,
        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">
    {
        id: '4',
        label: '风险源',
        children: [
            {
                parentId: '4',
                id: '4-1',
                label: '一般',
                type: 'layer',
                subType: 'labelPoint',
                method: getRiskList,
                params: {
                    riskLevel: 1,
                    size: 1000
                },
                showParams: 'firmName',
                className: 'fxy-ordinary',
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-yb.png',
                showPanel: false,
                layerName: 'fxyOrdinary',
                customWx: false,
                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.category || ''}</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),
            `<div class="public-map-popup-three">
                    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-2',
        label: '较大',
        type: 'layer',
        subType: 'labelPoint',
        method: getRiskList,
        params: {
          riskLevel: 2,
          size: 1000
        },
        showParams: 'firmName',
        className: 'fxy-larger-b',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd-b.png',
        showPanel: false,
        layerName: 'fxyLarger',
        customWx: true,
        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">
                    )
                    let incident = () => {
                        destroyPop()
                    }
                    divIcon.on(DC.MouseEventType.CLICK, incident)
                    addPopLayers[attrParams.name].addOverlay(divIcon)
                }
            },
            {
                parentId: '4',
                id: '4-2',
                label: '较大',
                type: 'layer',
                subType: 'labelPoint',
                method: getRiskList,
                params: {
                    riskLevel: 2,
                    size: 1000
                },
                showParams: 'firmName',
                className: 'fxy-larger-b',
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd-b.png',
                showPanel: false,
                layerName: 'fxyLarger',
                customWx: false,
                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.category || ''}</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),
            `<div class="public-map-popup-three">
                    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-3',
        label: '重大',
        type: 'layer',
        subType: 'labelPoint',
        method: getRiskList,
        params: {
          riskLevel: 3,
          size: 1000
        },
        showParams: 'firmName',
        className: 'fxy-larger',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-jd.png',
        showPanel: false,
        layerName: 'fxyLargerB',
        customWx: true,
        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">
                    )
                    let incident = () => {
                        destroyPop()
                    }
                    divIcon.on(DC.MouseEventType.CLICK, incident)
                    addPopLayers[attrParams.name].addOverlay(divIcon)
                }
            },
            {
                parentId: '4',
                id: '4-3',
                label: '重大',
                type: 'layer',
                subType: 'labelPoint',
                method: getRiskList,
                params: {
                    riskLevel: 3,
                    size: 1000
                },
                showParams: 'firmName',
                className: 'fxy-larger',
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-jd.png',
                showPanel: false,
                layerName: 'fxyLargerB',
                customWx: false,
                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.category || ''}</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),
            `<div class="public-map-popup-three">
                    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: 'firmName',
        className: 'fxy-zd',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd.png',
        showPanel: false,
        layerName: 'fxyZdLarger',
        customWx: true,
        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">
                    )
                    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: 'firmName',
                className: 'fxy-zd',
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd.png',
                showPanel: false,
                layerName: 'fxyZdLarger',
                customWx: false,
                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">
                    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-5',
        label: '路线',
                    )
                    let incident = () => {
                        destroyPop()
                    }
                    divIcon.on(DC.MouseEventType.CLICK, incident)
                    addPopLayers[attrParams.name].addOverlay(divIcon)
                }
            },
            {
                parentId: '4',
                id: '4-5',
                label: '路线',
                type: 'layer',
                subType: 'geojsonLx',
                layerName: 'lx',
                source: lx,
                color: DC.Color.CYAN.withAlpha(0.9),
                height: 30,
            },
            {
                parentId: '4',
                id: '4-6',
                label: '岗亭',
                type: 'layer',
                subType: 'geojsonGt',
                layerName: 'gt',
                showPanel: false,
                className: 'gt-zd',
                source: gt,
                color: DC.Color.CYAN.withAlpha(0.9),
                backgroundIcon: VITE_APP_BASE + 'img/mapicon/gt.png',
                height: 30,
            },
        ]
    },
    {
        id: '5',
        label: '园区范围',
        type: 'layer',
        subType: 'geojsonLx',
        layerName: 'lx',
        source: lx,
        color: DC.Color.CYAN.withAlpha(0.9),
        height: 30,
      },
      {
        parentId: '4',
        id: '4-6',
        label: '岗亭',
        subType: 'geojsonWall',
        layerName: 'yqfw',
        source: yqfw
    },
    {
        id: '7',
        label: '空中全景分布',
        type: 'layer',
        subType: 'geojsonGt',
        layerName: 'gt',
        subType: 'labelPoint',
        method: getPanoramaList,
        params: {
            size: 1000,
            remark: '1'
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/qj.png',
        showPanel: false,
        className: 'gt-zd',
        source: gt,
        color: DC.Color.CYAN.withAlpha(0.9),
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/gt.png',
        height: 30,
        layerName: 'kzqjdwfb',
        incident: (e) => {
            const { attrParams } = e.overlay
            panoramaTitle.value = attrParams.name
            if (
                attrParams.url.indexOf("http://vr.jxpskj.com:180") != -1
            ) {
                attrParams.url = attrParams.url.replace(
                    "http://vr.jxpskj.com:180",
                    "/panorama"
                )
            }
            panoramaUrl.value = attrParams.url
            panoramaShow.value = true
        }
    },
    {
        id: '8',
        label: '瑞昌影像',
        type: 'layer',
        subType: 'baseMap',
        layerName: 'baseMap',
        source: baseRcImages,
    },
    /* {
      id: '8',
      label: '地面全景分布',
      type: 'layer',
      subType: 'labelPoint',
      method: getPanoramaList,
      params: {
        size: 1000,
        remark: '2'
      },
    ]
  },
  {
    id: '5',
    label: '园区范围',
    type: 'layer',
    subType: 'geojsonWall',
    layerName: 'yqfw',
    source: yqfw
  },
  {
    id: '7',
    label: '空中全景分布',
    type: 'layer',
    subType: 'labelPoint',
    method: getPanoramaList,
    params: {
      size: 1000,
      remark: '1'
    },
    backgroundIcon: VITE_APP_BASE + 'img/mapicon/qj.png',
    showPanel: false,
    layerName: 'kzqjdwfb',
    incident: (e) => {
      const { attrParams } = e.overlay
      panoramaTitle.value = attrParams.name
      if (
        attrParams.url.indexOf("http://vr.jxpskj.com:180") != -1
      ) {
        attrParams.url = attrParams.url.replace(
          "http://vr.jxpskj.com:180",
          "/panorama"
        )
      backgroundIcon: VITE_APP_BASE + 'img/mapicon/qj.png',
      showPanel: false,
      layerName: 'dtqjdwfb',
      incident: (e) => {
        const { attrParams } = e.overlay
        panoramaTitle.value = attrParams.name
        if (
          attrParams.url.indexOf("http://vr.jxpskj.com:180") != -1
        ) {
          attrParams.url = attrParams.url.replace(
            "http://vr.jxpskj.com:180",
            "/panorama"
          )
        }
        panoramaUrl.value = attrParams.url
        panoramaShow.value = true
      }
      panoramaUrl.value = attrParams.url
      panoramaShow.value = true
    }
  },
  {
    id: '8',
    label: '瑞昌影像',
    type: 'layer',
    subType: 'baseMap',
    layerName: 'baseMap',
    source: baseRcImages,
  },
  /* {
    id: '8',
    label: '地面全景分布',
    type: 'layer',
    subType: 'labelPoint',
    method: getPanoramaList,
    params: {
      size: 1000,
      remark: '2'
    },
    backgroundIcon: VITE_APP_BASE + 'img/mapicon/qj.png',
    showPanel: false,
    layerName: 'dtqjdwfb',
    incident: (e) => {
      const { attrParams } = e.overlay
      panoramaTitle.value = attrParams.name
      if (
        attrParams.url.indexOf("http://vr.jxpskj.com:180") != -1
      ) {
        attrParams.url = attrParams.url.replace(
          "http://vr.jxpskj.com:180",
          "/panorama"
        )
      }
      panoramaUrl.value = attrParams.url
      panoramaShow.value = true
    }
  }, */
    }, */
]
// let modellayer = new DC.VectorLayer("modellayer").addTo(window.$viewer)
@@ -731,492 +734,492 @@
// window.$viewer.flyToPosition("121.46748793889597,31.22345700031846,300,0,-90")
const defaultProps = {
  children: 'children',
  label: 'label',
    children: 'children',
    label: 'label',
}
const checkType = (value) => {
  if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
    return 'obj'
  } else if (Array.isArray(value)) {
    return 'arr'
  }
    if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
        return 'obj'
    } else if (Array.isArray(value)) {
        return 'arr'
    }
}
// 用于存储收集到的节点的数组
const collectedNodes = reactive([])
// 递归函数,收集所有 flag 为 true 的子节点
const collectNodesWithFlag = (nodes) => {
  if (checkType(nodes) == 'obj') {
    if (nodes.type == 'layer') {
      collectedNodes.value.push(nodes)
    }
    if (nodes.children && nodes.children.length > 0) {
      collectNodesWithFlag(nodes.children)
      return
    }
  }
  if (checkType(nodes) == 'arr') {
    nodes.forEach(item => {
      if (item) {
        if (item.type == 'layer') {
          collectedNodes.value.push(item)
    if (checkType(nodes) == 'obj') {
        if (nodes.type == 'layer') {
            collectedNodes.value.push(nodes)
        }
        if (item.children && item.children.length > 0) {
          collectNodesWithFlag(item.children)
        if (nodes.children && nodes.children.length > 0) {
            collectNodesWithFlag(nodes.children)
            return
        }
      }
    })
  }
    }
    if (checkType(nodes) == 'arr') {
        nodes.forEach(item => {
            if (item) {
                if (item.type == 'layer') {
                    collectedNodes.value.push(item)
                }
                if (item.children && item.children.length > 0) {
                    collectNodesWithFlag(item.children)
                }
            }
        })
    }
}
let moveEntity = null
const handleCheckChange = (data) => {
  let options = treeRef.value?.getCheckedNodes()
  collectedNodes.value = []
  collectNodesWithFlag(data)
    let options = treeRef.value?.getCheckedNodes()
    collectedNodes.value = []
    collectNodesWithFlag(data)
  collectedNodes.value.forEach(item => {
    // console.log(item, 1111111111111111112)
    if (options?.some(i => i.id == item.id)) {
    collectedNodes.value.forEach(item => {
        // console.log(item, 1111111111111111112)
        if (options?.some(i => i.id == item.id)) {
      //  const window.$Cesium  = DC
      if (item.subType == '3Dtile') {
        if (!addTileLayers[item.layerName]) {
          // addTileLayers[item.layerName] = []
          // let tile = window.$viewer.delegate.scene.primitives.add(new window.$Cesium.Cesium3DTileset({
          //   url: '/zhyq-lc/mx/tile_01/tileset.json',
          // }))
            //  const window.$Cesium  = DC
            if (item.subType == '3Dtile') {
                if (!addTileLayers[item.layerName]) {
                    // addTileLayers[item.layerName] = []
                    // let tile = window.$viewer.delegate.scene.primitives.add(new window.$Cesium.Cesium3DTileset({
                    //   url: '/zhyq-lc/mx/tile_01/tileset.json',
                    // }))
          //   url: '/zhyq-lc/mx/tile_01/tileset.json',
          // }), 121323)
          // item.urlData.forEach(i => {
                    //   url: '/zhyq-lc/mx/tile_01/tileset.json',
                    // }), 121323)
                    // item.urlData.forEach(i => {
          // })
          addTileLayers[item.layerName] = []
          item.urlData.forEach((m, ind) => {
            addTileLayers[item.layerName][ind] = new DC.Tileset(m.url, {
              // maximumMemoryUsage: 1024,
              // maximumScreenSpaceError: 8,
              // skipLevels: 5,
              // skipLevelOfDetail: true,
              // skipScreenSpaceErrorFactor: 128,
              // progressiveResolutionHeightFraction: 0.5,
              // baseScreenSpaceError: 1024
                    // })
                    addTileLayers[item.layerName] = []
                    item.urlData.forEach((m, ind) => {
                        addTileLayers[item.layerName][ind] = new DC.Tileset(m.url, {
                            // maximumMemoryUsage: 1024,
                            // maximumScreenSpaceError: 8,
                            // skipLevels: 5,
                            // skipLevelOfDetail: true,
                            // skipScreenSpaceErrorFactor: 128,
                            // progressiveResolutionHeightFraction: 0.5,
                            // baseScreenSpaceError: 1024
              skipLevelOfDetail: true,
              baseScreenSpaceError: 1024,
              maximumScreenSpaceError: 16, // 数值加大,能让最终成像变模糊
              skipScreenSpaceErrorFactor: 128,
              skipLevels: 5,
              immediatelyLoadDesiredLevelOfDetail: false,
              loadSiblings: true, // 如果为true则不会在已加载完概况房屋后,自动从中心开始超清化房屋
              cullWithChildrenBounds: true,
              cullRequestsWhileMoving: true,
              cullRequestsWhileMovingMultiplier: 10, // 值越小能够更快的剔除
              preloadWhenHidden: true,
              preferLeaves: true,
              maximumMemoryUsage: 1024, // 内存分配变小有利于倾斜摄影数据回收,提升性能体验
              progressiveResolutionHeightFraction: 0.3, // 数值偏于0能够让初始加载变得模糊
              dynamicScreenSpaceErrorDensity: 0.5, // 数值加大,能让周边加载变快
              dynamicScreenSpaceErrorFactor: 1, // 不知道起了什么作用没,反正放着吧先
              dynamicScreenSpaceError: true, // 根据测试,有了这个后,会在真正的全屏加载完之后才清晰化房屋
            })
            // tile.setHeight(-420)
            tileLayers.addOverlay(addTileLayers[item.layerName][ind])
          })
        } else {
          addTileLayers[item.layerName].forEach(m => m.show = true)
        }
      } else if (item.subType == 'labelPoint') {
        if (!addTileLayers[item.layerName]) {
          addTileLayers[item.layerName] = new DC.HtmlLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
                            skipLevelOfDetail: true,
                            baseScreenSpaceError: 1024,
                            maximumScreenSpaceError: 16, // 数值加大,能让最终成像变模糊
                            skipScreenSpaceErrorFactor: 128,
                            skipLevels: 5,
                            immediatelyLoadDesiredLevelOfDetail: false,
                            loadSiblings: true, // 如果为true则不会在已加载完概况房屋后,自动从中心开始超清化房屋
                            cullWithChildrenBounds: true,
                            cullRequestsWhileMoving: true,
                            cullRequestsWhileMovingMultiplier: 10, // 值越小能够更快的剔除
                            preloadWhenHidden: true,
                            preferLeaves: true,
                            maximumMemoryUsage: 1024, // 内存分配变小有利于倾斜摄影数据回收,提升性能体验
                            progressiveResolutionHeightFraction: 0.3, // 数值偏于0能够让初始加载变得模糊
                            dynamicScreenSpaceErrorDensity: 0.5, // 数值加大,能让周边加载变快
                            dynamicScreenSpaceErrorFactor: 1, // 不知道起了什么作用没,反正放着吧先
                            dynamicScreenSpaceError: true, // 根据测试,有了这个后,会在真正的全屏加载完之后才清晰化房屋
                        })
                        // tile.setHeight(-420)
                        tileLayers.addOverlay(addTileLayers[item.layerName][ind])
                    })
                } else {
                    addTileLayers[item.layerName].forEach(m => m.show = true)
                }
            } else if (item.subType == 'labelPoint') {
                if (!addTileLayers[item.layerName]) {
                    addTileLayers[item.layerName] = new DC.HtmlLayer(item.layerName)
                    window.$viewer.addLayer(addTileLayers[item.layerName])
          item.method(item.params).then(res => {
            let data = res.data.data.records
                    item.method(item.params).then(res => {
                        let data = res.data.data.records
            data.filter(i => i.lng && i.lng != '' && i.lat && i.lat != '').forEach(i => {
              let iconEl = ''
                        data.filter(i => i.lng && i.lng != '' && i.lat && i.lat != '').forEach(i => {
                            let iconEl = ''
              if ('showPanel' in item && item.showPanel == false) {
                if (item.backgroundIcon) {
                  iconEl = `
                            if ('showPanel' in item && item.showPanel == false) {
                                if (item.backgroundIcon) {
                                    iconEl = `
                  <div class="map-name">${i[item.showParams] || i.name}</div>
                  <div class="map-icon">
                    <img src="${item.backgroundIcon}">
                  </div>
                  `
                }
              } else {
                iconEl = `<div class="marsBlueGradientPnl">
                                }
                            } else {
                                iconEl = `<div class="marsBlueGradientPnl">
                  <div>${i[item.showParams] || i.name}</div>
                </div>`
              }
                            }
              let divIcon = new DC.DivIcon(
                new DC.Position(i.lng, i.lat, i.ele || 64),
                `<div class="public-map-popup ${item.className || ''}">
                            let divIcon = new DC.DivIcon(
                                new DC.Position(i.lng, i.lat, i.ele || 64),
                                `<div class="public-map-popup ${item.className || ''}">
                    ${iconEl}
                  </div>`
              )
                            )
              divIcon.attrParams = i
                            divIcon.attrParams = i
              let incident = () => {
              }
                            let incident = () => {
                            }
              if (item.incident) incident = item.incident
                            if (item.incident) incident = item.incident
              divIcon.on(DC.MouseEventType.CLICK, (e) => {
                if (mapStore.editPoint) {
                  moveEntity = e
                  return
                            divIcon.on(DC.MouseEventType.CLICK, (e) => {
                                if (mapStore.editPoint) {
                                    moveEntity = e
                                    return
                                }
                                if (mapStore.startCustomWx && item.customWx) {
                                    EventBus.emit('wxEntityClick', e)
                                    return
                                }
                                incident(e)
                            })
                            addTileLayers[item.layerName].addOverlay(divIcon)
                        })
                    })
                } else {
                    addTileLayers[item.layerName].show = true
                }
            } else if (item.subType == 'geojsonWall') {
                if (!addTileLayers[item.layerName]) {
                    addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
                    window.$viewer.addLayer(addTileLayers[item.layerName])
                if (mapStore.startCustomWx && item.customWx) {
                  EventBus.emit('wxEntityClick', e)
                  return
                    item.source.features.forEach(i => {
                        let wall = new DC.Wall(
                            i.geometry.coordinates[0].map(d => [...d, 125].join(',')).join(';')
                        )
                        wall.setStyle({
                            material: new DC.WallTrailMaterialProperty({
                                color: window.$Cesium.Color.fromBytes(0, 123, 255, 180),
                                speed: 8
                            })
                        })
                        addTileLayers[item.layerName].addOverlay(wall)
                    })
                } else {
                    addTileLayers[item.layerName].show = true
                }
            } else if (item.subType == 'geojsonPipe') {
                if (!addTileLayers[item.layerName]) {
                    addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
                    window.$viewer.addLayer(addTileLayers[item.layerName])
                incident(e)
              })
                    function computeCircle (radius) {
                        var positions = []
                        for (var i = 0; i < 360; i++) {
                            var radians = DC.Math.toRadians(i)
                            positions.push({
                                x: radius * Math.cos(radians),
                                y: radius * Math.sin(radians),
                            })
                        }
                        return positions
                    }
              addTileLayers[item.layerName].addOverlay(divIcon)
            })
          })
        } else {
          addTileLayers[item.layerName].show = true
        }
      } else if (item.subType == 'geojsonWall') {
        if (!addTileLayers[item.layerName]) {
          addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
                    item.source.features.forEach(i => {
                        let polylineVolume = new DC.PolylineVolume(
                            i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
                            computeCircle(1.6)
                        )
                        if ('RefName' in i.properties && i.properties.RefName.indexOf('拟建') != -1) {
                            polylineVolume.setStyle({
                                material: DC.Color.fromBytes(255, 0, 0, 230)
                            })
          item.source.features.forEach(i => {
            let wall = new DC.Wall(
              i.geometry.coordinates[0].map(d => [...d, 125].join(',')).join(';')
            )
                            let features = window.$turf.featureCollection(
                                i.geometry.coordinates.map(d => window.$turf.point([d[0], d[1]]))
                            )
            wall.setStyle({
              material: new DC.WallTrailMaterialProperty({
                color: window.$Cesium.Color.fromBytes(0, 123, 255, 180),
                speed: 8
              })
            })
            addTileLayers[item.layerName].addOverlay(wall)
          })
        } else {
          addTileLayers[item.layerName].show = true
        }
      } else if (item.subType == 'geojsonPipe') {
        if (!addTileLayers[item.layerName]) {
          addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
                            let planCenter = window.$turf.center(features)
          function computeCircle (radius) {
            var positions = []
            for (var i = 0; i < 360; i++) {
              var radians = DC.Math.toRadians(i)
              positions.push({
                x: radius * Math.cos(radians),
                y: radius * Math.sin(radians),
              })
            }
            return positions
          }
          item.source.features.forEach(i => {
            let polylineVolume = new DC.PolylineVolume(
              i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
              computeCircle(1.6)
            )
            if ('RefName' in i.properties && i.properties.RefName.indexOf('拟建') != -1) {
              polylineVolume.setStyle({
                material: DC.Color.fromBytes(255, 0, 0, 230)
              })
              let features = window.$turf.featureCollection(
                i.geometry.coordinates.map(d => window.$turf.point([d[0], d[1]]))
              )
              let planCenter = window.$turf.center(features)
              let planDivIcon = new DC.DivIcon(
                new DC.Position(planCenter.geometry.coordinates[0], planCenter.geometry.coordinates[1], 60.5),
                `<div class="public-map-popup">
                            let planDivIcon = new DC.DivIcon(
                                new DC.Position(planCenter.geometry.coordinates[0], planCenter.geometry.coordinates[1], 60.5),
                                `<div class="public-map-popup">
                     <div class="map-name">拟建</div>
                  <div class="map-icon">
                    <img src="${VITE_APP_BASE + 'img/mapicon/nj-ys.png'}">
                  </div>
                  </div>`
              )
                            )
              planToBuild.addOverlay(planDivIcon)
            } else {
              polylineVolume.setStyle({
                material: item.color
              })
            }
            // 雨水管网流向
            if (item.layerName === 'ysgw') {
              let ss = i.properties.qd + ',' + item.height + ';' + i.properties.zd + ',' + item.height
              let polyline1 = new DC.Polyline(ss)
              polyline1.setStyle({
                width: 10,
                arcType: 1,
                material: new DC.PolylineImageTrailMaterialProperty({
                  color: DC.Color.GREEN,
                  speed: 20,
                  image: VITE_APP_BASE + 'img/mapicon/right.png',
                  repeat: { x: 30, y: 1 }
                }),
                clampToGround: false
              })
              addTileLayers[item.layerName].addOverlay(polyline1)
            }
            addTileLayers[item.layerName].addOverlay(polylineVolume)
          })
        } else {
          addTileLayers[item.layerName].show = true
        }
      } else if (item.subType == 'geojsonPolygon') {
        if (!addTileLayers[item.layerName]) {
          addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
                            planToBuild.addOverlay(planDivIcon)
                        } else {
                            polylineVolume.setStyle({
                                material: item.color
                            })
                        }
                        // 雨水管网流向
                        if (item.layerName === 'ysgw') {
                            let ss = i.properties.qd + ',' + item.height + ';' + i.properties.zd + ',' + item.height
                            let polyline1 = new DC.Polyline(ss)
                            polyline1.setStyle({
                                width: 10,
                                arcType: 1,
                                material: new DC.PolylineImageTrailMaterialProperty({
                                    color: DC.Color.GREEN,
                                    speed: 20,
                                    image: VITE_APP_BASE + 'img/mapicon/right.png',
                                    repeat: { x: 30, y: 1 }
                                }),
                                clampToGround: false
                            })
                            addTileLayers[item.layerName].addOverlay(polyline1)
                        }
                        addTileLayers[item.layerName].addOverlay(polylineVolume)
                    })
                } else {
                    addTileLayers[item.layerName].show = true
                }
            } else if (item.subType == 'geojsonPolygon') {
                if (!addTileLayers[item.layerName]) {
                    addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
                    window.$viewer.addLayer(addTileLayers[item.layerName])
          item.source.features.forEach(i => {
            let Polyline = new DC.Polyline(i.geometry.coordinates.map(d => [...d, item.height].join(',')).join(';'))
                    item.source.features.forEach(i => {
                        let Polyline = new DC.Polyline(i.geometry.coordinates.map(d => [...d, item.height].join(',')).join(';'))
            Polyline.setStyle({
              width: 3,
              material: DC.Color.BLUE,
              clampToGround: true
            })
            addTileLayers[item.layerName].addOverlay(Polyline)
          })
        } else {
          addTileLayers[item.layerName].show = true
        }
        // 路线
      } else if (item.subType == 'geojsonLx') {
        if (!addTileLayers[item.layerName]) {
          addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
                        Polyline.setStyle({
                            width: 3,
                            material: DC.Color.BLUE,
                            clampToGround: true
                        })
                        addTileLayers[item.layerName].addOverlay(Polyline)
                    })
                } else {
                    addTileLayers[item.layerName].show = true
                }
                // 路线
            } else if (item.subType == 'geojsonLx') {
                if (!addTileLayers[item.layerName]) {
                    addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
                    window.$viewer.addLayer(addTileLayers[item.layerName])
          item.source.features.forEach(i => {
            let ss = i.geometry.coordinates.map(d => [...d, item.height].join(',')).join(';')
            let Polyline = new DC.Polyline(i.geometry.coordinates.map(d => [...d, item.height].join(',')).join(';'))
                    item.source.features.forEach(i => {
                        let ss = i.geometry.coordinates.map(d => [...d, item.height].join(',')).join(';')
                        let Polyline = new DC.Polyline(i.geometry.coordinates.map(d => [...d, item.height].join(',')).join(';'))
            Polyline.setStyle({
              width: 3,
              // material: DC.Color.BLUE,
              material: new DC.PolylineTrailMaterialProperty({
                color: DC.Color.RED,
                speed: 10
              }),
              clampToGround: true
            })
            addTileLayers[item.layerName].addOverlay(Polyline)
          })
        } else {
          addTileLayers[item.layerName].show = true
        }
        // 岗亭
      } else if (item.subType == 'geojsonGt') {
        // if (!addTileLayers[item.layerName]) {
        //   addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
        //   window.$viewer.addLayer(addTileLayers[item.layerName])
                        Polyline.setStyle({
                            width: 3,
                            // material: DC.Color.BLUE,
                            material: new DC.PolylineTrailMaterialProperty({
                                color: DC.Color.RED,
                                speed: 10
                            }),
                            clampToGround: true
                        })
                        addTileLayers[item.layerName].addOverlay(Polyline)
                    })
                } else {
                    addTileLayers[item.layerName].show = true
                }
                // 岗亭
            } else if (item.subType == 'geojsonGt') {
                // if (!addTileLayers[item.layerName]) {
                //   addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
                //   window.$viewer.addLayer(addTileLayers[item.layerName])
        //   item.source.features.forEach(i => {
        //     let iconEl = ''
        //     if ('showPanel' in item && item.showPanel == false) {
        //       if (item.backgroundIcon) {
        //         iconEl = `
        //           <div class="map-name">${i.properties.O_Name}</div>
        //           <div class="map-icon">
        //             <img src="${item.backgroundIcon}">
        //           </div>
        //           `
        //       }
        //     } else {
        //       iconEl = `<div class="marsBlueGradientPnl">
        //           <div>${i.properties.O_Name}</div>
        //         </div>`
        //     }
        //     console.log(i.geometry.coordinates[0], "2222222222222222222")
        //     console.log(i.properties.O_Name, "3333333333333333")
                //   item.source.features.forEach(i => {
                //     let iconEl = ''
                //     if ('showPanel' in item && item.showPanel == false) {
                //       if (item.backgroundIcon) {
                //         iconEl = `
                //           <div class="map-name">${i.properties.O_Name}</div>
                //           <div class="map-icon">
                //             <img src="${item.backgroundIcon}">
                //           </div>
                //           `
                //       }
                //     } else {
                //       iconEl = `<div class="marsBlueGradientPnl">
                //           <div>${i.properties.O_Name}</div>
                //         </div>`
                //     }
                //     console.log(i.geometry.coordinates[0], "2222222222222222222")
                //     console.log(i.properties.O_Name, "3333333333333333")
        //     let divIcon = new DC.DivIcon(
        //       new DC.Position('115.60241996718104', '29.818985725785911'),
        //       `<div class="public-map-popup ${item.className || ''}">
        //             ${iconEl}
        //           </div>`
        //     )
                //     let divIcon = new DC.DivIcon(
                //       new DC.Position('115.60241996718104', '29.818985725785911'),
                //       `<div class="public-map-popup ${item.className || ''}">
                //             ${iconEl}
                //           </div>`
                //     )
        //     addTileLayers[item.layerName].addOverlay(divIcon)
        //   })
        // } else {
        //   addTileLayers[item.layerName].show = true
        // }
        if (!addTileLayers[item.layerName]) {
          addTileLayers[item.layerName] = new DC.HtmlLayer(item.layerName)
          window.$viewer.addLayer(addTileLayers[item.layerName])
                //     addTileLayers[item.layerName].addOverlay(divIcon)
                //   })
                // } else {
                //   addTileLayers[item.layerName].show = true
                // }
                if (!addTileLayers[item.layerName]) {
                    addTileLayers[item.layerName] = new DC.HtmlLayer(item.layerName)
                    window.$viewer.addLayer(addTileLayers[item.layerName])
          // item.method(item.params).then(res => {
          // let data = res.data.data.records
                    // item.method(item.params).then(res => {
                    // let data = res.data.data.records
          item.source.features.forEach(i => {
            let iconEl = ''
                    item.source.features.forEach(i => {
                        let iconEl = ''
            if ('showPanel' in item && item.showPanel == false) {
              if (item.backgroundIcon) {
                iconEl = `
                        if ('showPanel' in item && item.showPanel == false) {
                            if (item.backgroundIcon) {
                                iconEl = `
                  <div class="map-name">${i.properties.O_Name}</div>
                  <div class="map-icon">
                    <img src="${item.backgroundIcon}">
                  </div>
                  `
              }
            } else {
              iconEl = `<div class="marsBlueGradientPnl">
                            }
                        } else {
                            iconEl = `<div class="marsBlueGradientPnl">
                  <div>${i.properties.O_Name}</div>
                </div>`
            }
                        }
            let divIcon = new DC.DivIcon(
              new DC.Position(i.geometry.coordinates[0], i.geometry.coordinates[1], i.ele || 64),
              `<div class="public-map-popup ${item.className || ''}">
                        let divIcon = new DC.DivIcon(
                            new DC.Position(i.geometry.coordinates[0], i.geometry.coordinates[1], i.ele || 64),
                            `<div class="public-map-popup ${item.className || ''}">
                    ${iconEl}
                  </div>`
            )
                        )
            divIcon.attrParams = i
                        divIcon.attrParams = i
            // let incident = () => {
            // }
                        // let incident = () => {
                        // }
            // if (item.incident) incident = item.incident
                        // if (item.incident) incident = item.incident
            // divIcon.on(DC.MouseEventType.CLICK, (e) => {
            //   if (mapStore.editPoint) {
            //     moveEntity = e
            //     return
            //   }
                        // divIcon.on(DC.MouseEventType.CLICK, (e) => {
                        //   if (mapStore.editPoint) {
                        //     moveEntity = e
                        //     return
                        //   }
            //   if (mapStore.startCustomWx && item.customWx) {
            //     EventBus.emit('wxEntityClick', e)
            //     return
            //   }
                        //   if (mapStore.startCustomWx && item.customWx) {
                        //     EventBus.emit('wxEntityClick', e)
                        //     return
                        //   }
            //   incident(e)
            // })
                        //   incident(e)
                        // })
            addTileLayers[item.layerName].addOverlay(divIcon)
            // })
          })
                        addTileLayers[item.layerName].addOverlay(divIcon)
                        // })
                    })
                } else {
                    addTileLayers[item.layerName].show = true
                }
            } else if (item.subType == 'baseMap') {
                if (addTileLayers[item.layerName]) {
                    addTileLayers[item.layerName].show = true
                    return
                }
                addTileLayers[item.layerName] = window.$viewer?.imageryLayers.addImageryProvider(item.source)
            }
        } else {
          addTileLayers[item.layerName].show = true
        }
      } else if (item.subType == 'baseMap') {
        if (addTileLayers[item.layerName]) {
          addTileLayers[item.layerName].show = true
          return
        }
            if (addTileLayers[item.layerName]) {
                if (item.subType == '3Dtile') {
                    addTileLayers[item.layerName].forEach(m => m.show = false)
                } else if (item.subType == 'baseMap') {
                    addTileLayers[item.layerName].show = false
                } else {
                    addTileLayers[item.layerName].clear()
                    window.$viewer && window.$viewer.removeLayer(addTileLayers[item.layerName])
                    addTileLayers[item.layerName] = null
                    delete addTileLayers[item.layerName]
        addTileLayers[item.layerName] = window.$viewer?.imageryLayers.addImageryProvider(item.source)
      }
    } else {
      if (addTileLayers[item.layerName]) {
        if (item.subType == '3Dtile') {
          addTileLayers[item.layerName].forEach(m => m.show = false)
        } else if (item.subType == 'baseMap') {
          addTileLayers[item.layerName].show = false
        } else {
          addTileLayers[item.layerName].clear()
          window.$viewer && window.$viewer.removeLayer(addTileLayers[item.layerName])
          addTileLayers[item.layerName] = null
          delete addTileLayers[item.layerName]
          if (item.layerName == 'ysgw' && planToBuild) {
            planToBuild.clear()
          }
          if (item.layerName == 'qyjgx' && planToBuild) {
            planToBuild.clear()
          }
                    if (item.layerName == 'ysgw' && planToBuild) {
                        planToBuild.clear()
                    }
                    if (item.layerName == 'qyjgx' && planToBuild) {
                        planToBuild.clear()
                    }
                }
            }
        }
      }
    }
  })
    })
}
function findObjectById (data, id) {
  // 遍历数据数组
  for (let i = 0; i < data.length; i++) {
    const item = data[i]
    // 遍历数据数组
    for (let i = 0; i < data.length; i++) {
        const item = data[i]
    // 检查当前项的 id 是否匹配
    if (item.id === id) {
      return item // 找到匹配项,返回它
        // 检查当前项的 id 是否匹配
        if (item.id === id) {
            return item // 找到匹配项,返回它
        }
        // 如果当前项有 children 数组,则递归查找
        if (item.children && item.children.length > 0) {
            const found = findObjectById(item.children, id)
            if (found) {
                return found // 在 children 中找到匹配项,返回它
            }
        }
    }
    // 如果当前项有 children 数组,则递归查找
    if (item.children && item.children.length > 0) {
      const found = findObjectById(item.children, id)
      if (found) {
        return found // 在 children 中找到匹配项,返回它
      }
    }
  }
  // 如果没有找到匹配项,返回 null
  return null
    // 如果没有找到匹配项,返回 null
    return null
}
const restHandleCheckChange = (key) => {
  let checkIds = treeRef.value?.getCheckedKeys()
    let checkIds = treeRef.value?.getCheckedKeys()
  if (checkIds && checkIds.some(i => i == key)) {
    return
  }
    if (checkIds && checkIds.some(i => i == key)) {
        return
    }
  treeRef.value?.setCheckedKeys([...checkIds, key])
  handleCheckChange([findObjectById(data, key)])
    treeRef.value?.setCheckedKeys([...checkIds, key])
    handleCheckChange([findObjectById(data, key)])
}
const restHandleDelChange = (key) => {
  let checkIds = treeRef.value?.getCheckedKeys()
    let checkIds = treeRef.value?.getCheckedKeys()
  if (checkIds && !checkIds.some(i => i == key)) {
    return
  }
    if (checkIds && !checkIds.some(i => i == key)) {
        return
    }
  let selectData = findObjectById(data, key)
    let selectData = findObjectById(data, key)
  let parentId = null
  if (selectData && 'parentId' in selectData) parentId = selectData.parentId
    let parentId = null
    if (selectData && 'parentId' in selectData) parentId = selectData.parentId
  treeRef.value?.setCheckedKeys(checkIds.filter(i => i.indexOf(key) && i != parentId))
  handleCheckChange([selectData])
    treeRef.value?.setCheckedKeys(checkIds.filter(i => i.indexOf(key) && i != parentId))
    handleCheckChange([selectData])
}
// 飞到园区范围
const flyToyqfw = () => {
  window.$viewer.zoomToPosition(new DC.Position(
    115.6080,
    29.7880,
    3000,
    0,
    -45,
    0
  ), () => {
  })
    window.$viewer.zoomToPosition(new DC.Position(
        115.6080,
        29.7880,
        3000,
        0,
        -45,
        0
    ), () => {
    })
}
EventBus.on('restHandleCheckChange', restHandleCheckChange)
@@ -1227,63 +1230,63 @@
let tooltip = window.$viewer.tooltip
const viewerMouseMove = (e) => {
  if (mapStore.editPoint) {
    if (moveEntity != null) {
    if (mapStore.editPoint) {
        if (moveEntity != null) {
      if (e.wgs84Position && e.wgs84Position.alt > 0) {
        moveEntity.overlay.position = new DC.Position(e.wgs84Position.lng, e.wgs84Position.lat, e.wgs84Position.alt)
      } else {
        moveEntity.overlay.position = new DC.Position(e.wgs84SurfacePosition.lng, e.wgs84SurfacePosition.lat, e.wgs84SurfacePosition.alt)
      }
            if (e.wgs84Position && e.wgs84Position.alt > 0) {
                moveEntity.overlay.position = new DC.Position(e.wgs84Position.lng, e.wgs84Position.lat, e.wgs84Position.alt)
            } else {
                moveEntity.overlay.position = new DC.Position(e.wgs84SurfacePosition.lng, e.wgs84SurfacePosition.lat, e.wgs84SurfacePosition.alt)
            }
      tooltip.showAt({ x: e.windowPosition.x + 10, y: e.windowPosition.y }, '右键结束编辑')
    } else {
      tooltip.showAt({ x: e.windowPosition.x + 10, y: e.windowPosition.y }, '左键选中点位,开始编辑')
            tooltip.showAt({ x: e.windowPosition.x + 10, y: e.windowPosition.y }, '右键结束编辑')
        } else {
            tooltip.showAt({ x: e.windowPosition.x + 10, y: e.windowPosition.y }, '左键选中点位,开始编辑')
        }
    }
  }
}
window.$viewer.on(DC.MouseEventType.MOUSE_MOVE, viewerMouseMove)
const viewerRightClick = (e) => {
  if (mapStore.editPoint && moveEntity != null) {
    tooltip.enable = false
    let lng, lat, ele
    if (mapStore.editPoint && moveEntity != null) {
        tooltip.enable = false
        let lng, lat, ele
    const { attrParams } = moveEntity.overlay
    console.log(e, 2222)
        const { attrParams } = moveEntity.overlay
        console.log(e, 2222)
    if (e.wgs84Position && e.wgs84Position.alt > 0) {
      lng = e.wgs84Position.lng
      lat = e.wgs84Position.lat
      ele = e.wgs84Position.alt
    } else {
      lng = e.wgs84SurfacePosition.lng
      lat = e.wgs84SurfacePosition.lat
      ele = e.wgs84SurfacePosition.alt
        if (e.wgs84Position && e.wgs84Position.alt > 0) {
            lng = e.wgs84Position.lng
            lat = e.wgs84Position.lat
            ele = e.wgs84Position.alt
        } else {
            lng = e.wgs84SurfacePosition.lng
            lat = e.wgs84SurfacePosition.lat
            ele = e.wgs84SurfacePosition.alt
        }
        updateSpace({
            id: attrParams.id,
            lng,
            lat,
            ele: Math.ceil(ele)
        }).then(res => {
            moveEntity = null
            mapStore.setEditPoint(false)
            ElMessage({
                message: '修改成功',
                type: 'success',
            })
        })
    }
    updateSpace({
      id: attrParams.id,
      lng,
      lat,
      ele: Math.ceil(ele)
    }).then(res => {
      moveEntity = null
      mapStore.setEditPoint(false)
      ElMessage({
        message: '修改成功',
        type: 'success',
      })
    })
  }
}
window.$viewer.on(DC.MouseEventType.RIGHT_CLICK, viewerRightClick)
onMounted(() => {
  handleCheckChange(data.filter(i => indexPoint.value.includes(i.id)))
    handleCheckChange(data.filter(i => indexPoint.value.includes(i.id)))
})
// const sharedData = computed(() => pointStore.sharedData);
@@ -1292,26 +1295,26 @@
// 关闭所有选中的,除了倾斜,园区分布,空中全景
const closeAll = () => {
  EventBus.emit('restHandleDelChange', `2`)
  EventBus.emit('restHandleDelChange', `3-1`)
  EventBus.emit('restHandleDelChange', `3-2`)
  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', `3-11`)
    EventBus.emit('restHandleDelChange', `2`)
    EventBus.emit('restHandleDelChange', `3-1`)
    EventBus.emit('restHandleDelChange', `3-2`)
    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', `3-11`)
  EventBus.emit('restHandleDelChange', `4-1`)
  EventBus.emit('restHandleDelChange', `4-2`)
  EventBus.emit('restHandleDelChange', `4-3`)
  EventBus.emit('restHandleDelChange', `4-9`)
  EventBus.emit('restHandleDelChange', `4-5`)
  EventBus.emit('restHandleDelChange', `4-6`)
    EventBus.emit('restHandleDelChange', `4-1`)
    EventBus.emit('restHandleDelChange', `4-2`)
    EventBus.emit('restHandleDelChange', `4-3`)
    EventBus.emit('restHandleDelChange', `4-9`)
    EventBus.emit('restHandleDelChange', `4-5`)
    EventBus.emit('restHandleDelChange', `4-6`)
  destroyPop()
    destroyPop()
}
// const sharedData = computed(() => pointStore.sharedData);
@@ -1319,95 +1322,95 @@
// });
// 监听当前路由路径的变化
watch(() => router.currentRoute.value.path,
  (newPath, oldPath) => {
    console.log(`Current path changed from ${oldPath} to ${newPath}`)
    closeAll()
  },
  { immediate: true }
    (newPath, oldPath) => {
        console.log(`Current path changed from ${oldPath} to ${newPath}`)
        closeAll()
    },
    { immediate: true }
)
// 销毁
function destroyPop () {
  if (addPopLayers && addPopLayers != null) {
    let arr = Object.keys(addPopLayers)
    if (arr.length > 0) {
      arr.forEach(i => {
        addPopLayers[i] && window.$viewer && window.$viewer.removeLayer(addPopLayers[i])
        addPopLayers[i] = null
        delete addPopLayers[i]
      })
      addPopLayers = {}
    if (addPopLayers && addPopLayers != null) {
        let arr = Object.keys(addPopLayers)
        if (arr.length > 0) {
            arr.forEach(i => {
                addPopLayers[i] && window.$viewer && window.$viewer.removeLayer(addPopLayers[i])
                addPopLayers[i] = null
                delete addPopLayers[i]
            })
            addPopLayers = {}
        }
    }
  }
}
onUnmounted(() => {
  let arr = Object.keys(addTileLayers)
  arr.forEach(i => {
    if (i == 'hgyq' || i == 'hgyqT') {
      addTileLayers[i].forEach(t => {
        tileLayers.removeOverlay(t)
        t = null
      })
    } else if (i == 'baseMap') {
      window.$viewer?.imageryLayers.remove(addTileLayers[i])
    } else {
      addTileLayers[i] && window.$viewer && window.$viewer.removeLayer(addTileLayers[i])
    let arr = Object.keys(addTileLayers)
    arr.forEach(i => {
        if (i == 'hgyq' || i == 'hgyqT') {
            addTileLayers[i].forEach(t => {
                tileLayers.removeOverlay(t)
                t = null
            })
        } else if (i == 'baseMap') {
            window.$viewer?.imageryLayers.remove(addTileLayers[i])
        } else {
            addTileLayers[i] && window.$viewer && window.$viewer.removeLayer(addTileLayers[i])
        }
        addTileLayers[i] = null
        delete addTileLayers[i]
    })
    addTileLayers = null
    if (tileLayers) {
        tileLayers.remove()
        window.$viewer && window.$viewer.removeLayer(tileLayers)
        tileLayers = null
    }
    addTileLayers[i] = null
    delete addTileLayers[i]
  })
  addTileLayers = null
  if (tileLayers) {
    tileLayers.remove()
    window.$viewer && window.$viewer.removeLayer(tileLayers)
    tileLayers = null
  }
    if (planToBuild) {
        planToBuild.remove()
        window.$viewer && window.$viewer.removeLayer(planToBuild)
        planToBuild = null
    }
  if (planToBuild) {
    planToBuild.remove()
    window.$viewer && window.$viewer.removeLayer(planToBuild)
    planToBuild = null
  }
    // 弹窗销毁
    destroyPop()
    addPopLayers = null
  // 弹窗销毁
  destroyPop()
  addPopLayers = null
    window.$viewer && window.$viewer.off(DC.MouseEventType.MOUSE_MOVE, viewerMouseMove)
    window.$viewer && window.$viewer.off(DC.MouseEventType.RIGHT_CLICK, viewerRightClick)
  window.$viewer && window.$viewer.off(DC.MouseEventType.MOUSE_MOVE, viewerMouseMove)
  window.$viewer && window.$viewer.off(DC.MouseEventType.RIGHT_CLICK, viewerRightClick)
  EventBus.off('restHandleCheckChange', restHandleCheckChange)
  EventBus.off('restHandleDelChange', restHandleDelChange)
  EventBus.off('flyToyqfw', flyToyqfw)
    EventBus.off('restHandleCheckChange', restHandleCheckChange)
    EventBus.off('restHandleDelChange', restHandleDelChange)
    EventBus.off('flyToyqfw', flyToyqfw)
})
</script>
<style lang="scss" scoped>
.tree-content {
  min-width: 200px;
  padding: 10px;
    min-width: 200px;
    padding: 10px;
  ::v-deep(.el-tree) {
    color: #fff;
    background: transparent;
    ::v-deep(.el-tree) {
        color: #fff;
        background: transparent;
    /* 鼠标浮动过的背景颜色 */
    .el-tree-node__content:hover {
      background: #0074b7;
        /* 鼠标浮动过的背景颜色 */
        .el-tree-node__content:hover {
            background: #0074b7;
        }
        /* 鼠标点击时节点的背景颜色 */
        .el-tree-node:focus>.el-tree-node__content {
            background-color: #0074b7 !important;
            color: rgb(255, 255, 255);
        }
        /* 鼠标失去焦点时节点背景的颜色 */
        .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
            background: rgb(0, 129, 204);
        }
    }
    /* 鼠标点击时节点的背景颜色 */
    .el-tree-node:focus>.el-tree-node__content {
      background-color: #0074b7 !important;
      color: rgb(255, 255, 255);
    }
    /* 鼠标失去焦点时节点背景的颜色 */
    .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
      background: rgb(0, 129, 204);
    }
  }
}
</style>
src/styles/element/index.scss
@@ -1,83 +1,83 @@
.el-table {
  &::before {
    content: none;
  }
    &::before {
        content: none;
    }
  background: transparent !important;
    background: transparent !important;
  // border: none;
    // border: none;
  .el-table__header-wrapper {
    font-size: 14px;
    .el-table__header-wrapper {
        font-size: 14px;
    tr {
      height: 38px;
      background: rgba(35, 53, 92, 0.8) !important;
      box-sizing: border-box;
        tr {
            height: 38px;
            background: rgba(35, 53, 92, 0.8) !important;
            box-sizing: border-box;
      th {
        background: transparent !important;
        border-color: rgba(103, 135, 214, 1) !important;
            th {
                background: transparent !important;
                border-color: rgba(103, 135, 214, 1) !important;
        .cell {
          color: #AFBED8;
                .cell {
                    color: #AFBED8;
                }
            }
        }
      }
    }
  }
  .el-table__body-wrapper {
    font-size: 14px;
    .el-table__body-wrapper {
        font-size: 14px;
    // table {
    //   border-collapse: separate !important;
    //   border-spacing: 0 0px !important;
    // }
        // table {
        //   border-collapse: separate !important;
        //   border-spacing: 0 0px !important;
        // }
    tr {
      height: 38px;
      background: rgba(36, 57, 110, 0.2);
      box-sizing: border-box;
      cursor: pointer;
        tr {
            height: 38px;
            background: rgba(36, 57, 110, 0.2);
            box-sizing: border-box;
            cursor: pointer;
      &:hover {
        td {
          color: #44C1EF;
          background: transparent !important;
            &:hover {
                td {
                    color: #44C1EF;
                    background: transparent !important;
                }
            }
            td {
                padding: 0;
                height: 38px;
                line-height: 38px;
                color: #D4E8F8;
                // border-top: 1px solid rgba(110, 135, 197, 0.32);
                // border-bottom: 1px solid rgba(110, 135, 197, 0.32);
                border-color: rgba(110, 135, 197, 0.32);
                box-sizing: border-box;
            }
            td:first-child {
                // border-left: 1px solid rgba(110, 135, 197, 0.32);
                border-color: rgba(110, 135, 197, 0.32);
            }
            td:last-child {
                // border-right: 1px solid rgba(110, 135, 197, 0.32);
                border-color: rgba(110, 135, 197, 0.32);
            }
        }
      }
      td {
        padding: 0;
        height: 38px;
        line-height: 38px;
        color: #D4E8F8;
        // border-top: 1px solid rgba(110, 135, 197, 0.32);
        // border-bottom: 1px solid rgba(110, 135, 197, 0.32);
        border-color: rgba(110, 135, 197, 0.32);
        box-sizing: border-box;
      }
      td:first-child {
        // border-left: 1px solid rgba(110, 135, 197, 0.32);
        border-color: rgba(110, 135, 197, 0.32);
      }
      td:last-child {
        // border-right: 1px solid rgba(110, 135, 197, 0.32);
        border-color: rgba(110, 135, 197, 0.32);
      }
    }
  }
  .el-table__empty-block {
    background: rgba(36, 57, 110, 0.2);
    .el-table__empty-block {
        background: rgba(36, 57, 110, 0.2);
    .el-table__empty-text {
      color: #D4E8F8;
        .el-table__empty-text {
            color: #D4E8F8;
        }
    }
  }
}
@@ -87,44 +87,86 @@
.el-table__inner-wrapper:before,
.el-table__border-bottom-patch,
.el-table__border-left-patch {
  background: rgba(103, 135, 214, 1) !important;
    background: rgba(103, 135, 214, 1) !important;
}
.el-page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  line-height: 40px;
  color: #D4E8F8;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    line-height: 40px;
    color: #D4E8F8;
  .el-pagination {
    .el-pagination__total {
      color: #D4E8F8;
    .el-pagination {
        .el-pagination__total {
            color: #D4E8F8;
        }
        .btn-prev,
        .btn-next {
            color: rgba(216, 235, 238, 0.8) !important;
            background: rgba(68, 193, 239, 0.1) !important;
        }
        .el-pager {
            .btn-quickprev,
            .btn-quicknext,
            .number {
                color: rgba(216, 235, 238, 0.8) !important;
                background: rgba(68, 193, 239, 0.1);
            }
            .active {
                color: #FFFFFF;
                background: #44C1EF !important;
                opacity: 0.8;
            }
        }
    }
}
    .btn-prev,
    .btn-next {
      color: rgba(216, 235, 238, 0.8) !important;
      background: rgba(68, 193, 239, 0.1) !important;
/* 在你的全局 CSS 文件中添加 */
.dark-dialog {
    --el-dialog-bg-color: rgba(33, 26, 26, .9) !important;
    --el-dialog-title-font-color: #E0E0E0 !important;
    --el-text-color-primary: #E0E0E0 !important;
    --el-border-color-light: #434343 !important;
    background-color: var(--el-dialog-bg-color) !important;
}
.dark-dialog .el-dialog__title {
    color: var(--el-dialog-title-font-color) !important;
}
.dark-dialog .el-dialog__body {
    color: var(--el-text-color-primary) !important;
}
.dark-dialog .el-dialog__headerbtn .el-dialog__close {
    color: var(--el-text-color-secondary) !important;
}
.dark-dialog .el-dialog__headerbtn:hover .el-dialog__close {
    color: var(--el-color-primary) !important;
}
.el-notification.right {
    --el-dialog-bg-color: rgba(33, 26, 26, .9) !important;
    --el-dialog-title-font-color: #E0E0E0 !important;
    --el-text-color-primary: #E0E0E0 !important;
    --el-border-color-light: #434343 !important;
    background-color: var(--el-dialog-bg-color) !important;
    border: none !important;
    .el-notification__group {
        color: var(--el-dialog-title-font-color) !important;
        .el-notification__content {
            color: var(--el-dialog-title-font-color) !important;
        }
    }
    .el-pager {
      .btn-quickprev,
      .btn-quicknext,
      .number {
        color: rgba(216, 235, 238, 0.8) !important;
        background: rgba(68, 193, 239, 0.1);
      }
      .active {
        color: #FFFFFF;
        background: #44C1EF !important;
        opacity: 0.8;
      }
    }
  }
}
src/views/pd/components/dynamicPanel.vue
@@ -2,19 +2,24 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-11-09 15:41:35
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-08-06 00:09:39
 * @FilePath: \jsProject\bigScreen\src\views\pd\components\dynamicPanel.vue
 * @LastEditTime: 2025-08-18 20:00:48
 * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
 * @Description: 
 * 
 * Copyright (c) 2024 by shuishen, All Rights Reserved. 
-->
<script setup>
import 'element-plus/theme-chalk/dark/css-vars.css'
import { ElMessage, ElNotification } from 'element-plus'
import qyfw from "@/assets/json/qyfw"
import EventBus from 'utils/bus'
import qysgwslx from "@/assets/json/qysgwslx"
import disposeDataJson from "@/assets/json/dispose"
const { VITE_APP_BASE } = import.meta.env
const emit = defineEmits(['closePanel'])
import { onUnmounted } from 'vue'
import { computed, onUnmounted } from 'vue'
import { spatialAnalysisPoint } from "@/api/space/space"
@@ -145,6 +150,7 @@
tc.addTrack(track)
let startClick = false
let curSelectType = null
const synth = window.speechSynthesis
@@ -430,6 +436,27 @@
}
const wxEntityClick = (e) => {
    if (curStepType.value === 4 && e.overlay.attrParams.type != 4) {
        ElMessage({
            message: '请选择闸坝.',
            type: 'warning',
        })
        return
    }
    if (curStepType.value === 7 && e.overlay.attrParams.type != 4 && e.overlay.attrParams.type != 3) {
        ElMessage({
            message: '请选择闸阀.',
            type: 'warning',
        })
        return
    }
    isShowEquipmentClosePopup.value = true
    return
    const { attrParams } = e.overlay
    clearAll()
    pointStore.updateSharedData(1)
@@ -524,30 +551,33 @@
EventBus.on('wxEntityClick', wxEntityClick)
qysgwslx.features.forEach(item => {
    let polyline = new DC.Polyline(item.geometry.coordinates.join(';'))
    polyline.setStyle({
        width: 5,
        material: new DC.PolylineTrailMaterialProperty({
            color: DC.Color.ALICEBLUE,
            speed: 10
        }),
        clampToGround: true
    })
    qyWsLayer.addOverlay(polyline)
})
const schemeStart = (item, type) => {
    emit('closePanel')
    clearAll()
    if (type == 1) {
        curSelectType = 1
        if (startClick) {
            EventBus.emit('restHandleDelChange', `3-3`)
            EventBus.emit('restHandleDelChange', `3-4`)
            EventBus.emit('restHandleDelChange', `4-1`)
            EventBus.emit('restHandleDelChange', `4-2`)
            EventBus.emit('restHandleDelChange', `4-3`)
            EventBus.emit('restHandleDelChange', `4-9`)
        }
        // let polyline = new DC.Polyline(qysgwslx.features[0].geometry.coordinates.join(';'))
        // polyline.setStyle({
        //     width: 5,
        //     material: new DC.PolylineTrailMaterialProperty({
        //         color: DC.Color.RED,
        //         speed: 10
        //     }),
        //     clampToGround: true
        // })
        // qyWsLayer.addOverlay(polyline)
        if (item.showModel) {
            window.$viewer.flyToPosition("115.10587903,27.28374884,400,0,-90", () => {
@@ -631,10 +661,131 @@
        mapStore.setStartCustomWx(startClick)
    } else {
        startClick = true
        mapStore.setStartCustomWx(startClick)
        EventBus.emit('restHandleCheckChange', `4`)
        curStep.value = 0
        curStepType.value = 0
        curSelectType = 2
        // mapStore.setStartCustomWx(startClick)
        EventBus.emit('restHandleCheckChange', `3-3`)
        EventBus.emit('restHandleCheckChange', `3-4`)
    }
}
const disposeFlowData = ref([])
const isShowDisposeFlowPopup = ref(false)
const curStep = ref(0)
const isInEnterprise = ref(false)
const curStepType = ref(0)
const isShowEquipmentClosePopup = ref(false)
const viewerClick = (e) => {
    if (curSelectType === 2) {
        let curPosition = {}
        if (e.wgs84Position && e.wgs84Position.alt > 0) {
            curPosition = {
                lng: e.wgs84Position.lng,
                lat: e.wgs84Position.lat,
                alt: e.wgs84Position.alt,
            }
        } else {
            curPosition = {
                lng: e.wgs84SurfacePosition.lng,
                lat: e.wgs84SurfacePosition.lat,
                alt: e.wgs84SurfacePosition.alt,
            }
        }
        let point = window.$turf.point([curPosition.lng, curPosition.lat])
        const isInPolygon = qyfw.features.some(item => {
            let polygon = window.$turf.polygon(item.geometry.coordinates)
            return window.$turf.booleanPointInPolygon(point, polygon)
        })
        if (isInPolygon) {
            isInEnterprise.value = true
            disposeFlowData.value = JSON.parse(JSON.stringify(disposeDataJson.categoryTypeData[0]))
        } else {
            isInEnterprise.value = false
            disposeFlowData.value = JSON.parse(JSON.stringify(disposeDataJson.categoryTypeData[1]))
        }
        curStep.value = 0
        curStepType.value = 0
        isShowDisposeFlowPopup.value = true
        curSelectType = null
        mapStore.setStartCustomWx(startClick)
    }
}
const cancelFlowDispose = () => {
    isShowDisposeFlowPopup.value = false
    curStep.value = 0
    curStepType.value = 0
    startClick = false
    disposeFlowData.value = []
    curSelectType = null
    mapStore.setStartCustomWx(startClick)
}
const nextStep = () => {
    curStep.value += 1
    curStepType.value = disposeFlowData.value?.processFlowData[curStep.value]?.type
}
const isSelectSignPoint = () => {
    isShowDisposeFlowPopup.value = false
    message?.close()
    message = null
    if (curStepType.value === 4) {
        message = ElNotification({
            title: '提示',
            showClose: true,
            message: '进行下一步应急措施,需选中闸坝才可下一步。',
            type: 'warning',
            duration: 0,
            offset: 100,
        })
    } else {
        message = ElNotification({
            title: '提示',
            showClose: true,
            message: '进行下一步应急措施,需选中闸阀才可下一步。',
            type: 'warning',
            duration: 0,
            offset: 100,
        })
    }
}
const affirmEquipmentClose = () => {
    isShowEquipmentClosePopup.value = false
    message?.close()
    message = null
    nextStep()
    isShowDisposeFlowPopup.value = true
}
let message = null
const isOverBtn = computed(() => disposeFlowData.value?.processFlowData ? curStep.value === disposeFlowData.value?.processFlowData.length - 1 : false)
const isNextStepBtn = computed(() => disposeFlowData.value?.processFlowData ? curStep.value < disposeFlowData.value?.processFlowData.length - 1 : false)
const isShowSelectBtn = computed(() => {
    return disposeFlowData.value?.processFlowData ?
        (curStepType.value === 4 || curStepType.value === 7)
        : false
})
window.$viewer.on(DC.MouseEventType.CLICK, viewerClick)
const clearAll = () => {
    mapStore.setShowPreLevel(false)
@@ -659,16 +810,23 @@
    dynamicVectorLayer?.clear()
    dynamicHtmlLayer?.clear()
    dynamicLineVectorLayer?.clear()
    qyWsLayer?.clear()
    isShowEquipmentClosePopup.value = false
    isShowDisposeFlowPopup.value = false
    message?.close()
    message = null
}
onUnmounted(() => {
    if (startClick) {
        EventBus.emit('restHandleDelChange', `3-3`)
        EventBus.emit('restHandleDelChange', `3-4`)
        EventBus.emit('restHandleDelChange', `4-1`)
        EventBus.emit('restHandleDelChange', `4-2`)
        EventBus.emit('restHandleDelChange', `4-3`)
        EventBus.emit('restHandleDelChange', `4-9`)
    }
    mapStore.setStartCustomWx(false)
    EventBus.off('wxEntityClick', wxEntityClick)
@@ -680,6 +838,9 @@
    dynamicLineVectorLayer && window.$viewer && window.$viewer.removeLayer(dynamicLineVectorLayer)
    qyWsLayer && window.$viewer && window.$viewer.removeLayer(qyWsLayer)
    window.$viewer.off(DC.MouseEventType.CLICK, viewerClick)
    tc = null
    track = null
    dynamicVectorLayer = null
@@ -690,39 +851,75 @@
</script>
<template>
    <div class="panel-container no-select">
        <el-carousel :autoplay="false" :interval="4000" type="card" height="360px">
            <el-carousel-item v-for="item, index in panelData.data" :key="index">
                <template #>
                    <div class="content-box flex f-d-c">
                        <div class="title">
                            {{ item.title }}
                        </div>
                        <div class="content h0 flex-1">
                            <div class="bg-box">
    <div>
        <div class="panel-container no-select">
            <el-carousel :autoplay="false" :interval="4000" type="card" height="360px">
                <el-carousel-item v-for="item, index in panelData.data" :key="index">
                    <template #>
                        <div class="content-box flex f-d-c">
                            <div class="title">
                                {{ item.title }}
                            </div>
                            <div class="content h0 flex-1">
                                <div class="bg-box">
                                </div>
                                <div class="describe-box">
                                    {{ item.content }}
                                </div>
                            </div>
                            <div class="describe-box">
                                {{ item.content }}
                            <div class="footer-btn" v-show="item.type == 'demo'">
                                <div class="start-btn" @click="schemeStart(item, 1)">
                                    开始模拟
                                </div>
                            </div>
                        </div>
                        <div class="footer-btn" v-show="item.type == 'demo'">
                            <div class="start-btn" @click="schemeStart(item, 1)">
                                开始模拟
                            <div class="footer-btn" v-show="item.type != 'demo'">
                                <div class="start-btn" @click="schemeStart(item, 2)">
                                    自定义风险源
                                </div>
                            </div>
                        </div>
                    </template>
                </el-carousel-item>
            </el-carousel>
        </div>
                        <div class="footer-btn" v-show="item.type != 'demo'">
                            <div class="start-btn" @click="schemeStart(item, 2)">
                                自定义风险源
                            </div>
                        </div>
                    </div>
                </template>
            </el-carousel-item>
        </el-carousel>
        <el-dialog class="dark-dialog" v-model="isShowDisposeFlowPopup" :append-to-body="true"
            :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" title="风险处置流程" width="500">
            <div>
                <div v-for="item, ind in disposeFlowData.processFlowData" :key="ind" v-show="ind === curStep">{{
                    item.message }}
                </div>
            </div>
            <template #footer>
                <div class="dialog-footer">
                    <el-button @click="cancelFlowDispose">取消</el-button>
                    <el-button type="primary" v-show="isShowSelectBtn" @click="isSelectSignPoint">{{ curStepType === 4 ?
                        '选择闸坝' : '选择闸阀' }}</el-button>
                    <el-button type="primary" @click="cancelFlowDispose" v-show="isOverBtn">结束</el-button>
                    <el-button :disabled="isShowSelectBtn" type="primary" @click="nextStep"
                        v-show="isNextStepBtn">下一步</el-button>
                </div>
            </template>
        </el-dialog>
        <el-dialog class="dark-dialog" v-model="isShowEquipmentClosePopup" :append-to-body="true"
            :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" title="" width="500">
            <div>
                {{ curStepType === 4 ? '确认关闭该闸坝?' : '确认关闭该闸阀?' }}
            </div>
            <template #footer>
                <div class="dialog-footer">
                    <el-button @click="isShowEquipmentClosePopup = false">取消</el-button>
                    <el-button type="primary" @click="affirmEquipmentClose">确认</el-button>
                </div>
            </template>
        </el-dialog>
    </div>
</template>