| | |
| | | usefulfields: PropTypes.string, // 可用字段 |
| | | initsql: PropTypes.string, // sql前缀 |
| | | systemScripts: PropTypes.array, // 系统脚本 |
| | | customScripts: PropTypes.array, // 自定义脚本 |
| | | scriptsChange: PropTypes.func // 表单 |
| | | } |
| | | |
| | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: 'sql中\'必须成对出现', |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (_lparen !== _rparen) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: 'sql中()必须成对出现', |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } else if (/--/ig.test(values.sql)) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '自定义sql语句中,不可出现字符 -- ,注释请用 /*内容*/', |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: 'sql中不可使用' + error, |
| | | duration: 10 |
| | | duration: 5 |
| | | }) |
| | | return |
| | | } |
| | |
| | | aaa: |
| | | ` |
| | | |
| | | let _initsql = '' |
| | | this.props.customScripts.forEach(script => { |
| | | if (this.state.editItem && this.state.editItem.uuid === script.uuid) return |
| | | if (script.status === 'false' || script.position !== 'init') return |
| | | |
| | | _initsql += ` |
| | | ${script.sql} |
| | | ` |
| | | }) |
| | | |
| | | let param = { |
| | | func: 's_debug_sql', |
| | | LText: this.props.initsql + values.sql + tail |
| | | LText: this.props.initsql + _initsql + values.sql + tail |
| | | } |
| | | |
| | | param.LText = Utils.formatOptions(param.LText) |
| | |
| | | <Radio.Group> |
| | | <Radio value="front">sql前</Radio> |
| | | <Radio value="back">sql后</Radio> |
| | | <Radio value="init">初始化</Radio> |
| | | </Radio.Group> |
| | | )} |
| | | </Form.Item> |