| | |
| | | return ( |
| | | <> |
| | | <Drawer |
| | | title={`${name}`} |
| | | title={name?name:'-'} |
| | | width={640} |
| | | forceRender |
| | | destroyOnClose |
| | |
| | | render: (_, record) => [ |
| | | <Button |
| | | type="link" |
| | | key="scope" |
| | | onClick={() => { |
| | | Http.doGetPromise('/api/role/scope/list', { roleId: record.id }, (res) => { |
| | | if (res.data) { |
| | | setMenuIds(res.data); |
| | | } |
| | | setScopeModalVisible(true); |
| | | setCurrentRow(record); |
| | | }); |
| | | }} |
| | | > |
| | | 分配权限 |
| | | </Button>, |
| | | <Button |
| | | type="link" |
| | | key="edit" |
| | | onClick={() => { |
| | | setModalVisible(true); |
| | |
| | | > |
| | | 编辑 |
| | | </Button>, |
| | | <Button |
| | | type="link" |
| | | key="scope" |
| | | onClick={() => { |
| | | Http.doGetPromise('/api/role/scope/list', { roleId: record.id }, (res) => { |
| | | if (res.data) { |
| | | setMenuIds(res.data); |
| | | } |
| | | setScopeModalVisible(true); |
| | | setCurrentRow(record); |
| | | }); |
| | | }} |
| | | > |
| | | 分配权限 |
| | | </Button>, |
| | | <Button |
| | | type="link" |
| | | danger |