| | |
| | | const Header = asyncComponent(() => import('@/menu/header')) |
| | | const ComTableConfig = asyncLoadComponent(() => import('@/templates/comtableconfig')) |
| | | const TreePageConfig = asyncLoadComponent(() => import('@/templates/treepageconfig')) |
| | | const CalendarPageConfig = asyncLoadComponent(() => import('@/templates/calendarconfig')) |
| | | const FormTabConfig = asyncLoadComponent(() => import('@/templates/formtabconfig')) |
| | | const ModalConfig = asyncLoadComponent(() => import('@/templates/modalconfig')) |
| | | const SubTable = asyncLoadComponent(() => import('@/templates/subtableconfig')) |
| | | const UpdateFormTab = asyncLoadComponent(() => import('./updateFormTab')) |
| | | |
| | | document.body.className = '' |
| | | sessionStorage.setItem('isEditState', 'true') |
| | | |
| | | class BaseDesign extends Component { |
| | | state = { |
| | |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | | if (sessionStorage.getItem('devError') === 'true') { |
| | | sessionStorage.clear() |
| | | window.history.replaceState(null, null, window.location.href.split('#')[0] + '#/login') |
| | | window.location.reload() |
| | | return |
| | | } |
| | | |
| | | if (!sessionStorage.getItem('UserID')) { |
| | | this.props.history.replace('/login') |
| | | return |
| | | } |
| | | |
| | | window.GLOB.developing = true |
| | | |
| | | try { |
| | | let param = JSON.parse(window.decodeURIComponent(window.atob(this.props.match.params.param))) |
| | | |
| | |
| | | loading: true |
| | | }) |
| | | |
| | | Api.getSystemConfig(param).then(res => { |
| | | Api.getCloudConfig(param).then(res => { |
| | | if (res.status) { |
| | | editMenu.open_edition = res.open_edition || '' |
| | | editMenu.LongParam = '' |
| | |
| | | MenuID: editMenu.PageParam.copyMenuId |
| | | } |
| | | |
| | | Api.getSystemConfig(_param).then(res => { |
| | | Api.getCloudConfig(_param).then(res => { |
| | | if (res.status) { |
| | | if (res.LongParam) { |
| | | let _LongParam = '' |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { loading } = this.state |
| | | const { loading, editMenu, subConfig, btnTab } = this.state |
| | | |
| | | return ( |
| | | <div className="mk-base-design-wrap"> |
| | | <ConfigProvider locale={_locale}> |
| | | <Header/> |
| | | {this.state.tabview === 'TreePage' ? |
| | | <TreePageConfig |
| | | menu={this.state.editMenu} |
| | | reloadmenu={() => {localStorage.setItem('menuUpdate', new Date().getTime())}} |
| | | handleView={this.handleView} |
| | | /> : null |
| | | } |
| | | {this.state.tabview === 'CalendarPage' ? |
| | | <CalendarPageConfig |
| | | menu={this.state.editMenu} |
| | | reloadmenu={() => {localStorage.setItem('menuUpdate', new Date().getTime())}} |
| | | handleView={this.handleView} |
| | | /> : null |
| | | } |
| | | {this.state.tabview === 'CommonTable' ? |
| | | <ComTableConfig |
| | | menu={this.state.editMenu} |
| | | menu={editMenu} |
| | | reloadmenu={() => {localStorage.setItem('menuUpdate', new Date().getTime())}} |
| | | handleView={this.handleView} |
| | | /> : null |
| | | } |
| | | {this.state.tabview === 'Modal' ? |
| | | <ModalConfig |
| | | menu={this.state.editMenu} |
| | | editTab={this.state.editTab} |
| | | tabConfig={this.state.tabConfig} |
| | | editSubTab={this.state.editSubTab} |
| | | subTabConfig={this.state.subTabConfig} |
| | | btnTab={this.state.btnTab} |
| | | btnTabConfig={this.state.btnTabConfig} |
| | | editAction={this.state.editAction} |
| | | subConfig={this.state.subConfig} |
| | | handleView={this.handleView} |
| | | /> : null |
| | | } |
| | | {this.state.tabview === 'SubTable' ? |
| | | <SubTable |
| | | menu={this.state.editMenu} |
| | | menu={editMenu} |
| | | editTab={this.state.editTab} |
| | | editSubTab={this.state.editSubTab} |
| | | tabConfig={this.state.tabConfig} |
| | | btnTab={this.state.btnTab} |
| | | btnTab={btnTab} |
| | | btnTabConfig={this.state.btnTabConfig} |
| | | config={this.state.subConfig} |
| | | config={subConfig} |
| | | handleView={this.handleView} |
| | | /> : null |
| | | } |
| | | {this.state.tabview === 'Modal' ? |
| | | <ModalConfig |
| | | menu={editMenu} |
| | | editTab={this.state.editTab} |
| | | tabConfig={this.state.tabConfig} |
| | | editSubTab={this.state.editSubTab} |
| | | subTabConfig={this.state.subTabConfig} |
| | | btnTab={btnTab} |
| | | btnTabConfig={this.state.btnTabConfig} |
| | | editAction={this.state.editAction} |
| | | subConfig={subConfig} |
| | | handleView={this.handleView} |
| | | /> : null |
| | | } |
| | | {this.state.tabview === 'TreePage' ? |
| | | <TreePageConfig |
| | | menu={editMenu} |
| | | reloadmenu={() => {localStorage.setItem('menuUpdate', new Date().getTime())}} |
| | | handleView={this.handleView} |
| | | /> : null |
| | | } |
| | | {this.state.tabview === 'FormTab' ? |
| | | <FormTabConfig |
| | | menu={this.state.editMenu} |
| | | btnTab={this.state.btnTab} |
| | | config={this.state.subConfig} |
| | | <UpdateFormTab |
| | | menu={editMenu} |
| | | btnTab={btnTab} |
| | | config={subConfig} |
| | | handleView={this.handleView} |
| | | /> : null |
| | | } |