#
luxiaotao1123
2024-09-21 3ba41a836d73a2c6c478f5fbf4fb5d150c5d498d
zy-acs-flow/src/page/agv/AgvShow.jsx
@@ -22,9 +22,13 @@
    ListItemText,
    Stack,
    Typography,
    Avatar,
} from '@mui/material';
import { formatDistance } from 'date-fns';
import { AgvShowDetail } from "./show/AgvShowDetail";
import { AgvShowAside } from "./show/AgvShowAside";
import CustomerTopToolBar from "../components/EditTopToolBar";
import { useTheme } from '@mui/material/styles';
export const AgvShow = () => {
@@ -39,6 +43,7 @@
const AgvShowContent = (props) => {
    const { record, isPending } = useShowContext();
    const theme = useTheme();
    if (isPending || !record) return null;
    return (
@@ -46,11 +51,26 @@
            <Box mt={2} display="flex">
                <Box flex="1">
                    <Card>
                        <CardContent>
                            <Box display="flex" mb={1}>
                                <Typography variant="h5" ml={2} flex="1">
                                    {record.uuid}
                                </Typography>
                        <CardContent sx={{ pt: 0 }}>
                            <Box display="flex" mb={1} sx={{
                                justifyContent: 'space-between',
                                alignItems: 'center',
                            }}>
                                <CustomerTopToolBar />
                                <Box mt={1}>
                                    <Stack direction='row'>
                                        <Typography
                                            variant="h5"
                                            sx={{
                                                mt: .5,
                                                mr: 2
                                            }}
                                        >
                                            {record.agvModelData?.type}
                                        </Typography>
                                        <Avatar sx={{ bgcolor: theme.palette.primary.main }}>{record.uuid}</Avatar>
                                    </Stack>
                                </Box>
                            </Box>
                            <TabbedShowLayout
@@ -58,7 +78,8 @@
                                    '& .RaTabbedShowLayout-content': { p: 0 },
                                }}
                            >
                                <TabbedShowLayout.Tab label="Activity">
                                <TabbedShowLayout.Tab label="DETAIL">
                                    <AgvShowDetail record={record} />
                                </TabbedShowLayout.Tab>
                            </TabbedShowLayout>
                        </CardContent>
@@ -69,11 +90,3 @@
        </>
    )
}
const AgvShowAside = (props) => {
    const { record, isPending } = useShowContext();
    return (<>
        <h1>{JSON.stringify(record)}</h1>
    </>)
}