king
2020-06-08 1ed3cfb3778e13904839e9729cb5b4ce9f5c905d
src/tabviews/rolemanage/index.jsx
@@ -373,7 +373,7 @@
  /**
   * @description 提交已选的权限
   */
  roleSubmit = async () => {
  roleSubmit = () => {
    const { checkedKeys, halfCheckedKeys, selectRoleId, initCheckKeys } = this.state
    let _keys = []
@@ -401,34 +401,64 @@
      })
    }
    let localParam = fromJS(param).toJS()
    localParam.func = 's_rolemenu_sub_local'
    this.setState({
      submitloading: true
    })
    let result = await Api.getSystemConfig(param)
    if (result.status) {
      notification.success({
        top: 92,
        message: '保存成功',
        duration: 2
      })
      this.setState({
        submitloading: false,
        loadingTree: true
      }, () => {
        this.getSelectMenuList()
      })
    } else {
      this.setState({
        submitloading: false
      })
      notification.warning({
        top: 92,
        message: result.message,
        duration: 5
      })
    }
    Api.getSystemConfig(param).then(result => {
      if (result.status) {
        if (!window.GLOB.mainSystemApi) {
          notification.success({
            top: 92,
            message: '保存成功',
            duration: 2
          })
          this.setState({
            submitloading: false,
            loadingTree: true
          }, () => {
            this.getSelectMenuList()
          })
        } else {
          Api.getLocalConfig(localParam).then(res => {
            if (res.status) {
              notification.success({
                top: 92,
                message: '保存成功',
                duration: 2
              })
              this.setState({
                submitloading: false,
                loadingTree: true
              }, () => {
                this.getSelectMenuList()
              })
            } else {
              this.setState({
                submitloading: false
              })
              notification.warning({
                top: 92,
                message: res.message,
                duration: 5
              })
            }
          })
        }
      } else {
        this.setState({
          submitloading: false
        })
        notification.warning({
          top: 92,
          message: result.message,
          duration: 5
        })
      }
    })
  }
  UNSAFE_componentWillMount () {