#
luxiaotao1123
2024-09-21 e0fe34e65f8f1f051cf848fc7e8f099815747417
zy-acs-flow/src/page/agv/AgvShow.jsx
@@ -34,6 +34,14 @@
const AgvShowContent = (props) => {
    const { record, isPending } = useShowContext();
    const theme = useTheme();
    const [online, setOnline] = useState(false);
    useEffect(() => {
        if (record) {
            setOnline(record.online)
        }
    }, [record])
    if (isPending || !record) return null;
    return (
@@ -51,9 +59,8 @@
                                    <Stack direction='row'>
                                        <Box mt={.8} mr={2}>
                                            <PulseSignal
                                                flag={record.online}
                                                flag={online}
                                                width={10}
                                                negative={!record.online}
                                            />
                                        </Box>
                                        <Typography
@@ -76,7 +83,7 @@
                                }}
                            >
                                <TabbedShowLayout.Tab label="page.agv.show.tabs.detail">
                                    <AgvShowDetail agvId={record.id} />
                                    <AgvShowDetail agvId={record.id} setOnline={setOnline} />
                                </TabbedShowLayout.Tab>
                                <TabbedShowLayout.Tab label="page.agv.show.tabs.task" path="tasks">
                                    <AgvShowTask agvId={record.id} />