| | |
| | | /** |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { btn, selectedData, BID } = this.props |
| | | actionTrigger = (triggerId, record, type, lid) => { |
| | | const { btn, selectedData, BID, LID } = this.props |
| | | const { disabled } = this.state |
| | | |
| | | if (disabled || btn.multiMenus) return |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (type === 'linkbtn' && !btn.$toolbtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | if (type === 'linkbtn' && !btn.$toolbtn && LID !== lid) return |
| | | |
| | | let data = record || selectedData || [] |
| | | |
| | |
| | | return uuid |
| | | })() |
| | | primaryId = primaryId + (btn.sign || '') |
| | | } else { |
| | | } else if (btn.sysId !== 'empty') { |
| | | primaryId = BID || '' |
| | | } |
| | | } |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | | |
| | | if (btn.Ot === 'requiredSgl' || btn.Ot === 'requiredOnce') { |
| | | Object.keys(data[0]).forEach(key => { |
| | | if (/^\$/.test(key)) return |
| | | if (key === 'children') return |
| | | menu.param[key] = data[0][key] |
| | | }) |
| | | } |
| | | |
| | | newtab = menu |
| | |
| | | return uuid |
| | | })() |
| | | primaryId = primaryId + (tab.sign || '') |
| | | } else { |
| | | } else if (btn.sysId !== 'empty') { |
| | | primaryId = BID || '' |
| | | } |
| | | } |
| | |
| | | type="link" |
| | | title={btn.show === 'icon' ? btn.label : ''} |
| | | style={btn.style || null} |
| | | className={btn.$toolbtn ? (btn.hover || '') : ''} |
| | | className={btn.hover || ''} |
| | | >{label}</Button> |
| | | </Dropdown>) |
| | | } |
| | |
| | | title={disabled ? (btn.reason || '') : (btn.show === 'icon' ? btn.label : '')} |
| | | style={btn.style || null} |
| | | disabled={disabled} |
| | | className={btn.$toolbtn ? (btn.hover || '') : ''} |
| | | className={btn.hover || ''} |
| | | onClick={(e) => {e.stopPropagation(); this.actionTrigger()}} |
| | | >{label}</Button> |
| | | ) |