浏览代码

数据中心

彭宇 2 年之前
父节点
当前提交
2f55c18ae6
共有 4 个文件被更改,包括 28 次插入10 次删除
  1. 4 1
      src/components/supermap.vue
  2. 19 0
      src/views/datacenter.vue
  3. 2 4
      src/views/event.vue
  4. 3 5
      src/views/forest.vue

+ 4 - 1
src/components/supermap.vue

@@ -475,7 +475,10 @@
         _that.graphicsLayer.addLayer(polygon);
       },
       dropLocation: function (lat, lng) {//落点定位
-        this.map.panTo([lat, lng])
+        this.controlLevel(10)
+        setTimeout(() => {
+          this.map.panTo([lat, lng]);
+        },500)
       },
       controlLevel: function (level) {//控制地图缩放级别
         this.map.setZoom(level)

+ 19 - 0
src/views/datacenter.vue

@@ -276,6 +276,7 @@
                 isAggregation: false
               }
               if (resourceTable == 'centerdata_t_forest_weatherstation') {//气象站
+                markersMap.icon = "sj-icon-map-qxz"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -308,6 +309,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (resourceTable == 'centerdata_t_forest_farm') {//林场
+                markersMap.icon = "sj-icon-map-lc"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -340,6 +342,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (resourceTable == 'centerdata_t_forest_landing') {//起降点
+                markersMap.icon = "sj-icon-map-qjd"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -372,6 +375,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (resourceTable == 'centerdata_t_forest_channel') {//水源渠道
+                markersMap.icon = "sj-icon-map-syqd"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -404,6 +408,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (resourceTable == 'centerdata_t_forest_checkpoint') {//防火检查站
+                markersMap.icon = "sj-icon-map-fhjcz"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -443,6 +448,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (resourceTable == 'centerdata_t_forest_waterintake') {//取水口
+                markersMap.icon = "sj-icon-map-qsk"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -475,6 +481,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (resourceTable == 'centerdata_t_forest_watercrane') {//水鹤
+                markersMap.icon = "sj-icon-map-sh"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -507,6 +514,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (resourceTable == 'centerdata_t_forest_firehydrant') {//消火栓
+                markersMap.icon = "sj-icon-map-xhs"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -546,6 +554,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (resourceTable == 'centerdata_t_forest_fireteam') {//森林防火队
+                markersMap.icon = "sj-icon-map-slfh"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -603,6 +612,7 @@
                 isAggregation: false
               }
               if (that.resourceTable == 'centerdata_t_forest_weatherstation') {//气象站
+                markersMap.icon = "sj-icon-map-qxz"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.icon = 'icon_qxz'
@@ -636,6 +646,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (that.resourceTable == 'centerdata_t_forest_farm') {//林场
+                markersMap.icon = "sj-icon-map-lc"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -668,6 +679,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (that.resourceTable == 'centerdata_t_forest_landing') {//起降点
+                markersMap.icon = "sj-icon-map-qjd"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -700,6 +712,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (that.resourceTable == 'centerdata_t_forest_channel') {//水源渠道
+                markersMap.icon = "sj-icon-map-syqd"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -732,6 +745,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (that.resourceTable == 'centerdata_t_forest_checkpoint') {//防火检查站
+                markersMap.icon = "sj-icon-map-fhjcz"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -771,6 +785,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (that.resourceTable == 'centerdata_t_forest_waterintake') {//取水口
+                markersMap.icon = "sj-icon-map-qsk"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -803,6 +818,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (that.resourceTable == 'centerdata_t_forest_watercrane') {//水鹤
+                markersMap.icon = "sj-icon-map-sh"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -835,6 +851,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (that.resourceTable == 'centerdata_t_forest_firehydrant') {//消火栓
+                markersMap.icon = "sj-icon-map-xhs"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -874,6 +891,7 @@
                   '                </div>' +
                   '                </span></div>'
               } else if (that.resourceTable == 'centerdata_t_forest_fireteam') {//森林防火队
+                markersMap.icon = "sj-icon-map-slfh"
                 markersMap.lng = res.data.resourceList[i].longitude
                 markersMap.lat = res.data.resourceList[i].latitude
                 markersMap.bindPopupHtml = '<div>' +
@@ -914,6 +932,7 @@
         })
       }
 
+
 		}
 	}
 </script>

+ 2 - 4
src/views/event.vue

@@ -800,8 +800,7 @@
                   that.markersMapList.push(marke)
                 }
               }
-              that.$refs.supermapNotProcessed.controlLevel(10)
-              that.$refs.supermapNotProcessed.dropLocation(information.lng ,information.lat)
+              that.$refs.supermapNotProcessed.dropLocation(information.lat ,information.lng)
               that.$refs.supermapNotProcessed.clearM(false)
               that.$refs.supermapNotProcessed.setMarkers(that.markersMapList)
             })
@@ -882,8 +881,7 @@
                   that.markersMapList.push(marke)
                 }
               }
-              that.$refs.supermapProcessed.controlLevel(10)
-              that.$refs.supermapProcessed.dropLocation(information.lng,information.lat)
+              that.$refs.supermapProcessed.dropLocation(information.lat,information.lng)
               that.$refs.supermapProcessed.clearM(false)
               that.$refs.supermapProcessed.setMarkers(that.markersMapList)
             })

+ 3 - 5
src/views/forest.vue

@@ -442,7 +442,7 @@
 			  </div>
 			   <supermapProcessed ref="supermapProcessed" v-if="'point' === activeName"  style="width: 100%;height: 800px;" :mapDiv="'supermapProcessedSuperMap'" :mapSite="{doubleClickZoom:false}" :codes="['9fa5']" @preview="preview" :isSideBySide="false"></supermapProcessed>
           </el-tab-pane>
-         
+
         </el-tabs>
       </el-dialog>
 		</div>
@@ -1065,8 +1065,7 @@
                   that.markersMapList.push(marke)
                 }
               }
-              that.$refs.supermapNotProcessed.controlLevel(10)
-              that.$refs.supermapNotProcessed.dropLocation(information.lng ,information.lat)
+              that.$refs.supermapNotProcessed.dropLocation(information.lat ,information.lng)
               that.$refs.supermapNotProcessed.clearM(false)
               that.$refs.supermapNotProcessed.setMarkers(that.markersMapList)
             })
@@ -1159,8 +1158,7 @@
                   that.markersMapList.push(marke)
                 }
               }
-              that.$refs.supermapProcessed.controlLevel(10)
-              that.$refs.supermapProcessed.dropLocation(information.content,information.content)
+              that.$refs.supermapProcessed.dropLocation(information.lat,information.lng)
               that.$refs.supermapProcessed.clearM(false)
               that.$refs.supermapProcessed.setMarkers(that.markersMapList)
             })