king
2021-11-17 c51f5e007a3e03c9d6731ab7f28f0080de009990
src/templates/formtabconfig/actionform/index.jsx
@@ -79,42 +79,70 @@
    let _options = this.getOptions(card.btnType, _intertype)
    this.setState({
      formlist: this.props.formlist.map(item => {
        if (item.key === 'class') {
          item.options = btnClasses
        } else if (item.key === 'icon') {
          item.options = btnIcons
        } else if (item.key === 'resetPageIndex') {
          item.tooltip = '页面关闭,且执行刷新时生效'
        } else if (item.key === 'sqlType') {
          item.options = this.state.insertUpdateOptions
        } else if (item.key === 'OpenType') {
          item.options = [
            {
              value: 'prompt',
              text: this.props.dict['model.form.prompt']
            }, {
              value: 'exec',
              text: this.props.dict['model.form.exec']
            }
          ]
          if (card.btnType === 'cancel') {
            item.readonly = true
    let formlist = this.props.formlist.map(item => {
      if (item.key === 'class') {
        item.options = btnClasses
      } else if (item.key === 'icon') {
        item.options = btnIcons
      } else if (item.key === 'resetPageIndex') {
        item.tooltip = '页面关闭,且执行刷新时生效'
      } else if (item.key === 'sqlType') {
        item.options = this.state.insertUpdateOptions
      } else if (item.key === 'OpenType') {
        item.options = [
          {
            value: 'prompt',
            text: this.props.dict['model.form.prompt']
          }, {
            value: 'exec',
            text: this.props.dict['model.form.exec']
          }
        } else if (item.key === 'execSuccess' && card.btnType === 'cancel') {
          item.label = '关闭后'
          item.options[1].text = '刷新'
        } else if (item.key === 'execSuccess' || item.key === 'execError') {
          item.options[1].text = '刷新'
        } else if (item.key === 'innerFunc' && card.btnType !== 'confirm' && _intertype === 'inner') {
          item.required = true
        ]
        if (card.btnType === 'cancel') {
          item.readonly = true
        }
      } else if (item.key === 'execSuccess' && card.btnType === 'cancel') {
        item.label = '关闭后'
        item.options[1].text = '刷新'
      } else if (item.key === 'execSuccess' || item.key === 'execError') {
        item.options[1].text = '刷新'
      } else if (item.key === 'innerFunc' && card.btnType !== 'confirm' && _intertype === 'inner') {
        item.required = true
      }
        item.hidden = !_options.includes(item.key)
        return item
      })
      item.hidden = !_options.includes(item.key)
      return item
    })
    formlist.push({
      type: 'radio',
      key: 'afterExecSuccess',
      label: '成功后',
      initVal: card.afterExecSuccess || 'close',
      required: true,
      options: [{
        value: 'close',
        text: '关闭'
      }, {
        value: 'notclose',
        text: '不关闭'
      }]
    },
    {
      type: 'radio',
      key: 'afterExecError',
      label: '失败后',
      initVal: card.afterExecError || 'notclose',
      required: true,
      options: [{
        value: 'close',
        text: '关闭'
      }, {
        value: 'notclose',
        text: '不关闭'
      }]
    },)
    this.setState({formlist})
  }
  componentDidMount () {