king
2020-02-03 75623dd039b742dbb44fb4c6b4af563404ed9c7f
src/templates/ushare/modalform/index.jsx
File was renamed from src/templates/modalconfig/modalform/index.jsx
@@ -31,7 +31,7 @@
    if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '0') { // 选择类型、自定义资源
      _options = [..._options, 'resourceType', 'options']
    } else if ((type === 'multiselect' || type === 'select' || type === 'link') && resourceType === '1') { // 选择类型、数据源
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
      _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
    } else if (type === 'number') {
      _options = [..._options, 'decimal', 'min', 'max']
    } else if (type === 'fileupload') {
@@ -44,6 +44,8 @@
      _options = [..._options, 'setAll', 'linkField']
    } else if (type === 'funcvar') {       // 设置为函数变量时,不需要其他信息
      _options = ['label', 'field', 'type']
    } else if (type === 'linkMain') {
      _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden']
    }
    
    this.setState({
@@ -82,7 +84,7 @@
      if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '0') { // 选择类型、自定义资源
        _options = [..._options, 'resourceType', 'options']
      } else if ((value === 'multiselect' || value === 'select' || value === 'link') && this.state.resourceType === '1') { // 选择类型、数据源
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
        _options = [..._options, 'resourceType', 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      } else if (value === 'number') {
        _options = [..._options, 'decimal', 'min', 'max']
      } else if (value === 'fileupload') {
@@ -95,6 +97,8 @@
        _options = [..._options, 'setAll', 'linkField']
      } else if (value === 'funcvar') {
        _options = ['label', 'field', 'type']
      } else if (value === 'linkMain') {
        _options = ['label', 'field', 'type', 'readonly', 'required', 'hidden']
      }
      
      this.setState({
@@ -118,7 +122,7 @@
      }, () => {
        this.setState({
          formlist: this.state.formlist.map(form => {
            if (form.key === 'initval' && value !== 'fileupload' && value !== 'funcvar') {
            if (form.key === 'initval' && value !== 'fileupload' && value !== 'funcvar' && value !== 'linkMain') {
              form.show = true
            }
            return form
@@ -136,7 +140,7 @@
      if (value === '0') {
        _options = [..._options, 'options']
      } else if (value === '1') {
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType']
        _options = [..._options, 'dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'database']
      }
      if (openType === 'select') {
@@ -371,6 +375,8 @@
                duration: 10
              })
            }
          } else if (values.type === 'linkMain') {
            values.initval = ''
          }
          if (isvalid) {