feat(burst): add analysis report and valve binding

Replace the obsolete location result with a printable analysis report, bind valve analysis to the selected scheme, and cache report diameter lookups. Scheme identity is tracked with valve results so reports cannot reuse results from another scheme that shares the same pipe.
This commit is contained in:
2026-07-30 13:16:05 +08:00
parent 1b2a7f4fb8
commit c4246cf25f
9 changed files with 1082 additions and 463 deletions
@@ -18,6 +18,7 @@ import {
Link,
} from "@mui/material";
import {
DescriptionOutlined as ReportIcon,
Info as InfoIcon,
LocationOn as LocationIcon,
} from "@mui/icons-material";
@@ -59,7 +60,7 @@ import {
interface SchemeQueryProps {
schemes?: SchemeRecord[];
onSchemesChange?: (schemes: SchemeRecord[]) => void;
onLocate?: (scheme: SchemeRecord) => void;
onViewReport?: (scheme: SchemeRecord) => void;
network?: string;
state?: BurstSchemeQueryState;
onStateChange?: (state: BurstSchemeQueryState) => void;
@@ -88,7 +89,7 @@ export const createBurstSchemeQueryState = (): BurstSchemeQueryState => ({
const SchemeQuery: React.FC<SchemeQueryProps> = ({
schemes: externalSchemes,
onSchemesChange,
onLocate,
onViewReport,
network = NETWORK_NAME,
state,
onStateChange,
@@ -599,14 +600,14 @@ const SchemeQuery: React.FC<SchemeQueryProps> = ({
<InfoIcon fontSize="small" />
</IconButton>
</Tooltip>
<Tooltip title="查看定位结果">
<Tooltip title="查看分析报告">
<IconButton
size="small"
onClick={() => onLocate?.(scheme)}
onClick={() => onViewReport?.(scheme)}
color="primary"
className="p-1"
>
<LocationIcon fontSize="small" />
<ReportIcon fontSize="small" />
</IconButton>
</Tooltip>
</Box>