| | |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | columns={cards.columns} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | <ExcelOutButton |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | lineId={data.$$key || ''} |
| | | disabled={_disabled} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | <TabButton |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | <NewPageButton |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | BID={data.$$BID} |
| | | BData={data.$$BData || ''} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | <FuncMegvii |
| | | BID={data.$$BID} |
| | | disabled={_disabled} |
| | | lineId={data.$$key || ''} |
| | | btn={card} |
| | | show={card.show} |
| | | style={card.style} |
| | | setting={cards.setting} |
| | | selectedData={_data} |
| | | lineBtn={true} |
| | | /> |
| | | </Col> |
| | | ) |
| | |
| | | if (!setting.doubleClick) return |
| | | if (record.$disabled) return |
| | | |
| | | MKEmitter.emit('triggerBtnId', setting.doubleClick, [record]) |
| | | MKEmitter.emit('triggerBtnId', setting.doubleClick, [record], 'linkbtn') |
| | | } |
| | | |
| | | render() { |
| | |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineId: PropTypes.any, // 行索引+主键值,用于行按钮双击 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { setting, selectedData, btn, MenuID } = this.props |
| | | const { setting, selectedData, btn, MenuID, lineBtn } = this.props |
| | | const { loading, disabled } = this.state |
| | | |
| | | if (loading || disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (btn.funcType === 'closetab') { |
| | | MKEmitter.emit('closeTabView', MenuID || btn.$MenuID) |
| | |
| | | MKEmitter.emit('reloadMenuView', btn.refreshTab[btn.refreshTab.length - 1], 'table') |
| | | } |
| | | return |
| | | } else if (type === 'linkbtn' && selectedData && selectedData.length === 1) { |
| | | if (record[0].$Index !== selectedData[0].$Index) { |
| | | return |
| | | } |
| | | } else if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | let data = record || selectedData || [] |
| | |
| | | btn: PropTypes.object, // 按钮 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineId: PropTypes.any, // 行索引+主键值,用于行按钮双击 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { setting, Tab, BID, btn, selectedData } = this.props |
| | | const { setting, Tab, BID, btn, selectedData, lineBtn } = this.props |
| | | const { loading, disabled } = this.state |
| | | |
| | | if (loading || disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (((Tab && Tab.supMenu) || setting.supModule) && !BID) { |
| | | notification.warning({ |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (type === 'linkbtn' && selectedData && selectedData.length === 1) { |
| | | if (record[0].$Index !== selectedData[0].$Index) { |
| | | return |
| | | } |
| | | } else if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | let data = record || selectedData || [] |
| | |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | updateStatus: PropTypes.func, // 按钮状态更新 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineId: PropTypes.any, // 行索引+主键值,用于行按钮双击 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | /** |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record) => { |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { setting, Tab, BID, btn } = this.props |
| | | const { loading, disabled } = this.state |
| | | |
| | | if (loading || disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (((Tab && Tab.supMenu) || setting.supModule) && !BID) { |
| | | notification.warning({ |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (type === 'linkbtn' && this.props.lineBtn && !is(fromJS(this.props.selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | if (!btn.verify || !btn.verify.columns || btn.verify.columns.length === 0) { |
| | |
| | | static propTpyes = { |
| | | btn: PropTypes.object, // 按钮 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { Tab, BID, btn, selectedData, setting } = this.props |
| | | const { Tab, BID, btn, selectedData, setting, lineBtn } = this.props |
| | | const { loading, disabled } = this.state |
| | | |
| | | if (loading || disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (((Tab && Tab.supMenu) || setting.supModule) && !BID) { |
| | | notification.warning({ |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (type === 'linkbtn' && selectedData && selectedData.length === 1) { |
| | | if (record[0].$Index !== selectedData[0].$Index) { |
| | | return |
| | | } |
| | | } else if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | let data = record || selectedData || [] |
| | |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineId: PropTypes.any, // 行索引+主键值,用于行按钮双击 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { setting, btn, selectedData } = this.props |
| | | const { setting, btn, selectedData, lineBtn } = this.props |
| | | const { disabled } = this.state |
| | | |
| | | if (disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (type === 'linkbtn' && selectedData && selectedData.length === 1) { |
| | | if (record[0].$Index !== selectedData[0].$Index) { |
| | | return |
| | | } |
| | | if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | let data = record || selectedData || [] |
| | |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | ContainerId: PropTypes.any, // tab页面ID,用于弹窗控制 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineId: PropTypes.any, // 行索引+主键值,用于行按钮双击 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { Tab, BID, btn, selectedData, setting } = this.props |
| | | const { Tab, BID, btn, selectedData, setting, lineBtn } = this.props |
| | | const { loading, disabled } = this.state |
| | | |
| | | if (loading || disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (((Tab && Tab.supMenu) || setting.supModule) && !BID) { |
| | | notification.warning({ |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (type === 'linkbtn' && selectedData && selectedData.length === 1) { |
| | | if (record[0].$Index !== selectedData[0].$Index) { |
| | | return |
| | | } |
| | | } else if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | this.setState({autoMatic: type === 'autoMatic'}) |
| | |
| | | btn: PropTypes.object, // 按钮 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineId: PropTypes.any, // 行索引+主键值,用于行按钮双击 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { setting, Tab, BID, btn, selectedData } = this.props |
| | | const { setting, Tab, BID, btn, selectedData, lineBtn } = this.props |
| | | const { loading, disabled } = this.state |
| | | |
| | | if (loading || disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (((Tab && Tab.supMenu) || setting.supModule) && !BID) { |
| | | notification.warning({ |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (type === 'linkbtn' && selectedData && selectedData.length === 1) { |
| | | if (record[0].$Index !== selectedData[0].$Index) { |
| | | return |
| | | } |
| | | } else if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | let data = record || selectedData || [] |
| | |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | ContainerId: PropTypes.any, // tab页面ID,用于弹窗控制 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineId: PropTypes.any, // 行索引+主键值,用于行按钮双击 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { Tab, BID, btn, selectedData, setting } = this.props |
| | | const { Tab, BID, btn, selectedData, setting, lineBtn } = this.props |
| | | const { loading, disabled } = this.state |
| | | |
| | | if (loading || disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (((Tab && Tab.supMenu) || setting.supModule) && !BID) { |
| | | notification.warning({ |
| | |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (type === 'linkbtn' && selectedData && selectedData.length === 1) { |
| | | if (record[0].$Index !== selectedData[0].$Index) { |
| | | return |
| | | } |
| | | } else if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | this.setState({autoMatic: type === 'autoMatic'}) |
| | |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | disabled: PropTypes.any, // 行按钮禁用 |
| | | lineId: PropTypes.any, // 行索引+主键值,用于行按钮双击 |
| | | lineBtn: PropTypes.any, // 是否为行级按钮 |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 触发按钮操作 |
| | | */ |
| | | actionTrigger = (triggerId, record, type) => { |
| | | const { setting, btn, selectedData } = this.props |
| | | const { setting, btn, selectedData, lineBtn } = this.props |
| | | const { disabled } = this.state |
| | | |
| | | if (disabled) return |
| | | if (triggerId) { |
| | | if (btn.uuid !== triggerId) return |
| | | if (this.props.lineId && record && record[0] && this.props.lineId !== record[0].$$key) { |
| | | return |
| | | } |
| | | } |
| | | if (triggerId && btn.uuid !== triggerId) return |
| | | |
| | | if (type === 'linkbtn' && selectedData && selectedData.length === 1) { |
| | | if (record[0].$Index !== selectedData[0].$Index) { |
| | | return |
| | | } |
| | | if (type === 'linkbtn' && lineBtn && !is(fromJS(selectedData || []), fromJS(record))) { |
| | | return |
| | | } |
| | | |
| | | let data = record || selectedData || [] |
| | |
| | | btn={btn} |
| | | BID={record.$$BID} |
| | | disabled={record.$disabled} |
| | | lineId={record.$$key || ''} |
| | | selectedData={[record]} |
| | | BData={this.props.BData} |
| | | setting={this.props.setting} |
| | | columns={this.props.fields || this.props.columns} |
| | | ContainerId={this.props.ContainerId} |
| | | lineBtn={true} |
| | | /> |
| | | ) |
| | | } else if (btn.OpenType === 'popview') { |
| | |
| | | btn={btn} |
| | | BID={record.$$BID} |
| | | disabled={record.$disabled} |
| | | lineId={record.$$key || ''} |
| | | selectedData={[record]} |
| | | BData={this.props.BData} |
| | | setting={this.props.setting} |
| | | lineBtn={true} |
| | | /> |
| | | ) |
| | | } else if (btn.OpenType === 'tab') { |
| | |
| | | key={btn.uuid} |
| | | btn={btn} |
| | | disabled={record.$disabled} |
| | | lineId={record.$$key || ''} |
| | | selectedData={[record]} |
| | | BData={this.props.BData} |
| | | MenuID={this.props.MenuID} |
| | | setting={this.props.setting} |
| | | lineBtn={true} |
| | | /> |
| | | ) |
| | | } else if (btn.OpenType === 'innerpage' || btn.OpenType === 'outerpage') { |
| | |
| | | key={btn.uuid} |
| | | btn={btn} |
| | | disabled={record.$disabled} |
| | | lineId={record.$$key || ''} |
| | | selectedData={[record]} |
| | | BData={this.props.BData} |
| | | setting={this.props.setting} |
| | | lineBtn={true} |
| | | /> |
| | | ) |
| | | } |
| | |
| | | if (!setting.doubleClick) return |
| | | if (record.$disabled) return |
| | | |
| | | MKEmitter.emit('triggerBtnId', setting.doubleClick, [record]) |
| | | MKEmitter.emit('triggerBtnId', setting.doubleClick, [record], 'linkbtn') |
| | | } |
| | | |
| | | render() { |