Browse Source

修改状态监控页面的在地图上点击路口生成弹窗;

画安 1 month ago
parent
commit
834816a3ec
1 changed files with 19 additions and 3 deletions
  1. 19 3
      src/views/StatusMonitoring.vue

+ 19 - 3
src/views/StatusMonitoring.vue

@@ -238,8 +238,23 @@ export default {
     },
     methods: {
         // 处理地图点击事件
-        handleMapCrossingClick(mapData) {
-            console.log('父组件接收到了地图路口点击事件:', mapData);
+        handleMapCrossingClick(mapData, lnglat) {
+            console.log('父组件接收到了地图路口点击事件:', mapData, lnglat);
+            // 组装模拟数据
+            let nodeData = {
+                id: Math.random(1, 100),
+                label: mapData.road,
+            }
+            console.log(nodeData);
+            if (this.activeLeftTab === 'overview') { // 总览
+                this.showOverviewDalogs(nodeData);
+            } else if (this.activeLeftTab === 'crossing') { // 路口
+                this.showCrossingDalogs(nodeData);
+            } else if (this.activeLeftTab === 'trunkLine') { // 干线
+                this.showTrunkLineDalogs(nodeData);
+            } else if (this.activeLeftTab === 'specialDuty') { // 特勤
+                this.showSpecialDutyDalogs(nodeData);
+            }
         },
         // 模式切换
         onViewSelect(item) {
@@ -458,7 +473,8 @@ export default {
         },
         // 显示特勤弹窗组
         showSpecialDutyDalogs(nodeData) {
-            console.log('显示干线弹窗组', nodeData.id, nodeData.label);
+            console.log('显示特勤弹窗组', nodeData.id, nodeData.label);
+            this.openDutyDetailDialog(nodeData);
         },
         // === 解析路由参数并执行对应操作 ===
         checkRouteParams() {