|
|
@@ -1278,7 +1278,7 @@ function focusWarningType(code) {
|
|
|
if (!key) return false
|
|
|
uiStore.setMode('warningResponse')
|
|
|
eventStore.clearWarningTypeFilter()
|
|
|
- eventStore.setHistoryTypeFilter(key, warningTypeLabel(key))
|
|
|
+ eventStore.setHistoryTypeFilter(key, warningTypeLabel(key), EVENT_FAMILY.WARNING)
|
|
|
void eventStore.loadPanels({ mode: EVENT_FAMILY.WARNING, range: '30d' })
|
|
|
return true
|
|
|
}
|
|
|
@@ -1291,7 +1291,7 @@ function focusHistoryType(code) {
|
|
|
eventStore.clearHistoryTypeFilter()
|
|
|
return true
|
|
|
}
|
|
|
- eventStore.setHistoryTypeFilter(key, warningTypeLabel(key))
|
|
|
+ eventStore.setHistoryTypeFilter(key, warningTypeLabel(key), EVENT_FAMILY.WARNING)
|
|
|
return true
|
|
|
}
|
|
|
|
|
|
@@ -1545,9 +1545,17 @@ const currentFacilityRow = computed(() => {
|
|
|
const undergroundFacilityComponent = computed(() => facilityAsComponent(currentFacilityRow.value))
|
|
|
|
|
|
/** 设施能否进「地下管线详情视图」:只看自身有没有可渲染的 3D 模型与坐标。 */
|
|
|
-const facilityUndergroundReady = computed(() => Boolean(
|
|
|
- facilityDetailOpen.value && facilityUndergroundTarget(currentFacilityRow.value),
|
|
|
-))
|
|
|
+/**
|
|
|
+ * 设施卡上的「查看详情」是否可用。
|
|
|
+ *
|
|
|
+ * 常规设施靠「能不能定位到一条真实可见的管段」判定;但管网聚焦打开的就是这张设施卡,
|
|
|
+ * 而管段不在设施点图层里,currentFacilityRow 恒为空 —— 所以补一条按实体身份判定的分支,
|
|
|
+ * 否则管网详情永远看不到这个入口(维护者 2026-12-02)。
|
|
|
+ */
|
|
|
+const facilityUndergroundReady = computed(() => {
|
|
|
+ if (facilityUndergroundTarget(currentFacilityRow.value)) return true
|
|
|
+ return Boolean(entityDetailStore.identity && entityDetailStore.identity.category === 'PIPE_NETWORK')
|
|
|
+})
|
|
|
|
|
|
/** 实体详情抽屉里的地下设施能否进「地下管线详情视图」:管网一定能(按管段编码选中),窨井沿用设施判定。 */
|
|
|
const undergroundReadyForDetail = computed(() => {
|
|
|
@@ -1643,17 +1651,31 @@ const pipeColorCountsView = computed(() => pipeColorCounts(pipeNetworkStore.laye
|
|
|
* 其它地下设施仍走原有判定(要有可渲染的 3D 模型与坐标)。
|
|
|
*/
|
|
|
function openUndergroundFromDetail() {
|
|
|
- const identity = entityDetailStore.identity
|
|
|
- if (identity && identity.category === 'PIPE_NETWORK' && identity.id) {
|
|
|
- return pipeEnhancementStore.select(PIPE_ENHANCEMENT_KIND.PIPE, identity.id)
|
|
|
- }
|
|
|
+ if (openNetworkUnderground()) return
|
|
|
openFacilityUnderground()
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * 管网进地下视图:select 认的是**管段业务编码**,而实体详情的 identity.id 是 sourceId(raw_*),
|
|
|
+ * 所以取详情里的业务编码,退不到才用 identity.id。
|
|
|
+ */
|
|
|
+function openNetworkUnderground() {
|
|
|
+ const identity = entityDetailStore.identity
|
|
|
+ if (!identity || identity.category !== 'PIPE_NETWORK') return false
|
|
|
+ const code = (entityDetailStore.detail && entityDetailStore.detail.displayCode) || identity.code || identity.id
|
|
|
+ if (!code) return false
|
|
|
+ pipeEnhancementStore.select(PIPE_ENHANCEMENT_KIND.PIPE, code)
|
|
|
+ return true
|
|
|
+}
|
|
|
+
|
|
|
function openFacilityUnderground() {
|
|
|
const target = facilityUndergroundTarget(currentFacilityRow.value)
|
|
|
- if (!target) return
|
|
|
- pipeEnhancementStore.select(target.kind, target.code)
|
|
|
+ if (target) {
|
|
|
+ pipeEnhancementStore.select(target.kind, target.code)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 设施卡由管网聚焦打开时没有设施点行,改按实体详情身份进地下视图。
|
|
|
+ openNetworkUnderground()
|
|
|
}
|
|
|
|
|
|
function selectPipeEnhancement(hit) {
|