|
|
@@ -200,7 +200,7 @@ export default {
|
|
|
// 组装模拟数据
|
|
|
const scale = window.innerWidth / 1920;
|
|
|
let nodeData = {
|
|
|
- id: mapData.position[0] + mapData.position[1],
|
|
|
+ id: mapData.id || (mapData.position[0] + mapData.position[1]),
|
|
|
label: mapData.road,
|
|
|
// 反算为设计稿坐标(SmartDialog 内部会再乘 scale)
|
|
|
pixelX: pixel ? Math.round(pixel.x / scale) : 950,
|
|
|
@@ -217,11 +217,11 @@ export default {
|
|
|
handleMapCrossingMouseout(mapData) {
|
|
|
console.log('父组件接收到了地图路口鼠标滑出事件:', mapData);
|
|
|
if (this.activeLeftTab === 'overview' && mapData) { // 总览
|
|
|
- const id = mapData.position[0] + mapData.position[1];
|
|
|
+ const id = mapData.id || (mapData.position[0] + mapData.position[1]);
|
|
|
this.$refs.layout.handleDialogClose('crossing3_' + id);
|
|
|
} else if (this.activeLeftTab === 'crossing' && mapData) { // 路口
|
|
|
-
|
|
|
- const id = mapData.position[0] + mapData.position[1];
|
|
|
+
|
|
|
+ const id = mapData.id || (mapData.position[0] + mapData.position[1]);
|
|
|
this.$refs.layout.handleDialogClose('crossing3_' + id);
|
|
|
}
|
|
|
},
|
|
|
@@ -233,7 +233,7 @@ export default {
|
|
|
// 组装模拟数据
|
|
|
const scale = window.innerWidth / 1920;
|
|
|
let nodeData = {
|
|
|
- id: mapData.position[0] + mapData.position[1],
|
|
|
+ id: mapData.id || (mapData.position[0] + mapData.position[1]),
|
|
|
label: mapData.road,
|
|
|
// 反算为设计稿坐标(SmartDialog 内部会再乘 scale)
|
|
|
pixelX: pixel ? Math.round(pixel.x / scale) : 950,
|
|
|
@@ -518,7 +518,7 @@ export default {
|
|
|
data: { ...nodeData, preloadedData: detailData },
|
|
|
headerComponent: 'CrossingDetailHeader',
|
|
|
headerProps: {
|
|
|
- currentRoute: detailData?.currentRoute || {},
|
|
|
+ currentRoute: { ...(detailData?.currentRoute || {}), name: nodeData.label || detailData?.currentRoute?.name },
|
|
|
intersectionData: detailData?.intersectionData || {},
|
|
|
cycleLength: detailData?.cycleLength || 0,
|
|
|
}
|