| | |
| | | }} |
| | | > |
| | | <TabbedShowLayout.Tab label="DETAIL"> |
| | | <AgvShowDetail /> |
| | | <AgvShowDetail record={record} /> |
| | | </TabbedShowLayout.Tab> |
| | | </TabbedShowLayout> |
| | | </CardContent> |
| | |
| | | const record = useRecordContext(); |
| | | if (!record) return null; |
| | | |
| | | |
| | | return ( |
| | | <Box width={400} display={{ xs: 'none', lg: 'block' }}> |
| | | {record && ( |
| | |
| | | <Typography variant="subtitle2" gutterBottom> |
| | | {translate('common.edit.side.title')} |
| | | </Typography> |
| | | <Divider sx={{ mb: 1 }} /> |
| | | <Divider sx={{ mb: 2 }} /> |
| | | <Grid container rowSpacing={2} columnSpacing={1}> |
| | | <Grid item xs={12} display="flex" gap={1}> |
| | | <StatusField label="Status" /> |
| | |
| | | |
| | | |
| | | export const AgvShowDetail = (props) => { |
| | | const { agvId, ...rest } = props; |
| | | const { record, ...rest } = props; |
| | | |
| | | const dataProvider = useDataProvider(); |
| | | const [data, setData] = useState(null); |
| | | |
| | | useEffect(() => { |
| | | |
| | | }, []); |
| | | |
| | | if (!data) { |
| | | if (!record) { |
| | | return ( |
| | | <Stack mt={0.5}> |
| | | {Array.from({ length: 5 }).map((_, index) => ( |
| | |
| | | @PreAuthorize("hasAuthority('manager:agv:list')") |
| | | @GetMapping("/agv/{id}") |
| | | public R get(@PathVariable("id") Long id) { |
| | | return R.ok().add(agvService.getById(id)); |
| | | Agv agv = agvService.getById(id); |
| | | if (null != agv) { |
| | | AgvDetail agvDetail = agvDetailService.selectByAgvId(agv.getId()); |
| | | if (null != agvDetail) { |
| | | agv.setAgvDetail(agvDetail); |
| | | } |
| | | } |
| | | return R.ok().add(agv); |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:agv:save')") |