| | |
| | | }) |
| | | } |
| | | }).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) |
| | | }) |
| | | }) |
| | | }) |
| | |
| | | |
| | | _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 |
| | |
| | | _this.setState({ |
| | | actionlist: _actionlist |
| | | }, () => { |
| | | _this.props.updateaction({...config, action: _actionlist, gridBtn: _gridBtn}, '', delcard) |
| | | _this.props.updateaction({...config, action: _actionlist}, '', delcard) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | 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}) |
| | | }) |
| | | }) |
| | | }) |