king
2020-04-17 77ec79eb5e483a59157dff9b4fd75159e2fa132e
src/templates/formtabconfig/settingform/index.jsx
@@ -2,6 +2,7 @@
import PropTypes from 'prop-types'
import { Form, Row, Col, Input, Radio, Select, Tooltip, Icon, notification, InputNumber } from 'antd'
import { formRule } from '@/utils/option.js'
import Utils from '@/utils/utils.js'
import './index.scss'
const { TextArea } = Input
@@ -64,6 +65,17 @@
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
        if (!err) {
          let error = Utils.verifySql(values.dataresource)
          if (error) {
            notification.warning({
              top: 92,
              message: '数据源中不可使用' + error,
              duration: 10
            })
            return
          }
          resolve(values)
        } else {
          reject(err)