|
@@ -392,6 +392,7 @@
|
|
|
@device-close="enhancementDevicesStore.closeDetail"
|
|
@device-close="enhancementDevicesStore.closeDetail"
|
|
|
@device-retry="enhancementDevicesStore.open(enhancementDevicesStore.selected)"
|
|
@device-retry="enhancementDevicesStore.open(enhancementDevicesStore.selected)"
|
|
|
@radius-change="pipeEnhancementStore.setRadius"
|
|
@radius-change="pipeEnhancementStore.setRadius"
|
|
|
|
|
+ @locate-device="locateDeviceFromDetail"
|
|
|
@close="closePipeEnhancement"
|
|
@close="closePipeEnhancement"
|
|
|
/>
|
|
/>
|
|
|
|
|
|
|
@@ -503,7 +504,7 @@
|
|
|
@locate-device="locateDeviceFromDetail"
|
|
@locate-device="locateDeviceFromDetail"
|
|
|
@open-underground="openFacilityUnderground"
|
|
@open-underground="openFacilityUnderground"
|
|
|
/>
|
|
/>
|
|
|
- <PointDetailCard v-else :location-reason="fixedLocationReason" />
|
|
|
|
|
|
|
+ <PointDetailCard v-else :location-reason="fixedLocationReason" @locate-device="locateDeviceFromDetail" />
|
|
|
</aside>
|
|
</aside>
|
|
|
<aside v-if="eventStore.selectedEvent && uiStore.mode === 'warningResponse' && !introVisible"
|
|
<aside v-if="eventStore.selectedEvent && uiStore.mode === 'warningResponse' && !introVisible"
|
|
|
class="cockpit-shell__event-detail" aria-label="事件详情" @keydown.esc="eventStore.closeEvent()">
|
|
class="cockpit-shell__event-detail" aria-label="事件详情" @keydown.esc="eventStore.closeEvent()">
|
|
@@ -614,6 +615,7 @@ import { useDetailStore } from './stores/detailStore.js'
|
|
|
import { useDeviceLayerStore } from './stores/deviceLayerStore.js'
|
|
import { useDeviceLayerStore } from './stores/deviceLayerStore.js'
|
|
|
import { useInfrastructureStore } from './stores/infrastructureStore.js'
|
|
import { useInfrastructureStore } from './stores/infrastructureStore.js'
|
|
|
import { useMonitoringStore } from './stores/monitoringStore.js'
|
|
import { useMonitoringStore } from './stores/monitoringStore.js'
|
|
|
|
|
+import { usePointLocateStore } from './stores/pointLocateStore.js'
|
|
|
import { useDeviceStatusStore } from './stores/deviceStatusStore.js'
|
|
import { useDeviceStatusStore } from './stores/deviceStatusStore.js'
|
|
|
import { useEventStore } from './stores/eventStore.js'
|
|
import { useEventStore } from './stores/eventStore.js'
|
|
|
import { useEntityDetailStore } from './stores/entityDetailStore.js'
|
|
import { useEntityDetailStore } from './stores/entityDetailStore.js'
|
|
@@ -678,6 +680,7 @@ const detailStore = useDetailStore()
|
|
|
const mapStore = useMapStore()
|
|
const mapStore = useMapStore()
|
|
|
const infrastructureStore = useInfrastructureStore()
|
|
const infrastructureStore = useInfrastructureStore()
|
|
|
const monitoringStore = useMonitoringStore()
|
|
const monitoringStore = useMonitoringStore()
|
|
|
|
|
+const pointLocateStore = usePointLocateStore()
|
|
|
// 维护者 2026-11-04:设备状态池是**全站口径**(顶部状态栏四个模式都常驻),
|
|
// 维护者 2026-11-04:设备状态池是**全站口径**(顶部状态栏四个模式都常驻),
|
|
|
// 所以它有独立的全局数据源,不挂在「运行监测」的面板分区上。
|
|
// 所以它有独立的全局数据源,不挂在「运行监测」的面板分区上。
|
|
|
const deviceStatusStore = useDeviceStatusStore()
|
|
const deviceStatusStore = useDeviceStatusStore()
|
|
@@ -950,11 +953,11 @@ function panelMeta(panelId) {
|
|
|
return `${view.blocks.length} 组读数`
|
|
return `${view.blocks.length} 组读数`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 定位反馈:只有失败情形值得给一行字(成功时地图与详情卡自己会说话)。 */
|
|
|
|
|
|
|
+/** 定位反馈:取最近一次失败结果(成功时地图与详情卡自己会说话)。 */
|
|
|
const locateFeedback = computed(() => {
|
|
const locateFeedback = computed(() => {
|
|
|
- const current = facilityPointStore.locate || infrastructureStore.locate
|
|
|
|
|
- if (!current || !current.result || current.result === LOCATE_RESULT.OK) return null
|
|
|
|
|
- return current
|
|
|
|
|
|
|
+ const candidates = [pointLocateStore.locate, facilityPointStore.locate].filter((item) => item && item.result)
|
|
|
|
|
+ const latest = candidates.sort((a, b) => (b.at || 0) - (a.at || 0))[0]
|
|
|
|
|
+ return latest && latest.result !== LOCATE_RESULT.OK ? latest : null
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
/** 离开 /cockpit 后不再启动延迟任务(重图层空闲加载可能晚于卸载)。 */
|
|
/** 离开 /cockpit 后不再启动延迟任务(重图层空闲加载可能晚于卸载)。 */
|
|
@@ -1001,6 +1004,7 @@ watch(locateFeedback, (current) => {
|
|
|
if (!current) return
|
|
if (!current) return
|
|
|
locateDismissTimer = window.setTimeout(() => {
|
|
locateDismissTimer = window.setTimeout(() => {
|
|
|
locateDismissTimer = null
|
|
locateDismissTimer = null
|
|
|
|
|
+ pointLocateStore.clearLocate()
|
|
|
infrastructureStore.clearLocate()
|
|
infrastructureStore.clearLocate()
|
|
|
facilityPointStore.clearLocate()
|
|
facilityPointStore.clearLocate()
|
|
|
}, 8000)
|
|
}, 8000)
|
|
@@ -1011,12 +1015,14 @@ function dismissLocateFeedback() {
|
|
|
window.clearTimeout(locateDismissTimer)
|
|
window.clearTimeout(locateDismissTimer)
|
|
|
locateDismissTimer = null
|
|
locateDismissTimer = null
|
|
|
}
|
|
}
|
|
|
|
|
+ pointLocateStore.clearLocate()
|
|
|
infrastructureStore.clearLocate()
|
|
infrastructureStore.clearLocate()
|
|
|
facilityPointStore.clearLocate()
|
|
facilityPointStore.clearLocate()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/** 点面板里的可定位对象 → 地图定位(接缝在 store,本组件只管转发)。 */function locateOnMap(pointCode) {
|
|
|
|
|
- return infrastructureStore.locatePoint(pointCode)
|
|
|
|
|
|
|
+/** 点面板里的可定位对象 → 地图定位(#131:统一走 pointLocateStore)。 */
|
|
|
|
|
+function locateOnMap(pointCode) {
|
|
|
|
|
+ return pointLocateStore.locateTarget({ kind: 'map-object', code: pointCode })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1026,13 +1032,12 @@ function dismissLocateFeedback() {
|
|
|
* 与地图设施点点击共用 facilityPointStore.select,不再走历史固定抽屉。
|
|
* 与地图设施点点击共用 facilityPointStore.select,不再走历史固定抽屉。
|
|
|
*/
|
|
*/
|
|
|
/**
|
|
/**
|
|
|
- * 详情里的「关联设备定位」——沿用运行监测「设备台账」的定位方法(维护者 2026-10-29)。
|
|
|
|
|
- * 即 `monitoringStore.locateCode`:判定能否定位 → 地形感知飞行 → 进设备详情;
|
|
|
|
|
- * 三种「点不动」由 `domain/mapLocate.js` 如实反馈,不另造第二套。
|
|
|
|
|
|
|
+ * 详情里的「关联设备定位」——统一走 pointLocateStore(#131)。
|
|
|
|
|
+ * 判定、地形感知飞行、打开设备详情、揭示目标都由通用入口承担。
|
|
|
*/
|
|
*/
|
|
|
function locateDeviceFromDetail(deviceCode) {
|
|
function locateDeviceFromDetail(deviceCode) {
|
|
|
if (facilityDetailOpen.value) entityDetailStore.close()
|
|
if (facilityDetailOpen.value) entityDetailStore.close()
|
|
|
- return monitoringStore.locateCode(deviceCode)
|
|
|
|
|
|
|
+ return pointLocateStore.locateTarget({ kind: 'map-object', code: deviceCode })
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function openLedgerCard(pointCode) {
|
|
function openLedgerCard(pointCode) {
|
|
@@ -1048,8 +1053,8 @@ function handleCardAction(action, sourceSide = 'right') {
|
|
|
}
|
|
}
|
|
|
if (action.kind === CARD_ACTION.POINT) return selectMonitoringPoint(action.code, { mode: mode.value })
|
|
if (action.kind === CARD_ACTION.POINT) return selectMonitoringPoint(action.code, { mode: mode.value })
|
|
|
// 维护者 2026-10-29:设备台账卡要像监测点台账一样「定位 + 进设备级详情」。
|
|
// 维护者 2026-10-29:设备台账卡要像监测点台账一样「定位 + 进设备级详情」。
|
|
|
- // `locateCode` 是既有的设备维度定位接缝(判定 → 相机 → 详情),不新造第二条路径。
|
|
|
|
|
- if (action.kind === CARD_ACTION.DEVICE) return monitoringStore.locateCode(action.code)
|
|
|
|
|
|
|
+ // #131:统一走 pointLocateStore,不再另造设备维度定位路径。
|
|
|
|
|
+ if (action.kind === CARD_ACTION.DEVICE) return pointLocateStore.locateTarget({ kind: 'map-object', code: action.code })
|
|
|
const row = action.row || {}
|
|
const row = action.row || {}
|
|
|
const prefill = row.identityPayload || row
|
|
const prefill = row.identityPayload || row
|
|
|
if (action.kind === CARD_ACTION.EVENT) {
|
|
if (action.kind === CARD_ACTION.EVENT) {
|
|
@@ -1061,7 +1066,14 @@ function handleCardAction(action, sourceSide = 'right') {
|
|
|
}, prefill, { side: sourceSide })
|
|
}, prefill, { side: sourceSide })
|
|
|
}
|
|
}
|
|
|
if (action.kind === CARD_ACTION.FACILITY) {
|
|
if (action.kind === CARD_ACTION.FACILITY) {
|
|
|
- return facilityPointStore.select({ kind: 'facility', id: action.code, category: row.identityCategory || row.category || '' }, prefill, { side: sourceSide })
|
|
|
|
|
|
|
+ return pointLocateStore.locateTarget({
|
|
|
|
|
+ kind: 'facility',
|
|
|
|
|
+ code: action.code,
|
|
|
|
|
+ category: row.identityCategory || row.category || '',
|
|
|
|
|
+ facility: { kind: 'facility', id: action.code, category: row.identityCategory || row.category || '' },
|
|
|
|
|
+ prefill,
|
|
|
|
|
+ side: sourceSide,
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
if ([CARD_ACTION.WORK_ORDER, CARD_ACTION.EMERGENCY].includes(action.kind)) {
|
|
if ([CARD_ACTION.WORK_ORDER, CARD_ACTION.EMERGENCY].includes(action.kind)) {
|
|
|
return entityDetailStore.show({
|
|
return entityDetailStore.show({
|