| | |
| | | thawMvisible: false, // 解除冻结模态框 |
| | | confirmLoading: false, // 提交中。。。 |
| | | dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, |
| | | targetKeys: [] // 解冻菜单列表 |
| | | } |
| | | |
| | | handlePreviewList = (List) => { |
| | |
| | | } |
| | | |
| | | thawMemuSubmit = () => { |
| | | if (this.refs.trawmenu.state.targetKeys.length === 0) { |
| | | const { targetKeys } = this.state |
| | | |
| | | if (targetKeys.length === 0) { |
| | | notification.warning({ |
| | | top: 92, |
| | | message: this.state.dict['form.required.select'] + this.state.dict['model.menu'], |
| | |
| | | this.setState({ |
| | | confirmLoading: true |
| | | }) |
| | | let defers = this.refs.trawmenu.state.targetKeys.map(item => { |
| | | let defers = targetKeys.map(item => { |
| | | return new Promise((resolve) => { |
| | | Api.getSystemConfig({ |
| | | func: 'sPC_MainMenu_ReDel', |
| | |
| | | this.setState({ |
| | | confirmLoading: false, |
| | | thawMvisible: false, |
| | | targetKeys: [], |
| | | thawmenulist: null |
| | | }) |
| | | this.props.reload() |
| | |
| | | thawMemuCancel = () => { |
| | | this.setState({ |
| | | thawMvisible: false, |
| | | targetKeys: [], |
| | | thawmenulist: null |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } else if (type === 'thawmenu') { |
| | | this.setState({ |
| | | thawMvisible: true |
| | | thawMvisible: true, |
| | | targetKeys: [] |
| | | }) |
| | | Api.getSystemConfig({ |
| | | func: 'sPC_Get_FrozenMenu', |
| | |
| | | destroyOnClose |
| | | > |
| | | {!this.state.thawmenulist && <Spin style={{marginLeft: 'calc(50% - 22px)', marginTop: '70px', marginBottom: '70px'}} size="large" />} |
| | | {this.state.thawmenulist && <TransferForm ref="trawmenu" menulist={this.state.thawmenulist}/>} |
| | | {this.state.thawmenulist && <TransferForm onChange={(vals) => this.setState({targetKeys: vals})} menulist={this.state.thawmenulist}/>} |
| | | </Modal> |
| | | {/* 编辑菜单模态框 */} |
| | | <Modal |