king
2020-02-10 34f78e1203a839592ca6764f88f1632088e07d2a
src/templates/formtabconfig/actionform/index.jsx
@@ -58,19 +58,24 @@
  
  UNSAFE_componentWillMount () {
    const { card } = this.props
    let _intertype = ''
    let _options = null
    this.props.formlist.forEach(form => {
      if (form.key === 'intertype') {
        _intertype = form.initVal
      }
    })
    if (_intertype === 'outer') {
      _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError', 'method']
    console.log(this.props.card.btnType)
    if (card.btnType === 'cancel') {
      _options = ['label', 'OpenType', 'icon', 'class', 'execSuccess']
    } else {
      _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
      this.props.formlist.forEach(form => {
        if (form.key === 'intertype') {
          _intertype = form.initVal
        }
      })
      if (_intertype === 'outer') {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'sysInterface', 'icon', 'class', 'execSuccess', 'execError']
      } else {
        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
      }
    }
    this.setState({
@@ -91,6 +96,11 @@
              text: this.props.dict['header.form.exec']
            }
          ]
          if (card.btnType === 'cancel') {
            item.readonly = 'true'
          }
        } else if (item.key === 'execSuccess' && card.btnType === 'cancel') {
          item.label = '返回后'
        }
        item.hidden = !_options.includes(item.key)
        return item