king
2020-09-29 30273c297c59887434f44a75df75f13db6c8885c
src/menu/actioncomponent/index.jsx
@@ -464,32 +464,12 @@
          })
        }
      }).then(() => {
        // 判断是否存在操作列
        let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0
        let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null
        if (_gridBtn) {
          _gridBtn.display = _hasGridbtn
        } else {
          _gridBtn = {
            display: _hasGridbtn,
            Align: 'center',
            IsSort: 'false',
            uuid: Utils.getuuid(),
            label: this.state.dict['model.form.column.action'],
            type: 'action',
            style: 'button',
            show: 'horizontal',
            Width: 120
          }
        }
        this.setState({
          actionlist: _actionlist,
          copying: false,
          visible: false
        }, () => {
          this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn}, copyActionId)
          this.props.updateaction({...config, action: _actionlist}, copyActionId)
        })
      })
    })
@@ -686,25 +666,6 @@
        _actionlist = _actionlist.filter(item => item.uuid !== card.uuid)
        let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0
        let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null
        if (_gridBtn) {
          _gridBtn.display = _hasGridbtn
        } else {
          _gridBtn = {
            display: _hasGridbtn,
            Align: 'center',
            IsSort: 'false',
            uuid: Utils.getuuid(),
            label: this.state.dict['model.form.column.action'],
            type: 'action',
            style: 'button',
            show: 'horizontal',
            Width: 120
          }
        }
        let delcard = {
          type: 'action',
          card: card
@@ -713,7 +674,7 @@
        _this.setState({
          actionlist: _actionlist
        }, () => {
          _this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn}, '', delcard)
          _this.props.updateaction({...config, action: _actionlist}, '', delcard)
        })
      },
      onCancel() {}
@@ -895,30 +856,10 @@
        this.refs.btnCreatFunc.exec(btn.innerFunc, newLText, DelText).then(result => {
          if (result !== 'success') return
          // 判断是否存在操作列
          let _hasGridbtn = _actionlist.filter(act => act.position === 'grid').length > 0
          let _gridBtn = config.gridBtn ? fromJS(config.gridBtn).toJS() : null
          if (_gridBtn) {
            _gridBtn.display = _hasGridbtn
          } else {
            _gridBtn = {
              display: _hasGridbtn,
              Align: 'center',
              IsSort: 'false',
              uuid: Utils.getuuid(),
              label: this.state.dict['model.form.column.action'],
              type: 'action',
              style: 'button',
              show: 'horizontal',
              Width: 120
            }
          }
          this.setState({
            actionlist: _actionlist
          }, () => {
            this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn})
            this.props.updateaction({...config, action: _actionlist})
          })
        })
      })