| | |
| | | /** |
| | | * @description 提交已选的权限 |
| | | */ |
| | | roleSubmit = async () => { |
| | | roleSubmit = () => { |
| | | const { checkedKeys, halfCheckedKeys, selectRoleId, initCheckKeys } = this.state |
| | | |
| | | let _keys = [] |
| | |
| | | }) |
| | | } |
| | | |
| | | let localParam = fromJS(param).toJS() |
| | | localParam.func = 's_rolemenu_sub_local' |
| | | |
| | | this.setState({ |
| | | submitloading: true |
| | | }) |
| | | |
| | | let result = await Api.getSystemConfig(param) |
| | | |
| | | 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: '保存成功', |
| | |
| | | }) |
| | | 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 () { |