#
zjj
7 天以前 1e479e493542e77240625b9100eb14cda1fe9041
#
5个文件已修改
71 ■■■■■ 已修改文件
rsf-admin/src/i18n/core/chineseMessages.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/zh.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/basicInfo/deviceSite/DeviceSiteEdit.jsx 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/components/DictionarySelect.jsx 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/page/deviceBind/DeviceBindList.jsx 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
rsf-admin/src/i18n/core/chineseMessages.js
@@ -102,7 +102,7 @@
      not_found: "Either you typed a wrong URL, or you followed a bad link.",
      yes: "Yes",
      unsaved_changes:
        "Some of your changes weren't saved. Are you sure you want to ignore them?",
        "您所做的部分更改尚未保存。确定要忽略这些更改吗?",
    },
    navigation: {
      no_results: "没有找到数据",
rsf-admin/src/i18n/zh.js
@@ -157,7 +157,7 @@
        fields: '扩展字段',
        fieldsItem: '扩展字段明细',
        warehouseAreasItem: '库区库存信息',
        deviceSite: '站点管理',
        deviceSite: '路径管理',
        waitPakin: '组拖通知档',
        waitPakinItem: '组拖档明细',
        waitPakinLog: '组拖历史档',
rsf-admin/src/page/basicInfo/deviceSite/DeviceSiteEdit.jsx
@@ -69,9 +69,13 @@
                                label={translate("table.field.deviceSite.type")}
                                name="type"
                                validate={[required()]}
                                dictTypeCode="sys_task_type"
                                dictTypeCode="sys_task_type"
                                multiple
                            />
                                perPage={REFERENCE_INPUT_PAGESIZE}
                                pagination={true}
                                sort={{ field: 'id', order: 'ASC' }}
                                filter={{ active: true }}
                            />
                        </Stack>
                        <Stack direction='row' gap={2}>
                            <TextInput
rsf-admin/src/page/components/DictionarySelect.jsx
@@ -8,38 +8,59 @@
import request from '@/utils/request';
const DictionarySelect = (props) => {
    const { dictTypeCode, name, multiple = false, ...parmas } = props;
    const {
        dictTypeCode,
        name,
        multiple = false,
        perPage = 100,  // 默认每页显示100条数据
        page = 1,       // 默认第一页
        ...parmas
    } = props;
    const translate = useTranslate();
    const notify = useNotify();
    const [list, setList] = useState([])
    const [list, setList] = useState([]);
    const [loading, setLoading] = useState(false);
    useEffect(() => {
        http()
    }, [dictTypeCode]);
        http();
    }, [dictTypeCode, page, perPage]);
    const http = async () => {
        const res = await request.post('/dictData/page', { dictTypeCode });
        if (res?.data?.code === 200) {
            setList(res.data.data.records.map((item) => {
                return {
                    id: item.value,
                    name: item.label
                }
            }))
        } else {
            notify(res.data.msg);
        setLoading(true);
        try {
            const res = await request.post('/dictData/page', {
                dictTypeCode,
                current: page,
                pageSize: perPage
            });
            if (res?.data?.code === 200) {
                setList(res.data.data.records.map((item) => {
                    return {
                        id: item.value,
                        name: item.label
                    }
                }));
            } else {
                notify(res.data.msg);
            }
        } catch (error) {
            notify('加载字典数据失败', 'error');
            console.error('加载字典数据失败:', error);
        } finally {
            setLoading(false);
        }
    }
    };
    const InputComponent = multiple ? SelectArrayInput : SelectInput;
    return (
        <InputComponent
            source={name}
            choices={list}
            isLoading={loading}
            {...parmas}
        />
    );
};
rsf-admin/src/page/deviceBind/DeviceBindList.jsx
@@ -133,7 +133,9 @@
                    <NumberField source="startDeviceNo" label="table.field.deviceBind.startDeviceNo" />
                    <NumberField source="endDeviceNo" label="table.field.deviceBind.endDeviceNo" />
                    <TextField source="staList" label="table.field.deviceBind.staList" />
                    <NumberField source="typeId" label="table.field.deviceBind.typeId" />
                    <ReferenceField source="typeId" label="table.field.deviceBind.typeId" reference="warehouseAreas" link={false} sortable={false}>
                        <TextField source="name" />
                    </ReferenceField>
                    <TextField source="beSimilar" label="table.field.deviceBind.beSimilar" />
                    <TextField source="emptySimilar" label="table.field.deviceBind.emptySimilar" />