| | |
| | | |
| | | let _options = this.getOptions(card.btnType, _intertype) |
| | | |
| | | this.setState({ |
| | | formlist: this.props.formlist.map(item => { |
| | | let formlist = this.props.formlist.map(item => { |
| | | if (item.key === 'class') { |
| | | item.options = btnClasses |
| | | } else if (item.key === 'icon') { |
| | |
| | | item.hidden = !_options.includes(item.key) |
| | | return item |
| | | }) |
| | | }) |
| | | formlist.push({ |
| | | type: 'radio', |
| | | key: 'afterExecSuccess', |
| | | label: '成功后', |
| | | initVal: card.afterExecSuccess || 'close', |
| | | required: true, |
| | | options: [{ |
| | | value: 'close', |
| | | text: '关闭' |
| | | }, { |
| | | value: 'notclose', |
| | | text: '不关闭' |
| | | }] |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'afterExecError', |
| | | label: '失败后', |
| | | initVal: card.afterExecError || 'notclose', |
| | | required: true, |
| | | options: [{ |
| | | value: 'close', |
| | | text: '关闭' |
| | | }, { |
| | | value: 'notclose', |
| | | text: '不关闭' |
| | | }] |
| | | },) |
| | | |
| | | this.setState({formlist}) |
| | | } |
| | | |
| | | componentDidMount () { |