| | |
| | | const { confirm } = Modal |
| | | |
| | | const MenuForm = asyncComponent(() => import('./menuform')) |
| | | const Header = asyncComponent(() => import('@/menu/header')) |
| | | const SourceWrap = asyncComponent(() => import('@/menu/modulesource')) |
| | | const MenuShell = asyncComponent(() => import('@/menu/menushell')) |
| | | const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) |
| | | const BgController = asyncComponent(() => import('@/menu/bgcontroller')) |
| | | const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) |
| | | const PaddingController = asyncComponent(() => import('@/menu/padcontroller')) |
| | |
| | | updateCustomComponent = () => { |
| | | Api.getSystemConfig({ |
| | | func: 's_get_custom_components', |
| | | typename: sessionStorage.getItem('appType'), |
| | | typecharone: '' |
| | | }).then(res => { |
| | | let coms = [] |
| | |
| | | buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) |
| | | _sort++ |
| | | }) |
| | | item.subcards.forEach(card => { |
| | | item.subcards && item.subcards.forEach(card => { |
| | | card.elements && card.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') return |
| | | this.checkBtn(cell) |
| | |
| | | window.GLOB.customMenu = config |
| | | } |
| | | |
| | | resetConfig = (config) => { |
| | | this.setState({ |
| | | config: {...config, components: []}, |
| | | }, () => { |
| | | this.setState({ |
| | | config: config |
| | | }) |
| | | }) |
| | | |
| | | window.GLOB.customMenu = config |
| | | } |
| | | |
| | | /** |
| | | * @description 更新常用表信息,快捷添加后更新配置信息 |
| | | */ |
| | |
| | | const { activeKey, MenuType, dict, config, menuloading, customComponents } = this.state |
| | | |
| | | return ( |
| | | <div className="pc-poper-view"> |
| | | <Header /> |
| | | <DndProvider backend={HTML5Backend}> |
| | | <div className="menu-body"> |
| | | <div className="menu-setting"> |
| | |
| | | <div> {config && config.MenuName} </div> |
| | | } bordered={false} extra={ |
| | | <div> |
| | | <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> |
| | | <StyleCombControlButton menu={config} /> |
| | | <PasteController type="menu" Tab={null} insert={this.insert} /> |
| | | {config ? <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config.enabled} onChange={this.onEnabledChange} /> : null} |
| | |
| | | </div> |
| | | </div> |
| | | </DndProvider> |
| | | </div> |
| | | ) |
| | | } |
| | | } |