| | |
| | | import { is, fromJS } from 'immutable' |
| | | import moment from 'moment' |
| | | import HTML5Backend from 'react-dnd-html5-backend' |
| | | import { ConfigProvider, notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd' |
| | | import { notification, Modal, Collapse, Card, Switch, Button, Typography } from 'antd' |
| | | import { DoubleLeftOutlined, DoubleRightOutlined } from '@ant-design/icons' |
| | | import md5 from 'md5' |
| | | |
| | | import Api from '@/api' |
| | | import Utils, { setGLOBFuncs } from '@/utils/utils.js' |
| | | import antdZhCN from 'antd/es/locale/zh_CN' |
| | | import { langs } from '@/store/options' |
| | | import MKEmitter from '@/utils/events.js' |
| | | import { getTables, getFuncsAndInters, getLangTrans } from '@/utils/utils-custom.js' |
| | | import SourceElement from '@/templates/zshare/dragsource' |
| | |
| | | const { Panel } = Collapse |
| | | const { confirm } = Modal |
| | | const { Paragraph } = Typography |
| | | const _locale = antdZhCN |
| | | |
| | | const MenuForm = asyncComponent(() => import('./menuform')) |
| | | const PopView = asyncComponent(() => import('./popview')) |
| | |
| | | comloading: false, |
| | | settingshow: sessionStorage.getItem('settingshow') !== 'false', |
| | | view: null, |
| | | langName: '', |
| | | popConfig: null |
| | | } |
| | | |
| | |
| | | ParentId: param.ParentId || '', |
| | | MenuName: param.MenuName || '', |
| | | MenuNo: param.MenuNo || '', |
| | | langName: sessionStorage.getItem('lang') !== 'zh-CN' && langs[sessionStorage.getItem('lang')] ? `(${langs[sessionStorage.getItem('lang')]})` : '' |
| | | }, () => { |
| | | this.getMenuParam() |
| | | }) |
| | |
| | | if (!this.checkBase()) { |
| | | return |
| | | } else if (this.checklog()) { |
| | | notification.success({ |
| | | top: 92, |
| | | message: '当前配置未修改,无需保存。', |
| | | duration: 5 |
| | | }) |
| | | MKEmitter.emit('completeSave') |
| | | return |
| | | if (sessionStorage.getItem('langList') && !config.trans) { |
| | | |
| | | } else { |
| | | notification.success({ |
| | | top: 92, |
| | | message: '当前配置未修改,无需保存。', |
| | | duration: 5 |
| | | }) |
| | | MKEmitter.emit('completeSave') |
| | | return |
| | | } |
| | | } |
| | | |
| | | this.setState({ |
| | |
| | | MenuName: config.MenuName || '', |
| | | PageParam: JSON.stringify({Template: 'BaseTable', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false', menuColor: config.menuColor || '', interfaces, urlFields}), |
| | | open_edition: config.open_edition, |
| | | LText: '', |
| | | LTexttb: '', |
| | | // LText: '', |
| | | // LTexttb: '', |
| | | debug_md5: key, |
| | | debug_url: url, |
| | | debug_list: window.btoa(tbs), |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), |
| | | lang_translation: window.btoa(window.encodeURIComponent(langSql)) |
| | | LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))) |
| | | } |
| | | |
| | | if (langSql) { |
| | | param.lang_translation = window.btoa(window.encodeURIComponent(langSql)) |
| | | } |
| | | |
| | | param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') |
| | |
| | | } |
| | | |
| | | render () { |
| | | const { view, activeKey, comloading, MenuId, config, settingshow, ParentId, menuloading } = this.state |
| | | const { view, activeKey, comloading, MenuId, config, settingshow, ParentId, menuloading, langName } = this.state |
| | | |
| | | return ( |
| | | <ConfigProvider locale={_locale}> |
| | | <Header menuName={config ? config.MenuName : ''}/> |
| | | <> |
| | | <Header menuName={config ? config.MenuName + langName : ''}/> |
| | | <DndProvider backend={HTML5Backend}> |
| | | {view !== 'popview' ? <div className="pc-table-view"> |
| | | <div className="menu-body"> |
| | |
| | | </DndProvider> |
| | | <StyleController /> |
| | | <ModalController /> |
| | | </ConfigProvider> |
| | | </> |
| | | ) |
| | | } |
| | | } |