|
|
@@ -115,6 +115,13 @@ function displayStatusFor(code, fallback, statusIndex) {
|
|
|
*/
|
|
|
function withLocateTarget(visible, objects, mode, locateTarget) {
|
|
|
if (!locateTarget || mode === MODE_LAYER.INFRASTRUCTURE) return visible
|
|
|
+ // 关联设备的目标是设备图层(由 deviceLayerStore 临时补行),不再额外补宿主点位标记:
|
|
|
+ // 宿主点图标更大,叠在设备点上会把设备图标盖住(#135 走查:定位成功但设备点“丢了”)。
|
|
|
+ // 即使宿主点位本身在本模式可见,定位设备期间也先让位,避免遮挡设备点。
|
|
|
+ if (locateTarget.deviceCode) {
|
|
|
+ const hostCode = String(locateTarget.code || '').trim()
|
|
|
+ return hostCode ? visible.filter((object) => object && object.code !== hostCode) : visible
|
|
|
+ }
|
|
|
const code = String(locateTarget.code || '').trim()
|
|
|
if (!code) return visible
|
|
|
const target = (Array.isArray(objects) ? objects : []).find((object) => object && object.code === code)
|
|
|
@@ -218,7 +225,12 @@ function selectionVisible({ mode, selection, objects, markers, associatedDevices
|
|
|
if (locateTarget && mode !== MODE_LAYER.INFRASTRUCTURE) {
|
|
|
const targetCode = String(locateTarget.code || '').trim()
|
|
|
const targetDevice = String(locateTarget.deviceCode || '').trim()
|
|
|
- const targetDrawn = Boolean(targetCode) && (markers || []).some((marker) => marker && marker.code === targetCode)
|
|
|
+ // 关联设备的目标点在设备图层(`associatedDevices` 里的临时 drawn 行),不在摘要 markers。
|
|
|
+ const targetRow = targetDevice
|
|
|
+ ? (Array.isArray(associatedDevices) ? associatedDevices : []).find((row) => row && row.code === targetDevice)
|
|
|
+ : null
|
|
|
+ const targetDrawn = (Boolean(targetCode) && (markers || []).some((marker) => marker && marker.code === targetCode))
|
|
|
+ || Boolean(targetRow && targetRow.placement === 'drawn')
|
|
|
if (targetDrawn && (current.deviceCode === targetCode
|
|
|
|| (!current.deviceCode && current.pointCode === targetCode)
|
|
|
|| (targetDevice && current.deviceCode === targetDevice))) return true
|