From 89c7f6e5bcc21b0e8f83a2bc6d680e2ffe431e6f Mon Sep 17 00:00:00 2001
From: vincentlu <t1341870251@gmail.com>
Date: 星期一, 13 一月 2025 09:38:29 +0800
Subject: [PATCH] #

---
 zy-acs-flow/src/page/agv/show/AgvShowTask.jsx |   43 ++++++++++++++++++++++++++-----------------
 1 files changed, 26 insertions(+), 17 deletions(-)

diff --git a/zy-acs-flow/src/page/agv/show/AgvShowTask.jsx b/zy-acs-flow/src/page/agv/show/AgvShowTask.jsx
index e134b01..c5474b4 100644
--- a/zy-acs-flow/src/page/agv/show/AgvShowTask.jsx
+++ b/zy-acs-flow/src/page/agv/show/AgvShowTask.jsx
@@ -23,12 +23,12 @@
 import { formatDistance } from 'date-fns';
 import request from '@/utils/request';
 import { useTheme } from '@mui/material/styles';
-import { getTaskStsColor } from '@/utils/common';
+import { getTaskStsColor } from '@/utils/color-util';
+import ListEmptyTip from "../../components/ListEmptyTip";
 
 const TaskItem = ({ record, now }) => {
     const translate = useTranslate();
     const theme = useTheme();
-    console.log(record);
 
     return (
         <>
@@ -51,13 +51,24 @@
                     </ListItemAvatar>
                     <ListItemText
                         primary={<>
-                            <Typography
-                                variant="body1"
-                                color="textPrimary"
-                                component="span"
-                            >
-                                {record.taskType$}
-                            </Typography>
+                            <Stack direction={'row'}>
+                                <Typography
+                                    variant="body1"
+                                    color="textSecondary"
+                                    component="span"
+                                    sx={{ fontWeight: '600' }}
+                                >
+                                    {record.taskType$}
+                                </Typography>
+                                <Typography
+                                    variant="caption"
+                                    color="textSecondary"
+                                    component="span"
+                                >
+                                    &nbsp;-&nbsp; {record.taskTypeEl}
+                                </Typography>
+                            </Stack>
+
                         </>}
                         secondary={
                             <>
@@ -65,6 +76,7 @@
                                     variant="body2"
                                     color="textSecondary"
                                     component="span"
+                                    sx={{ fontWeight: 'bold' }}
                                 >
                                     {record.taskSts$}
                                 </Typography>
@@ -105,6 +117,7 @@
     const [currCount, setCurrCount] = useState(pageSize);
     const [records, setRecords] = useState(null);
     const [total, setTotal] = useState(0);
+    const translate = useTranslate();
 
     useEffect(() => {
         const http = async () => {
@@ -158,18 +171,16 @@
                     <List>
                         {records.map(record => {
                             return (
-                                <>
+                                <React.Fragment key={record.id}>
                                     <TaskItem
                                         key={record.id}
                                         record={record}
                                         now={now}
                                     />
                                     <Divider />
-                                </>
-
+                                </React.Fragment>
                             )
                         })}
-
                         {currCount < total && (
                             <Button
                                 onClick={() =>
@@ -181,15 +192,13 @@
                                 fullWidth
                                 sx={{ mt: 1 }}
                             >
-                                Load more activity
+                                {translate('common.action.loadMore')}
                             </Button>
                         )}
                     </List>
                 </Box>
             ) : (
-                <Typography>
-                    no data found
-                </Typography>
+                <ListEmptyTip />
             )}
 
         </>

--
Gitblit v1.9.1