#
luxiaotao1123
2024-10-17 8e6ecd57bad3d66a0c9407f41fd04b3ff7747553
#
1个文件已修改
20 ■■■■■ 已修改文件
zy-acs-flow/src/map/insight/agv/AgvControl.jsx 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-acs-flow/src/map/insight/agv/AgvControl.jsx
@@ -1,5 +1,5 @@
import React from 'react';
import { useForm, Controller, useWatch } from 'react-hook-form';
import { useForm, Controller } from 'react-hook-form';
import {
    Drawer,
    Button,
@@ -63,14 +63,15 @@
            </Typography>
            <form onSubmit={handleSubmit(onSubmit)}>
                <Grid container spacing={2}>
                    {/* 任务方式选择 */}
                    <Grid item xs={12}>
                    {/* 左侧:任务方式选择 */}
                    <Grid item xs={4}>
                        <Controller
                            name="taskMode"
                            control={control}
                            render={({ field }) => (
                                <ToggleButtonGroup
                                    {...field}
                                    orientation="vertical"
                                    exclusive
                                    fullWidth
                                    color="primary"
@@ -81,7 +82,7 @@
                                    }}
                                >
                                    {taskModes.map((mode) => (
                                        <ToggleButton key={mode.value} value={mode.value}>
                                        <ToggleButton key={mode.value} value={mode.value} sx={{ textAlign: 'left' }}>
                                            {mode.label}
                                        </ToggleButton>
                                    ))}
@@ -90,6 +91,9 @@
                        />
                    </Grid>
                    {/* 右侧:输入字段和按钮 */}
                    <Grid item xs={8}>
                        <Grid container spacing={2}>
                    {/* 动态渲染表单字段 */}
                    {showField('startCode') && (
                        <Grid item xs={12}>
@@ -205,9 +209,9 @@
                        </Grid>
                    )}
                    {/* 按钮 */}
                    <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'space-between', mt: 2 }}>
                        <Button variant="contained" color="primary" type="submit">
                            {/* 按钮区域 */}
                            <Grid item xs={12} sx={{ display: 'flex', justifyContent: 'flex-end', mt: 2 }}>
                                <Button variant="contained" color="primary" type="submit" sx={{ mr: 2 }}>
                            确认
                        </Button>
                        <Button variant="outlined" color="secondary" onClick={() => reset()}>
@@ -215,6 +219,8 @@
                        </Button>
                    </Grid>
                </Grid>
                    </Grid>
                </Grid>
            </form>
        </Box>
    );