Browse Source

基础设施信息整合

zengy 6 giờ trước cách đây
mục cha
commit
fcc0924a69

+ 1 - 1
src/modules/cockpit/domain/pipeNetwork.js

@@ -247,7 +247,7 @@ export function toPipeNetwork(payload) {
         const properties = (feature && feature.properties) || {}
         const industry = industryOf(properties.industry)
         // 管段/构件判别:契约没有 kind 字段,按 geometry 形状判。geometry 为 null(非法坐标)
-        // 时按 properties.typeCode 归类——两端的 source(pipe_network_base / gas_pipe_point / manhole_base)
+        // 时按 properties.typeCode 归类——两端的 source(pipe_network_base / manhole_base)
         // 各自只有一种形状,typeCode 是后端给的权威标识,不猜。
         const geometryType = feature && feature.geometry && feature.geometry.type
         // 窨井是**设施**不是构件(维护者 2026-11-16):由设施点链承载,

+ 1 - 30
src/modules/cockpit/mocks/contractMocks.js

@@ -3281,14 +3281,6 @@ function pipeNetworkPayload(s, query) {
         ['DR-P-001', '排水主干管', 'DRAINAGE', '混凝土', 800, [[110.3880, 28.4400], [110.3800, 28.4420]]],
     ].filter((row) => keep(row[2]))
 
-    const componentRows = [
-        // 真实 pointType 是英文(实测 valve);中文词表也覆盖,两种都不得漏
-        ['GAS-C-001', 'valve', '阀门', 'GAS', 'GAS-P-001', 110.3960, 28.4455],
-        ['GAS-C-002', 'elbow', '弯头', 'GAS', 'GAS-P-001', 110.4020, 28.4440],
-        ['GAS-C-003', 'tee', '三通', 'GAS', 'GAS-P-002', 110.3862, 28.4380],
-        ['GAS-C-004', 'regulator', '调压', 'GAS', 'GAS-P-003', 110.3790, 28.4392],
-    ].filter((row) => keep(row[3]))
-
     const features = [
         ...pipeRows.map(([code, name, ind, material, diameter, coordinates]) => ({
             type: 'Feature',
@@ -3301,16 +3293,6 @@ function pipeNetworkPayload(s, query) {
                 sourceCoordinates: coordinates, coordinateValidation: valid, coordinateValidations: [valid, valid],
             },
         })),
-        ...componentRows.map(([code, pointType, label, ind, networkId, longitude, latitude]) => ({
-            type: 'Feature',
-            id: `gas_pipe_point:${code}`,
-            geometry: { type: 'Point', coordinates: [longitude, latitude] },
-            properties: {
-                source: 'gas_pipe_point', sourceId: code, code, name: label, industry: ind,
-                typeCode: 'GAS_PIPE_POINT', networkType: null, pointType, networkId,
-                sourceCoordinates: [[longitude, latitude]], coordinateValidation: valid, coordinateValidations: [valid],
-            },
-        })),
         // 窨井:有坐标的点位设施,没有管线
         {
             type: 'Feature',
@@ -3345,17 +3327,6 @@ function pipeNetworkPayload(s, query) {
                 coordinateValidation: invalid('ZERO_COORDINATE'), coordinateValidations: [invalid('ZERO_COORDINATE')],
             },
         },
-        {
-            type: 'Feature',
-            id: 'gas_pipe_point:GAS-C-005',
-            geometry: null,
-            properties: {
-                source: 'gas_pipe_point', sourceId: 'GAS-C-005', code: 'GAS-C-005', name: '阀门(主场景区外)',
-                industry: 'GAS', typeCode: 'GAS_PIPE_POINT', networkType: null, pointType: 'valve', networkId: 'GAS-P-003',
-                sourceCoordinates: [[12.0, 12.0]],
-                coordinateValidation: invalid('OUTSIDE_PRIMARY_AREA'), coordinateValidations: [invalid('OUTSIDE_PRIMARY_AREA')],
-            },
-        },
     ]
 
     // coverage 是**三态行**:同一行业可有管线/构件两行,缺口用 UNAVAILABLE + reason 如实标注。
@@ -3363,7 +3334,7 @@ function pipeNetworkPayload(s, query) {
         { industry: 'GAS', source: 'pipe_network_base', geometryType: 'LineString', state: 'AVAILABLE', reason: 'TWO_ENDPOINTS_ONLY', recordCount: 3, geometryCount: 3, renderableCount: 3 },
         { industry: 'WATER_SUPPLY', source: 'pipe_network_base', geometryType: 'LineString', state: 'AVAILABLE', reason: 'TWO_ENDPOINTS_ONLY', recordCount: 2, geometryCount: 2, renderableCount: 2 },
         { industry: 'DRAINAGE', source: 'pipe_network_base', geometryType: 'LineString', state: 'AVAILABLE', reason: 'TWO_ENDPOINTS_ONLY', recordCount: 1, geometryCount: 1, renderableCount: 1 },
-        { industry: 'GAS', source: 'gas_pipe_point', geometryType: 'Point', state: 'AVAILABLE', reason: null, recordCount: 4, geometryCount: 4, renderableCount: 4 },
+        { industry: 'GAS', source: null, geometryType: 'Point', state: 'UNAVAILABLE', reason: 'NO_COMPONENT_SOURCE', recordCount: 0, geometryCount: 0, renderableCount: 0 },
         { industry: 'WATER_SUPPLY', source: null, geometryType: 'Point', state: 'UNAVAILABLE', reason: 'NO_COMPONENT_SOURCE', recordCount: 0, geometryCount: 0, renderableCount: 0 },
         { industry: 'DRAINAGE', source: null, geometryType: 'Point', state: 'UNAVAILABLE', reason: 'NO_TYPED_COMPONENT_SOURCE', recordCount: 0, geometryCount: 0, renderableCount: 0 },
         { industry: 'MANHOLE', source: 'manhole_base', geometryType: 'Point', state: 'AVAILABLE', reason: 'NO_COMPONENT_TYPE', recordCount: 1, geometryCount: 1, renderableCount: 1 },