|
@@ -19,6 +19,9 @@
|
|
|
securityJsCode="a7413c674852c5eaf01d90813c5b7ef6"
|
|
securityJsCode="a7413c674852c5eaf01d90813c5b7ef6"
|
|
|
:mode="activeLeftTab === 'crossing' ? '路口' : activeLeftTab === 'trunkLine' ? '干线' : activeLeftTab === 'specialDuty' ? '特勤' : ''"
|
|
:mode="activeLeftTab === 'crossing' ? '路口' : activeLeftTab === 'trunkLine' ? '干线' : activeLeftTab === 'specialDuty' ? '特勤' : ''"
|
|
|
@map-crossing-click="handleMapCrossingClick"
|
|
@map-crossing-click="handleMapCrossingClick"
|
|
|
|
|
+ @map-crossing-mouseover="handleMapCrossingMouseover"
|
|
|
|
|
+ @map-crossing-mouseout="handleMapCrossingMouseout"
|
|
|
|
|
+
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -196,6 +199,31 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 处理地图鼠标滑入事件
|
|
|
|
|
+ handleMapCrossingMouseover(mapData, lnglat, pixel) {
|
|
|
|
|
+ console.log('父组件接收到了地图路口鼠标滑入事件:', mapData);
|
|
|
|
|
+ // 组装模拟数据
|
|
|
|
|
+ const scale = window.innerWidth / 1920;
|
|
|
|
|
+ let nodeData = {
|
|
|
|
|
+ id: mapData.position[0] + mapData.position[1],
|
|
|
|
|
+ label: mapData.road,
|
|
|
|
|
+ // 反算为设计稿坐标(SmartDialog 内部会再乘 scale)
|
|
|
|
|
+ pixelX: pixel ? Math.round(pixel.x / scale) : 950,
|
|
|
|
|
+ pixelY: pixel ? Math.round(pixel.y / scale) : 430,
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(nodeData);
|
|
|
|
|
+ if (this.activeLeftTab === 'overview') { // 总览
|
|
|
|
|
+ this.showOverviewDalogs(nodeData);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 处理地图鼠标滑出事件
|
|
|
|
|
+ handleMapCrossingMouseout(mapData) {
|
|
|
|
|
+ console.log('父组件接收到了地图路口鼠标滑出事件:', mapData);
|
|
|
|
|
+ if (this.activeLeftTab === 'overview' && mapData) { // 总览
|
|
|
|
|
+ const id = mapData.position[0] + mapData.position[1];
|
|
|
|
|
+ this.$refs.layout.handleDialogClose('crossing3_' + id);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 处理地图点击事件
|
|
// 处理地图点击事件
|
|
|
handleMapCrossingClick(mapData, lnglat, pixel) {
|
|
handleMapCrossingClick(mapData, lnglat, pixel) {
|
|
|
console.log('父组件接收到了地图路口点击事件:', mapData);
|
|
console.log('父组件接收到了地图路口点击事件:', mapData);
|
|
@@ -212,7 +240,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
console.log(nodeData);
|
|
console.log(nodeData);
|
|
|
if (this.activeLeftTab === 'overview') { // 总览
|
|
if (this.activeLeftTab === 'overview') { // 总览
|
|
|
- this.showOverviewDalogs(nodeData);
|
|
|
|
|
|
|
+ this.showCrossingDetailDialogs(nodeData);
|
|
|
} else if (this.activeLeftTab === 'crossing') { // 路口
|
|
} else if (this.activeLeftTab === 'crossing') { // 路口
|
|
|
this.showCrossingDalogs(nodeData);
|
|
this.showCrossingDalogs(nodeData);
|
|
|
} else if (this.activeLeftTab === 'trunkLine') { // 干线
|
|
} else if (this.activeLeftTab === 'trunkLine') { // 干线
|