Przeglądaj źródła

refactor:更新采砂区数据及中心点数据;移除多余geojson数据

yangqishu 3 miesięcy temu
rodzic
commit
fbde383ae9

Plik diff jest za duży
+ 0 - 11
public/geojson/weihe1.geojson


Plik diff jest za duży
+ 2 - 1
public/geojson/团结采砂区.geojson


Plik diff jest za duży
+ 0 - 8
public/geojson/坊龙兴1区采砂区.geojson


+ 2 - 1
public/geojson/宜空采砂区.geojson

@@ -3,6 +3,7 @@
 "name": "宜空采砂区",
 "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
 "features": [
-{ "type": "Feature", "properties": { "name": "宜空采砂区" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.351453584321874, 34.203314422928294 ], [ 108.350339636381847, 34.202528614385606 ], [ 108.349137313386805, 34.200713110811506 ], [ 108.35218618788592, 34.201319272945355 ], [ 108.356040428780645, 34.202311838326132 ], [ 108.354959244015362, 34.203192487600084 ], [ 108.353091743057149, 34.203355067998494 ], [ 108.351453584321874, 34.203314422928294 ] ] ] } }
+{ "type": "Feature", "properties": { "name": "宜空采砂区" }, "geometry": null },
+{ "type": "Feature", "properties": { "name": "仪空" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 108.458475958428167, 34.213745456348981 ], [ 108.460379761239253, 34.212796215651778 ], [ 108.462983491554382, 34.212416516378866 ], [ 108.465178464206986, 34.211539034074747 ], [ 108.463145874735346, 34.213303250427757 ], [ 108.462826707793482, 34.213891314337623 ], [ 108.462048388408974, 34.214069584869733 ], [ 108.458475958428167, 34.213745456348981 ] ] ] } }
 ]
 }

Plik diff jest za duży
+ 9 - 0
public/geojson/汤坊龙兴1区采砂区.geojson


Plik diff jest za duży
+ 0 - 8
public/geojson/生态区界限2.geojson


+ 16 - 16
src/views/components/layerList/index.vue

@@ -94,7 +94,7 @@ export default {
           children: [
             { id: '3-1', label: '兴平市宜空采砂区', type: 'csq', meta: { type: 'polygon', url: '/sddnWeihe/geojson/宜空采砂区.geojson' } },
             { id: '3-2', label: '兴平市团结采砂区', type: 'csq', meta: { type: 'polygon', url: '/sddnWeihe/geojson/团结采砂区.geojson' } },
-            { id: '3-3', label: '兴平市汤坊龙兴1区采砂区', type: 'csq', meta: { type: 'polygon', url: '/sddnWeihe/geojson/坊龙兴1区采砂区.geojson' } }
+            { id: '3-3', label: '兴平市汤坊龙兴1区采砂区', type: 'csq', meta: { type: 'polygon', url: '/sddnWeihe/geojson/坊龙兴1区采砂区.geojson' } }
           ]
         },
         {
@@ -429,16 +429,16 @@ export default {
           { template: false, offsetY: 0 }
         )
       } else if (['3-1', '3-2', '3-3'].includes(layer.id)) {
-         const coorList = {
-        兴平市宜空采砂区: [108.352091, 34.202407, 100],
-        兴平市团结采砂区: [108.360076, 34.20512, 100],
-        兴平市汤坊龙兴1区采砂区: [108.474301, 34.21255, 100]
+        const coorList = {
+          兴平市宜空采砂区: [108.461726, 34.213397, 100],
+          兴平市团结采砂区: [108.53167, 34.23404, 100],
+          兴平市汤坊龙兴1区采砂区: [108.360459, 34.203945, 100]
+        }
+        const position = coorList[layer.options.name]
+        layer.on(this.mars3d.EventType.click, function (event) {
+          _that.$globalEventBus.$emit('clickCsqModal', { title: layer.options.name, position: position })
+        })
       }
-       const position = coorList[layer.options.name]
-       layer.on(this.mars3d.EventType.click, function (event) {
-        _that.$globalEventBus.$emit('clickCsqModal', { title: layer.options.name, position: position })
-      })
-      } 
     },
     getMonitorData() {
       graphicsLayer = new this.mars3d.layer.GraphicLayer()
@@ -500,12 +500,12 @@ export default {
     fetchUrl(item) {
       return new Promise((resolve, reject) => {
         getVideoRealtimeUrl({
-              deviceCode: item.deviceCode,
-              channelCode: item.channelCode,
-              netType: 2,
-              protocolType:9,
-              streamType: 1
-            }).then(async(res)=>{
+          deviceCode: item.deviceCode,
+          channelCode: item.channelCode,
+          netType: 2,
+          protocolType: 9,
+          streamType: 1
+        }).then(async (res) => {
           resolve(res)
         })
       })

+ 4 - 6
src/views/csq-popup/index.vue

@@ -5,7 +5,7 @@
       <img src="@/assets/image/common/close.png" style="cursor: pointer" alt="" @click="closeModal" />
     </div>
     <div class="csq-popup-content">
-      <PieChart style="height: 2.4rem"/>
+      <PieChart style="height: 2.4rem" />
     </div>
   </div>
 </template>
@@ -29,7 +29,6 @@ export default {
   },
   mounted() {
     this.$globalEventBus.$on('clickCsqModal', (data) => {
-      // this.visible = true
       this.title = data.title
       this.showPopup(data)
     })
@@ -37,14 +36,13 @@ export default {
   methods: {
     showPopup(data) {
       // 将笛卡尔坐标转换为屏幕坐标
-      const cartesian = this.Cesium.Cartesian3.fromDegrees(data.position[0],data.position[1],data.position[2])
-      const canvasPosition = this.Cesium.SceneTransforms.worldToWindowCoordinates (window.map.scene, cartesian);
-       console.info(canvasPosition)
+      const cartesian = this.Cesium.Cartesian3.fromDegrees(data.position[0], data.position[1], data.position[2])
+      const canvasPosition = this.Cesium.SceneTransforms.worldToWindowCoordinates(window.map.scene, cartesian)
       if (canvasPosition) {
         this.popupStyle = {
           position: 'absolute',
           left: `${canvasPosition.x}px`,
-          top: `${canvasPosition.y -300}px`, // 向上偏移,避免遮挡点位
+          top: `${canvasPosition.y - 300}px`, // 向上偏移,避免遮挡点位
           'z-index': 1000
         }