cl
2026-04-21 c55a86895cabc3e91c2e7aa4eab099a7287e0ae6
rsf-admin/src/page/components/DictSelect.jsx
@@ -6,19 +6,20 @@
import { Select, MenuItem, FormControl, InputLabel } from '@mui/material';
const DictSelect = (props) => {
    const { dictTypeCode, label, value, onChange, ...params } = props;
    const { dictTypeCode, label, group, value, onChange, ...params } = props;
    const translate = useTranslate();
    const notify = useNotify();
    const [list, setList] = useState([]);
    useEffect(() => {
        http();
    }, [dictTypeCode]);
    }, [dictTypeCode, group]);
    const http = async () => {
        const res = await request.post('/dictData/page', { dictTypeCode });
        const res = await request.post('/dictData/page', { dictTypeCode, group });
        if (res?.data?.code === 200) {
            setList(res.data.data.records.map((item) => {
            const rows = res.data.data.records || [];
            setList(rows.map((item) => {
                return {
                    value: item.value,
                    label: item.label
@@ -47,7 +48,6 @@
                variant="filled"
                onChange={handleChange}
                size='small'
            >
                {list.map((item) => (
                    <MenuItem key={item.value} value={item.value}>