| | |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | editMenu.LongParam = _LongParam |
| | | } else if (editMenu.PageParam.copyMenuId) { |
| | | let _param = { |
| | | func: 'sPC_Get_LongParam', |
| | | MenuID: editMenu.PageParam.copyMenuId |
| | | } |
| | | |
| | | Api.getCloudConfig(_param).then(res => { |
| | | if (res.status) { |
| | | if (res.LongParam) { |
| | | let _LongParam = '' |
| | | try { |
| | | _LongParam = JSON.parse(window.decodeURIComponent(window.atob(res.LongParam))) |
| | | _LongParam.type = 'user' |
| | | } catch (e) { |
| | | console.warn('Parse Failure') |
| | | _LongParam = '' |
| | | } |
| | | editMenu.LongParam = _LongParam |
| | | } |
| | | |
| | | this.setState({ |
| | | editMenu: editMenu, |
| | | loading: false, |
| | | tabview: editMenu.type |
| | | }) |
| | | } else { |
| | | this.setState({ |
| | | loading: false |
| | | }) |
| | | notification.warning({ |
| | | top: 92, |
| | | message: res.message, |
| | | duration: 5 |
| | | }) |
| | | |
| | | if (_LongParam && (_LongParam.Template === 'BaseTable' || _LongParam.Template === 'CustomPage')) { |
| | | let _param = { |
| | | MenuId: editMenu.MenuID, |
| | | MenuID: editMenu.MenuID, |
| | | ParentId: _LongParam.ParentId, |
| | | MenuName: _LongParam.MenuName, |
| | | MenuNo: _LongParam.MenuNo |
| | | } |
| | | }) |
| | | return |
| | | let url = '' |
| | | if (_LongParam.Template === 'BaseTable') { |
| | | url = window.location.href.split('#')[0] + `#/tabledesign/${window.btoa(window.encodeURIComponent(JSON.stringify(_param)))}` |
| | | } else { |
| | | _param.MenuType = 'custom' |
| | | _param = window.btoa(window.encodeURIComponent(JSON.stringify(_param))) |
| | | url = window.location.href.split('#')[0] + `#/menudesign/${_param}` |
| | | } |
| | | |
| | | window.history.replaceState(null, null, url) |
| | | window.location.reload() |
| | | return |
| | | } |
| | | editMenu.LongParam = _LongParam |
| | | } |
| | | |
| | | this.setState({ |