| | |
| | | static propTpyes = { |
| | | menu: PropTypes.any, |
| | | editTab: PropTypes.any, |
| | | tabConfig: PropTypes.any, |
| | | editSubTab: PropTypes.any, |
| | | config: PropTypes.any, |
| | | handleView: PropTypes.func |
| | |
| | | * 2、设置操作类型、原始菜单信息(每次保存后重置)、已使用表及基本信息表单 |
| | | */ |
| | | UNSAFE_componentWillMount () { |
| | | const { config, editTab } = this.props |
| | | const { config, editTab, editSubTab } = this.props |
| | | |
| | | let _config = null |
| | | |
| | | if (!config) { |
| | | _config = JSON.parse(JSON.stringify(Source.baseConfig)) |
| | | _config.uuid = editTab.linkTab |
| | | _config.tabName = editTab.label |
| | | _config.uuid = editSubTab ? editSubTab.linkTab : editTab.linkTab |
| | | _config.tabName = editSubTab ? editSubTab.label : editTab.label |
| | | _config.isAdd = true |
| | | } else { |
| | | _config = JSON.parse(JSON.stringify(config)) |
| | |
| | | * @description 组件销毁,清除state更新 |
| | | */ |
| | | componentWillUnmount () { |
| | | this.setState = (state, callback) => { |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | } |
| | | |
| | | // 页面返回 |
| | | handleViewBack = () => { |
| | | const {menu} = this.props |
| | | const {menu, editTab, tabConfig, editSubTab} = this.props |
| | | let _tabview = menu ? menu.LongParam.Template : '' |
| | | |
| | | if (editSubTab) { |
| | | if (editTab.hasOwnProperty('OpenType')) { |
| | | _tabview = editTab.tabType |
| | | } else { |
| | | _tabview = editTab.type |
| | | } |
| | | } |
| | | |
| | | let param = { |
| | | editMenu: menu, |
| | | editTab: '', |
| | | editAction: '', |
| | | subConfig: '', |
| | | tabview: menu ? menu.LongParam.Template : '' |
| | | editTab: editSubTab ? editTab : null, |
| | | tabConfig: null, |
| | | editSubTab: null, |
| | | subTabConfig: null, |
| | | editAction: null, |
| | | subConfig: tabConfig, |
| | | tabview: _tabview |
| | | } |
| | | |
| | | this.props.handleView(param) |
| | |
| | | * @description 设置可配置按钮 |
| | | */ |
| | | setSubConfig = (btn) => { |
| | | const { menu } = this.props |
| | | const {menu, editTab, tabConfig, editSubTab} = this.props |
| | | const { config, originConfig } = this.state |
| | | |
| | | if (originConfig.isAdd) { |
| | |
| | | |
| | | // 子菜单信息验证通过后,跳转子按钮配置页面 |
| | | let _view = '' |
| | | let _subtab = editSubTab |
| | | |
| | | if (btn.OpenType === 'pop') { |
| | | _view = 'Modal' // 表单页面 |
| | | } else if (btn.OpenType === 'popview') { |
| | | _view = btn.tabType // 新弹窗标签模板 |
| | | _subtab = btn |
| | | } |
| | | |
| | | let param = { |
| | | editMenu: menu, |
| | | editTab: originConfig, |
| | | editSubTab: '', |
| | | editTab: editTab, |
| | | tabConfig: editSubTab ? tabConfig : originConfig, |
| | | editSubTab: _subtab, |
| | | subTabConfig: editSubTab ? originConfig : null, |
| | | editAction: btn, |
| | | subConfig: '', |
| | | tabview: _view |
| | |
| | | onCancel={() => { this.setState({ profileVisible: false }) }} |
| | | destroyOnClose |
| | | > |
| | | <VerifyCard card={this.state.card} columns={this.state.config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} dict={this.state.dict} /> |
| | | <VerifyCard floor="subtable" card={this.state.card} columns={this.state.config.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} dict={this.state.dict} /> |
| | | </Modal> |
| | | {/* 设置全局配置及列表数据源 */} |
| | | <Modal |