Browse Source

用户列表

master
wenlele 2 years ago
parent
commit
315dceea12
  1. 8
      web/client/src/sections/organization/containers/authority.js

8
web/client/src/sections/organization/containers/authority.js

@ -13,7 +13,7 @@ const Authority = (props) => {
const [userSelected, setUserSelected] = useState() const [userSelected, setUserSelected] = useState()
const [resCode, setResCode] = useState({}) const [resCode, setResCode] = useState({})
const [useName, setUseName] = useState()// 选中名字 const [useName, setUseName] = useState()// 选中名字
const [userType,setUserType]=useState() const [userType, setUserType] = useState()
console.log(resource) console.log(resource)
useEffect(() => { useEffect(() => {
dispatch(getResource()) dispatch(getResource())
@ -78,7 +78,7 @@ const Authority = (props) => {
</Card> </Card>
</Col> </Col>
<Col span={4} style={{ height: '100%', }}> <Col span={4} style={{ height: '100%', }}>
<Card title={`[${depSelected}] 用户列表`} bordered={false} bodyStyle={{ padding: 8, paddingTop: 24 }}> <Card title={(depSelected ? `[${depSelected}]` : "") + '用户列表'} bordered={false} bodyStyle={{ padding: 8, paddingTop: 24 }}>
{ {
depUser.length ? depUser.length ?
<Tree <Tree
@ -118,7 +118,7 @@ const Authority = (props) => {
<Row type="flex" justify="center" style={{ marginBottom: 16, marginTop: 16, textAlign: 'center' }}> <Row type="flex" justify="center" style={{ marginBottom: 16, marginTop: 16, textAlign: 'center' }}>
<Col span="24"> <Col span="24">
<Button <Button
disabled={userSelected === "SuperAdmin"||userType===4} disabled={userSelected === "SuperAdmin" || userType === 4}
onClick={handleSave} onClick={handleSave}
style={{ width: '60%' }} style={{ width: '60%' }}
type='primary'>保存修改</Button> type='primary'>保存修改</Button>
@ -134,7 +134,7 @@ const Authority = (props) => {
) )
} }
function mapStateToProps(state) { function mapStateToProps (state) {
const { userResource, resource, depMessage, depUser, global } = state; const { userResource, resource, depMessage, depUser, global } = state;
return { return {
clientHeight: global.clientHeight, clientHeight: global.clientHeight,

Loading…
Cancel
Save