#
vincentlu
2 天以前 3553afdbe35ed5ff5d2ce2a85e90962a01de9a4a
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);