| | |
| | | show: PropTypes.any, // 按钮显示样式控制 |
| | | BID: PropTypes.string, // 主表ID |
| | | BData: PropTypes.any, // 主表数据 |
| | | style: PropTypes.any, // 按钮样式 |
| | | selectedData: PropTypes.any, // 子表中选择数据 |
| | | Tab: PropTypes.any, // 如果当前元素为标签时,tab为标签信息 |
| | | MenuID: PropTypes.string, // 菜单ID |
| | | btn: PropTypes.object, // 按钮 |
| | | columns: PropTypes.any, // 字段列 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | |
| | | this.execSubmit(data, () => { this.setState({loading: false})}) |
| | | } else if (btn.OpenType === 'pop') { |
| | | this.updateStatus('start') |
| | | |
| | | this.setState({ |
| | | tabledata: data |
| | | tabledata: data, |
| | | btnconfig: btn.modal ? btn.modal : this.state.btnconfig |
| | | }, () => { |
| | | this.improveAction() |
| | | }) |
| | |
| | | this.sendMessage() |
| | | } |
| | | |
| | | this.props.updateStatus('refresh', btn.execSuccess) |
| | | this.props.updateStatus('refresh', btn.execSuccess, btn) |
| | | } |
| | | |
| | | sendMessage = () => { |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | this.props.updateStatus('refresh', btn.execError) |
| | | this.props.updateStatus('refresh', btn.execError, btn) |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | render() { |
| | | const { btn, show } = this.props |
| | | const { btn, show, style } = this.props |
| | | const { loadingNumber, loading } = this.state |
| | | |
| | | if (show === 'actionList') { |
| | | if (show === 'actionList' || show === 'button') { |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | style={style} |
| | | icon={btn.icon} |
| | | loading={loading} |
| | | className={'mk-btn mk-' + btn.class} |
| | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type="link" |
| | | style={style} |
| | | loading={loading} |
| | | icon={show === 'text' ? '' : (btn.icon || '')} |
| | | onClick={() => {this.actionTrigger()}} |