| | |
| | | |
| | | let extra = null |
| | | if (card.header && card.header.actions) { |
| | | let actions = this.getActionList(card.header.actions, card.header.show) |
| | | let actions = card.header.actions.map(item => { |
| | | if (card.header.show === 'icon') { |
| | | item.show = 'icon' |
| | | } else { |
| | | item.show = 'button' |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | actions = this.getActionList(actions) |
| | | extra = actions[0] |
| | | } |
| | | |
| | | let _actions = null |
| | | if (card.bottom && card.bottom.actions) { |
| | | _actions = this.getActionList(card.bottom.actions, card.bottom.show) |
| | | _actions = card.bottom.actions.map(item => { |
| | | if (card.bottom.show === 'icon') { |
| | | item.show = 'icon' |
| | | } else { |
| | | item.show = 'button' |
| | | } |
| | | return item |
| | | }) |
| | | _actions = this.getActionList(_actions) |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | /** |
| | | * @description 获取按钮元素 |
| | | */ |
| | | getActionList = (actions, show) => { |
| | | getActionList = (actions) => { |
| | | const { BData, Tab, setting, columns, ContainerId, data, MenuID } = this.props |
| | | |
| | | return actions.map(item => { |
| | |
| | | BID={data.$$BID} |
| | | Tab={Tab} |
| | | btn={item} |
| | | show={show} |
| | | BData={BData} |
| | | setting={setting} |
| | | columns={columns} |
| | |
| | | BID={data.$$BID} |
| | | Tab={Tab} |
| | | btn={item} |
| | | show={show} |
| | | BData={BData} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | |
| | | <TabButton |
| | | key={item.uuid} |
| | | btn={item} |
| | | show={show} |
| | | MenuID={MenuID} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | |
| | | <NewPageButton |
| | | key={item.uuid} |
| | | btn={item} |
| | | show={show} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | | /> |
| | |
| | | key={item.uuid} |
| | | BID={data.$$BID} |
| | | btn={item} |
| | | show={show} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | | /> |
| | |
| | | BID={data.$$BID} |
| | | Tab={Tab} |
| | | btn={item} |
| | | show={show} |
| | | BData={BData} |
| | | setting={setting} |
| | | selectedData={[data]} |
| | |
| | | title = card.header.content |
| | | } |
| | | } |
| | | let style = {fontSize: plusSize + 'px'} |
| | | |
| | | return ( |
| | | <div className={'chart-card-box ' + card.outclass}> |
| | |
| | | <NormalButton |
| | | BID={this.props.BID} |
| | | Tab={this.props.Tab} |
| | | btn={card.insertAction} |
| | | show={'plus' + plusSize} |
| | | btn={{...card.insertAction, style}} |
| | | BData={this.props.BData} |
| | | setting={this.props.setting} |
| | | columns={this.props.columns} |
| | |
| | | if ((item.Ot && item.Ot !== 'notRequired' && !['excelIn', 'excelOut'].includes(item.OpenType)) || item.funcType === 'changeuser') { |
| | | actionMap.set(item.uuid, item) |
| | | } else if (plot.extraAction && plot.extraAction === item.uuid && ['pop', 'prompt', 'exec'].includes(item.OpenType) && item.Ot === 'notRequired') { |
| | | item.show = 'icon' |
| | | insertAction = item |
| | | } else if (plot.actions && plot.actions.length > 0 && plot.actions.includes(item.uuid) && (item.OpenType === 'excelOut' || (item.OpenType === 'excelIn' && item.Ot === 'notRequired'))) { |
| | | item.show = 'icon' |
| | | actionList.push(item) |
| | | } |
| | | }) |
| | |
| | | key={action.uuid} |
| | | BID={BID} |
| | | Tab={Tab} |
| | | show="icon" |
| | | btn={action} |
| | | setting={config.setting} |
| | | /> |
| | |
| | | key={action.uuid} |
| | | BID={BID} |
| | | Tab={Tab} |
| | | show="icon" |
| | | btn={action} |
| | | setting={config.setting} |
| | | /> |