| | |
| | | thawVisible: false, |
| | | thawbtnlist: null, |
| | | pasteVisible: false, |
| | | targetKeys: [] |
| | | } |
| | | |
| | | /** |
| | |
| | | const { MenuID } = this.props |
| | | |
| | | this.setState({ |
| | | thawVisible: true |
| | | thawVisible: true, |
| | | targetKeys: [] |
| | | }) |
| | | |
| | | Api.getSystemConfig({ |
| | |
| | | */ |
| | | thawBtnSubmit = () => { |
| | | const { thawButtons } = this.props |
| | | const { thawbtnlist, dict } = this.state |
| | | const { thawbtnlist, dict, targetKeys } = this.state |
| | | let config = fromJS(this.props.config).toJS() |
| | | |
| | | // 三级菜单解除冻结 |
| | | if (this.refs.trawmenu.state.targetKeys.length === 0) { |
| | | if (targetKeys.length === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: dict['form.required.select'] + dict['header.form.thawbutton'], |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | |
| | | thawbtnlist.forEach(item => { |
| | | if (this.refs.trawmenu.state.targetKeys.includes(item.key)) { |
| | | if (targetKeys.includes(item.key)) { |
| | | config.action.push(item.btnParam) |
| | | } |
| | | }) |
| | | |
| | | this.props.refresh({ |
| | | type: 'thaw', |
| | | thawButtons: [...thawButtons, ...this.refs.trawmenu.state.targetKeys], |
| | | thawButtons: [...thawButtons, ...targetKeys], |
| | | config: config |
| | | }) |
| | | |
| | | this.setState({ |
| | | thawVisible: false |
| | | thawVisible: false, |
| | | targetKeys: [] |
| | | }) |
| | | } |
| | | } |
| | |
| | | title={dict['header.form.thawbutton']} |
| | | visible={this.state.thawVisible} |
| | | onOk={this.thawBtnSubmit} |
| | | onCancel={() => {this.setState({thawVisible: false, thawbtnlist: null})}} |
| | | onCancel={() => {this.setState({thawVisible: false, thawbtnlist: null, targetKeys: []})}} |
| | | destroyOnClose |
| | | > |
| | | {!this.state.thawbtnlist && <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" />} |
| | | {this.state.thawbtnlist && <TransferForm ref="trawmenu" menulist={this.state.thawbtnlist}/>} |
| | | {this.state.thawbtnlist && <TransferForm onChange={(vals) => this.setState({targetKeys: vals})} menulist={this.state.thawbtnlist}/>} |
| | | </Modal> |
| | | {/* 按钮配置信息粘贴复制 */} |
| | | <Modal |