| | |
| | | } |
| | | |
| | | state = { |
| | | dict: localStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | formlist: [], |
| | | btnloading: false, |
| | | activeKey: 'setting', |
| | |
| | | const { activeKey, setting, preScripts, cbScripts } = this.state |
| | | |
| | | let _loading = false |
| | | if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql')) { |
| | | if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.preScriptsForm.props.form.getFieldValue('sql'))) { |
| | | _loading = true |
| | | } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql')) { |
| | | } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.cbScriptsForm.props.form.getFieldValue('sql'))) { |
| | | _loading = true |
| | | } |
| | | |
| | |
| | | const { activeKey } = this.state |
| | | |
| | | let _loading = false |
| | | if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql')) { |
| | | if (this.preScriptsForm && this.preScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.preScriptsForm.props.form.getFieldValue('sql'))) { |
| | | _loading = true |
| | | } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql')) { |
| | | } else if (this.cbScriptsForm && this.cbScriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.cbScriptsForm.props.form.getFieldValue('sql'))) { |
| | | _loading = true |
| | | } |
| | | |
| | |
| | | |
| | | return ( |
| | | <div className="model-interface-form-box" id="model-interface-form-body"> |
| | | <Tabs activeKey={activeKey} className="verify-card-box" onChange={this.changeTab}> |
| | | <TabPane tab="数据源" key="setting"> |
| | | <Tabs activeKey={activeKey} onChange={this.changeTab}> |
| | | <TabPane tab="接口设置" key="setting"> |
| | | <BaseForm |
| | | dict={dict} |
| | | setting={setting} |