Bladeren bron

石家庄 地图落点(真实)

wangzhe 8 maanden geleden
bovenliggende
commit
047a4bf450
1 gewijzigde bestanden met toevoegingen van 57 en 41 verwijderingen
  1. 57 41
      screen-demo/src/views/templateInstance.vue

+ 57 - 41
screen-demo/src/views/templateInstance.vue

@@ -194,40 +194,38 @@ export default {
     this.btnMethod(0)
     this.echarts3q()
     this.echarts4q()
-    // 获取摄像头点位列表信息
-    this.$requestSDK(
-      // "/video-demo22/querySiteCodeAndDevices",
-      // "/jilin-devloper/device/queryPresetList",
-      "/jilin-devloper/jilin/querySiteCodeAndDevices",
-      {},
-      {},
-      "post"
-    ).then((res) => {
-      console.log("res querySiteCodeAndDevices=", res)
-      this.markPoints = [
-        {
-          longitude: 125,
-          latitude:43
-        },
-        {
-          longitude: 125.66,
-          latitude:43
-        },
-        {
-          longitude: 125.77,
-          latitude:43.55
-        }
-      ];
-      this.markPoints = res.data;
-      // 添加打点
-      if (this.map) {
-        if (this.mapType === "3D" || this.mapType === "2D") {
-          this.addPoint3D(this.map);
-        } else {
-          this.addPoint(this.map.map);
-        }
-      }
-    });
+    // // 获取摄像头点位列表信息
+    // this.$requestSDK(
+    //   "/jilin-devloper/jilin/querySiteCodeAndDevices",
+    //   {},
+    //   {},
+    //   "post"
+    // ).then((res) => {
+    //   console.log("res querySiteCodeAndDevices=", res)
+    //   this.markPoints = [
+    //     {
+    //       longitude: 125,
+    //       latitude:43
+    //     },
+    //     {
+    //       longitude: 125.66,
+    //       latitude:43
+    //     },
+    //     {
+    //       longitude: 125.77,
+    //       latitude:43.55
+    //     }
+    //   ];
+    //   this.markPoints = res.data;
+    //   // 添加打点
+    //   if (this.map) {
+    //     if (this.mapType === "3D" || this.mapType === "2D") {
+    //       this.addPoint3D(this.map);
+    //     } else {
+    //       this.addPoint(this.map.map);
+    //     }
+    //   }
+    // });
     // 最新视频弹窗监听方式
     // this.$postMsgUtil.listen('videoListen', (data) => {
     //   // 对应业务逻辑处理
@@ -1862,15 +1860,33 @@ export default {
       this.map = e;
       this.targetId = targetId;
       this.mapInstance = e?.map || e;
-      // 添加打点
-      if (this.markPoints.length) {
+      // 获取摄像头点位列表信息
+      this.$requestSDK(
+        "/jilin-devloper/jilin/querySiteCodeAndDevices",
+        {},
+        {},
+        "post"
+      ).then((res) => {
+        console.log("res querySiteCodeAndDevices=", res)
+        this.markPoints = res.data;
         // 添加打点
-        if (this.mapType === "3D" || this.mapType === "2D") {
-          this.addPoint3D(e);
-        } else { // 当前地图mapType satellite
-          this.addPoint(this.map.map);
+        if (this.map) {
+          if (this.mapType === "3D" || this.mapType === "2D") {
+            this.addPoint3D(this.map);
+          } else {
+            this.addPoint(this.map.map);
+          }
         }
-      }
+      });
+      // // 添加打点
+      // if (this.markPoints.length) {
+      //   // 添加打点
+      //   if (this.mapType === "3D" || this.mapType === "2D") {
+      //     this.addPoint3D(e);
+      //   } else { // 当前地图mapType satellite
+      //     this.addPoint(this.map.map);
+      //   }
+      // }
       this.$nextTick(() => {
         this.show = true;
       });