king
2020-02-03 75623dd039b742dbb44fb4c6b4af563404ed9c7f
src/templates/formtabconfig/modalform/index.jsx
@@ -26,12 +26,12 @@
    let type = formlist.filter(cell => cell.key === 'type')[0].initVal
    let resourceType = formlist.filter(cell => cell.key === 'resourceType')[0].initVal
    let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required'] // 默认显示项
    let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden'] // 默认显示项
    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') {
@@ -55,7 +55,6 @@
          form.type = 'select'
        } else if (type === 'number' && form.key === 'initval') {
          form.type = 'number'
          form.initVal = 0
        }
        form.hidden = !_options.includes(form.key)
        return form
@@ -78,12 +77,12 @@
  openTypeChange = (key, value) => {
    if (key === 'type') {
      let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required']
      let _options = ['label', 'field', 'initval', 'type', 'readonly', 'required', 'hidden']
      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') {
@@ -139,7 +138,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') {