bug修复

This commit is contained in:
Chengliang 2022-06-08 14:10:17 +08:00
parent 76c5ceed96
commit faf37dba1d
3 changed files with 13 additions and 4 deletions

View File

@ -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)}

View File

@ -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"

View File

@ -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;
}
}