Commit f6b5e507 authored by 邓晓峰's avatar 邓晓峰

fix: 修复三级菜单

parent f7061578
Pipeline #47757 skipped with stages
...@@ -110,9 +110,9 @@ ...@@ -110,9 +110,9 @@
"@wisdom-map/Map": "^1.0.12-17", "@wisdom-map/Map": "^1.0.12-17",
"@wisdom-map/arcgismap": "^1.0.79-17", "@wisdom-map/arcgismap": "^1.0.79-17",
"@wisdom-map/util": "^1.0.27-0", "@wisdom-map/util": "^1.0.27-0",
"@wisdom-utils/components": "0.1.16", "@wisdom-utils/components": "0.1.35",
"@wisdom-utils/runtime": "0.0.15", "@wisdom-utils/runtime": "0.0.15",
"@wisdom-utils/utils": "0.1.56", "@wisdom-utils/utils": "0.1.75",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"antd": "^4.17.4", "antd": "^4.17.4",
"compression": "1.7.4", "compression": "1.7.4",
......
...@@ -7,15 +7,15 @@ import 'antd/dist/antd.less'; ...@@ -7,15 +7,15 @@ import 'antd/dist/antd.less';
import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions import 'file-loader?name=.htaccess!./.htaccess'; // eslint-disable-line import/extensions
import '@wisdom-utils/utils/lib/helpers/format'; import '@wisdom-utils/utils/lib/helpers/format';
import 'sanitize.css/sanitize.css'; import 'sanitize.css/sanitize.css';
import { event } from '@wisdom-utils/utils'; // import { event } from '@wisdom-utils/utils';
import { ConfigProvider } from 'antd'; import { ConfigProvider } from 'antd';
import { Storeage } from '@wisdom-utils/utils/lib/helpers'; import { Storeage } from '@wisdom-utils/utils/lib/helpers';
// import { history } from '@wisdom-utils/runtime';
import { actionCreators } from './containers/App/store'; // import { actionCreators } from './containers/App/store';
import { initGlobalConfig } from './initConfig'; import { initGlobalConfig } from './initConfig';
import './utils/event'; import './utils/event';
import store from './stores'; // import store from './stores';
// eslint-disable-next-line no-restricted-globals // eslint-disable-next-line no-restricted-globals
const namespace = `__PANDA_STORE__${location.hostname}`; const namespace = `__PANDA_STORE__${location.hostname}`;
window.createStoreage = new Storeage(namespace); window.createStoreage = new Storeage(namespace);
...@@ -32,7 +32,6 @@ initLocale(); ...@@ -32,7 +32,6 @@ initLocale();
// const unlisten = (function() { // const unlisten = (function() {
// let prePathname = ''; // let prePathname = '';
// return history.listen(location => { // return history.listen(location => {
// console.log(location)
// if (location.pathname.indexOf('/civbase/user/login') > -1 && location.pathname !== prePathname) { // if (location.pathname.indexOf('/civbase/user/login') > -1 && location.pathname !== prePathname) {
// initGlobalConfig(); // initGlobalConfig();
// } // }
......
...@@ -111,7 +111,6 @@ const GlobalHeaderRight = props => { ...@@ -111,7 +111,6 @@ const GlobalHeaderRight = props => {
if (theme === 'dark' && layout === 'top') { if (theme === 'dark' && layout === 'top') {
className = `${styles.right} ${styles.dark}`; className = `${styles.right} ${styles.dark}`;
} }
const intl = useIntl(); const intl = useIntl();
...@@ -240,7 +239,7 @@ const GlobalHeaderRight = props => { ...@@ -240,7 +239,7 @@ const GlobalHeaderRight = props => {
</div> </div>
</div> </div>
<NoticeIconView title={intl.formatMessage({id: 'component.header.icon.alarm'})} /> <NoticeIconView title={intl.formatMessage({id: 'component.header.icon.alarm'})} />
<Avatar menu global={props.global} updateCurrentIndex={props.updateCurrentIndex} updateConfig={props.updateConfig} logout={props.logout}/> <Avatar menu config={props.global} updateCurrentIndex={props.updateCurrentIndex} updateConfig={props.updateConfig} logout={props.logout}/>
</div> </div>
); );
}; };
......
...@@ -8,6 +8,7 @@ import { helpers } from '@wisdom-utils/utils'; ...@@ -8,6 +8,7 @@ import { helpers } from '@wisdom-utils/utils';
import { dyRoutes } from '../../routes/config'; import { dyRoutes } from '../../routes/config';
const pkg = require('../../../package.json'); const pkg = require('../../../package.json');
const config = require('../../../config/config'); const config = require('../../../config/config');
const defaultSetting = config.layout; const defaultSetting = config.layout;
const { renderRoutes } = helpers; const { renderRoutes } = helpers;
function App(props) { function App(props) {
......
...@@ -38,11 +38,7 @@ const arrowSvg = ({ fillColor = '#fff' }) => ( ...@@ -38,11 +38,7 @@ const arrowSvg = ({ fillColor = '#fff' }) => (
</svg> </svg>
); );
const ArrowIcon = props => <Icon component={arrowSvg} {...props} />; const ArrowIcon = props => <Icon component={arrowSvg} {...props} />;
// const { TabPane } = Tabs;
// const baseURI = isProd
// ? window.location.origin
// : `http://${window.location.hostname}:3020`;
const optionsWith = [ const optionsWith = [
{ label: '按站点', value: 'site' }, { label: '按站点', value: 'site' },
{ label: '按城市', value: 'city' }, { label: '按城市', value: 'city' },
...@@ -277,23 +273,6 @@ const Layout = props => { ...@@ -277,23 +273,6 @@ const Layout = props => {
} }
} }
// useEffect(() => {
// // actions.setGlobalState({
// // globalConfig: props.global
// // });
// // if(!/industry/.test(location.pathname)) {
// // store.set('props:globalConfig', {globalConfig: props.global});
// // } else {
// // store.off('props:globalConfig', state => {})
// // }
// console.log(props.location, location)
// const pathname = props.location.pathname;
// const argv = pathname.split('/');
// }, [location.pathname, props.global])
useEffect(() => { useEffect(() => {
window.share.event.on('updateSite', res => setCityData(res)); window.share.event.on('updateSite', res => setCityData(res));
...@@ -326,7 +305,7 @@ const Layout = props => { ...@@ -326,7 +305,7 @@ const Layout = props => {
route={props.route} route={props.route}
title={props.global.title} title={props.global.title}
logo={logo} logo={logo}
global={props.global} config={props.global}
collapsed={collapse} collapsed={collapse}
onCollapse={handlerCollapsed} onCollapse={handlerCollapsed}
currentMenuIndex={props.currentMenuIndex} currentMenuIndex={props.currentMenuIndex}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment