From 146282e2d4b8658f829cb82b6df65dfdf7dfe83f Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 20 九月 2024 16:22:46 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/agv/index.jsx   |    3 +
 zy-acs-flow/src/page/agv/AgvShow.jsx |   79 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 1 deletions(-)

diff --git a/zy-acs-flow/src/page/agv/AgvShow.jsx b/zy-acs-flow/src/page/agv/AgvShow.jsx
new file mode 100644
index 0000000..d758cea
--- /dev/null
+++ b/zy-acs-flow/src/page/agv/AgvShow.jsx
@@ -0,0 +1,79 @@
+import React, { useState, useRef, useEffect, useMemo } from "react";
+import {
+    RecordContextProvider,
+    ReferenceManyField,
+    ShowBase,
+    SortButton,
+    TabbedShowLayout,
+    useListContext,
+    useRecordContext,
+    useShowContext,
+} from 'react-admin';
+import { Link as RouterLink, useLocation } from 'react-router-dom';
+import {
+    Box,
+    Button,
+    Card,
+    CardContent,
+    List,
+    ListItem,
+    ListItemAvatar,
+    ListItemSecondaryAction,
+    ListItemText,
+    Stack,
+    Typography,
+} from '@mui/material';
+import { formatDistance } from 'date-fns';
+
+
+export const AgvShow = () => {
+
+    return (
+        <>
+            <ShowBase>
+                <AgvShowContent />
+            </ShowBase>
+        </>
+    )
+}
+
+const AgvShowContent = (props) => {
+    const { record, isPending } = useShowContext();
+    if (isPending || !record) return null;
+
+    return (
+        <>
+            <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>
+                            </Box>
+
+                            <TabbedShowLayout
+                                sx={{
+                                    '& .RaTabbedShowLayout-content': { p: 0 },
+                                }}
+                            >
+                                <TabbedShowLayout.Tab label="Activity">
+                                </TabbedShowLayout.Tab>
+                            </TabbedShowLayout>
+                        </CardContent>
+                    </Card>
+                </Box>
+                <AgvShowAside />
+            </Box>
+        </>
+    )
+}
+
+const AgvShowAside = (props) => {
+    const { record, isPending } = useShowContext();
+
+    return (<>
+        <h1>{JSON.stringify(record)}</h1>
+    </>)
+}
\ No newline at end of file
diff --git a/zy-acs-flow/src/page/agv/index.jsx b/zy-acs-flow/src/page/agv/index.jsx
index 6919a02..1f1f039 100644
--- a/zy-acs-flow/src/page/agv/index.jsx
+++ b/zy-acs-flow/src/page/agv/index.jsx
@@ -7,12 +7,13 @@
 
 import { AgvList, AgvGrid } from "./AgvList";
 import AgvEdit from "./AgvEdit";
+import { AgvShow } from "./AgvShow";
 
 export default {
     // list: AgvList,
     list: AgvGrid,
     edit: AgvEdit,
-    show: ShowGuesser,
+    show: AgvShow,
     recordRepresentation: (record) => {
         return `${record.uuid}`
     }

--
Gitblit v1.9.1