57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
export const MOCK_SPATIAL_ANALYSIS = {
|
|
run_id: "analysis-layout-spatial",
|
|
name: "北区爆管定位",
|
|
run_type: "burst_location",
|
|
run_type_label: "爆管定位",
|
|
status: "completed",
|
|
status_label: "已完成",
|
|
created_by: "layout-test",
|
|
created_at: "2026-09-18T02:20:00Z",
|
|
started_at: "2026-09-18T02:10:00Z",
|
|
results: [{
|
|
result_type: "burst_location",
|
|
created_at: "2026-09-18T02:20:00Z",
|
|
facts: [{ label: "关联管段", value: "P-42" }]
|
|
}],
|
|
map_payload: {
|
|
type: "FeatureCollection",
|
|
features: [{
|
|
type: "Feature",
|
|
properties: { label: "后端爆管定位" },
|
|
geometry: { type: "Point", coordinates: [121.5, 30.9] }
|
|
}]
|
|
}
|
|
} as const;
|
|
|
|
export const MOCK_NON_SPATIAL_ANALYSIS = {
|
|
...MOCK_SPATIAL_ANALYSIS,
|
|
run_id: "analysis-layout-table",
|
|
name: "供水服务分区平衡分析",
|
|
run_type: "pressure_analysis",
|
|
run_type_label: "压力分析",
|
|
results: [{
|
|
result_type: "pressure_analysis",
|
|
created_at: "2026-09-18T02:20:00Z",
|
|
facts: [{ label: "结果状态", value: "已完成" }]
|
|
}],
|
|
map_payload: null
|
|
} as const;
|
|
|
|
export function createAnalysisRuntimeSnapshot(latestAnalysis: unknown) {
|
|
return {
|
|
availability: "ready",
|
|
source: "analysis_runs",
|
|
scenario_availability: "ready",
|
|
artifact_availability: "ready",
|
|
schedule_availability: "not_configured",
|
|
work_order_availability: "not_configured",
|
|
alert_availability: "not_configured",
|
|
generated_at: "2026-09-18T02:30:00Z",
|
|
conditions: [],
|
|
alerts: [],
|
|
scenarios: [],
|
|
latest_analysis: latestAnalysis,
|
|
work_orders: []
|
|
};
|
|
}
|