1
0

2 Commity be9d24a6dd ... 15aad28d14

Autor SHA1 Správa Dátum
  yangqishu 15aad28d14 Merge branch 'dev' of http://git.dnzc.vip:3000/yangqishu/tmzn-weihe into dev 3 mesiacov pred
  yangqishu 27df0e6084 refactor:摄像头添加可视域 3 mesiacov pred

+ 18 - 1
src/views/components/layerList/index.vue

@@ -406,7 +406,7 @@ export default {
       window.map.addLayer(graphicsLayer)
       window.requestSDK('/sddnWeiHe/device/deviceSimpleList', { pageNum: 1, pageSize: 10, platFlag: '1', operType: '0' }, {}, 'post').then((res) => {
         const data = res.data
-        data.forEach((point) => {
+        data.forEach((point, index) => {
           const graphic = new mars3d.graphic.BillboardEntity({
             position: [point.longitude, point.latitude],
             style: {
@@ -420,6 +420,23 @@ export default {
             },
             attr: { ...point }
           })
+          //添加可视化区域
+          const sector = new this.mars3d.graphic.CircleEntity({
+            id: 'sector_' + index,
+            positions: [[point.longitude, point.latitude, 0]],
+            style: {
+              radius: 6000,
+              color: '#32edda',
+              opacity: 0.35,
+              outline: true,
+              outlineWidth: 1,
+              outlineColor: '#32edda',
+              visibleDepth: false,
+              clampToGround: true
+            },
+            attr: { ...point }
+          })
+          graphicsLayer.addGraphic(sector)
           graphicsLayer.addGraphic(graphic)
           let that = this
           graphic.on(this.mars3d.EventType.click, function () {

+ 20 - 3
src/views/safety-inspection/index.vue

@@ -48,13 +48,13 @@ export default {
     addInitialPoints() {
       graphicsLayer = new this.mars3d.layer.GraphicLayer()
       window.map.addLayer(graphicsLayer)
-      this.inspectionOptions.forEach((point) => {
-        this.addPointToMap(point)
+      this.inspectionOptions.forEach((point, index) => {
+        this.addPointToMap(point, index)
       })
     },
 
     // 添加点到地图
-    addPointToMap(point) {
+    addPointToMap(point, index) {
       const graphic = new this.mars3d.graphic.BillboardEntity({
         position: [point.longitude, point.latitude],
         style: {
@@ -65,6 +65,23 @@ export default {
         },
         attr: { ...point }
       })
+      //添加可视化区域
+      const sector = new this.mars3d.graphic.CircleEntity({
+        id: 'sector_' + index,
+        positions: [[point.longitude, point.latitude, 0]],
+        style: {
+          radius: 6000,
+          color: '#32edda',
+          opacity: 0.35,
+          outline: true,
+          outlineWidth: 1,
+          outlineColor: '#32edda',
+          visibleDepth: false,
+          clampToGround: true
+        },
+        attr: { ...point }
+      })
+      graphicsLayer.addGraphic(sector)
       graphicsLayer.addGraphic(graphic)
       let that = this
       graphic.on(this.mars3d.EventType.click, function () {

+ 1 - 1
src/views/water-station-popup/index.vue

@@ -382,8 +382,8 @@ export default {
           },
           attr: { deviceCode: item.deviceCode, channelCode: item.channelCode, devName: item.devName }
         })
-        graphicsLayer.addGraphic(graphic)
         graphicsLayer.addGraphic(sector)
+        graphicsLayer.addGraphic(graphic)
       })
     },
     // 定位到点

+ 1 - 1
vue.config.js

@@ -56,7 +56,7 @@ module.exports = defineConfig({
       },
       '/api/sddnWeiHe/': {
         //测试环境
-        target: 'http://127.0.0.1:28132/api/sddnWeiHe/',//http://192.168.1.185:28131
+        target: 'http://10.157.200.5:28132/api/sddnWeiHe/',//http://192.168.1.185:28131
         changOrigin: true
       }
     }