From 3553afdbe35ed5ff5d2ce2a85e90962a01de9a4a Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期六, 21 三月 2026 16:26:43 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/map/insight/code/CodeMain.jsx | 33 ++++++++++++++-------------------
1 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/zy-acs-flow/src/map/insight/code/CodeMain.jsx b/zy-acs-flow/src/map/insight/code/CodeMain.jsx
index 6719584..f89fb26 100644
--- a/zy-acs-flow/src/map/insight/code/CodeMain.jsx
+++ b/zy-acs-flow/src/map/insight/code/CodeMain.jsx
@@ -55,10 +55,10 @@
() => extractRelationItems(info, ['routeList', 'routes', 'routeRefs']),
[info]
);
- const funcStaBool = detectBoolean(
- info?.funcStaBool ?? info?.isFuncSta ?? info?.funcStation ?? info?.funcStaFlag
+ const funcStaRelations = useMemo(
+ () => extractRelationItems(info, ['funcStaList', 'funcStas']),
+ [info]
);
- const funcStaText = info?.funcSta$ || info?.funcStaName || info?.funcStaType || info?.funcStaCode || info?.funcStaUuid || info?.funcSta;
const ruleList = useMemo(() => normalizeDirRule(info?.dirRule), [info?.dirRule]);
@@ -103,10 +103,6 @@
}
};
- const funcStaLabel = funcStaBool == null
- ? translate('common.enums.na')
- : translate(funcStaBool ? 'common.enums.true' : 'common.enums.false');
-
return (
<Box sx={{ pr: 1, pb: 3 }}>
<Grid container spacing={3} alignItems="flex-start">
@@ -147,7 +143,7 @@
disabled={!info?.id}
sx={{ alignSelf: 'flex-start', textTransform: 'none', px: 3 }}
>
- {translate('page.map.insight.code.actions.openDetail', { _: '杩涘叆 Code 椤甸潰' })}
+ {translate('page.map.insight.code.actions.openDetail', { _: '缂栬緫' })}
</Button>
</Stack>
</Paper>
@@ -180,17 +176,10 @@
/>
</InfoPanel>
<InfoPanel title={translate('menu.funcSta', { _: '鍔熻兘绔�' })}>
- <Stack spacing={1}>
- <BooleanDisplay
- value={funcStaBool}
- label={funcStaLabel}
- />
- {funcStaText && funcStaText !== funcStaLabel && (
- <Typography variant="body2" color="text.secondary">
- {funcStaText}
- </Typography>
- )}
- </Stack>
+ <RelationsChips
+ items={funcStaRelations}
+ emptyLabel={translate('page.map.insight.code.relations.empty', { _: '鏆傛棤鍏宠仈淇℃伅' })}
+ />
</InfoPanel>
</Stack>
</Paper>
@@ -592,6 +581,12 @@
return item;
}
if (typeof item === 'object') {
+ if (item.startCode$ && item.endCode$) {
+ return `${item.startCode$} -> ${item.endCode$}`;
+ }
+ if (item.name || item.type || item.state) {
+ return [item.name, item.type, item.state].filter(Boolean).join(' / ');
+ }
return item.name || item.code || item.data || item.no || item.uuid || item.locNo || item.staNo || JSON.stringify(item);
}
return String(item);
--
Gitblit v1.9.1