|
|
@ -8,7 +8,7 @@ import ResetPasswordModal from '../components/resetPassword'; |
|
|
|
import { useFsRequest, ApiTable } from '$utils'; |
|
|
|
import './style.less'; |
|
|
|
function Member(props) { |
|
|
|
const { loading, clientHeight, actions, dispatch, member, user } = props; |
|
|
|
const { loading, clientHeight, actions, dispatch, member, user, organization } = props; |
|
|
|
const [pageSize, setPageSize] = useState(10); |
|
|
|
const [currentPage, setCurrentPage] = useState(1); |
|
|
|
const [searchValue, setSearchValue] = useState('') |
|
|
@ -26,13 +26,10 @@ function Member(props) { |
|
|
|
|
|
|
|
dispatch(actions.memberManagement.getUserList(query)); |
|
|
|
} |
|
|
|
const { data: treeData = [] } = useFsRequest({ |
|
|
|
url: ApiTable.getResourceCatalog, |
|
|
|
refreshDeps: [refreshTree] |
|
|
|
}); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
queryData(); |
|
|
|
dispatch(actions.organization.getOrganizationList()); |
|
|
|
}, [pageSize, currentPage]); |
|
|
|
|
|
|
|
const columns = [ |
|
|
@ -73,6 +70,7 @@ function Member(props) { |
|
|
|
title="编辑用户" |
|
|
|
onFinish={onFinish} |
|
|
|
key="editUser" |
|
|
|
organization={organization} |
|
|
|
/>) |
|
|
|
options.push( |
|
|
|
<Popconfirm |
|
|
@ -149,6 +147,7 @@ function Member(props) { |
|
|
|
title="新建用户" |
|
|
|
onFinish={onFinish} |
|
|
|
key="addModel" |
|
|
|
organization={organization} |
|
|
|
/> |
|
|
|
</Col> |
|
|
|
<Col span={12} style={{ display: 'flex', justifyContent: 'flex-end', alignItems: 'center' }}> |
|
|
@ -213,14 +212,15 @@ function Member(props) { |
|
|
|
|
|
|
|
function mapStateToProps(state) { |
|
|
|
const { |
|
|
|
auth, global, datasources, member |
|
|
|
auth, global, datasources, member, organization |
|
|
|
} = state; |
|
|
|
return { |
|
|
|
loading: datasources.isRequesting, |
|
|
|
clientHeight: global.clientHeight, |
|
|
|
actions: global.actions, |
|
|
|
member: member?.data || {}, |
|
|
|
user: auth.user |
|
|
|
user: auth.user, |
|
|
|
organization: organization?.data?.rows || [], |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|