|
|
@@ -116,7 +116,27 @@ export const usePointLocateStore = defineStore('pointLocateStore', () => {
|
|
|
deviceCode: plan.deviceCode || '',
|
|
|
reasonText: plan.reasonText,
|
|
|
}
|
|
|
- if (plan.result !== LOCATE_RESULT.OK) return setLocate(base)
|
|
|
+ if (plan.result !== LOCATE_RESULT.OK) {
|
|
|
+ // 目标不在当前地图摘要里(还没上图 / 被筛选掉):关联设备仍可以从**设备档案**取坐标。
|
|
|
+ // 不补这条,「点定位设备」的表现就是什么都没发生(维护者 2026-12-02)。
|
|
|
+ const archive = await deviceFromAggregate(code)
|
|
|
+ if (!archive) return setLocate(base)
|
|
|
+ let failure = TERRAIN_LOCATE_REASON.MAP
|
|
|
+ const flying = Promise.resolve()
|
|
|
+ .then(() => flyPoint(archive, { tier: 'device', onFailure: (reason) => { failure = reason } }))
|
|
|
+ .catch(() => false)
|
|
|
+ // 揭示目标带上设备行与设备编码:图层能补点,详情面板的可见性判据也认得出它。
|
|
|
+ const reveal = { code, deviceCode: archive.code || code, device: archive }
|
|
|
+ await openDevice(code, { locateTarget: reveal })
|
|
|
+ const applied = await flying
|
|
|
+ return setLocate({
|
|
|
+ result: applied === true ? LOCATE_RESULT.OK : LOCATE_RESULT.UNAVAILABLE,
|
|
|
+ code,
|
|
|
+ pointCode: code,
|
|
|
+ deviceCode: code,
|
|
|
+ reasonText: applied === true ? '' : locateFailureText(failure),
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
// #131 补充:关联设备要**越过宿主监测点**直接飞到设备自己的坐标。
|
|
|
// 设备坐标不在 map-snapshot(关联设备不带坐标),必须先打开宿主点位详情,
|