|
@@ -592,7 +592,7 @@ import { selectMonitoringPoint } from './pointSelection.js'
|
|
|
// 票 46:模式图层计划(唯一裁决点)+ 模式切换的选择态语义判定。
|
|
// 票 46:模式图层计划(唯一裁决点)+ 模式切换的选择态语义判定。
|
|
|
import { planModeLayers, planModeSelectionTransition } from './domain/modeLayerPlan.js'
|
|
import { planModeLayers, planModeSelectionTransition } from './domain/modeLayerPlan.js'
|
|
|
import { PIPE_ENHANCEMENT_KIND, planPipeEnhancement } from './domain/pipeEnhancement.js'
|
|
import { PIPE_ENHANCEMENT_KIND, planPipeEnhancement } from './domain/pipeEnhancement.js'
|
|
|
-import { facilityUndergroundTarget } from './domain/facilityUnderground.js'
|
|
|
|
|
|
|
+import { facilityAsComponent, facilityUndergroundTarget } from './domain/facilityUnderground.js'
|
|
|
// 票 48:图例计数纯函数(色值/词条/计数与地图管线同源的 domain 单源)。
|
|
// 票 48:图例计数纯函数(色值/词条/计数与地图管线同源的 domain 单源)。
|
|
|
import { pipeColorCounts } from './domain/pipeVisual.js'
|
|
import { pipeColorCounts } from './domain/pipeVisual.js'
|
|
|
import { usePipeEnhancementStore } from './stores/pipeEnhancementStore.js'
|
|
import { usePipeEnhancementStore } from './stores/pipeEnhancementStore.js'
|
|
@@ -1230,6 +1230,33 @@ const modeLayerPlan = computed(() => planModeLayers({
|
|
|
entered: !introVisible.value,
|
|
entered: !introVisible.value,
|
|
|
}))
|
|
}))
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * 当前打开的设施在**地图标记行**里的那一行(含经纬度与类型)。
|
|
|
|
|
+ *
|
|
|
|
|
+ * 为什么要回查标记行:`entityDetailStore.detail` 只有详情字段,坐标在
|
|
|
|
|
+ * `facilityPointStore` 的标记行上。两者按「类别 + 主键」对上,不按编码猜。
|
|
|
|
|
+ */
|
|
|
|
|
+const currentFacilityRow = computed(() => {
|
|
|
|
|
+ if (!facilityDetailOpen.value) return null
|
|
|
|
|
+ const identity = entityDetailStore.identity || {}
|
|
|
|
|
+ const rows = facilityPointStore.points?.value ?? facilityPointStore.points ?? []
|
|
|
|
|
+ const category = String(identity.category || "").toUpperCase()
|
|
|
|
|
+ const id = String(identity.id || "")
|
|
|
|
|
+ const row = (Array.isArray(rows) ? rows : []).find((item) => item
|
|
|
|
|
+ && String(item.type || "").toUpperCase() === category
|
|
|
|
|
+ && String(item.id || "") === id)
|
|
|
|
|
+ return row || null
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+/** 当前设施转成的 3D 构件(只有窨井这类有模型的才非空)。 */
|
|
|
|
|
+const undergroundFacilityComponent = computed(() => facilityAsComponent(currentFacilityRow.value))
|
|
|
|
|
+
|
|
|
|
|
+/** 设施能否进「地下管线详情视图」:只看自身有没有可渲染的 3D 模型与坐标。 */
|
|
|
|
|
+const facilityUndergroundReady = computed(() => Boolean(
|
|
|
|
|
+ facilityDetailOpen.value && facilityUndergroundTarget(currentFacilityRow.value),
|
|
|
|
|
+))
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 设备→设施真实关联索引(维护者 2026-10-22 批准的后端契约)。
|
|
* 设备→设施真实关联索引(维护者 2026-10-22 批准的后端契约)。
|
|
|
*
|
|
*
|
|
@@ -1254,7 +1281,12 @@ const pipeEnhancementPlan = computed(() => {
|
|
|
selected: pipeEnhancementSelection.value,
|
|
selected: pipeEnhancementSelection.value,
|
|
|
radiusM: pipeEnhancementRadius.value,
|
|
radiusM: pipeEnhancementRadius.value,
|
|
|
visiblePipes: modeLayerPlan.value.pipelines,
|
|
visiblePipes: modeLayerPlan.value.pipelines,
|
|
|
- visibleComponents: modeLayerPlan.value.facilities,
|
|
|
|
|
|
|
+ // 窨井(维护者 2026-11-16):设施自己有 3D 模型(井筒+井盖),
|
|
|
|
|
+ // 必须作为构件进入可见集合,否则 3D 视图里只有周边管线、没有它自己。
|
|
|
|
|
+ visibleComponents: [
|
|
|
|
|
+ ...modeLayerPlan.value.facilities,
|
|
|
|
|
+ ...(undergroundFacilityComponent.value ? [undergroundFacilityComponent.value] : []),
|
|
|
|
|
+ ],
|
|
|
})
|
|
})
|
|
|
return { ...plan, ...planEnhancementDevices(plan, enhancementDevicesStore.source.rows, {
|
|
return { ...plan, ...planEnhancementDevices(plan, enhancementDevicesStore.source.rows, {
|
|
|
mode: mode.value, abnormalDevices: modeAbnormalDevices.value, facilityRelations: facilityRelations.value,
|
|
mode: mode.value, abnormalDevices: modeAbnormalDevices.value, facilityRelations: facilityRelations.value,
|
|
@@ -1302,17 +1334,10 @@ const pipeColorCountsView = computed(() => pipeColorCounts(pipeNetworkStore.laye
|
|
|
* (窨井/排水设施用详情里的 networkId,管线用自身编码)。定位不到就不画按钮 ——
|
|
* (窨井/排水设施用详情里的 networkId,管线用自身编码)。定位不到就不画按钮 ——
|
|
|
* 画了就是「点了必然失败」的入口。
|
|
* 画了就是「点了必然失败」的入口。
|
|
|
*/
|
|
*/
|
|
|
-const facilityUndergroundReady = computed(() => Boolean(
|
|
|
|
|
- facilityDetailOpen.value
|
|
|
|
|
- && facilityUndergroundTarget(entityDetailStore.detail, pipeNetworkStore.pipelines?.value ?? pipeNetworkStore.pipelines ?? []),
|
|
|
|
|
-))
|
|
|
|
|
|
|
|
|
|
/** 「查看详情」:选中关联管段,既有三维视图随之打开(不新建第二条渲染链)。 */
|
|
/** 「查看详情」:选中关联管段,既有三维视图随之打开(不新建第二条渲染链)。 */
|
|
|
function openFacilityUnderground() {
|
|
function openFacilityUnderground() {
|
|
|
- const target = facilityUndergroundTarget(
|
|
|
|
|
- entityDetailStore.detail,
|
|
|
|
|
- pipeNetworkStore.pipelines?.value ?? pipeNetworkStore.pipelines ?? [],
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ const target = facilityUndergroundTarget(currentFacilityRow.value)
|
|
|
if (!target) return
|
|
if (!target) return
|
|
|
pipeEnhancementStore.select(target.kind, target.code)
|
|
pipeEnhancementStore.select(target.kind, target.code)
|
|
|
}
|
|
}
|