From 60edff747d52eb42aadb036e3fbd580252de4c05 Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期四, 28 八月 2025 08:15:54 +0800 Subject: [PATCH] 1 --- zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx b/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx index 61d6a1e..365b716 100644 --- a/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx +++ b/zy-acs-flow/src/page/agvModel/AgvModelCreate.jsx @@ -48,8 +48,8 @@ notify('common.response.success'); }; - const handleError = async (data) => { - notify('common.response.fail'); + const handleError = async (error) => { + notify(error.message || 'common.response.fail', { type: 'error', messageArgs: { _: error.message } }); }; return ( @@ -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}> -- Gitblit v1.9.1