| | |
| | | import { AgvShowTask } from "./show/AgvShowTask"; |
| | | import CustomerTopToolBar from "../components/EditTopToolBar"; |
| | | import { useTheme } from '@mui/material/styles'; |
| | | import PulseSignal from "../components/PulseSignal"; |
| | | |
| | | export const AgvShow = () => { |
| | | |
| | | return ( |
| | | <> |
| | | <ShowBase> |
| | |
| | | <CustomerTopToolBar /> |
| | | <Box mt={1} mr={1}> |
| | | <Stack direction='row'> |
| | | <Box mt={.8} mr={2}> |
| | | <PulseSignal |
| | | flag={record.online} |
| | | width={10} |
| | | negative={!record.online} |
| | | /> |
| | | </Box> |
| | | <Typography |
| | | variant="h5" |
| | | sx={{ |
| | |
| | | import { teal } from '@mui/material/colors'; |
| | | |
| | | const PulseSignal = (props) => { |
| | | const { flag = true, width = 8, ...rest } = props; |
| | | const { flag = true, width = 8, negative = false, ...rest } = props; |
| | | |
| | | return ( |
| | | <> |
| | | <Box |
| | | {...rest} |
| | | sx={{ |
| | | width: width, |
| | | height: width, |
| | | borderRadius: '50%', |
| | | backgroundColor: flag ? `${teal[400]}` : '#f44336', |
| | | display: 'inline-block', |
| | | animation: 'pulse 1.2s infinite', |
| | | '@keyframes pulse': { |
| | | '0%': { |
| | | transform: 'scale(1)', |
| | | opacity: 1, |
| | | {flag ? ( |
| | | <Box |
| | | {...rest} |
| | | sx={{ |
| | | width: width, |
| | | height: width, |
| | | borderRadius: '50%', |
| | | backgroundColor: `${teal[400]}`, |
| | | display: 'inline-block', |
| | | animation: `pulse ${negative ? '2' : '1.2'}s infinite`, |
| | | '@keyframes pulse': { |
| | | '0%': { |
| | | transform: 'scale(1)', |
| | | opacity: 1, |
| | | }, |
| | | '50%': { |
| | | transform: 'scale(1.3)', |
| | | opacity: 0.7, |
| | | }, |
| | | '100%': { |
| | | transform: 'scale(1)', |
| | | opacity: 1, |
| | | }, |
| | | }, |
| | | '50%': { |
| | | transform: 'scale(1.2)', |
| | | opacity: 0.7, |
| | | }, |
| | | '100%': { |
| | | transform: 'scale(1)', |
| | | opacity: 1, |
| | | }, |
| | | }, |
| | | }} |
| | | /> |
| | | }} |
| | | /> |
| | | ) : ( |
| | | <Box |
| | | {...rest} |
| | | sx={{ |
| | | width: width + width / 10, |
| | | height: width + width / 10, |
| | | borderRadius: '50%', |
| | | backgroundColor: '#f44336', |
| | | display: 'inline-block', |
| | | }} |
| | | /> |
| | | )} |
| | | </> |
| | | ) |
| | | |
| | |
| | | public R get(@PathVariable("id") Long id) { |
| | | Agv agv = agvService.getById(id); |
| | | if (null != agv) { |
| | | agv.setOnline(agvService.judgeOnline(agv.getId())); |
| | | AgvDetail agvDetail = agvDetailService.selectByAgvId(agv.getId()); |
| | | if (null != agvDetail) { |
| | | agv.setAgvDetail(agvDetail); |
| | |
| | | @TableField(exist = false) |
| | | private AgvModel agvModelData; |
| | | |
| | | @TableField(exist = false) |
| | | private Boolean online = Boolean.FALSE; |
| | | |
| | | public String getAgvSts$(){ |
| | | AgvStsService service = SpringUtils.getBean(AgvStsService.class); |
| | | AgvSts agvSts = service.getById(this.agvSts); |