Просмотр исходного кода

fix: 从mock数据加载路口名称

sequoia tungfang недель назад: 3
Родитель
Сommit
92c672af94
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      src/components/TongzhouTrafficMap.vue

+ 4 - 1
src/components/TongzhouTrafficMap.vue

@@ -336,7 +336,10 @@ export default {
         if (!realRouteConfigs[config.name]) {
           const intersections = this.statusIntersections[config.name] || [];
           const markers = intersections.map(item =>
-            this.createTrafficLightMarker([item["位置-经度"], item["位置-纬度"]], config)
+            this.createTrafficLightMarker([item["位置-经度"], item["位置-纬度"]], {
+              ...config,
+              road: item["路口名称"] || '规划路口'
+            })
           ).filter(Boolean);
           this.routeGroups[config.name] = markers;
           if (this.activeLegends.includes(config.name)) this.map.add(markers);