| | |
| | | const _this = this |
| | | |
| | | if (!config.enabled) { |
| | | let tb = config.components[0] |
| | | if (config.components.length === 1 && tb.setting.interType === 'system' && !tb.setting.dataresource) { |
| | | confirm({ |
| | | title: '当前页面将清空,确定切换为自定义页面吗?', |
| | | content: '', |
| | | onOk() { |
| | | return new Promise(resolve => { |
| | | _this.execUpdate(resolve, true) |
| | | }) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | notification.warning({ |
| | | top: 92, |
| | | message: '未启用菜单不可升级!', |
| | |
| | | }) |
| | | } |
| | | |
| | | execUpdate = (_resolve) => { |
| | | execUpdate = (_resolve, clear) => { |
| | | let _config = fromJS(this.props.config).toJS() |
| | | _config.permission = 'true' |
| | | _config.Template = 'CustomPage' |
| | |
| | | delete _config.autoMatic |
| | | |
| | | let useMSearch = false |
| | | |
| | | if (clear) { |
| | | _config.components = [] |
| | | } else { |
| | | _config.components.forEach((item, i) => { |
| | | if (item.type === 'tabs') { |
| | | item.name = '标签组' + i |
| | |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if (useMSearch) { |
| | | let cell = { |