From 007a9dba69ac16cf8ddacb95d6e105710f42a27d Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期一, 07 十月 2024 08:11:36 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/mission/MissionShow.jsx | 33 +++++++++++++++++++++++----------
1 files changed, 23 insertions(+), 10 deletions(-)
diff --git a/zy-acs-flow/src/page/mission/MissionShow.jsx b/zy-acs-flow/src/page/mission/MissionShow.jsx
index 8a24fea..8a6c6af 100644
--- a/zy-acs-flow/src/page/mission/MissionShow.jsx
+++ b/zy-acs-flow/src/page/mission/MissionShow.jsx
@@ -23,9 +23,10 @@
Stack,
Typography,
Avatar,
+ 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";
@@ -61,10 +62,10 @@
}
const MissionShowContent = ({ handleClose }) => {
+ const theme = useTheme();
const record = useRecordContext();
const translate = useTranslate();
if (!record) return null;
- console.log(record);
return (
<>
@@ -85,7 +86,7 @@
sx={{
width: 30,
height: 30,
- bgcolor: blueGrey[500],
+ bgcolor: theme.palette.primary.main,
}}
>
{record.agv}
@@ -109,7 +110,7 @@
color="textSecondary"
variant="caption"
>
- Last sending date
+ {translate('table.field.mission.lastSendDate')}
</Typography>
<Stack
direction="row"
@@ -127,7 +128,7 @@
color="textSecondary"
variant="caption"
>
- Bus No
+ {translate('table.field.bus.busNo')}
</Typography>
<Typography variant="body2">
{record.busNo || '-'}
@@ -151,7 +152,7 @@
color="textSecondary"
variant="caption"
>
- Action Count
+ {translate('table.field.mission.actionCount')}
</Typography>
<Typography variant="body2">
{record.actionCount || 'unknown'}
@@ -171,7 +172,7 @@
color="textSecondary"
variant="caption"
>
- Tasks
+ {translate('table.field.mission.task')}
</Typography>
<ReferenceArrayField
source="contact_ids"
@@ -189,15 +190,27 @@
color="textSecondary"
variant="caption"
>
- Run Path
+ {translate('table.field.mission.runPath')}
</Typography>
- <Typography variant="body2">
- [ {record.codeList.join(' , ')} ]
+ <Typography variant="body2" sx={{ whiteSpace: 'normal', overflow: 'hidden', display: 'flex', flexWrap: 'wrap' }}>
+ [ {record.codeList.map((code, index) => (
+ <span key={index} style={{
+ color: record.currCode === code ? theme.palette.primary.main : 'inherit',
+ }}>
+ {code}{index < record.codeList.length - 1 && ','}
+ </span>
+ ))} ]
</Typography>
</Box>
)}
<Box m={2}>
+ <Typography
+ color="textSecondary"
+ variant="caption"
+ >
+ {translate('table.field.mission.actions')}
+ </Typography>
<Divider />
<ActionsIterator actionIds={record.actionIds} />
</Box>
--
Gitblit v1.9.1