| | |
| | | } |
| | | |
| | | handleButton = (type) => { |
| | | const that = this |
| | | // 菜单编辑:添加,确定,取消 |
| | | let _menuchange = !is(fromJS(this.state.menulist), fromJS(this.props.menulist)) |
| | | |
| | | if (type === 'confirm' && _menuchange) { |
| | | let _this = this |
| | | let param = { |
| | | func: 'sPC_Menu_SortUpt', |
| | | LText: this.state.menulist.map((item, index) => { |
| | |
| | | onOk() { |
| | | return Api.getSystemConfig(param).then(res => { |
| | | if (res.status) { |
| | | _this.props.reload() |
| | | that.props.reload() |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |
| | |
| | | onCancel() {} |
| | | }) |
| | | } else if (type === 'cancel' && _menuchange) { |
| | | let _this = this |
| | | |
| | | confirm({ |
| | | title: '菜单顺序已调整,放弃保存吗?', |
| | | content: '', |
| | | onOk() { |
| | | _this.props.exitEdit() |
| | | that.props.exitEdit() |
| | | }, |
| | | onCancel() {} |
| | | }) |