commit
d724566384
|
|
@ -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 (
|
||||
<div ref='page' style={{ height: '100%' }}>
|
||||
hasRight && <div ref='page' style={{ height: '100%' }}>
|
||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@k6oc4u`}
|
||||
datas={this.getDropMenuDatas()}
|
||||
onClick={key => this.handleMenuClick(key)}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ const Routes = (
|
|||
<Route key="sequence" path="sequence" component={Sequence} />
|
||||
<Route key="group" path="group" component={Group} />
|
||||
<Route key="officeManage" path="officeManage" component={OfficeManage} />
|
||||
<Route key="companyExtend" path="companyExtend" component={CompanyExtend} />
|
||||
<Route key="companyExtend" path="companyExtend/:id" component={CompanyExtend} />
|
||||
<Route
|
||||
key="branchNumSetting"
|
||||
path="branchNumSetting"
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export class GroupStore {
|
|||
@observable selectedKey = 1;
|
||||
@observable topTab = [];
|
||||
@observable date = '';
|
||||
@observable hasRight = '';
|
||||
|
||||
@action
|
||||
getGroupForm() {
|
||||
|
|
@ -69,6 +70,7 @@ export class GroupStore {
|
|||
getHasRight() {
|
||||
Api.getHasRight().then(res => {
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue