浏览代码

林班林场图层

彭宇 2 年之前
父节点
当前提交
f6378ad628

+ 7 - 7
src/api/forest.js

@@ -101,7 +101,7 @@ export function sendEventLog(param) {
 // 事件处理流程
 export function updateCentereventTEventcatalogueStatus(param) {
   return request({
-    url: '/center-event/eventcatalogue/updateCentereventTEventcatalogueStatus',
+    url: '/center-fire/VisuForestCloudMapController/updateCentereventTEventcatalogueStatus',
     method: 'post',
     data: param
   })
@@ -109,22 +109,22 @@ export function updateCentereventTEventcatalogueStatus(param) {
 // 事件处理流程-事件类型
 export function listSJfl(param) {
   return request({
-    url: '/center-event/eventtype/listSJfl',
-    method: 'get',
+    url: '/center-fire/VisuForestCloudMapController/listSJfl',
+    method: 'post',
     data: param
   })
 }
 // 事件处理流程-关联预案
 export function listYuAn() {
   return request({
-    url: 'sooka-sponest-center-data/reserve/listYuAn',
-    method: 'get'
+    url: '/center-fire/VisuForestCloudMapController/listYuAn',
+    method: 'post'
   })
 }
 // 事件处理流程-签收部门
 export function selectByeventCode(eventCode) {
   return request({
-    url: '/center-event/eventcatalogue/selectByeventCode/'+eventCode,
-    method: 'get'
+    url: '/center-fire/VisuForestCloudMapController/selectByeventCode/'+eventCode,
+    method: 'post'
   })
 }

+ 18 - 3
src/components/supermap.vue

@@ -58,7 +58,8 @@ export default {
       latLngGroup: [],
       isEditableLayers: false, //绘图控件
       drawControl: null, //绘图控件
-      deckglLayer: null //图层Layer
+      deckglLayer: null, //图层Layer
+      deckglLayerList: [] //图层Layer(数组)
     }
   },
   watch: {
@@ -128,7 +129,7 @@ export default {
     }
   },
   mounted() {
-      this.initMap()
+    this.initMap()
     //添加画图的提示信息
     window.L.drawLocal.draw.toolbar = {
       actions: {
@@ -783,7 +784,7 @@ export default {
     },
     dropLocation: function(lat, lng) { //落点定位
 
-      this.map.flyTo([lat, lng], 14,{duration:2})
+      this.map.flyTo([lat, lng], 14, { duration: 2 })
 
       // this.controlLevel(12)
       // setTimeout(() => {
@@ -802,6 +803,20 @@ export default {
       this.deckglLayer = window.L.supermap.tiledMapLayer(url, {})
       this.map.addLayer(this.deckglLayer)
     },
+    layerSwitchingList: function(urlList) { //图层切换数组  urlList 图层地址(数组)
+      if (this.deckglLayerList != null && this.deckglLayerList.length > 0) {
+        for (let i = 0; i < this.deckglLayerList.length; i++) {
+          this.deckglLayerList[i].remove()
+        }
+      }
+      if (urlList != null && urlList.length > 0) {
+        for (let i = 0; i < urlList.length; i++) {
+          this.deckglLayer = window.L.supermap.tiledMapLayer(urlList[i], {})
+          this.deckglLayerList.push(this.deckglLayer)
+          this.map.addLayer(this.deckglLayer)
+        }
+      }
+    },
     /** ----------------------------------动态绘制开始------------------------------------- */
     clearLayers: function() {
       this.plottingLayer.removeAllFeatures()

文件差异内容过多而无法显示
+ 631 - 600
src/components/vBottomMenu.vue


+ 7 - 2
src/views/afforestation.vue

@@ -83,6 +83,7 @@
       /** ----------------------------------底部按钮公用组件开始------------------------------------- */
       window.showDialog = this.showDialog
       window.choseLayerSwitching = this.choseLayerSwitching
+      window.choseLayerSwitchingList = this.choseLayerSwitchingList
       /** ----------------------------------底部按钮公用组件结束------------------------------------- */
     },
     mounted() {
@@ -134,8 +135,12 @@
         }
       },
       //选择图层
-      choseLayerSwitching(url) {
-        this.$refs.supermap.layerSwitching(url, true)
+      choseLayerSwitching(url,isClear) {
+        this.$refs.supermap.layerSwitching(url, isClear)
+      },
+      //选择图层(传递数组)
+      choseLayerSwitchingList(urlList) {
+        this.$refs.supermap.layerSwitchingList(urlList)
       },
       /** ----------------------------------底部按钮公用组件结束------------------------------------- */
 

+ 8 - 3
src/views/animal.vue

@@ -172,6 +172,7 @@
 			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
 			window.showDialog = this.showDialog
 			window.choseLayerSwitching = this.choseLayerSwitching
+      window.choseLayerSwitchingList = this.choseLayerSwitchingList
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 		},
 		mounted() {
@@ -205,9 +206,13 @@
 				}
 			},
 			//选择图层
-			choseLayerSwitching(url) {
-				this.$refs.supermap.layerSwitching(url, true);
-			},
+      choseLayerSwitching(url,isClear) {
+        this.$refs.supermap.layerSwitching(url, isClear)
+      },
+      //选择图层(传递数组)
+      choseLayerSwitchingList(urlList) {
+        this.$refs.supermap.layerSwitchingList(urlList)
+      },
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 			dropLocation(lat, lng, index) {
 				this.listCurrentIndex1 = index

+ 8 - 3
src/views/datacenter.vue

@@ -99,6 +99,7 @@
 			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
 			window.showDialog = this.showDialog
 			window.choseLayerSwitching = this.choseLayerSwitching
+      window.choseLayerSwitchingList = this.choseLayerSwitchingList
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 		},
 		mounted() {
@@ -159,9 +160,13 @@
 				}
 			},
 			//选择图层
-			choseLayerSwitching(url) {
-				this.$refs.supermap.layerSwitching(url, true);
-			},
+      choseLayerSwitching(url,isClear) {
+        this.$refs.supermap.layerSwitching(url, isClear)
+      },
+      //选择图层(传递数组)
+      choseLayerSwitchingList(urlList) {
+        this.$refs.supermap.layerSwitchingList(urlList)
+      },
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 			//数据分布chart
 			dataChat() {

+ 8 - 3
src/views/disaster.vue

@@ -355,6 +355,7 @@
 			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
 			window.showDialog = this.showDialog
 			window.choseLayerSwitching = this.choseLayerSwitching
+      window.choseLayerSwitchingList = this.choseLayerSwitchingList
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 		},
 		mounted() {
@@ -471,9 +472,13 @@
 				}
 			},
 			//选择图层
-			choseLayerSwitching(url) {
-				this.$refs.supermap.layerSwitching(url, true);
-			},
+      choseLayerSwitching(url,isClear) {
+        this.$refs.supermap.layerSwitching(url, isClear)
+      },
+      //选择图层(传递数组)
+      choseLayerSwitchingList(urlList) {
+        this.$refs.supermap.layerSwitchingList(urlList)
+      },
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 			choseFireList(id, index) {
 				this.listCurrentIndex = index

+ 8 - 3
src/views/event.vue

@@ -466,6 +466,7 @@
 			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
 			window.showDialog = this.showDialog
 			window.choseLayerSwitching = this.choseLayerSwitching
+      window.choseLayerSwitchingList = this.choseLayerSwitchingList
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 		},
 		mounted() {
@@ -625,9 +626,13 @@
         }
 			},
 			//选择图层
-			choseLayerSwitching(url) {
-				this.$refs.supermap.layerSwitching(url, true);
-			},
+      choseLayerSwitching(url,isClear) {
+        this.$refs.supermap.layerSwitching(url, isClear)
+      },
+      //选择图层(传递数组)
+      choseLayerSwitchingList(urlList) {
+        this.$refs.supermap.layerSwitchingList(urlList)
+      },
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 			//事件chart
 			eventChart() {

+ 7 - 2
src/views/forest.vue

@@ -349,6 +349,7 @@ export default {
     /** ----------------------------------底部按钮公用组件开始------------------------------------- */
     window.showDialog = this.showDialog
     window.choseLayerSwitching = this.choseLayerSwitching
+    window.choseLayerSwitchingList = this.choseLayerSwitchingList
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
   },
   mounted() {
@@ -1000,8 +1001,12 @@ export default {
 
       },
     //选择图层
-    choseLayerSwitching(url) {
-      this.$refs.supermap.layerSwitching(url, true)
+    choseLayerSwitching(url,isClear) {
+      this.$refs.supermap.layerSwitching(url, isClear)
+    },
+    //选择图层(传递数组)
+    choseLayerSwitchingList(urlList) {
+      this.$refs.supermap.layerSwitchingList(urlList)
     },
     /** ----------------------------------底部按钮公用组件结束------------------------------------- */
 

+ 8 - 3
src/views/leader.vue

@@ -150,6 +150,7 @@
 			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
 			window.showDialog = this.showDialog
 			window.choseLayerSwitching = this.choseLayerSwitching
+      window.choseLayerSwitchingList = this.choseLayerSwitchingList
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 		},
 		methods: {
@@ -180,9 +181,13 @@
 				}
 			},
 			//选择图层
-			choseLayerSwitching(url) {
-				this.$refs.supermap.layerSwitching(url, true)
-			},
+      choseLayerSwitching(url,isClear) {
+        this.$refs.supermap.layerSwitching(url, isClear)
+      },
+      //选择图层(传递数组)
+      choseLayerSwitchingList(urlList) {
+        this.$refs.supermap.layerSwitchingList(urlList)
+      },
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 
 			//初始化

+ 8 - 3
src/views/monitor.vue

@@ -148,6 +148,7 @@
 			/** ----------------------------------底部按钮公用组件开始------------------------------------- */
 			window.showDialog = this.showDialog
 			window.choseLayerSwitching = this.choseLayerSwitching
+      window.choseLayerSwitchingList = this.choseLayerSwitchingList
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 		},
 		mounted() {
@@ -213,9 +214,13 @@
         }
 			},
 			//选择图层
-			choseLayerSwitching(url) {
-				this.$refs.supermap.layerSwitching(url, true);
-			},
+      choseLayerSwitching(url,isClear) {
+        this.$refs.supermap.layerSwitching(url, isClear)
+      },
+      //选择图层(传递数组)
+      choseLayerSwitchingList(urlList) {
+        this.$refs.supermap.layerSwitchingList(urlList)
+      },
 			/** ----------------------------------底部按钮公用组件结束------------------------------------- */
 			cameraChat() {
 				// 基于准备好的dom,初始化echarts实例