From 85cc78cd9485e95b185ca5d06021a5491719ec1d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 04 Jan 2025 20:08:47 +0800
Subject: [PATCH] 图层控制更新

---
 src/pages/map/components/scomponents/layersControl.vue |  608 +++++++++++++++++++++++--------------------------------
 1 files changed, 256 insertions(+), 352 deletions(-)

diff --git a/src/pages/map/components/scomponents/layersControl.vue b/src/pages/map/components/scomponents/layersControl.vue
index 5d3637e..18a790a 100644
--- a/src/pages/map/components/scomponents/layersControl.vue
+++ b/src/pages/map/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2024-10-31 10:47:29
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2025-01-04 18:23:54
+ * @LastEditTime: 2025-01-04 20:06:31
  * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
  * @Description:
  *
@@ -70,7 +70,7 @@
 import panorama from './popup/panorama.vue'
 import { getPage } from '@/api/indParkInfo'
 import { getPage as getfirmPage } from '@/api/firmInfo/firmInfo'
-import { getList, getGouQu } from "@/api/space/space"
+import { getList, getGouQu, updateSpace } from "@/api/space/space"
 import { getList as getRiskList } from "@/api/riskSource/riskSource"
 import { getPanoramaList } from "@/api/panorama/"
 import yqfw from "@/assets/json/yqfw"
@@ -82,8 +82,13 @@
 import EventBus from 'utils/bus'
 import { usePointStore } from 'store/usepoint'
 const pointStore = usePointStore()
+import { useMap } from 'store/map'
+const mapStore = useMap()
 import { useRouter } from 'vue-router'
 const router = useRouter()
+import {
+  ElMessage
+} from 'element-plus'
 
 const { VITE_APP_BASE } = import.meta.env
 // , '7', 
@@ -111,7 +116,14 @@
     type: 'layer',
     subType: '3Dtile',
     urlData: [
-
+      // {
+      //   url: '/3Dtile/lcmx/tile_01/tileset.json',
+      //   label: 'tile_01'
+      // },
+      // {
+      //   url: '/3Dtile/lcmx/tile_02/tileset.json',
+      //   label: 'tile_02'
+      // },
     ],
     layerName: 'hgyq'
   },
@@ -137,268 +149,31 @@
     children: [
       {
         parentId: '3',
-        id: '3-1',
-        label: '应急池',
-        children: [
-          {
-            parentId: '3-1',
-            id: '3-1-1',
-            label: '园区',
-            type: 'layer',
-            subType: 'labelPoint',
-            method: getList,
-            params: {
-              type: 1,
-              size: 1000,
-              category: 1
-            },
-            backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
-            className: 'yjc-box',
-            showPanel: false,
-            layerName: 'yjc-yq',
-            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>`
-              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)
-            }
-          },
-          {
-            parentId: '3-1',
-            id: '3-1-2',
-            label: '企业',
-            type: 'layer',
-            subType: 'labelPoint',
-            method: getList,
-            params: {
-              type: 1,
-              size: 1000,
-              category: 2
-            },
-            backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
-            className: 'yjc-box',
-            showPanel: false,
-            layerName: 'yjc-qy',
-            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>`
-              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)
-            }
-          },
-        ]
-      },
-
-      {
-        parentId: '3',
         id: '3-2',
-        label: '阀门',
-        children: [
-          {
-            parentId: '3-2',
-            id: '3-2-1',
-            label: '园区',
-            type: 'layer',
-            subType: 'labelPoint',
-            method: getList,
-            params: {
-              type: 2,
-              size: 1000,
-              category: 1
-            },
-            backgroundIcon: VITE_APP_BASE + 'img/mapicon/ysf.png',
-            className: 'ysf-box',
-            showPanel: false,
-            layerName: 'fm-yq',
-            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>`
-              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)
-            }
-          },
-          {
-            parentId: '3-2',
-            id: '3-2-2',
-            label: '企业',
-            type: 'layer',
-            subType: 'labelPoint',
-            method: getList,
-            params: {
-              type: 2,
-              size: 1000,
-              category: 2
-            },
-            backgroundIcon: VITE_APP_BASE + 'img/mapicon/ysf.png',
-            className: 'ysf-box',
-            showPanel: false,
-            layerName: 'fm-qy',
-            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>`
-              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)
-            }
-          }
-        ]
-      },
-
-      {
-        parentId: '3',
-        id: '3-3',
-        label: '公共管网',
-        children: [
-          // 给水管网、污水管网、燃气管网、雨水管网
-          {
-            parentId: '3-3',
-            id: '3-3-2',
-            label: '污水管网',
-            type: 'layer',
-            subType: 'geojsonPipe',
-            layerName: 'wsgw',
-            source: wsgw,
-            color: DC.Color.DARKBLUE.withAlpha(0.9),
-            height: 60.2,
-          },
-          {
-            parentId: '3-3',
-            id: '3-3-4',
-            label: '雨水管网',
-            type: 'layer',
-            subType: 'geojsonPipe',
-            layerName: 'ysgw',
-            source: ysgw,
-            color: DC.Color.CYAN.withAlpha(0.9),
-            height: 60,
-          },
-          // {
-          //   id: '3-3-1',
-          //   label: '给水管网',
-          //   type: 'layer',
-          //   subType: 'geojsonPipe',
-          //   layerName: 'gsgw',
-          //   source: gsgw,
-          //   color: DC.Color.BLUE.withAlpha(0.9),
-          //   height: 60.4,
-          // },
-          // {
-          //   id: '3-3-3',
-          //   label: '燃气管网',
-          //   type: 'layer',
-          //   subType: 'geojsonPipe',
-          //   layerName: 'rqgw',
-          //   source: rqgw,
-          //   color: DC.Color.RED.withAlpha(0.9),
-          //   height: 60.6,
-          // },
-        ]
-      },
-
-      {
-        parentId: '3',
-        id: '3-4',
-        label: '污水提升泵站',
+        label: '事故应急池',
         type: 'layer',
         subType: 'labelPoint',
         method: getList,
-        // className: 'sk-box',
-        // showPanel: false,
         params: {
-          type: 4,
-          size: 1000
+          type: 2,
+          size: 1000,
         },
-        backgroundIcon: VITE_APP_BASE + 'img/mapicon/wstsb.png',
+        backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
         className: 'yjc-box',
         showPanel: false,
-        layerName: 'wstsbz',
+        layerName: 'sg-yjc',
         incident: (e) => {
           const { attrParams } = e.overlay
           // 删除
           destroyPop()
-          if (!attrParams.imageUrl) {
+          if (!attrParams.firmName) {
             return
           }
-          addPopLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
-          window.$viewer.addLayer(addPopLayers[attrParams.name])
+          addPopLayers[attrParams.id] = new DC.HtmlLayer(attrParams.id)
+          window.$viewer.addLayer(addPopLayers[attrParams.id])
           let iconEl = `<div class="marsBlueGradientPnl">
-                  <div>${attrParams.fullName}</div>
-                  <img src="${attrParams.imageUrl}" width="160" height="160" />
+            <div>企业名称:${attrParams.firmName}</div>
+            <div>作用:${attrParams.mainFuncName}</div>
                 </div>`
           let divIcon = new DC.DivIcon(
             new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
@@ -410,8 +185,108 @@
             destroyPop()
           }
           divIcon.on(DC.MouseEventType.CLICK, incident)
-          addPopLayers[attrParams.name].addOverlay(divIcon)
+          addPopLayers[attrParams.id].addOverlay(divIcon)
         }
+      },
+
+      {
+        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>`
+          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)
+        }
+      },
+
+      {
+        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">
+            <div>企业名称:${attrParams.firmName}</div>
+            <div>作用:${attrParams.mainFuncName}</div>
+                </div>`
+          let divIcon = new DC.DivIcon(
+            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
+            `<div class="public-map-popup-two">
+                    ${iconEl}
+                  </div>`
+          )
+          let incident = () => {
+            destroyPop()
+          }
+          divIcon.on(DC.MouseEventType.CLICK, incident)
+          addPopLayers[attrParams.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'
       },
 
       {
@@ -459,7 +334,7 @@
       {
         parentId: '3',
         id: '3-6',
-        label: '应急泵',
+        label: '坑塘',
         type: 'layer',
         subType: 'labelPoint',
         method: getList,
@@ -467,10 +342,10 @@
           type: 6,
           size: 1000
         },
-        backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjb.png',
-        className: 'yjb-box',
+        backgroundIcon: VITE_APP_BASE + 'img/mapicon/kt.png',
+        className: 'sk-box',
         showPanel: false,
-        layerName: 'yjb',
+        layerName: 'kt',
         incident: (e) => {
           const { attrParams } = e.overlay
           // 删除
@@ -500,92 +375,49 @@
 
       {
         parentId: '3',
-        id: '3-8',
-        label: '沟渠',
-        type: 'layer',
-        subType: 'geojsonPolygon',
-        method: getGouQu,
-        params: {
-          type: 8,
-          size: 1000
-        },
-        backgroundIcon: VITE_APP_BASE + 'img/mapicon/gouqu.png',
-        className: 'xfs-box',
-        showPanel: false,
-        layerName: 'gouqu'
-      },
-      // {
-      //   id: '3-9',
-      //   label: '废水处理站',
-      //   type: 'layer',
-      //   subType: 'labelPoint',
-      //   method: getList,
-      //   params: {
-      //     type: 9,
-      //     size: 1000
-      //     // name: '吉水县绿源污水处理厂',
-      //   },
-      //   backgroundIcon: VITE_APP_BASE + 'img/mapicon/wsclc.png',
-      //   className: 'xfs-box',
-      //   showPanel: false,
-      //   layerName: 'fsclz'
-      // },
-      {
-        parentId: '3',
-        id: '3-10',
-        label: '排水口',
+        id: '3-7',
+        label: '洼地',
         type: 'layer',
         subType: 'labelPoint',
         method: getList,
         params: {
-          type: 10,
+          type: 7,
           size: 1000
         },
-        backgroundIcon: VITE_APP_BASE + 'img/mapicon/psk.png',
+        backgroundIcon: VITE_APP_BASE + 'img/mapicon/wd.png',
         className: 'xfs-box',
         showPanel: false,
-        layerName: 'psk',
-        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>`
-          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)
-        }
+        layerName: 'wd'
       },
-      // {
-      //   id: '3-11',
-      //   label: '污水池',
-      //   type: 'layer',
-      //   subType: 'labelPoint',
-      //   method: getList,
-      //   params: {
-      //     type: 11,
-      //     size: 1000
-      //   },
-      //   backgroundIcon: VITE_APP_BASE + 'img/mapicon/wsc.png',
-      //   className: 'xfs-box',
-      //   showPanel: false,
-      //   layerName: 'wsc'
-      // }
+
+      {
+        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: 48,
+      },
     ]
   },
 
@@ -673,10 +505,11 @@
           addPopLayers[attrParams.name].addOverlay(divIcon)
         }
       },
+
       {
         parentId: '4',
         id: '4-9',
-        label: '暂定',
+        label: '其他',
         type: 'layer',
         subType: 'labelPoint',
         method: getRiskList,
@@ -753,7 +586,8 @@
       panoramaShow.value = true
     }
   },
-  {
+
+  /* {
     id: '8',
     label: '地面全景分布',
     type: 'layer',
@@ -780,7 +614,7 @@
       panoramaUrl.value = attrParams.url
       panoramaShow.value = true
     }
-  },
+  }, */
 ]
 
 // let modellayer = new DC.VectorLayer("modellayer").addTo(window.$viewer)
@@ -833,6 +667,8 @@
   }
 }
 
+let moveEntity = null
+
 const handleCheckChange = (data) => {
 
   let options = treeRef.value?.getCheckedNodes()
@@ -847,10 +683,10 @@
         if (!addTileLayers[item.layerName]) {
           // addTileLayers[item.layerName] = []
           // let tile = window.$viewer.delegate.scene.primitives.add(new window.$Cesium.Cesium3DTileset({
-          //   url: '/zhyq-rc/mx/tile_01/tileset.json',
+          //   url: '/zhyq-lc/mx/tile_01/tileset.json',
           // }))
 
-          //   url: '/zhyq-rc/mx/tile_01/tileset.json',
+          //   url: '/zhyq-lc/mx/tile_01/tileset.json',
           // }), 121323)
           // item.urlData.forEach(i => {
 
@@ -931,7 +767,14 @@
 
               if (item.incident) incident = item.incident
 
-              divIcon.on(DC.MouseEventType.CLICK, incident)
+              divIcon.on(DC.MouseEventType.CLICK, (e) => {
+                if (mapStore.editPoint) {
+                  moveEntity = e
+                  return
+                }
+
+                incident(e)
+              })
 
               addTileLayers[item.layerName].addOverlay(divIcon)
             })
@@ -944,9 +787,11 @@
           addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
           window.$viewer.addLayer(addTileLayers[item.layerName])
 
-          item.source.features.forEach(i => {
+          console.log(item.source.geometries, 906666)
+
+          item.source.geometries.forEach(i => {
             let wall = new DC.Wall(
-              i.geometry.coordinates[0].map(d => [...d, 125].join(',')).join(';')
+              i.coordinates[0].map(d => [d[0], d[1], 125].join(',')).join(';')
             )
 
             wall.setStyle({
@@ -976,14 +821,14 @@
             }
             return positions
           }
-
-          item.source.features.forEach(i => {
+          console.log(item.source.geometries, 465465)
+          item.source.geometries.forEach(i => {
             let polylineVolume = new DC.PolylineVolume(
-              i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
+              i.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
               computeCircle(1.6)
             )
 
-            if (i.properties.RefName.indexOf('拟建') != -1) {
+            if ('properties' in i && i.properties?.RefName.indexOf('拟建') != -1) {
               polylineVolume.setStyle({
                 material: DC.Color.fromBytes(255, 0, 0, 230)
               })
@@ -1120,9 +965,9 @@
 // 飞到园区范围
 const flyToyqfw = () => {
   window.$viewer.zoomToPosition(new DC.Position(
-    115.1021,
-    27.2360,
-    5000,
+    116.2819,
+    27.9400,
+    8000,
     0,
     -45,
     0
@@ -1134,6 +979,64 @@
 EventBus.on('restHandleDelChange', restHandleDelChange)
 EventBus.on('flyToyqfw', flyToyqfw)
 EventBus.on('destroyPop', destroyPop)
+
+let tooltip = window.$viewer.tooltip
+
+const viewerMouseMove = (e) => {
+  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)
+      }
+
+      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
+
+    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
+    }
+
+    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)))
@@ -1148,16 +1051,14 @@
   EventBus.emit('restHandleDelChange', `2`)
   EventBus.emit('restHandleDelChange', `3-1`)
   EventBus.emit('restHandleDelChange', `3-2`)
-  // EventBus.emit('restHandleDelChange', `3-3-1`)
-  EventBus.emit('restHandleDelChange', `3-3-2`)
-  // EventBus.emit('restHandleDelChange', `3-3-3`)
-  EventBus.emit('restHandleDelChange', `3-3-4`)
+  EventBus.emit('restHandleDelChange', `3-3`)
   EventBus.emit('restHandleDelChange', `3-4`)
   EventBus.emit('restHandleDelChange', `3-5`)
   EventBus.emit('restHandleDelChange', `3-6`)
   EventBus.emit('restHandleDelChange', `3-7`)
   EventBus.emit('restHandleDelChange', `3-8`)
-  // EventBus.emit('restHandleDelChange', `3-9`)
+  EventBus.emit('restHandleDelChange', `3-9`)
+
   EventBus.emit('restHandleDelChange', `4-1`)
   EventBus.emit('restHandleDelChange', `4-2`)
   EventBus.emit('restHandleDelChange', `4-9`)
@@ -1225,6 +1126,9 @@
   destroyPop()
   addPopLayers = null
 
+  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)

--
Gitblit v1.9.3