| | |
| | | static propTpyes = { |
| | | card: PropTypes.object, |
| | | updateConfig: PropTypes.func, |
| | | deletecomponent: PropTypes.func, |
| | | |
| | | menu: PropTypes.object, // 当前菜单信息 |
| | | config: PropTypes.object, // 配置信息 |
| | | pasteContent: PropTypes.object, // 粘贴配置信息 |
| | | sysRoles: PropTypes.array, // 角色列表,黑名单 |
| | | updatesearch: PropTypes.func // 更新 |
| | | deletecomponent: PropTypes.func |
| | | } |
| | | |
| | | state = { |
| | |
| | | * @description 搜索条件编辑,获取搜索条件表单信息 |
| | | */ |
| | | handleSearch = (cell) => { |
| | | const { menu } = this.props |
| | | const { card } = this.state |
| | | let linkableFields = [] |
| | | |
| | |
| | | this.setState({ |
| | | visible: true, |
| | | editcard: cell, |
| | | formlist: getSearchForm(cell, this.props.sysRoles, linkableFields) |
| | | formlist: getSearchForm(cell, menu.sysRoles, linkableFields) |
| | | }) |
| | | } |
| | | |
| | |
| | | <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ |
| | | <div className="mk-popover-control"> |
| | | <Icon className="plus" title="添加" onClick={this.addSearch} type="plus" /> |
| | | <WrapComponent config={card} updateConfig={this.updateComponent}/> |
| | | <WrapComponent config={card} sysRoles={this.props.menu.sysRoles} updateConfig={this.updateComponent}/> |
| | | <Icon className="style" title="调整样式" onClick={this.changeStyle} type="font-colors" /> |
| | | <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} /> |
| | | </div> |