From d69391dfe6333aadf858d5b9b52b5f3007ba16e4 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 29 九月 2024 16:46:39 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/agv/AgvAvatar.jsx       |    5 +++--
 zy-acs-flow/src/page/mission/TaskList.jsx    |    4 +++-
 zy-acs-flow/src/page/agv/AgvCard.jsx         |    4 ++--
 zy-acs-flow/src/page/mission/MissionCard.jsx |    5 +++--
 zy-acs-flow/src/page/action/Action.jsx       |   17 ++++++++---------
 zy-acs-flow/src/page/mission/MissionShow.jsx |    4 ++--
 6 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/zy-acs-flow/src/page/action/Action.jsx b/zy-acs-flow/src/page/action/Action.jsx
index 50f36e1..40d7da5 100644
--- a/zy-acs-flow/src/page/action/Action.jsx
+++ b/zy-acs-flow/src/page/action/Action.jsx
@@ -40,8 +40,14 @@
                 >
                     {data.priority}
                 </Avatar>
-                <Typography color="text.secondary" variant="body2">
+                <Typography color="textPrimary" variant="body2">
                     {data.actionType$}
+                </Typography>
+                <Typography
+                    variant="body2"
+                    color="textSecondary"
+                >
+                    ({data.actionSts$ || '-'})
                 </Typography>
                 <Box flex={1}></Box>
                 <Typography
@@ -68,13 +74,6 @@
                     variant="body2"
                     color="textSecondary"
                 >
-                    code: {data.code || '-'}
-                </Typography>
-                <Divider orientation="vertical" flexItem sx={{ marginX: 1 }} />
-                <Typography
-                    variant="body2"
-                    color="textSecondary"
-                >
                     task: {data.taskId$ || '-'}
                 </Typography>
                 <Divider orientation="vertical" flexItem sx={{ marginX: 1 }} />
@@ -82,7 +81,7 @@
                     variant="body2"
                     color="textSecondary"
                 >
-                    status: {data.actionSts$ || '-'}
+                    code: {data.code || '-'}
                 </Typography>
                 <Divider orientation="vertical" flexItem sx={{ marginX: 1 }} />
                 <Typography
diff --git a/zy-acs-flow/src/page/agv/AgvAvatar.jsx b/zy-acs-flow/src/page/agv/AgvAvatar.jsx
index bbc2065..3aa36f3 100644
--- a/zy-acs-flow/src/page/agv/AgvAvatar.jsx
+++ b/zy-acs-flow/src/page/agv/AgvAvatar.jsx
@@ -1,9 +1,10 @@
 import * as React from 'react';
-import { Avatar, Typography } from '@mui/material';
+import { Avatar, Typography, useTheme } from '@mui/material';
 import { useRecordContext } from 'react-admin';
 import { blueGrey } from '@mui/material/colors';
 
 export const AgvAvatar = (props) => {
+    const theme = useTheme();
     const { width = 40, height = 40 } = props;
     const record = useRecordContext(props);
     if (!record) return null;
@@ -16,7 +17,7 @@
                 width,
                 height,
                 fontSize: height !== 40 ? '0.6rem' : undefined,
-                bgcolor: blueGrey[500]
+                bgcolor: theme.palette.primary.main,
             }}
         >
             {record.uuid}
diff --git a/zy-acs-flow/src/page/agv/AgvCard.jsx b/zy-acs-flow/src/page/agv/AgvCard.jsx
index b96f4d2..04e7e75 100644
--- a/zy-acs-flow/src/page/agv/AgvCard.jsx
+++ b/zy-acs-flow/src/page/agv/AgvCard.jsx
@@ -10,7 +10,7 @@
 } from 'react-admin';
 import PulseSignal from '../components/PulseSignal';
 import { AgvAvatar } from './AgvAvatar';
-import { red, blue } from '@mui/material/colors';
+import { red, blue, blueGrey } from '@mui/material/colors';
 
 export const AgvCard = (props) => {
     const resource = useResourceContext();
@@ -129,7 +129,7 @@
                     <Avatar
                         key={record.id}
                         title={`${record.seqNum}`}
-                        sx={{ bgcolor: blue[300] }}
+                        sx={{ bgcolor: blueGrey[500] }}
                     >
                         {record.seqNum.slice(0, 4)}
                     </Avatar>
diff --git a/zy-acs-flow/src/page/mission/MissionCard.jsx b/zy-acs-flow/src/page/mission/MissionCard.jsx
index b94df01..720eaca 100644
--- a/zy-acs-flow/src/page/mission/MissionCard.jsx
+++ b/zy-acs-flow/src/page/mission/MissionCard.jsx
@@ -1,5 +1,5 @@
 import { Draggable } from '@hello-pangea/dnd';
-import { Box, Card, Typography, Avatar, Divider, Stack, Slider } from '@mui/material';
+import { Box, Card, Typography, Avatar, Divider, Stack, Slider, useTheme } from '@mui/material';
 import { ReferenceField, useRedirect } from 'react-admin';
 import { blueGrey } from '@mui/material/colors';
 import { styled } from '@mui/material/styles';
@@ -21,6 +21,7 @@
 };
 
 export const MissionCardContent = ({ provided, snapshot, mission, }) => {
+    const theme = useTheme();
     const redirect = useRedirect();
     const handleClick = () => {
         redirect(`/mission/${mission.id}/show`, undefined, undefined, undefined, {
@@ -50,7 +51,7 @@
                             sx={{
                                 width: 30,
                                 height: 30,
-                                bgcolor: blueGrey[500],
+                                bgcolor: theme.palette.primary.main,
                             }}
                         >
                             {mission.agv}
diff --git a/zy-acs-flow/src/page/mission/MissionShow.jsx b/zy-acs-flow/src/page/mission/MissionShow.jsx
index 6a45af4..92e1761 100644
--- a/zy-acs-flow/src/page/mission/MissionShow.jsx
+++ b/zy-acs-flow/src/page/mission/MissionShow.jsx
@@ -26,7 +26,7 @@
     useTheme,
 } from '@mui/material';
 import DialogCloseButton from "../components/DialogCloseButton";
-import { blueGrey } from '@mui/material/colors';
+import { blueGrey, blue } from '@mui/material/colors';
 import MoveToInboxIcon from '@mui/icons-material/MoveToInbox';
 import { format } from 'date-fns';
 import { TaskList } from "./TaskList";
@@ -87,7 +87,7 @@
                                     sx={{
                                         width: 30,
                                         height: 30,
-                                        bgcolor: blueGrey[500],
+                                        bgcolor: theme.palette.primary.main,
                                     }}
                                 >
                                     {record.agv}
diff --git a/zy-acs-flow/src/page/mission/TaskList.jsx b/zy-acs-flow/src/page/mission/TaskList.jsx
index e537699..9440fe7 100644
--- a/zy-acs-flow/src/page/mission/TaskList.jsx
+++ b/zy-acs-flow/src/page/mission/TaskList.jsx
@@ -5,6 +5,7 @@
     useTranslate,
 } from 'react-admin';
 import { getTaskStsColor } from '@/utils/color-util';
+import { blueGrey } from "@mui/material/colors";
 
 export const TaskList = ({ taskIds }) => {
     const dataProvider = useDataProvider();
@@ -35,7 +36,8 @@
                             fontSize: '1rem',
                             width: 55,
                             height: 40,
-                            bgcolor: getTaskStsColor(task.taskSts$),
+                            bgcolor: blueGrey[400],
+                            // bgcolor: getTaskStsColor(task.taskSts$),
                         }}
                     >
                         {task.seqNum}

--
Gitblit v1.9.1