| | |
| | | import './index.scss' |
| | | |
| | | const ComTableConfig = asyncLoadComponent(() => import('@/templates/comtableconfig')) |
| | | const FormTabConfig = asyncLoadComponent(() => import('@/templates/formtabconfig')) |
| | | const ModalConfig = asyncLoadComponent(() => import('@/templates/modalconfig')) |
| | | const SubTable = asyncLoadComponent(() => import('@/templates/subtableconfig')) |
| | | |
| | |
| | | } |
| | | |
| | | handleSubConfig = (item, originMenu, config, type) => { |
| | | if (type === 'button') { |
| | | if (type === 'button') { // 三级菜单页面,按钮配置 |
| | | if (item.OpenType === 'pop') { |
| | | let pageParam = '' |
| | | if (config && config.type === 'Modal') { |
| | |
| | | tabview: 'Modal' |
| | | }) |
| | | } |
| | | } else if (type === 'tab') { |
| | | } else if (type === 'tab') { // 三级菜单页面,标签配置 |
| | | if (item.type === 'SubTable' || item.tabType === 'SubTable') { |
| | | this.setState({ |
| | | editMenu: originMenu, |
| | |
| | | tabview: 'SubTable' |
| | | }) |
| | | } |
| | | } else if (type === 'tabButton') { |
| | | } else if (type === 'tabButton') { // 三级菜单下,标签下,按钮配置 |
| | | let pageParam = '' |
| | | if (config && config.type === 'Modal') { |
| | | pageParam = config |
| | |
| | | editAction: item, |
| | | btnParam: pageParam, |
| | | tabview: 'Modal' |
| | | }) |
| | | } else if (type === 'tabview') { // 三级菜单下,打开新标签页或当前页跳转,类型的按钮配置 |
| | | let pageParam = '' |
| | | if (config && config.type === 'formTab') { |
| | | pageParam = config |
| | | } |
| | | |
| | | this.setState({ |
| | | editMenu: originMenu, |
| | | editAction: item, |
| | | btnParam: pageParam, |
| | | tabview: 'FormTab' |
| | | }) |
| | | } |
| | | } |
| | |
| | | handleSubConfig={this.handleSubConfig} |
| | | /> |
| | | } |
| | | {this.state.tabview === 'FormTab' && |
| | | <FormTabConfig |
| | | menu={this.state.editMenu} |
| | | config={this.state.btnParam} |
| | | editAction={this.state.editAction} |
| | | handleConfig={this.handleConfig} |
| | | handleSubConfig={this.handleSubConfig} |
| | | /> |
| | | } |
| | | {/* 图片预览 */} |
| | | <Preview cancel={this.cancelPrePicture} preview={this.state.preview} template={this.state.pretemplate} confirm={this.useTemplate}/> |
| | | {/* 解冻菜单模态框 */} |