From a00b7b609830736d18a749cbe3ffa6cbf0035cd9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 24 十二月 2019 18:03:38 +0800 Subject: [PATCH] 2019-12-24 --- src/templates/modalconfig/index.jsx | 2 +- src/tabviews/subtable/index.jsx | 8 ++++---- src/components/sidemenu/index.jsx | 4 ++-- src/tabviews/commontable/index.jsx | 21 +++++++++++---------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/components/sidemenu/index.jsx b/src/components/sidemenu/index.jsx index 68f9051..56ced81 100644 --- a/src/components/sidemenu/index.jsx +++ b/src/components/sidemenu/index.jsx @@ -91,8 +91,8 @@ _tmenu.type = 'CommonTable' } else if (child.LinkUrl === 'DataManage') { _tmenu.type = 'DataManage' - } else if (child.LinkUrl === 'bda/rdt?pageno=rolemenus&MenuNo=RoleMenuM') { - _tmenu.type = 'RoleManage' + // } else if (child.LinkUrl === 'bda/rdt?pageno=rolemenus&MenuNo=RoleMenuM') { + // _tmenu.type = 'RoleManage' } else if (child.LinkUrl.split('?')[0] === 'Main/Index' || child.LinkUrl.split('?')[0] === 'bda/rdt') { _tmenu.type = 'iframe' } diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index e6c50d3..94ed0e5 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -539,16 +539,17 @@ } {setting && setting.onload !== 'false' && setting.tabshow !== 'vertical' && tabviews && tabviews.length > 0 && <Tabs defaultActiveKey="0" tabPosition="top"> - {tabviews.map((_tab, index) => ( - <TabPane tab={ - <span> - {_tab.icon ? <Icon type={_tab.icon} /> : null} - {_tab.label} - </span> - } key={`${index}`}> - {_tab.type === 'SubTable' ? <SubTable SupMenuID={this.props.MenuID} MenuID={_tab.linkTab} Tab={_tab} BIDs={this.state.BIDs} /> : null} - </TabPane> - ))} + {tabviews.map((_tab, index) => { + return !_tab.supMenu || (_tab.supMenu && this.state.BIDs[_tab.supMenu]) ? + <TabPane tab={ + <span> + {_tab.icon ? <Icon type={_tab.icon} /> : null} + {_tab.label} + </span> + } key={`${index}`}> + {_tab.type === 'SubTable' ? <SubTable SupMenuID={this.props.MenuID} MenuID={_tab.linkTab} Tab={_tab} BID={this.state.BIDs[_tab.supMenu] || ''} /> : null} + </TabPane> : null + })} </Tabs> } <BackTop> diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index d4cffb1..585ac35 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -16,7 +16,7 @@ export default class NormalTable extends Component { static propTpyes = { Tab: PropTypes.object, // 鏍囩淇℃伅 - BIDs: PropTypes.string, // 涓婄骇鏁版嵁ID + BID: PropTypes.string, // 涓婄骇鏁版嵁ID MenuID: PropTypes.string, // 鑿滃崟Id SupMenuID: PropTypes.string // 涓婄骇鑿滃崟Id } @@ -44,7 +44,7 @@ } UNSAFE_componentWillReceiveProps(nextProps) { - if (this.props.Tab.supMenu && !is(fromJS(this.props.BIDs[this.props.Tab.supMenu]), fromJS(nextProps.BIDs[this.props.Tab.supMenu]))) { + if (this.props.Tab.supMenu && !is(fromJS(this.props.BID), fromJS(nextProps.BID))) { this.loadmaindata() } } @@ -305,7 +305,7 @@ func: 'sPC_Get_TableData', obj_name: 'data', arr_field: arr_field, - BID: this.props.BIDs[this.props.Tab.supMenu] || '' + BID: this.props.BID } let orderBy = orderColumn ? (orderColumn + ' ' + orderType) : setting.order @@ -490,7 +490,7 @@ <SubAction ref="subButton" MenuID={this.props.MenuID} - BID={this.props.BIDs[this.props.Tab.supMenu] || ''} + BID={this.props.BID} setting={setting} refreshdata={this.refreshbyaction} gettableselected={this.gettableselected} diff --git a/src/templates/modalconfig/index.jsx b/src/templates/modalconfig/index.jsx index 87d339f..2184437 100644 --- a/src/templates/modalconfig/index.jsx +++ b/src/templates/modalconfig/index.jsx @@ -91,7 +91,7 @@ label: this.state.dict['header.menu.supMenu'], initVal: menu.MenuName, required: true, - readonly: true, + readonly: true }, { type: 'text', -- Gitblit v1.8.0