From faf37dba1df22c6e89937a97adebebb2de79cdd9 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 8 Jun 2022 14:10:17 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/organization/components/group/Group.js | 9 +++++++-- pc4mobx/organization/index.js | 2 +- pc4mobx/organization/stores/group.js | 6 +++++- 3 files changed, 13 insertions(+), 4 deletions(-) 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