Jelajahi Sumber

20250415-遥感、禁飞区修改

zhiyuan-007 4 hari lalu
induk
melakukan
9340ffe8bf
3 mengubah file dengan 275 tambahan dan 2 penghapusan
  1. 9 0
      src/data/resources.json
  2. 245 0
      src/data/sanjiBall.json
  3. 21 2
      src/views/home/cpns/Layers.vue

+ 9 - 0
src/data/resources.json

@@ -25,5 +25,14 @@
     "visible": false,
     "opacity": 1,
     "type": "tile"
+  },
+  {
+    "title": "局部影像",
+    "D_CODE": "50115066",
+    "id": "50115066",
+    "url": "https://116.236.218.30:6443/geoscene/rest/services/hp_hp/MapServer",
+    "visible": false,
+    "opacity": 1,
+    "type": "tile"
   }
 ]

+ 245 - 0
src/data/sanjiBall.json

@@ -124,5 +124,250 @@
         "color": [0,255,255,0.7]
       }
     }
+  ],
+  "jfq": [
+    {
+      "type": "polygon",
+      "name": "虹桥禁飞区1",
+      "shape": {
+        "height": 300,
+        "rings": [
+          [
+            [ -15267.6580810547, -22269.6918945313 ],
+            [ -10407.382019043, 4287.9343261719 ],
+            [ -8734.7694091797, 3503.0198974609 ],
+            [ -6269.3046875, 801.3833007813 ],
+            [ -5504.1502075195, -1891.3521118164 ],
+            [ -5346.5615234375, -5405.7946777344 ],
+            [ -5893.1116943359, -9013.8499145508 ],
+            [ -6847.5078125, -10590.4155273438 ],
+            [ -9624.6831054688, -12686.7872924805 ],
+            [ -7721.5562133789, -21740.083190918 ],
+            [ -8388.8743286133, -21790.0017089844 ],
+            [ -8361.470703125, -21928.6170043945 ],
+            [ -14022.7153930664, -22208.5338745117 ],
+            [ -15270.559387207, -22300.8961791992 ],
+            [ -15267.6580810547, -22269.6918945313 ]
+          ]
+        ],
+        "color": [
+          255,
+          0,
+          0,
+          0.7
+        ]
+      }
+    },
+    {
+      "type": "polygon",
+      "name": "虹桥禁飞区2",
+      "shape": {
+        "height": 300,
+        "rings": [
+          [
+            [ -9765.1840820312, 13711.8756713867 ],
+            [ -9765.3123779297, 13710.9340820313 ],
+            [ -9288.8331298828, 13710.5869140625 ],
+            [ -10407.382019043, 4287.9343261719 ],
+            [ -15267.6580810547, -22269.6918945313 ],
+            [ -15906.4494018555, -22301.2249145508 ],
+            [ -14943.3569946289, -12529.9807128906 ],
+            [ -17512.9321899414, -11123.0239868164 ],
+            [ -17814.6154174805, -10748.6383056641 ],
+            [ -18065.9135131836, -10594.9686279297 ],
+            [ -19151.6746826172, -9105.6116943359 ],
+            [ -20004.4271850586, -5947.2849121094 ],
+            [ -20156.8236083984, -2628.5283813477 ],
+            [ -19302.7866821289, 920.1857299805 ],
+            [ -18216.305480957, 2409.7335205078 ],
+            [ -15719.7952880859, 4099.4100952148 ],
+            [ -17286.3489990234, 13719.0891113281 ],
+            [ -9765.1840820312, 13711.8756713867 ]
+          ]
+        ],
+        "color": [
+          255,
+          0,
+          0,
+          0.7
+        ]
+      }
+    },
+    {
+      "type": "polygon",
+      "name": "虹桥禁飞区4",
+      "shape": {
+        "height": 300,
+        "rings": [
+          [
+            [ -1461.2083129883, -25381.7291259766 ],
+            [ -21479.8400878906, -26302.3071899414 ],
+            [ -21482.1315917969, -26254.4523925781 ],
+            [ -21859.6190795898, -26271.1708984375 ],
+            [ -23838.2399291992, 17114.6591186523 ],
+            [ -3818.1892089844, 18016.3203125 ],
+            [ -3817.416809082, 17999.2493286133 ],
+            [ -3472.624206543, 18015.4331054688 ],
+            [ -1461.2083129883, -25381.7291259766 ]
+          ]
+        ],
+        "color": [
+          255,
+          0,
+          0,
+          0.7
+        ]
+      }
+    },
+
+    {
+      "type": "polygon",
+      "name": "浦东禁飞区1",
+      "shape": {
+        "height": 300,
+        "rings": [
+          [
+            [ 28908.3557128906, 7350.8889160156 ],
+            [ 29277.5155029297, 7459.5971069336 ],
+            [ 31926.6029052734, 8427.2045288086 ],
+            [ 33543.6834716797, -992.1209106445 ],
+            [ 23927.5905151367, -5386.2138061523 ],
+            [ 23987.1782836914, -5203.8494873047 ],
+            [ 25657.7172851563, -3194.5650024414 ],
+            [ 21403.0996704102, 5557.9763183594 ],
+            [ 21975.0233154297, 5737.0421142578 ],
+            [ 21878.2266845703, 5927.9735107422 ],
+            [ 28750.9962768555, 8235.2985229492 ],
+            [ 28908.3557128906, 7350.8889160156 ]
+          ]
+        ],
+        "color": [
+          255,
+          0,
+          0,
+          0.7
+        ]
+      }
+    },
+    {
+      "type": "polygon",
+      "name": "浦东禁飞区2",
+      "shape": {
+        "height": 300,
+        "rings": [
+          [
+            [ 38737.078125, -17760.3682250977 ],
+            [ 33543.6834716797, -992.1209106445 ],
+            [ 35357.4232788086, -1351.6314086914 ],
+            [ 38405.9146728516, -3379.796875 ],
+            [ 39431.846496582, -5514.8977050781 ],
+            [ 39767.4229125977, -6039.9865112305 ],
+            [ 39839.544921875, -6363.1076049805 ],
+            [ 41371.5126953125, -9548.9993896484 ],
+            [ 41771.2307128906, -11345.787902832 ],
+            [ 41689.9821166992, -13184.3121948242 ],
+            [ 41133.3059082031, -14939.2777099609 ],
+            [ 38737.078125, -17760.3682250977 ]
+          ]
+        ],
+        "color": [
+          255,
+          0,
+          0,
+          0.7
+        ]
+      }
+    },
+    {
+      "type": "polygon",
+      "name": "浦东禁飞区3",
+      "shape": {
+        "height": 300,
+        "rings": [
+          [
+            [ 33543.6834716797, -992.1209106445 ],
+            [ 31222.938293457, -19222.3024291992 ],
+            [ 28123.3079223633, -18478.8880004883 ],
+            [ 27923.9666748047, -18290.3825073242 ],
+            [ 27664.1713256836, -18222.3472290039 ],
+            [ 26191.8115234375, -17108.8341064453 ],
+            [ 24504.7597045898, -14467.4508056641 ],
+            [ 23224.7648925781, -10959.2296142578 ],
+            [ 23103.055480957, -7312.1726074219 ],
+            [ 23753.6763305664, -5589.517578125 ],
+            [ 23927.5905151367, -5386.2138061523 ],
+            [ 33543.6834716797, -992.1209106445 ]
+          ]
+        ],
+        "color": [
+          255,
+          0,
+          0,
+          0.7
+        ]
+      }
+    },
+    {
+      "type": "polygon",
+      "name": "浦东禁飞区4",
+      "shape": {
+        "height": 300,
+        "rings": [
+          [
+            [ 33543.6834716797, -992.1209106445 ],
+            [ 38737.078125, -17760.3682250977 ],
+            [ 43225.2188720703, -25868.4860229492 ],
+            [ 42451.2631225586, -26151.1259765625 ],
+            [ 42588.712097168, -26432.1513061523 ],
+            [ 35699.0610961914, -28746.296081543 ],
+            [ 35536.6065063477, -27805.0272827148 ],
+            [ 32990.229675293, -28753.6090087891 ],
+            [ 32958.871887207, -28526.9180297852 ],
+            [ 32825.870300293, -28565.9923095703 ],
+            [ 31222.938293457, -19222.3024291992 ],
+            [ 33543.6834716797, -992.1209106445 ]
+          ]
+        ],
+        "color": [
+          255,
+          0,
+          0,
+          0.7
+        ]
+      }
+    },
+    {
+      "type": "polygon",
+      "name": "浦东禁飞区5",
+      "shape": {
+        "height": 300,
+        "rings": [
+          [
+            [ 34345.5194702148, 13064.7918701172 ],
+            [ 36427.0676879883, 13754.7097167969 ],
+            [ 50281.5075073242, -27676.1956787109 ],
+            [ 49567.5316772461, -27913.8792114258 ],
+            [ 49653.3090820313, -28182.3192138672 ],
+            [ 30551.7568969727, -34215.1679077148 ],
+            [ 30274.8145141602, -33348.4802856445 ],
+            [ 27778.6947021484, -34145.4541015625 ],
+            [ 27728.9838867188, -33992.0289916992 ],
+            [ 27728.3532714844, -33992.2188110352 ],
+            [ 27716.864074707, -33954.6218261719 ],
+            [ 14478.1757202148, 7070.6505126953 ],
+            [ 15163.8715209961, 7288.5928955078 ],
+            [ 14983.8234863281, 7882.5897216797 ],
+            [ 34167.4343261719, 13652.2922973633 ],
+            [ 34345.5194702148, 13064.7918701172 ]
+          ]
+        ],
+        "color": [
+          255,
+          0,
+          0,
+          0.7
+        ]
+      }
+    }
   ]
 }

+ 21 - 2
src/views/home/cpns/Layers.vue

@@ -48,34 +48,52 @@ const layersData = ref([
 		children: [
 			{ id: 'bm', name: '白模', alias: ['全市白模', '东方明珠'], icon: 'resource-bm', check: false },
 			{ id: 'yx', name: '影像', alias: '影像底图', icon: 'resource-yx', check: false },
+			{ id: 'jbyx', name: '局部影像', alias: '局部影像', icon: 'resource-yx', check: false },
 		],
 	},
 	{ name: '1.4G基站', icon: 'resource-jz', check: false, children: [] },
 	{ name: '侦测点位', icon: 'resource-zcdw', check: false, children: [] },
 	{ name: '微气象', icon: 'resource-wqx', check: false, children: [] },
 	{ name: '航线', icon: 'resource-hx', check: false, children: [] },
+	{
+		name: '禁飞区',
+		icon: 'resource-bm',
+		check: false,
+		children: [],
+	},
 ])
 
 async function getSubData() {
-	const { zcdw, jz, qxjcd } = sanjiData
+	const { zcdw, jz, qxjcd, jfq } = sanjiData
 	layersData.value[1].children = jz.map((item, index) => ({
 		id: `jz_${index + 1}`,
+		type: item.type,
 		name: `基站${index + 1}`,
 		shape: JSON.stringify(item),
 		check: false,
 	}))
 	layersData.value[2].children = zcdw.map((item, index) => ({
 		id: `zcdw_${index + 1}`,
+		type: item.type,
 		name: `侦测点位${index + 1}`,
 		shape: JSON.stringify(item),
 		check: false,
 	}))
 	layersData.value[3].children = qxjcd.map((item, index) => ({
 		id: `wqx_${index + 1}`,
+		type: item.type,
 		name: `气象监测点${index + 1}`,
 		shape: JSON.stringify(item),
 		check: false,
 	}))
+	debugger
+	layersData.value[5].children = jfq.map((item, index) => ({
+		id: `jfq_${index + 1}`,
+		type: item.type,
+		name: item.name,
+		shape: JSON.stringify(item),
+		check: false,
+	}))
 
 	await GetRouteList()
 		.then((res) => {
@@ -120,7 +138,8 @@ function handleCheck(item) {
 					: null,
 			})
 		} else {
-			if (item.type === 'polyline') {
+			debugger
+			if (item.type === 'polygon') {
 				showShapes({
 					id: item.name,
 					data: item.check ? [JSON.parse(item.shape)] : null,