Browse Source

fix(cockpit): 窨井改按设施点链承载点击

ChenJZ 1 hour ago
parent
commit
c863dacf46

+ 13 - 1
src/modules/cockpit/domain/facilityPoints.js

@@ -32,6 +32,7 @@ export const FACILITY_POINT_TYPE = Object.freeze({
     PUMP_STATION: 'PUMP_STATION',
     PUMP_STATION: 'PUMP_STATION',
     WATER_SOURCE: 'WATER_SOURCE',
     WATER_SOURCE: 'WATER_SOURCE',
     WATER_USER: 'WATER_USER',
     WATER_USER: 'WATER_USER',
+    MANHOLE: 'MANHOLE',
 })
 })
 
 
 /**
 /**
@@ -55,6 +56,16 @@ export const FACILITY_POINT_TYPES = Object.freeze([
         archiveCodes: ['WATER_PUMP_STATION', 'DRAINAGE_PUMP_STATION'],
         archiveCodes: ['WATER_PUMP_STATION', 'DRAINAGE_PUMP_STATION'],
         detailCategory: 'PUMP_STATION',
         detailCategory: 'PUMP_STATION',
     },
     },
+    {
+        // 窨井(维护者 2026-11-16):与泵站/水厂同链 —— 点击先弹设施详情面板,
+        // 面板里再由「查看详情」按钮进「地下管线详情视图」。
+        key: FACILITY_POINT_TYPE.MANHOLE,
+        label: '窨井',
+        unit: '座',
+        symbol: 'facilityManhole',
+        archiveCodes: ['MANHOLE'],
+        detailCategory: 'MANHOLE',
+    },
     {
     {
         key: FACILITY_POINT_TYPE.WATER_SOURCE,
         key: FACILITY_POINT_TYPE.WATER_SOURCE,
         label: '水源地',
         label: '水源地',
@@ -125,7 +136,8 @@ export function normalizeFacilityType(value) {
     if (!code) return ''
     if (!code) return ''
     if (ARCHIVE_TYPE.has(code)) return ARCHIVE_TYPE.get(code)
     if (ARCHIVE_TYPE.has(code)) return ARCHIVE_TYPE.get(code)
     // 实体详情的 `category` 与设施台账的 `facilityKind` 都可能是 WATER_PLANT / PUMP_STATION。
     // 实体详情的 `category` 与设施台账的 `facilityKind` 都可能是 WATER_PLANT / PUMP_STATION。
-    if (code === 'WATER_PLANT' || code === 'PUMP_STATION' || code === 'WATER_SOURCE' || code === 'WATER_USER') return code
+    if (code === 'WATER_PLANT' || code === 'PUMP_STATION' || code === 'WATER_SOURCE'
+            || code === 'WATER_USER' || code === 'MANHOLE') return code
     return ''
     return ''
 }
 }
 
 

+ 9 - 2
src/modules/cockpit/domain/pipeNetwork.js

@@ -250,8 +250,15 @@ export function toPipeNetwork(payload) {
         // 时按 properties.typeCode 归类——两端的 source(pipe_network_base / gas_pipe_point / manhole_base)
         // 时按 properties.typeCode 归类——两端的 source(pipe_network_base / gas_pipe_point / manhole_base)
         // 各自只有一种形状,typeCode 是后端给的权威标识,不猜。
         // 各自只有一种形状,typeCode 是后端给的权威标识,不猜。
         const geometryType = feature && feature.geometry && feature.geometry.type
         const geometryType = feature && feature.geometry && feature.geometry.type
-        const isComponent = geometryType === 'Point' || (!geometryType && (
-            String(properties.typeCode || '').includes('POINT') || properties.typeCode === 'MANHOLE'))
+        // 窨井是**设施**不是构件(维护者 2026-11-16):由设施点链承载,
+        // 点击先弹设施详情面板,面板里再进「地下管线详情视图」。
+        // 留在这里当构件会使点击直接开 3D,绕过设施详情 —— 与泵站/水厂的交互不一致。
+        if (String(properties.typeCode || '').toUpperCase() === 'MANHOLE'
+                || String(properties.industry || '').toUpperCase() === 'MANHOLE') {
+            continue
+        }
+        const isComponent = geometryType === 'Point' || (!geometryType && 
+            String(properties.typeCode || '').includes('POINT'))
         const kind = isComponent ? 'component' : 'pipe'
         const kind = isComponent ? 'component' : 'pipe'
         const id = String(properties.code || properties.sourceId || feature.id || '')
         const id = String(properties.code || properties.sourceId || feature.id || '')
         const verdict = admission(properties)
         const verdict = admission(properties)