| | |
| | | */ |
| | | thawBtnSubmit = () => { |
| | | const { thawButtons } = this.props |
| | | const { thawbtnlist } = this.state |
| | | const { thawbtnlist, dict } = this.state |
| | | let config = JSON.parse(JSON.stringify(this.props.config)) |
| | | |
| | | // 三级菜单解除冻结 |
| | | if (this.refs.trawmenu.state.targetKeys.length === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: this.props.dict['form.required.select'] + this.props.dict['header.form.thawbutton'], |
| | | message: dict['form.required.select'] + dict['header.form.thawbutton'], |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | |
| | | const { dict } = this.state |
| | | const menu = ( |
| | | <Menu onClick={this.handleMenuClick}> |
| | | {this.props.type !== 'TreePage' ? <Menu.Item key="thaw"><Icon type="unlock" />{this.props.dict['header.form.thawbutton']}</Menu.Item> : null} |
| | | <Menu.Item key="paste"><Icon type="snippets" />{this.props.dict['header.form.paste']}</Menu.Item> |
| | | {this.props.type !== 'TreePage' ? <Menu.Item key="thaw"><Icon type="unlock" />{dict['header.form.thawbutton']}</Menu.Item> : null} |
| | | <Menu.Item key="paste"><Icon type="snippets" />{dict['header.form.paste']}</Menu.Item> |
| | | {/* <Menu.Item key="replace"><Icon type="retweet" />替换</Menu.Item> */} |
| | | </Menu> |
| | | ) |
| | |
| | | </Dropdown> |
| | | {/* 解冻按钮模态框 */} |
| | | <Modal |
| | | title={this.props.dict['header.form.thawbutton']} |
| | | okText={this.props.dict['model.confirm']} |
| | | cancelText={this.props.dict['model.cancel']} |
| | | title={dict['header.form.thawbutton']} |
| | | okText={dict['model.confirm']} |
| | | cancelText={dict['model.cancel']} |
| | | visible={this.state.thawVisible} |
| | | onOk={this.thawBtnSubmit} |
| | | onCancel={() => {this.setState({thawVisible: false, thawbtnlist: null})}} |
| | | 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 ref="trawmenu" dict={dict} menulist={this.state.thawbtnlist}/>} |
| | | </Modal> |
| | | {/* 按钮配置信息粘贴复制 */} |
| | | <Modal |
| | | title={this.props.dict['header.form.paste']} |
| | | title={dict['header.form.paste']} |
| | | visible={this.state.pasteVisible} |
| | | width={600} |
| | | maskClosable={false} |
| | |
| | | destroyOnClose |
| | | > |
| | | <PasteForm |
| | | dict={this.props.dict} |
| | | dict={dict} |
| | | wrappedComponentRef={(inst) => this.pasteFormRef = inst} |
| | | /> |
| | | </Modal> |