diff --git a/pc4mobx/organization/components/group/Group.js b/pc4mobx/organization/components/group/Group.js index c33be85..28e56f4 100644 --- a/pc4mobx/organization/components/group/Group.js +++ b/pc4mobx/organization/components/group/Group.js @@ -30,6 +30,7 @@ import { import '../../style/common.less'; import NewAndEditDialog from '../NewAndEditDialog'; +import { renderNoright } from '../../util'; const toJS = mobx.toJS; @@ -174,11 +175,15 @@ export default class Group extends React.Component { group } = this.props; const { - nEdialogTitle, visible, condition, form, dialogLoading, isEdit, topTab, selectedKey,date + nEdialogTitle, visible, condition, form, dialogLoading, isEdit, topTab, selectedKey,date,hasRight } = group; + if (hasRight === false) { + return renderNoright(); + } + return ( -
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/index.js b/pc4mobx/organization/index.js index db4a266..917c942 100644 --- a/pc4mobx/organization/index.js +++ b/pc4mobx/organization/index.js @@ -53,7 +53,7 @@ const Routes = ( - + { if (res.code === 200) { + this.setHasRight(res.data.hasRight); res.data.rightMenu && this.setRightMenu(res.data.rightMenu); res.data.topMenu && this.setTopMenu(res.data.topMenu); } else { @@ -159,6 +161,8 @@ export class GroupStore { this.dialogLoading = bool; } - + setHasRight(bool) { + this.hasRight = bool; + } } \ No newline at end of file