Bladeren bron

修改总览左侧菜单点击后地图聚焦标记位置

画安 3 weken geleden
bovenliggende
commit
39693658af
1 gewijzigde bestanden met toevoegingen van 7 en 0 verwijderingen
  1. 7 0
      src/views/StatusMonitoring.vue

+ 7 - 0
src/views/StatusMonitoring.vue

@@ -283,6 +283,13 @@ export default {
 
             // 根据Tab来显示不同的弹窗内容
             if (this.activeLeftTab === 'overview') { // 总览
+                // 临时逻辑,有真实接口后可以删除
+                const index = Math.floor(Math.random() * 10);
+                const position = localStorage.getItem(`pos${index + 1}`).split(',');
+
+                // 地图联动
+                this.$refs.trafficMapRef.focusByLocation([Number(position[0]), Number(position[1])]);
+                
                 this.showOverviewDalogs(nodeData);
             } else if (this.activeLeftTab === 'crossing') { // 路口
                 this.showCrossingDalogs(nodeData);