|
@ -8,7 +8,7 @@ import ResetPasswordModal from '../components/resetPassword'; |
|
|
import { useFsRequest, ApiTable } from '$utils'; |
|
|
import { useFsRequest, ApiTable } from '$utils'; |
|
|
import './style.less'; |
|
|
import './style.less'; |
|
|
function Member(props) { |
|
|
function Member(props) { |
|
|
const { loading, clientHeight, actions, dispatch, member } = props; |
|
|
const { loading, clientHeight, actions, dispatch, member, user } = props; |
|
|
const [pageSize, setPageSize] = useState(10); |
|
|
const [pageSize, setPageSize] = useState(10); |
|
|
const [currentPage, setCurrentPage] = useState(1); |
|
|
const [currentPage, setCurrentPage] = useState(1); |
|
|
const [searchValue, setSearchValue] = useState('') |
|
|
const [searchValue, setSearchValue] = useState('') |
|
@ -86,13 +86,21 @@ function Member(props) { |
|
|
> |
|
|
> |
|
|
<a>删除</a> |
|
|
<a>删除</a> |
|
|
</Popconfirm>) |
|
|
</Popconfirm>) |
|
|
options.push(<ResetPasswordModal |
|
|
user?.username == 'SuperAdmin' && options.push( |
|
|
editData={record} |
|
|
<Popconfirm |
|
|
triggerRender={<a>重置密码</a>} |
|
|
key="del" |
|
|
title="重置密码" |
|
|
placement="top" |
|
|
onFinish={onFinish} |
|
|
title={<><div>是否确认重置该用户密码?</div> |
|
|
key="resetPassword" |
|
|
</>} |
|
|
/>) |
|
|
onConfirm={() => { |
|
|
|
|
|
dispatch(actions.memberManagement.modifyUser(record.id, { password: 'e10adc3949ba59abbe56e057f20f883e' }, '重置密码')) |
|
|
|
|
|
}} |
|
|
|
|
|
okText="是" |
|
|
|
|
|
cancelText="否" |
|
|
|
|
|
> |
|
|
|
|
|
<a>重置密码</a> |
|
|
|
|
|
</Popconfirm>) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return options; |
|
|
return options; |
|
|
|
|
|
|
|
@ -173,7 +181,6 @@ function Member(props) { |
|
|
y: clientHeight - 260 |
|
|
y: clientHeight - 260 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
//1490 2256
|
|
|
|
|
|
pagination={{ |
|
|
pagination={{ |
|
|
size: 'large', |
|
|
size: 'large', |
|
|
total: member?.count, |
|
|
total: member?.count, |
|
@ -213,6 +220,7 @@ function mapStateToProps(state) { |
|
|
clientHeight: global.clientHeight, |
|
|
clientHeight: global.clientHeight, |
|
|
actions: global.actions, |
|
|
actions: global.actions, |
|
|
member: member?.data || {}, |
|
|
member: member?.data || {}, |
|
|
|
|
|
user: auth.user |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|