Browse Source

可视化底部林班数据改为后台维护

彭宇 2 năm trước cách đây
mục cha
commit
b26fba9280
1 tập tin đã thay đổi với 17 bổ sung22 xóa
  1. 17 22
      src/components/supermap.vue

+ 17 - 22
src/components/supermap.vue

@@ -268,7 +268,6 @@
 			}
 		},
 		mounted() {
-			this.getspuerMapHost()
 			this.initMap()
 			//添加画图的提示信息
 			window.L.drawLocal.draw.toolbar = {
@@ -1525,29 +1524,25 @@
 			PlottingDrawCancel: function() {
 				this.plottingdrawControl.handler.disable()
 			},
-			getspuerMapHost() {
-				selectConfigKey('superMap.iserver.plot').then(res => {
-					this.host = res.data
-				})
-			},
 			dynamicPlotting: function() {
 				setTimeout(() => {
-					var host = this.host
-					var serverUrl = host + '/iserver/services/plot-jingyong/rest/plot/'
-
-					var me = this
-					this.plottingLayer = window.L.supermap.plotting.plottingLayer('plot',
-						serverUrl)
-					this.plottingLayer.spatialAnalystUrl =
-						host + '/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst'
-					this.plottingLayer.addTo(this.map)
-					this.plottingdrawControl = window.L.supermap.plotting.drawControl(this
-						.plottingLayer)
-					this.plottingdrawControl.addTo(this.map)
-					var editControl = window.L.supermap.plotting.editControl()
-					editControl.addTo(this.map)
-					window.L.supermap.plotting.initPlotPanel('plotPanel', serverUrl, this
-						.plottingdrawControl)
+          selectConfigKey('superMap.iserver.plot').then(res => {
+            var host = res.data
+            var serverUrl = host + '/iserver/services/plot-jingyong/rest/plot/'
+            var me = this
+            this.plottingLayer = window.L.supermap.plotting.plottingLayer('plot',
+              serverUrl)
+            this.plottingLayer.spatialAnalystUrl =
+              host + '/iserver/services/spatialanalyst-sample/restjsr/spatialanalyst'
+            this.plottingLayer.addTo(this.map)
+            this.plottingdrawControl = window.L.supermap.plotting.drawControl(this
+              .plottingLayer)
+            this.plottingdrawControl.addTo(this.map)
+            var editControl = window.L.supermap.plotting.editControl()
+            editControl.addTo(this.map)
+            window.L.supermap.plotting.initPlotPanel('plotPanel', serverUrl, this
+              .plottingdrawControl)
+          })
 				}, 2000)
 			}
 			/** ----------------------------------动态绘制结束------------------------------------- */