| | |
| | | static propTpyes = { |
| | | dict: PropTypes.object, // 字典项 |
| | | tableFields: PropTypes.any, // 数据源信息 |
| | | permFuncField: PropTypes.any, // 数据源信息 |
| | | config: PropTypes.object, // 数据源信息 |
| | | menuId: PropTypes.string, // 菜单Id |
| | | searches: PropTypes.array, // 搜索条件 |
| | |
| | | }) |
| | | }, () => { // 验证失败 |
| | | this.setState({ |
| | | activeKey: val, |
| | | loading: false |
| | | }) |
| | | }, activeKey) |
| | |
| | | }) |
| | | }, () => { // 验证失败 |
| | | this.setState({ |
| | | activeKey: val, |
| | | loading: false |
| | | }) |
| | | }, activeKey) |
| | |
| | | } |
| | | |
| | | sqlverify = (resolve, reject, type, testScripts) => { |
| | | const { searches } = this.props |
| | | const { searches, config } = this.props |
| | | const { columns, setting, scripts } = this.state |
| | | |
| | | if (setting.interType !== 'system') { // 不使用系统接口时,不需要sql验证 |
| | |
| | | } else if (setting.execute !== 'false' || _scripts.length > 0) { |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | LText: SettingUtils.getDebugSql(setting, _scripts, columns, searches) |
| | | LText: SettingUtils.getDebugSql(setting, _scripts, columns, Utils.getRegOptions(searches), config.calendar) |
| | | } |
| | | param.LText = Utils.formatOptions(param.LText) |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | <SettingForm |
| | | menuId={this.props.menuId} |
| | | dict={this.props.dict} |
| | | permFuncField={this.props.permFuncField} |
| | | columns={columns} |
| | | setting={setting} |
| | | scripts={scripts} |
| | |
| | | pagination={false} |
| | | /> |
| | | </TabPane> |
| | | <TabPane tab="自定义脚本" key="scripts"> |
| | | <TabPane tab={ |
| | | <span> |
| | | 自定义脚本 |
| | | {scripts.length ? <span className="count-tip">{scripts.length}</span> : null} |
| | | </span> |
| | | } key="scripts"> |
| | | <CustomScript |
| | | dict={this.props.dict} |
| | | setting={setting} |