| | |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { ConfigProvider, notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' |
| | | import html2canvas from 'html2canvas' |
| | | |
| | | import Api from '@/api' |
| | |
| | | popBtn: null, // 弹窗标签页 |
| | | visible: false, |
| | | customComponents: [], |
| | | comloading: false |
| | | comloading: false, |
| | | settingshow: !['linkage_navigation', 'linkage', 'menu_board', 'menu_board_navigation'].includes(window.GLOB.navBar) |
| | | } |
| | | |
| | | UNSAFE_componentWillMount() { |
| | |
| | | config = null |
| | | } |
| | | |
| | | let _settingshow = this.state.settingshow |
| | | if (!config) { |
| | | _settingshow = true |
| | | config = { |
| | | version: 1.0, |
| | | uuid: MenuId, |
| | |
| | | window.GLOB.urlFields = config.urlFields || [] |
| | | |
| | | this.setState({ |
| | | settingshow: _settingshow, |
| | | oriConfig: config, |
| | | config: fromJS(config).toJS() |
| | | }) |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { activeKey, comloading, MenuType, popBtn, visible, dict, MenuId, config, ParentId, MenuName, MenuNo, menuloading, customComponents } = this.state |
| | | const { activeKey, comloading, MenuType, popBtn, visible, dict, MenuId, config, settingshow, ParentId, MenuName, MenuNo, menuloading, customComponents } = this.state |
| | | |
| | | return ( |
| | | <ConfigProvider locale={_locale}> |
| | |
| | | <Header /> |
| | | {!popBtn && !visible ? <DndProvider backend={HTML5Backend}> |
| | | <div className="menu-body"> |
| | | <div className="menu-setting"> |
| | | <div className={'menu-setting ' + (!settingshow ? 'hidden' : '')}> |
| | | <div className="draw"> |
| | | {settingshow ? <DoubleLeftOutlined onClick={() => this.setState({settingshow: false})}/> : null} |
| | | {!settingshow ? <DoubleRightOutlined onClick={() => this.setState({settingshow: true})}/> : null} |
| | | </div> |
| | | <Collapse accordion activeKey={activeKey} bordered={false} onChange={(key) => this.setState({activeKey: key})}> |
| | | {/* 基本信息 */} |
| | | <Panel header={dict['mob.basemsg']} key="basedata"> |
| | |
| | | </div> |
| | | <div className={'menu-view ' + (menuloading ? 'saving' : '')}> |
| | | <Card title={ |
| | | <div> {config && config.MenuName} </div> |
| | | <div style={{paddingLeft: '15px'}}> {config && config.MenuName} </div> |
| | | } bordered={false} extra={ |
| | | <div> |
| | | <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/> |