king
2020-02-18 3d8cb6c1787dec23cbc85d4b262fd1f00654f891
src/templates/subtableconfig/actionform/index.jsx
@@ -9,10 +9,11 @@
class MainSearch extends Component {
  static propTpyes = {
    dict: PropTypes.object,  // 字典项
    formlist: PropTypes.any, // 表单信息
    card: PropTypes.any,     // 按钮信息
    tabs: PropTypes.array    // 所有标签页
    dict: PropTypes.object,    // 字典项
    setting: PropTypes.object, // 页面设置
    formlist: PropTypes.any,   // 表单信息
    card: PropTypes.any,       // 按钮信息
    tabs: PropTypes.array      // 所有标签页
  }
  state = {
@@ -96,9 +97,9 @@
      _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose']
    } else if (_opentype === 'excelOut') {
      if (_intertype === 'outer') {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'icon', 'class', 'execSuccess', 'execError', 'pagination']
      } else {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError']
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'pagination']
      }
    } else if (_opentype === 'excelIn') {
      if (_intertype === 'outer') {
@@ -196,9 +197,9 @@
        _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose']
      } else if (value === 'excelOut') {
        if (this.state.interType === 'outer') {
          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError']
          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'icon', 'class', 'execSuccess', 'execError', 'pagination']
        } else {
          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError']
          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'pagination']
        }
      } else if (value === 'excelIn') {
        if (this.state.interType === 'outer') {
@@ -325,9 +326,9 @@
      
      if (openType === 'excelOut') {
        if (value === 'outer') {
          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError']
          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'icon', 'class', 'execSuccess', 'execError', 'pagination']
        } else {
          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError']
          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'pagination']
        }
      } else if (openType === 'excelIn') {
        if (value === 'outer') {
@@ -520,6 +521,7 @@
  }
  handleConfirm = () => {
    const { setting } = this.props
    // 表单提交时检查输入值是否正确
    return new Promise((resolve, reject) => {
      this.props.form.validateFieldsAndScroll((err, values) => {
@@ -530,6 +532,16 @@
          if (values.OpenType === 'excelIn') {
            values.position = 'toolbar'
          } else if (values.OpenType === 'excelOut') {
            if (values.intertype === 'inner' && !values.innerFunc) {
              if ((setting.interType === 'inner' && setting.innerFunc) || setting.interType === 'outer') {
                notification.warning({
                  top: 92,
                  message: '表格数据查询未使用数据源,导出Excel使用内部接口时,需自定义内部函数!',
                  duration: 10
                })
                return
              }
            }
            values.position = 'toolbar'
            values.Ot = 'notRequired'
          } else if (values.OpenType === 'popview' && !values.linkTab) { // 没有关联标签(新建时),创建新标签Id