bug修复
This commit is contained in:
parent
76c5ceed96
commit
faf37dba1d
|
|
@ -30,6 +30,7 @@ import {
|
||||||
import '../../style/common.less';
|
import '../../style/common.less';
|
||||||
|
|
||||||
import NewAndEditDialog from '../NewAndEditDialog';
|
import NewAndEditDialog from '../NewAndEditDialog';
|
||||||
|
import { renderNoright } from '../../util';
|
||||||
|
|
||||||
|
|
||||||
const toJS = mobx.toJS;
|
const toJS = mobx.toJS;
|
||||||
|
|
@ -174,11 +175,15 @@ export default class Group extends React.Component {
|
||||||
group
|
group
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const {
|
const {
|
||||||
nEdialogTitle, visible, condition, form, dialogLoading, isEdit, topTab, selectedKey,date
|
nEdialogTitle, visible, condition, form, dialogLoading, isEdit, topTab, selectedKey,date,hasRight
|
||||||
} = group;
|
} = group;
|
||||||
|
|
||||||
|
if (hasRight === false) {
|
||||||
|
return renderNoright();
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref='page' style={{ height: '100%' }}>
|
hasRight && <div ref='page' style={{ height: '100%' }}>
|
||||||
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@k6oc4u`}
|
<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@k6oc4u`}
|
||||||
datas={this.getDropMenuDatas()}
|
datas={this.getDropMenuDatas()}
|
||||||
onClick={key => this.handleMenuClick(key)}
|
onClick={key => this.handleMenuClick(key)}
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ const Routes = (
|
||||||
<Route key="sequence" path="sequence" component={Sequence} />
|
<Route key="sequence" path="sequence" component={Sequence} />
|
||||||
<Route key="group" path="group" component={Group} />
|
<Route key="group" path="group" component={Group} />
|
||||||
<Route key="officeManage" path="officeManage" component={OfficeManage} />
|
<Route key="officeManage" path="officeManage" component={OfficeManage} />
|
||||||
<Route key="companyExtend" path="companyExtend" component={CompanyExtend} />
|
<Route key="companyExtend" path="companyExtend/:id" component={CompanyExtend} />
|
||||||
<Route
|
<Route
|
||||||
key="branchNumSetting"
|
key="branchNumSetting"
|
||||||
path="branchNumSetting"
|
path="branchNumSetting"
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ export class GroupStore {
|
||||||
@observable selectedKey = 1;
|
@observable selectedKey = 1;
|
||||||
@observable topTab = [];
|
@observable topTab = [];
|
||||||
@observable date = '';
|
@observable date = '';
|
||||||
|
@observable hasRight = '';
|
||||||
|
|
||||||
@action
|
@action
|
||||||
getGroupForm() {
|
getGroupForm() {
|
||||||
|
|
@ -69,6 +70,7 @@ export class GroupStore {
|
||||||
getHasRight() {
|
getHasRight() {
|
||||||
Api.getHasRight().then(res => {
|
Api.getHasRight().then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
this.setHasRight(res.data.hasRight);
|
||||||
res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
|
res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
|
||||||
res.data.topMenu && this.setTopMenu(res.data.topMenu);
|
res.data.topMenu && this.setTopMenu(res.data.topMenu);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -159,6 +161,8 @@ export class GroupStore {
|
||||||
this.dialogLoading = bool;
|
this.dialogLoading = bool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setHasRight(bool) {
|
||||||
|
this.hasRight = bool;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue