| | |
| | | const TaskItem = ({ record, now }) => { |
| | | const translate = useTranslate(); |
| | | const theme = useTheme(); |
| | | console.log(record); |
| | | |
| | | return ( |
| | | <> |
| | |
| | | <ListItemAvatar> |
| | | <Avatar |
| | | alt={record.seqNum} |
| | | variant="rounded" |
| | | sx={{ |
| | | '& img': { objectFit: 'contain' }, |
| | | fontSize: '0.9rem', |
| | | width: 40, |
| | | height: 40, |
| | | height: 25, |
| | | bgcolor: getTaskStsColor(record.taskSts$), |
| | | }} |
| | | > |
| | |
| | | </Avatar> |
| | | </ListItemAvatar> |
| | | <ListItemText |
| | | primary={`${record.first_name} ${record.last_name}`} |
| | | primary={`${record.taskType$}`} |
| | | secondary={ |
| | | <> |
| | | {record.title} |
| | | {record.taskSts$} |
| | | |
| | | </> |
| | | } |
| | | /> |
| | | <ListItemText |
| | | primary={`${record.oriLoc$ || ''}${record.oriSta$ || ''} - ${record.destLoc$ || ''}${record.destSta$ || ''}`} |
| | | secondary={`code: ${record.destCode$ || ''}`} |
| | | /> |
| | | <ListItemSecondaryAction> |
| | | <Typography |
| | |
| | | color="textSecondary" |
| | | component="span" |
| | | > |
| | | last activity{' '} |
| | | last update {' '} |
| | | {formatDistance(record.createTime, now)} ago{' '} |
| | | </Typography> |
| | | </ListItemSecondaryAction> |
| | |
| | | ) |
| | | } |
| | | |
| | | export const AgvShowTask = ({ agvId, pageSize = 20 }) => { |
| | | export const AgvShowTask = ({ agvId, pageSize = 10 }) => { |
| | | const [currCount, setCurrCount] = useState(pageSize); |
| | | const [records, setRecords] = useState(null); |
| | | const [total, setTotal] = useState(0); |
| | |
| | | return ( |
| | | <> |
| | | {records.length > 0 ? ( |
| | | <Box m={1}> |
| | | <Box > |
| | | <List> |
| | | {records.map(record => { |
| | | return ( |