| | |
| | | } |
| | | |
| | | let primaryId = '' |
| | | let _data = null |
| | | |
| | | if (btn.Ot === 'requiredSgl') { |
| | | primaryId = data[0][setting.primaryKey] || '' |
| | | _data = data[0] |
| | | } |
| | | |
| | | let newtab = {} |
| | |
| | | ...menu, |
| | | selected: true, |
| | | param: { |
| | | BID: primaryId, |
| | | data: _data |
| | | $BID: primaryId |
| | | } |
| | | } |
| | | } |
| | |
| | | return tab.MenuID !== newtab.MenuID |
| | | }) |
| | | |
| | | if (tabviews.length !== tabs.length) { |
| | | this.props.modifyTabview(fromJS(tabs).toJS()) |
| | | } |
| | | |
| | | this.setState({}, () => { |
| | | if (MenuID) { |
| | | tabs.splice(index + 1, 0, newtab) |
| | | } else { |
| | | tabs.push(newtab) |
| | | if (['linkage_navigation', 'linkage'].includes(window.GLOB.navBar)) { |
| | | this.props.modifyTabview([newtab]) |
| | | } else { |
| | | if (tabviews.length !== tabs.length) { |
| | | this.props.modifyTabview(fromJS(tabs).toJS()) |
| | | } |
| | | this.props.modifyTabview(tabs) |
| | | }) |
| | | |
| | | this.setState({}, () => { |
| | | if (MenuID) { |
| | | tabs.splice(index + 1, 0, newtab) |
| | | } else { |
| | | tabs.push(newtab) |
| | | } |
| | | this.props.modifyTabview(tabs) |
| | | }) |
| | | } |
| | | |
| | | MKEmitter.emit('openNewTab') |
| | | if (window.GLOB.systemType === 'production') { |