king
2021-07-20 6055fa01416fc57ee33b291a8103ccc1a8edce44
src/templates/zshare/editcomponent/index.jsx
@@ -25,6 +25,7 @@
    thawVisible: false,
    thawbtnlist: null,
    pasteVisible: false,
    targetKeys: []
  }
  /**
@@ -34,7 +35,8 @@
    const { MenuID } = this.props
    this.setState({
      thawVisible: true
      thawVisible: true,
      targetKeys: []
    })
    Api.getSystemConfig({
@@ -84,32 +86,31 @@
   */
  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: []
      })
    }
  }
@@ -249,11 +250,11 @@
          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