| | |
| | | static propTpyes = { |
| | | menu: PropTypes.any, |
| | | editTab: PropTypes.any, |
| | | subConfig: PropTypes.any, |
| | | editSubTab: PropTypes.any, |
| | | tabConfig: PropTypes.any, |
| | | subTabConfig: PropTypes.any, |
| | | editAction: PropTypes.object, |
| | | subConfig: PropTypes.any, |
| | | handleView: PropTypes.func |
| | | } |
| | | |
| | |
| | | * 4、设置按钮基本信息 |
| | | */ |
| | | UNSAFE_componentWillMount () { |
| | | const {menu, editAction, editTab, subConfig} = this.props |
| | | const {menu, editAction, tabConfig, subTabConfig, subConfig} = this.props |
| | | |
| | | let _config = '' |
| | | let _tab = subTabConfig ? subTabConfig : tabConfig |
| | | |
| | | let _menu = { // 上级菜单是三级菜单或标签页 |
| | | type: editTab ? editTab.Template : menu.type, |
| | | tables: editTab ? editTab.tables : menu.LongParam.tables, |
| | | MenuID: editTab ? editTab.uuid : menu.MenuID, |
| | | MenuNo: editTab ? editTab.tabNo : menu.MenuNo, |
| | | MenuName: editTab ? editTab.tabName : menu.MenuName |
| | | type: _tab ? _tab.Template : menu.type, |
| | | tables: _tab ? _tab.tables : menu.LongParam.tables, |
| | | MenuID: _tab ? _tab.uuid : menu.MenuID, |
| | | MenuNo: _tab ? _tab.tabNo : menu.MenuNo, |
| | | MenuName: _tab ? _tab.tabName : menu.MenuName |
| | | } |
| | | |
| | | if (subConfig) { |
| | |
| | | |
| | | // 页面返回 |
| | | handleViewBack = () => { |
| | | const {menu, editTab} = this.props |
| | | const {menu, editTab, editSubTab, tabConfig, subTabConfig} = this.props |
| | | |
| | | let _view = (subTabConfig && subTabConfig.Template) || (tabConfig && tabConfig.Template) || menu.LongParam.Template |
| | | |
| | | let param = { |
| | | editMenu: menu, |
| | | editTab: editTab, |
| | | editAction: '', |
| | | subConfig: '', |
| | | tabview: editTab ? editTab.Template : menu.LongParam.Template |
| | | tabConfig: tabConfig, |
| | | editSubTab: editSubTab, |
| | | subTabConfig: subTabConfig, |
| | | editAction: null, |
| | | subConfig: subTabConfig || tabConfig || null, |
| | | tabview: _view |
| | | } |
| | | |
| | | this.props.handleView(param) |