From a8ae29d162e12612a0d07f5d6870755e46bddc9a Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 20 九月 2024 15:45:36 +0800 Subject: [PATCH] # --- zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx | 22 +++++++---- zy-acs-flow/src/page/agvModel/AgvModelList.jsx | 6 +- zy-acs-flow/src/page/agvModel/AgvModelEdit.jsx | 65 +++++++++++--------------------- 3 files changed, 40 insertions(+), 53 deletions(-) diff --git a/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx b/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx index 61d6a1e..8455651 100644 --- a/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx +++ b/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx @@ -84,12 +84,20 @@ </DialogTitle> <DialogContent> <Grid container rowSpacing={2} columnSpacing={2}> - <Grid item xs={6} display="flex" gap={1}> + {/* <Grid item xs={6} display="flex" gap={1}> <TextInput label="table.field.agvModel.uuid" source="uuid" parse={v => v} autoFocus + /> + </Grid> */} + <Grid item xs={6} display="flex" gap={1}> + <TextInput + label="table.field.agvModel.name" + source="name" + parse={v => v} + validate={required()} /> </Grid> <Grid item xs={6} display="flex" gap={1}> @@ -97,13 +105,7 @@ label="table.field.agvModel.type" source="type" parse={v => v} - /> - </Grid> - <Grid item xs={6} display="flex" gap={1}> - <TextInput - label="table.field.agvModel.name" - source="name" - parse={v => v} + validate={required()} /> </Grid> <Grid item xs={6} display="flex" gap={1}> @@ -134,6 +136,7 @@ <NumberInput label="table.field.agvModel.diameter" source="diameter" + validate={required()} /> </Grid> <Grid item xs={6} display="flex" gap={1}> @@ -147,6 +150,7 @@ <NumberInput label="table.field.agvModel.backpack" source="backpack" + validate={required()} /> </Grid> <Grid item xs={6} display="flex" gap={1}> @@ -171,6 +175,7 @@ <NumberInput label="table.field.agvModel.workDirection" source="workDirection" + validate={required()} /> </Grid> <Grid item xs={6} display="flex" gap={1}> @@ -181,6 +186,7 @@ { id: 0, name: '鍚�' }, { id: 1, name: '鏄�' }, ]} + validate={required()} /> </Grid> <Grid item xs={6} display="flex" gap={1}> diff --git a/zy-acs-flow/src/page/agvModel/AgvModelEdit.jsx b/zy-acs-flow/src/page/agvModel/AgvModelEdit.jsx index 3400684..7a33b6f 100644 --- a/zy-acs-flow/src/page/agvModel/AgvModelEdit.jsx +++ b/zy-acs-flow/src/page/agvModel/AgvModelEdit.jsx @@ -63,15 +63,20 @@ <Typography variant="h6" gutterBottom> {translate('common.edit.title.main')} </Typography> - <Stack direction='row' gap={2}> + {/* <Stack direction='row' gap={2}> <TextInput label="table.field.agvModel.uuid" source="uuid" parse={v => v} autoFocus /> - </Stack> + </Stack> */} <Stack direction='row' gap={2}> + <TextInput + label="table.field.agvModel.name" + source="name" + parse={v => v} + /> <TextInput label="table.field.agvModel.type" source="type" @@ -79,13 +84,10 @@ /> </Stack> <Stack direction='row' gap={2}> - <TextInput - label="table.field.agvModel.name" - source="name" - parse={v => v} + <NumberInput + label="table.field.agvModel.backpack" + source="backpack" /> - </Stack> - <Stack direction='row' gap={2}> <NumberInput label="table.field.agvModel.length" source="length" @@ -96,8 +98,6 @@ label="table.field.agvModel.width" source="width" /> - </Stack> - <Stack direction='row' gap={2}> <NumberInput label="table.field.agvModel.height" source="height" @@ -108,24 +108,9 @@ label="table.field.agvModel.liftHeight" source="liftHeight" /> - </Stack> - <Stack direction='row' gap={2}> <NumberInput label="table.field.agvModel.diameter" source="diameter" - /> - </Stack> - <Stack direction='row' gap={2}> - <TextInput - label="table.field.agvModel.password" - source="password" - parse={v => v} - /> - </Stack> - <Stack direction='row' gap={2}> - <NumberInput - label="table.field.agvModel.backpack" - source="backpack" /> </Stack> <Stack direction='row' gap={2}> @@ -133,8 +118,6 @@ label="table.field.agvModel.lowBattery" source="lowBattery" /> - </Stack> - <Stack direction='row' gap={2}> <NumberInput label="table.field.agvModel.quaBattery" source="quaBattery" @@ -145,21 +128,9 @@ label="table.field.agvModel.travelSpeed" source="travelSpeed" /> - </Stack> - <Stack direction='row' gap={2}> <NumberInput label="table.field.agvModel.workDirection" source="workDirection" - /> - </Stack> - <Stack direction='row' gap={2}> - <SelectInput - label="table.field.agvModel.allDirection" - source="allDirection" - choices={[ - { id: 0, name: '鍚�' }, - { id: 1, name: '鏄�' }, - ]} /> </Stack> <Stack direction='row' gap={2}> @@ -168,20 +139,30 @@ source="protocol" parse={v => v} /> - </Stack> - <Stack direction='row' gap={2}> <TextInput label="table.field.agvModel.mqttTopic" source="mqttTopic" parse={v => v} /> </Stack> - </Grid> <Grid item xs={12} md={4}> <Typography variant="h6" gutterBottom> {translate('common.edit.title.common')} </Typography> + <SelectInput + label="table.field.agvModel.allDirection" + source="allDirection" + choices={[ + { id: 0, name: '鍚�' }, + { id: 1, name: '鏄�' }, + ]} + /> + <TextInput + label="table.field.agvModel.password" + source="password" + parse={v => v} + /> <StatusSelectInput /> <Box mt="2em" /> <MemoInput /> diff --git a/zy-acs-flow/src/page/agvModel/AgvModelList.jsx b/zy-acs-flow/src/page/agvModel/AgvModelList.jsx index a1fd3d5..7ebe025 100644 --- a/zy-acs-flow/src/page/agvModel/AgvModelList.jsx +++ b/zy-acs-flow/src/page/agvModel/AgvModelList.jsx @@ -116,7 +116,7 @@ title={"menu.agvModel"} empty={<EmptyData onClick={() => { setCreateDialog(true) }} />} filters={filters} - sort={{ field: "create_time", order: "desc" }} + sort={{ field: "create_time", order: "asc" }} actions={( <TopToolbar> <FilterButton /> @@ -133,12 +133,12 @@ rowClick={(id, resource, record) => false} expand={() => <AgvModelPanel />} expandSingle={true} - omit={['id', 'uuid', 'liftHeight', 'mqttTopic', 'password', 'updateBy', 'updateTime', 'createTime', 'createBy', 'memo']} + omit={['id', 'uuid', 'liftHeight', 'mqttTopic', 'password', 'protocol', 'statusBool', 'updateBy', 'updateTime', 'createTime', 'createBy', 'memo']} > <NumberField source="id" /> <TextField source="uuid" label="table.field.agvModel.uuid" /> - <TextField source="type" label="table.field.agvModel.type" /> <TextField source="name" label="table.field.agvModel.name" /> + <TextField source="type" label="table.field.agvModel.type" /> <NumberField source="length" label="table.field.agvModel.length" /> <NumberField source="width" label="table.field.agvModel.width" /> <NumberField source="height" label="table.field.agvModel.height" /> -- Gitblit v1.9.1