king
2021-09-01 31ec63f0419895876cbaba99637a884a32d33d0d
src/templates/formtabconfig/settingform/index.jsx
@@ -12,13 +12,13 @@
    dict: PropTypes.object, // 字典项
    menu: PropTypes.object,
    config: PropTypes.object,
    usefulFields: PropTypes.array,
    inputSubmit: PropTypes.any     // 回车提交事件
  }
  state = {
    interType: (this.props.config.setting && this.props.config.setting.interType) || 'inner',
    columns: null,
    usefulFields: [],
    interReadonly: false,
  }
@@ -43,7 +43,7 @@
          return true
        }
      })
    } catch {
    } catch (e) {
      notification.warning({
        top: 92,
        message: '菜单信息错误!',
@@ -51,12 +51,24 @@
      })
    }
    let usefulFields = sessionStorage.getItem('permFuncField')
    if (usefulFields) {
      try {
        usefulFields = JSON.parse(usefulFields)
      } catch (e) {
        usefulFields = []
      }
    } else {
      usefulFields = []
    }
    this.setState({
      columns: _columns,
      setting: _setting,
      interType: _setting.interType || 'inner',
      interReadonly: _setting.sysInterface === 'true',
      datatype: _setting.datatype || 'maintable'
      datatype: _setting.datatype || 'maintable',
      usefulFields
    })
  }
@@ -154,9 +166,9 @@
  }
  render() {
    const { dict, usefulFields, menu } = this.props
    const { dict, menu } = this.props
    const { getFieldDecorator } = this.props.form
    const { interType, setting, datatype } = this.state
    const { interType, setting, datatype, usefulFields } = this.state
    const formItemLayout = {
      labelCol: {
@@ -185,8 +197,8 @@
                    message: dict['form.required.input'] + '表名!'
                  },
                  {
                    max: formRule.input.max,
                    message: formRule.input.message
                    max: 50,
                    message: '表名最长为50个字符!'
                  }
                ]
              })(<Input placeholder="" autoComplete="off" onPressEnter={this.handleSubmit} />)}
@@ -231,8 +243,8 @@
                initialValue: interType
              })(
                <Radio.Group onChange={this.onChange}>
                  <Radio value="inner">{dict['header.form.interface.inner']}</Radio>
                  <Radio value="outer">{dict['header.form.interface.outer']}</Radio>
                  <Radio value="inner">{dict['model.interface.inner']}</Radio>
                  <Radio value="outer">{dict['model.interface.outer']}</Radio>
                </Radio.Group>
              )}
            </Form.Item>