fix(map): show simulation pipe ids

This commit is contained in:
2026-07-16 14:50:22 +08:00
parent 209da0d295
commit ef2b045306
4 changed files with 300 additions and 6 deletions
@@ -13,6 +13,7 @@ import {
TableHead,
TableRow,
Button,
Link,
} from "@mui/material";
import {
FormatListBulleted,
@@ -251,6 +252,7 @@ const LocationResults: React.FC<Props> = ({ result }) => {
);
const sourceLabel = getDataSourceLabel(result);
const normalDataDescription = getNormalDataDescription(result);
const simulationBurstIds = result.simulation_scheme?.burst_ids ?? [];
return (
<Box className="h-full overflow-auto p-1">
@@ -287,6 +289,7 @@ const LocationResults: React.FC<Props> = ({ result }) => {
variant="outlined"
startIcon={<LocationOnIcon />}
onClick={() => locatePipes([result.located_pipe])}
disabled={!result.located_pipe}
sx={{
height: 24,
minWidth: 0,
@@ -348,6 +351,55 @@ const LocationResults: React.FC<Props> = ({ result }) => {
: {result.simulation_scheme.name}
</Typography>
) : null}
{simulationBurstIds.length > 0 ? (
<Box className="mt-1 flex flex-wrap items-center gap-1">
<Typography variant="caption" className="text-purple-600">
:
</Typography>
{simulationBurstIds.map((pipeId) => (
<Link
key={pipeId}
component="button"
variant="caption"
onClick={() => locatePipes([pipeId])}
title={pipeId}
sx={{
maxWidth: 132,
color: "#7c3aed",
fontSize: "0.75rem",
fontWeight: 700,
lineHeight: "22px",
cursor: "pointer",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap",
textDecoration: "underline",
textUnderlineOffset: "2px",
"&:hover": {
color: "#5b21b6",
},
}}
>
{pipeId}
</Link>
))}
<Button
size="small"
variant="text"
startIcon={<LocationOnIcon />}
onClick={() => locatePipes(simulationBurstIds)}
sx={{
minWidth: 0,
px: 0.5,
py: 0,
color: "#7c3aed",
fontSize: "0.72rem",
}}
>
</Button>
</Box>
) : null}
</Box>
</Box>