Bladeren bron

地图组件功能更新

sbj 1 jaar geleden
bovenliggende
commit
2f3a4e3698
4 gewijzigde bestanden met toevoegingen van 25 en 4 verwijderingen
  1. 8 0
      src/apis/ship.js
  2. 7 0
      src/utils/map/ArcgisUtil.js
  3. 7 1
      src/utils/map/Boat.js
  4. 3 3
      src/views/map/Index.vue

+ 8 - 0
src/apis/ship.js

@@ -5,4 +5,12 @@ export function GetHpjShip() {
         url: 'http://10.83.68.109:8092/digitalTwin2/dataShare/GetBoatAISByExtentCalculateGwTest',
         method: "post"
     })
+}
+
+export function GetBoatAISHistoryByMMSI(data) {
+    return request({
+        url: '/dataShare/GetBoatAISHistoryByMMSI',
+        method: "post",
+        data: data
+    })
 }

+ 7 - 0
src/utils/map/ArcgisUtil.js

@@ -153,6 +153,13 @@ export function layerQuery(paramData){
         }
     });
 }
+/*重置*/
+export function resetMap(){
+    let params = {
+        "ActionName": "ResetMap"
+    };
+    bridge.Invoke(params);
+}
 
 /*全景*/
 export function fullExtent(){

+ 7 - 1
src/utils/map/Boat.js

@@ -49,6 +49,12 @@ export function onLocationBoat(){
 }
 
 // 设置船舶历史轨迹
-export function setShipPath(){
+export function setShipPath(data){
+    GetBoatAISHistoryByMMSI({
+        deviceId:data.mmsi,
+        startTime:data.startTime,
+        endTime:data.endTime
+    }).then(
 
+    )
 }

+ 3 - 3
src/views/map/Index.vue

@@ -16,7 +16,7 @@
 
 <script>
     import {initBridge,fullExtent,calculation,clearMap} from "@/utils/map/ArcgisUtil"
-    import {pjylLine, djldShip} from '@/utils/map/WaterPassenger'
+    import {pjylLine, djldShip, pjylPortLocation} from '@/utils/map/WaterPassenger'
     import {setShip, setShipPath, onLocationBoat} from '@/utils/map/Boat'
     import {GetPjylLinePaths} from "@/apis/ssky";
     import {GetHpjShip} from "@/apis/ship";
@@ -42,7 +42,7 @@
             test(value){
                 switch (value) {
                     case '浦江游览码头':
-                        this.pjylPortLocation({
+                        pjylPortLocation({
                             'portName':'东方明珠旅游码头',
                             'mapx':'2360.10554497',
                             'mapy':'794.13869415'
@@ -83,7 +83,7 @@
     }
 
     #tool_div {
-        display: none;
+        display: block;
         background-color: #cccccc;
         z-index: 10;
         position: absolute;