| | |
| | | return |
| | | } |
| | | |
| | | // 兼容标签 |
| | | if (!config.tabgroups) { |
| | | config.tabgroups = [{ uuid: 'tabs', sublist: [] }] |
| | | } else if (typeof(config.tabgroups[0]) === 'string') { |
| | | let _tabgroups = [] |
| | | config.tabgroups.forEach(groupId => { |
| | | let _group = { |
| | | uuid: groupId, |
| | | sublist: fromJS(config[groupId]).toJS() |
| | | } |
| | | |
| | | delete config[groupId] |
| | | |
| | | _tabgroups.push(_group) |
| | | }) |
| | | |
| | | config.tabgroups = _tabgroups |
| | | } |
| | | |
| | | // 权限过滤 |
| | | if (this.props.param.menuType !== 'HS') { |
| | | config.action = config.action.filter(item => permAction[item.uuid]) |
| | | config.tabgroups.forEach(group => { |
| | | if (!config[group]) return |
| | | |
| | | config[group] = config[group].filter(tab => permAction[tab.linkTab]) |
| | | group.sublist = group.sublist.filter(tab => permAction[tab.linkTab]) |
| | | }) |
| | | } |
| | | |
| | |
| | | /> : null |
| | | } |
| | | {!loadingview && !viewlost && config.tabgroups.map(group => { |
| | | if (config[group].length === 0) return null |
| | | if (group.sublist.length === 0) return null |
| | | |
| | | return ( |
| | | <Tabs defaultActiveKey="0" key={group}> |
| | | {config[group].map((_tab, index) => { |
| | | <Tabs defaultActiveKey="0" key={group.uuid}> |
| | | {group.sublist.map((_tab, index) => { |
| | | return ( |
| | | <TabPane tab={ |
| | | <span> |