| | |
| | | errTime: "err time", |
| | | errDesc: "error", |
| | | }, |
| | | mission: { |
| | | backpack: 'Backpack', |
| | | code: 'Code', |
| | | task: 'Task', |
| | | lastSendDate: 'Last sending date', |
| | | actionCount: 'Action Count', |
| | | runPath: 'Run Path', |
| | | actions: 'Actions', |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | |
| | | errTime: "异常时间", |
| | | errDesc: "异常", |
| | | }, |
| | | mission: { |
| | | backpack: '背篓', |
| | | code: '地面码', |
| | | task: '任务', |
| | | lastSendDate: '最近下发时间', |
| | | actionCount: '动作数量', |
| | | runPath: '走行路径', |
| | | actions: '动作列表', |
| | | }, |
| | | } |
| | | }, |
| | | page: { |
| | |
| | | variant="body2" |
| | | color="textSecondary" |
| | | > |
| | | task: {data.taskId$ || '-'} |
| | | {translate('table.field.action.taskId')}: {data.taskId$ || '-'} |
| | | </Typography> |
| | | <Divider orientation="vertical" flexItem sx={{ marginX: 1 }} /> |
| | | <Typography |
| | | variant="body2" |
| | | color="textSecondary" |
| | | > |
| | | code: {data.code || '-'} |
| | | {translate('table.field.action.code')}: {data.code || '-'} |
| | | </Typography> |
| | | <Divider orientation="vertical" flexItem sx={{ marginX: 1 }} /> |
| | | <Typography |
| | | variant="body2" |
| | | color="textSecondary" |
| | | > |
| | | val: {data.val || '-'} |
| | | {translate('table.field.action.val')}: {data.val || '-'} |
| | | </Typography> |
| | | <Divider orientation="vertical" flexItem sx={{ marginX: 1 }} /> |
| | | <Typography |
| | | variant="body2" |
| | | color="textSecondary" |
| | | > |
| | | param: {data.param || '-'} |
| | | {translate('table.field.action.params')}: {data.param || '-'} |
| | | </Typography> |
| | | </Stack> |
| | | </Box> |
| | |
| | | import { Draggable } from '@hello-pangea/dnd'; |
| | | import { Box, Card, Typography, Avatar, Divider, Stack, Slider, useTheme } from '@mui/material'; |
| | | import { ReferenceField, useRedirect } from 'react-admin'; |
| | | import { ReferenceField, useRedirect, useTranslate } from 'react-admin'; |
| | | import { blueGrey } from '@mui/material/colors'; |
| | | import { styled } from '@mui/material/styles'; |
| | | |
| | |
| | | |
| | | export const MissionCardContent = ({ provided, snapshot, mission, }) => { |
| | | const theme = useTheme(); |
| | | const translate = useTranslate(); |
| | | const redirect = useRedirect(); |
| | | const handleClick = () => { |
| | | redirect(`/mission/${mission.id}/show`, undefined, undefined, undefined, { |
| | |
| | | <Box> |
| | | <Stack direction="row" justifyContent="space-between" mb={1}> |
| | | <Typography variant="caption" color="textSecondary"> |
| | | Backpack: {mission.backpack} |
| | | {translate('table.field.mission.backpack')} : {mission.backpack} |
| | | </Typography> |
| | | <Typography variant="caption" color="textPrimary"> |
| | | Code: {mission.currCode} |
| | | {translate('table.field.mission.code')}: {mission.currCode} |
| | | </Typography> |
| | | </Stack> |
| | | <Divider orientation="horizontal" flexItem /> |
| | | <Stack direction="row" justifyContent="space-between" > |
| | | <Typography variant="overline"> |
| | | Task: [{mission.taskNos.join(',')}] |
| | | {translate('table.field.mission.task')}: [{mission.taskNos.join(',')}] |
| | | </Typography> |
| | | </Stack> |
| | | <Stack pl={0.5} pr={0.5} direction="row" spacing={1} alignItems="center" mb={.6}> |
| | |
| | | const record = useRecordContext(); |
| | | const translate = useTranslate(); |
| | | if (!record) return null; |
| | | console.log(record); |
| | | |
| | | return ( |
| | | <> |
| | |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Last sending date |
| | | {translate('table.field.mission.lastSendDate')} |
| | | </Typography> |
| | | <Stack |
| | | direction="row" |
| | |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Bus No |
| | | {translate('table.field.bus.busNo')} |
| | | </Typography> |
| | | <Typography variant="body2"> |
| | | {record.busNo || '-'} |
| | |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Action Count |
| | | {translate('table.field.mission.actionCount')} |
| | | </Typography> |
| | | <Typography variant="body2"> |
| | | {record.actionCount || 'unknown'} |
| | |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Tasks |
| | | {translate('table.field.mission.task')} |
| | | </Typography> |
| | | <ReferenceArrayField |
| | | source="contact_ids" |
| | |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Run Path |
| | | {translate('table.field.mission.runPath')} |
| | | </Typography> |
| | | <Typography variant="body2" sx={{ whiteSpace: 'normal', overflow: 'hidden', display: 'flex', flexWrap: 'wrap' }}> |
| | | [ {record.codeList.map((code, index) => ( |
| | |
| | | color="textSecondary" |
| | | variant="caption" |
| | | > |
| | | Actions |
| | | {translate('table.field.mission.actions')} |
| | | </Typography> |
| | | <Divider /> |
| | | <ActionsIterator actionIds={record.actionIds} /> |