| | |
| | | } |
| | | |
| | | pasteSubmit = () => { |
| | | const { config } = this.props |
| | | const { setting } = this.state |
| | | |
| | | this.pasteFormRef.handleConfirm().then(res => { |
| | |
| | | res.data.setting.supModule = setting.supModule |
| | | } |
| | | |
| | | if (config.subtype !== 'basetable') { |
| | | this.setState({ |
| | | scripts: res.data.scripts.map(col => { |
| | | col.uuid = Utils.getuuid() |
| | |
| | | }, () => { |
| | | this.setState({reload: false}) |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | scripts: res.data.scripts.map(col => { |
| | | col.uuid = Utils.getuuid() |
| | | return col |
| | | }), |
| | | setting: res.data.setting, |
| | | reload: true, |
| | | pvisible: false |
| | | }, () => { |
| | | this.setState({reload: false}) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | |
| | | wrappedComponentRef={(inst) => this.settingForm = inst} |
| | | /> : null} |
| | | </TabPane> |
| | | <TabPane tab={ |
| | | {config.subtype !== 'basetable' ? <TabPane tab={ |
| | | <span> |
| | | 字段集 |
| | | {columns.length ? <span className="count-tip">{columns.length}</span> : null} |
| | |
| | | updatefield={this.updatefields} |
| | | /> |
| | | <EditTable actions={['edit', 'move', 'copy', 'del', 'clear']} type="datasourcefield" wrappedComponentRef={(inst) => this.datasource = inst} data={columns} columns={colColumns} onChange={(columns) => this.setState({columns})}/> |
| | | </TabPane> |
| | | </TabPane> : null} |
| | | <TabPane tab={ |
| | | <span> |
| | | 自定义脚本 |