| | |
| | | direction: 'DIRECTION', |
| | | agv: 'AGV', |
| | | point: 'POINT', |
| | | code: 'CODE', |
| | | area: 'AREA', |
| | | }, |
| | | action: { |
| | |
| | | outbound: 'Outbound', |
| | | updateStatus: 'Update Status', |
| | | }, |
| | | code: { |
| | | summary: { |
| | | qr: 'QR Preview', |
| | | }, |
| | | sections: { |
| | | rules: 'Movement Rules', |
| | | }, |
| | | fields: { |
| | | mapPosition: 'Map Position', |
| | | rotation: 'Rotation (°)', |
| | | }, |
| | | actions: { |
| | | openDetail: 'Edit', |
| | | }, |
| | | relations: { |
| | | routes: 'Routes', |
| | | empty: 'No related info', |
| | | }, |
| | | }, |
| | | control: { |
| | | type: { |
| | | MOVE: 'MOVE', |
| | |
| | | direction: '方向', |
| | | agv: '车辆', |
| | | point: '定位点', |
| | | code: '地面码', |
| | | area: '区域', |
| | | }, |
| | | action: { |
| | |
| | | outbound: '出库', |
| | | updateStatus: '修改状态', |
| | | }, |
| | | code: { |
| | | summary: { |
| | | qr: '二维码预览', |
| | | }, |
| | | sections: { |
| | | rules: '通行规则', |
| | | }, |
| | | fields: { |
| | | mapPosition: '地图坐标', |
| | | rotation: '旋转角度(°)', |
| | | }, |
| | | actions: { |
| | | openDetail: '编辑', |
| | | }, |
| | | relations: { |
| | | routes: '关联路线', |
| | | empty: '暂无关联信息', |
| | | }, |
| | | }, |
| | | control: { |
| | | type: { |
| | | MOVE: '移动', |
| | |
| | | /> |
| | | )} |
| | | <FieldGrid items={spatialItems} loading={loading} /> |
| | | <Button |
| | | variant="contained" |
| | | color="primary" |
| | | startIcon={<OpenInNewIcon />} |
| | | onClick={handleOpenDetail} |
| | | disabled={!info?.id} |
| | | sx={{ alignSelf: 'flex-start', textTransform: 'none', px: 3 }} |
| | | > |
| | | {translate('page.map.insight.code.actions.openDetail', { _: '编辑' })} |
| | | </Button> |
| | | </Stack> |
| | | </Paper> |
| | | <Button |
| | | variant="contained" |
| | | color="primary" |
| | | startIcon={<OpenInNewIcon />} |
| | | onClick={handleOpenDetail} |
| | | disabled={!info?.id} |
| | | sx={{ alignSelf: 'flex-start', textTransform: 'none', px: 3 }} |
| | | > |
| | | {translate('page.map.insight.code.actions.openDetail', { _: '编辑' })} |
| | | </Button> |
| | | </Stack> |
| | | </Grid> |
| | | <Grid item xs={12} md={7}> |
| | |
| | | const theme = useTheme(); |
| | | const enabledCount = rules.filter(rule => rule.enabled).length; |
| | | const placement = { |
| | | 0: { gridColumn: 2, gridRow: 1 }, |
| | | 90: { gridColumn: 3, gridRow: 2 }, |
| | | 180: { gridColumn: 2, gridRow: 3 }, |
| | | 270: { gridColumn: 1, gridRow: 2 }, |
| | | 0: { gridColumn: '2 / span 3', gridRow: 1 }, |
| | | 90: { gridColumn: '4 / span 2', gridRow: 2 }, |
| | | 180: { gridColumn: '2 / span 3', gridRow: 3 }, |
| | | 270: { gridColumn: '1 / span 2', gridRow: 2 }, |
| | | }; |
| | | |
| | | return ( |
| | | <Box |
| | | sx={{ |
| | | display: 'grid', |
| | | gridTemplateColumns: 'repeat(3, minmax(0, 1fr))', |
| | | gridTemplateRows: 'repeat(3, minmax(58px, auto))', |
| | | gridTemplateColumns: 'repeat(5, minmax(0, 1fr))', |
| | | gridTemplateRows: 'repeat(3, minmax(44px, auto))', |
| | | gap: 1, |
| | | alignItems: 'stretch', |
| | | }} |
| | | > |
| | | <Box |
| | | sx={{ |
| | | gridColumn: 2, |
| | | gridColumn: 3, |
| | | gridRow: 2, |
| | | borderRadius: 3, |
| | | border: '1px dashed', |
| | | borderColor: 'divider', |
| | | backgroundColor: alpha(theme.palette.primary.main, 0.04), |
| | | px: 1, |
| | | py: 0.75, |
| | | py: 0.5, |
| | | display: 'flex', |
| | | alignItems: 'center', |
| | | justifyContent: 'center', |
| | |
| | | backgroundColor: rule.enabled |
| | | ? alpha(theme.palette.success.main, 0.08) |
| | | : alpha(theme.palette.error.main, 0.08), |
| | | px: 1, |
| | | py: 0.75, |
| | | minHeight: 60, |
| | | px: 1.25, |
| | | py: 0.5, |
| | | minHeight: 46, |
| | | display: 'flex', |
| | | alignItems: 'center', |
| | | justifyContent: 'center', |
| | |
| | | variant="caption" |
| | | sx={{ |
| | | lineHeight: 1.1, |
| | | fontSize: '0.73rem', |
| | | color: rule.enabled ? 'success.dark' : 'error.dark', |
| | | fontWeight: 600, |
| | | }} |
| | |
| | | const [loading, setLoading] = useState(false); |
| | | |
| | | const codeLabel = translate('page.map.devices.code', { |
| | | _: '地面码' |
| | | _: 'Code' |
| | | }); |
| | | |
| | | const fetchCodeInfo = useCallback(async (code, options = {}) => { |
| | |
| | | |
| | | <Divider /> |
| | | |
| | | <Box flex={1} pt={2} sx={{ overflow: 'hidden' }}> |
| | | <Box flex={1} pt={2} sx={{ minHeight: 0, overflowY: 'auto', overflowX: 'hidden', pr: 1 }}> |
| | | {activeTab === 0 && ( |
| | | <CodeMain |
| | | sprite={sprite} |
| | |
| | | <Edit |
| | | redirect="list" |
| | | mutationMode={EDIT_MODE} |
| | | actions={<CustomerTopToolBar />} |
| | | actions={<CustomerTopToolBar backPrevious />} |
| | | aside={<EditBaseAside />} |
| | | > |
| | | <SimpleForm |