lbq
16 小时以前 56ca28233a84c5aa3ca93cae266b2d008ea348e1
rsf-admin/src/page/system/role/RoleList.jsx
@@ -55,7 +55,7 @@
    '& .column-name': {
    },
    '& .opt': {
        width: 260
        width: 450
    },
}));
@@ -63,7 +63,6 @@
    <SearchInput source="condition" alwaysOn />,
    <TextInput source="name" label="table.field.role.name" />,
    <TextInput source="code" label="table.field.role.code" />,
    <TextInput label="common.field.memo" source="memo" />,
    <SelectInput
        label="common.field.status"
@@ -83,6 +82,8 @@
    const [drawerVal, setDrawerVal] = useState(false);
    const [menuIds, setMenuIds] = useState([]);
    const [authType,setAuthType] = useState(0)
    const assign = (record) => {
        request('/role/scope/list', {
@@ -146,7 +147,9 @@
                    <BooleanField source="statusBool" label="common.field.status" sortable={false} />
                    <TextField source="memo" label="common.field.memo" sortable={false} />
                    <WrapperField cellClassName="opt" label="common.field.opt">
                        <ScopeButton sx={{ padding: '1px', fontSize: '.75rem' }} assign={assign} />
                        <ScopeButton sx={{ padding: '1px', fontSize: '.75rem' }} assign={assign} auType={0} setAuthType={setAuthType} label="网页权限&nbsp;&nbsp;&nbsp;" />
                        <ScopeButton sx={{ padding: '1px', fontSize: '.75rem' }} assign={assign} auType={1} setAuthType={setAuthType} label="PDA权限&nbsp;&nbsp;&nbsp;" />
                        <ScopeButton sx={{ padding: '1px', fontSize: '.75rem' }} assign={assign} auType={2} setAuthType={setAuthType} label="仓库权限&nbsp;" />
                        <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
                        <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
                    </WrapperField>
@@ -171,6 +174,7 @@
                    closeCallback={() => {
                        setMenuIds([]);
                    }}
                    authType = {authType}
                />
            </PageDrawer>
        </Box>
@@ -179,14 +183,15 @@
const ScopeButton = (props) => {
    const record = useRecordContext();
    const { assign, ...rest } = props;
    const { assign, auType, setAuthType, label, ...rest } = props;
    return (
        <Button
            variant="text"
            color="primary"
            startIcon={<AssignmentIndIcon />}
            label="common.action.scope"
            label={label}
            onClick={(event) => {
                setAuthType(auType);
                event.stopPropagation();
                assign(record);
            }}