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

---
 zy-acs-flow/src/page/mission/MissionShow.jsx |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/zy-acs-flow/src/page/mission/MissionShow.jsx b/zy-acs-flow/src/page/mission/MissionShow.jsx
index 451db8c..6a45af4 100644
--- a/zy-acs-flow/src/page/mission/MissionShow.jsx
+++ b/zy-acs-flow/src/page/mission/MissionShow.jsx
@@ -23,11 +23,14 @@
     Stack,
     Typography,
     Avatar,
+    useTheme,
 } from '@mui/material';
 import DialogCloseButton from "../components/DialogCloseButton";
 import { blueGrey } from '@mui/material/colors';
 import MoveToInboxIcon from '@mui/icons-material/MoveToInbox';
 import { format } from 'date-fns';
+import { TaskList } from "./TaskList";
+import { ActionsIterator } from "../action/ActionsIterator";
 
 const MissionShow = ({ open, id }) => {
     const redirect = useRedirect();
@@ -59,6 +62,7 @@
 }
 
 const MissionShowContent = ({ handleClose }) => {
+    const theme = useTheme();
     const record = useRecordContext();
     const translate = useTranslate();
     if (!record) return null;
@@ -115,7 +119,7 @@
                                     gap={1}
                                 >
                                     <Typography variant="body2">
-                                        {format(record.sendTime, 'yyyy-MM-dd HH:mm:ss')}
+                                        {format(record.sendTime, 'yyyy-MM-dd HH:mm:ss') || '-'}
                                     </Typography>
                                 </Stack>
                             </Box>
@@ -128,7 +132,7 @@
                                     Bus No
                                 </Typography>
                                 <Typography variant="body2">
-                                    {record.busNo}
+                                    {record.busNo || '-'}
                                 </Typography>
                             </Box>
 
@@ -157,7 +161,7 @@
                             </Box>
                         </Box>
 
-                        {!!record.contact_ids?.length && (
+                        {!!record.taskIds?.length && (
                             <Box m={2}>
                                 <Box
                                     display="flex"
@@ -169,34 +173,41 @@
                                         color="textSecondary"
                                         variant="caption"
                                     >
-                                        Contacts
+                                        Tasks
                                     </Typography>
                                     <ReferenceArrayField
                                         source="contact_ids"
                                         reference="contacts_summary"
                                     >
-                                        <ContactList />
+                                        <TaskList taskIds={record.taskIds} />
                                     </ReferenceArrayField>
                                 </Box>
                             </Box>
                         )}
 
-                        {record.description && (
+                        {!!record.codeList?.length && (
                             <Box m={2} sx={{ whiteSpace: 'pre-line' }}>
                                 <Typography
                                     color="textSecondary"
                                     variant="caption"
                                 >
-                                    Description
+                                    Run Path
                                 </Typography>
-                                <Typography variant="body2">
-                                    {record.description}
+                                <Typography variant="body2" sx={{ whiteSpace: 'normal', overflow: 'hidden', display: 'flex', flexWrap: 'wrap' }}>
+                                    [&nbsp;{record.codeList.map((code, index) => (
+                                        <span key={index} style={{
+                                            color: record.currCode === code ? theme.palette.primary.main : 'inherit',
+                                        }}>
+                                            {code}{index < record.codeList.length - 1 && ','}&nbsp;
+                                        </span>
+                                    ))}&nbsp;]
                                 </Typography>
                             </Box>
                         )}
 
                         <Box m={2}>
                             <Divider />
+                            <ActionsIterator actionIds={record.actionIds} />
                         </Box>
                     </Box>
                 </Box>

--
Gitblit v1.9.1