From 377eaa6e65678c27cb37ad28a7f6d3dea7e5c389 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期六, 21 九月 2024 16:02:29 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/agv/AgvShow.jsx | 58 ++++++++++++++++++++++++++++++++--------------------------
1 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/zy-acs-flow/src/page/agv/AgvShow.jsx b/zy-acs-flow/src/page/agv/AgvShow.jsx
index d758cea..6c0475a 100644
--- a/zy-acs-flow/src/page/agv/AgvShow.jsx
+++ b/zy-acs-flow/src/page/agv/AgvShow.jsx
@@ -1,30 +1,24 @@
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,
+ Avatar,
} from '@mui/material';
import { formatDistance } from 'date-fns';
-
+import { AgvShowDetail } from "./show/AgvShowDetail";
+import { AgvShowAside } from "./show/AgvShowAside";
+import { AgvShowTask } from "./show/AgvShowTask";
+import CustomerTopToolBar from "../components/EditTopToolBar";
+import { useTheme } from '@mui/material/styles';
export const AgvShow = () => {
@@ -39,6 +33,7 @@
const AgvShowContent = (props) => {
const { record, isPending } = useShowContext();
+ const theme = useTheme();
if (isPending || !record) return null;
return (
@@ -46,11 +41,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} mr={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 +68,11 @@
'& .RaTabbedShowLayout-content': { p: 0 },
}}
>
- <TabbedShowLayout.Tab label="Activity">
+ <TabbedShowLayout.Tab label="page.agv.show.tabs.detail">
+ <AgvShowDetail agvId={record.id} />
+ </TabbedShowLayout.Tab>
+ <TabbedShowLayout.Tab label="page.agv.show.tabs.task" path="tasks">
+ <AgvShowTask agvId={record.id} />
</TabbedShowLayout.Tab>
</TabbedShowLayout>
</CardContent>
@@ -69,11 +83,3 @@
</>
)
}
-
-const AgvShowAside = (props) => {
- const { record, isPending } = useShowContext();
-
- return (<>
- <h1>{JSON.stringify(record)}</h1>
- </>)
-}
\ No newline at end of file
--
Gitblit v1.9.1