| | |
| | | * @description 获取按钮元素 |
| | | */ |
| | | getActionList = (actions) => { |
| | | const { BData, setting, columns, ContainerId, data, MenuID } = this.props |
| | | const { BData, setting, columns, data, MenuID } = this.props |
| | | |
| | | return actions.map(item => { |
| | | if (['exec', 'prompt', 'pop'].includes(item.OpenType)) { |
| | |
| | | setting={setting} |
| | | columns={columns} |
| | | selectedData={[data]} |
| | | ContainerId={ContainerId} |
| | | /> |
| | | ) |
| | | } else if (item.OpenType === 'popview') { |
| | |
| | | BData={BData} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | | ContainerId={ContainerId} |
| | | /> |
| | | ) |
| | | } |
| | |
| | | setting={this.props.setting} |
| | | columns={this.props.columns} |
| | | selectedData={[]} |
| | | ContainerId={this.props.ContainerId} |
| | | /> |
| | | </div> |
| | | </Card> : null} |
| | |
| | | MenuID: PropTypes.string, // 菜单ID |
| | | config: PropTypes.object, // 页面配置信息 |
| | | columns: PropTypes.array, // 显示列 |
| | | ContainerId: PropTypes.any, // tab页面ID,用于弹窗控制 |
| | | plot: PropTypes.object, |
| | | tableId: PropTypes.string, |
| | | loading: PropTypes.bool, |
| | |
| | | |
| | | this.setState({selectKey: data.key}) |
| | | |
| | | MKEmitter.emit('changeTableLine', this.props.ContainerId, this.props.tableId, _id, data) |
| | | MKEmitter.emit('changeTableLine', config.setting.ContainerId, this.props.tableId, _id, data) |
| | | } |
| | | |
| | | render() { |
| | | const { plot, data, loading, BID, BData, MenuID, config, columns, ContainerId } = this.props |
| | | const { plot, data, loading, BID, BData, MenuID, config, columns } = this.props |
| | | const { card, colMap, selectKey, actionList } = this.state |
| | | |
| | | return ( |
| | |
| | | columns={columns} |
| | | selectKey={selectKey} |
| | | setting={config.setting} |
| | | ContainerId={ContainerId} |
| | | switchCard={this.switchCard} |
| | | /> |
| | | )) |
| | |
| | | BData={BData} |
| | | MenuID={MenuID} |
| | | setting={config.setting} |
| | | ContainerId={ContainerId} |
| | | switchCard={() => {}} |
| | | /> : null |
| | | } |