| | |
| | | |
| | | deleteMenu = (record) => { |
| | | const { app, appViewList } = this.state |
| | | const _this = this |
| | | const that = this |
| | | |
| | | let param = { |
| | | func: 'sPC_MainMenu_Del', |
| | |
| | | message: '操作成功!', |
| | | duration: 3 |
| | | }) |
| | | _this.getMenuList(true) |
| | | that.getMenuList(true) |
| | | |
| | | if (_param) { |
| | | Api.getCloudConfig(_param).then(res => { |
| | |
| | | duration: 5 |
| | | }) |
| | | } else { |
| | | _this.setState({appViewList: _appViewList}) |
| | | that.setState({appViewList: _appViewList}) |
| | | } |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | initTree = () => { |
| | | const _this = this |
| | | const that = this |
| | | confirm({ |
| | | content: '权限树会重新生成,确定执行吗?', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.getMenuList(true, resolve) |
| | | that.getMenuList(true, resolve) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | } |
| | | |
| | | syncTree = () => { |
| | | const _this = this |
| | | const that = this |
| | | |
| | | confirm({ |
| | | content: '同步会根据菜单删除或新增节点,确定执行吗?', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.syncMenutree(resolve) |
| | | that.syncMenutree(resolve) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | |
| | | |
| | | saveTree = () => { |
| | | // const { trees } = this.state |
| | | const _this = this |
| | | const that = this |
| | | |
| | | // if (!trees || trees.length === 0) { |
| | | // notification.warning({ |
| | |
| | | content: '确定执行吗?', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.execSave(resolve) |
| | | that.execSave(resolve) |
| | | }) |
| | | }, |
| | | onCancel() {} |