#
vincentlu
2025-12-15 4d97647ec29563c1cb0b0c01bafe9f8a70839977
zy-acs-flow/src/map/areaSettings/AreaBasicTab.jsx
@@ -13,13 +13,14 @@
import { useTranslate } from 'react-admin';
const AreaBasicTab = ({
    areaName,
    setAreaName,
    name,
    setName,
    agvOptions,
    selectedAgvs,
    setSelectedAgvs,
    barcodeList,
    agvList,
    setAgvList,
    codeListText,
    onSave,
    disableSave,
}) => {
    const translate = useTranslate();
    const icon = <CheckBoxOutlineBlankIcon fontSize="small" />;
@@ -45,12 +46,9 @@
                <TextField
                    label={translate('page.map.area.name', { _: '名称' })}
                    fullWidth
                    value={areaName}
                    onChange={(e) => setAreaName(e.target.value)}
                    value={name}
                    onChange={(e) => setName(e.target.value)}
                />
                <Button variant="contained" onClick={onSave}>
                    {translate('common.action.save', { _: '保存' })}
                </Button>
            </Stack>
            <Box>
@@ -61,11 +59,11 @@
                    multiple
                    disableCloseOnSelect
                    options={agvOptions || []}
                    value={selectedAgvs || []}
                    value={agvList || []}
                    getOptionLabel={getOptionLabel}
                    isOptionEqualToValue={(option, value) => getOptionId(option) === getOptionId(value)}
                    onChange={(event, newValue) => {
                        setSelectedAgvs(newValue);
                        setAgvList(newValue);
                    }}
                    renderOption={(props, option, { selected }) => (
                        <li {...props}>
@@ -98,10 +96,16 @@
                    multiline
                    minRows={6}
                    maxRows={10}
                    value={barcodeList}
                    value={codeListText}
                    InputProps={{ readOnly: true }}
                />
            </Box>
            <Box display="flex" justifyContent="flex-start">
                <Button variant="contained" onClick={onSave} disabled={disableSave}>
                    {translate('common.action.save', { _: '保存' })}
                </Button>
            </Box>
        </Stack>
    );
};