Browse Source

fix(cockpit): 独立设备的详情面板不再被「目标是否上图」判据误伤

- 详情浮层的显示条件是 v-show="selectionVisibleInMode",而 selectionVisible 判「定位目标可见」时
  只认 locateTarget.deviceCode;独立设备的揭示目标 deviceCode 本来就是空的(它靠 code 揭示),
  于是这类目标永远被判成「没上图」→ 面板被直接隐藏,表现就是「只飞过去、详情不出来」。
- 改为 deviceCode 为空时回落到 code 取关联设备行,独立设备与关联设备走同一判据。
ChenJZ 6 hours ago
parent
commit
b8b972d958
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/modules/cockpit/domain/modeLayerPlan.js

+ 5 - 2
src/modules/cockpit/domain/modeLayerPlan.js

@@ -224,10 +224,13 @@ function selectionVisible({ mode, selection, objects, markers, associatedDevices
     const current = selection || {}
     if (!current.level || current.level === 'none') return false
     // 定位目标本身必须可见(#127):定位的语义是「让目标可见」,不是只把相机开过去。
-    // 基础设施模式整体不呈现监测设备,该模式不破例;目标没被坐标准入收下时也不画面板。
+    // 目标没被坐标准入收下时也不画面板。
+    //
+    // 独立设备的揭示目标 deviceCode 是空的(它靠 code 揭示),早先只认 deviceCode,
+    // 于是这类目标永远判成「没上图」→ 详情面板被 v-show 直接隐藏(维护者 2026-12-02)。
     if (locateTarget) {
         const targetCode = String(locateTarget.code || '').trim()
-        const targetDevice = String(locateTarget.deviceCode || '').trim()
+        const targetDevice = String(locateTarget.deviceCode || '').trim() || targetCode
         // 关联设备的目标点在设备图层(`associatedDevices` 里的临时 drawn 行),不在摘要 markers。
         const targetRow = targetDevice
             ? (Array.isArray(associatedDevices) ? associatedDevices : []).find((row) => row && row.code === targetDevice)