Parcourir la source

Merge remote-tracking branch 'origin/dev' into dev

Hwf il y a 6 mois
Parent
commit
9de77bb9f1
2 fichiers modifiés avec 31 ajouts et 1 suppressions
  1. 13 0
      src/api/globalMap/spatialAnalysis.ts
  2. 18 1
      src/components/Map/index.vue

+ 13 - 0
src/api/globalMap/spatialAnalysis.ts

@@ -328,3 +328,16 @@ export const getVehicleDetails = (id: string) => {
     }
   });
 };
+
+//气象灾害隐患点单位详情
+export const getMDPUnitDetails = (id: string) => {
+  return request({
+    url: '/api/gateway/v2/get_point_info_MDP_units',
+    method: 'post',
+    data: {
+      query: {
+        id: id
+      }
+    }
+  });
+};

+ 18 - 1
src/components/Map/index.vue

@@ -44,6 +44,8 @@ import {
   getMiningOperationsDetails,
   getEmergencyTransportResourcesDetails,
   getEmergencyDisasterInfoOfficerDetails,
+  getMidmapDzzhDetails, getVehicleDetails, getMDPUnitDetails
+} from "@/api/globalMap/spatialAnalysis";
   getMidmapDzzhDetails,
   getVehicleDetails
 } from '@/api/globalMap/spatialAnalysis';
@@ -90,7 +92,21 @@ let AMap, map, scale;
 // 鼠标绘制工具
 const drawTool = useDrawTool();
 // 初始化地图
-const mapUtils = useAMap({
+const {
+  getAMap,
+  getMap,
+  switchMap,
+  addMarker,
+  addSearchMarker,
+  clearMarker,
+  getMarkers,
+  getScale,
+  showInfo,
+  hideInfo,
+  handleHover,
+  creatMask,
+  trackPlayback
+} = useAMap({
   key: '30d3d8448efd68cb0b284549fd41adcf', // 申请好的Web端开发者Key,首次调用 load 时必填
   version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
   pitch: mapState.isThreeDimensional ? 45 : 0,
@@ -206,6 +222,7 @@ const handlePointDetails = (data) => {
     '16': getRainbowDetails,
     '17': getMidmapDzzhDetails,
     '18': getMiningOperationsDetails,
+    '20': getMDPUnitDetails,
     '21': getBuildingProjectDetails,
     '22': getChemicalWarehouseDetails,
     '23': getMajorHazardSourceDetails,