| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | const { config } = this.props |
| | | const { config, mainSearch } = this.props |
| | | |
| | | let search = config.search || [] |
| | | search = [...search, ...mainSearch] |
| | | |
| | | this.setState({ |
| | | columns: fromJS(config.columns).toJS(), |
| | | setting: fromJS(config.setting).toJS(), |
| | | scripts: fromJS(config.scripts).toJS() |
| | | scripts: fromJS(config.scripts).toJS(), |
| | | searches: search |
| | | }) |
| | | |
| | | this.getsysScript() |
| | |
| | | } |
| | | |
| | | sqlverify = (resolve, reject, change = false, testScripts) => { |
| | | const { config } = this.props |
| | | const { columns, setting, scripts } = this.state |
| | | const { columns, setting, scripts, searches } = this.state |
| | | |
| | | let _scripts = scripts.filter(item => item.status !== 'false') |
| | | |
| | |
| | | if ((setting.interType === 'system' && setting.execute !== 'false') || _scripts.length > 0) { |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | LText: SettingUtils.getDebugSql(setting, _scripts, columns, config.search) |
| | | LText: SettingUtils.getDebugSql(setting, _scripts, columns, searches) |
| | | } |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | |
| | | render() { |
| | | const { menu, config } = this.props |
| | | const { columns, setting, scripts, colColumns, scriptsColumns, activeKey, loading } = this.state |
| | | const { columns, setting, scripts, colColumns, scriptsColumns, activeKey, loading, searches } = this.state |
| | | |
| | | return ( |
| | | <div id="model-verify-card-box-tab"> |
| | |
| | | <TabPane tab="自定义脚本" key="scripts"> |
| | | <CustomScriptsForm |
| | | setting={setting} |
| | | searches={config.search} |
| | | searches={searches} |
| | | initsql={this.state.initsql} |
| | | dict={this.props.dict} |
| | | customScripts={scripts} |