| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -18,30 +18,15 @@ const themeMap = { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					const Header = props => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const { dispatch, changeTheme, history, user, pathname, toggleCollapsed, collapsed, actions } = props | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const changeTheme_ = (themeKey) => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        localStorage.setItem("theme-name", themeKey); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        window.less.modifyVars(themeMap[themeKey]).catch(error => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            message.error(`Failed to reset theme`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        changeTheme(themeKey) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const { dispatch, history, user, pathname, toggleCollapsed, collapsed, actions } = props | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const handelClick = item => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (item.key == 'logout') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dispatch(actions.auth.logout(user)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            history.push(`/signin`); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else if (item.key == 'themeLight') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            changeTheme_('light') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else if (item.key == 'themeDark') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            changeTheme_('dark') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else if (item.key == 'themeExample') { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            changeTheme_('example') | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    let current = pathname; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    console.log(pathname); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    if (pathname == '/' || pathname == '') { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -56,56 +41,46 @@ const Header = props => { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    return ( | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <div className={styles.header}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* <div className={styles['header-fold']}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <div className={styles['header-fold']}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <span onClick={toggleCollapsed} style={{ marginRight: 20 }}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    {collapsed ? <MenuUnfoldOutlined /> : <MenuFoldOutlined />} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </span> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <div className={styles['header-title']} style={{}}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    智慧应急 */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* <span>{user.orgName}</span> */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    四好公路 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <div id="nav" className={styles['header-nav']}> */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* <Menu | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <div id="nav" className={styles['header-nav']}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <Menu | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    mode='horizontal' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    selectedKeys={[current]} style={{ border: 0 }} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    onClick={handelClick} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                > */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* <Menu.SubMenu key="theme" title={<div style={{ margin: '0 8px' }}>主题切换</div>}  > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <Menu.Item key="themeLight" > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <span>亮色风格</span> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <Menu.SubMenu key="user" title={ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div style={{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            margin: '0 8px' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        }}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <div | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                className={styles['header-nav-user-img-wrapper']} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <UserOutlined /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <div style={{ display: 'inline-block' }}>{user.name}</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div>} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        {/* <Menu.Item key="profile" icon={<UserOutlined />}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <Link to="/profile">个人设置</Link> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </Menu.Item> */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <Menu.Item key="logout" icon={<LogoutOutlined />}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <span>退出</span> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </Menu.Item> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <Menu.Item key="themeDark" > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <span>暗色风格</span> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </Menu.Item> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <Menu.Item key="themeExample" > | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <span>示例风格</span> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </Menu.Item> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </Menu.SubMenu> */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* <Menu.SubMenu key="user" title={ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    <div style={{ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        margin: '0 8px' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    }}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div className={styles['header-nav-user-img-wrapper']}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            <UserOutlined /> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <div style={{ display: 'inline-block' }}>{user.name}</div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </div>} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                > */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* <Menu.Item key="profile" icon={<UserOutlined />}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                <Link to="/profile">个人设置</Link> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            </Menu.Item> */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* <Menu.Item key="logout" icon={<LogoutOutlined />}> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        <span>退出</span> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </Menu.Item> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </Menu.SubMenu> */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* </Menu> */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            {/* </div> */} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    </Menu.SubMenu> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </Menu> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    ); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					}; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					function mapStateToProps(state) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					function mapStateToProps (state) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    const { global, auth } = state; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    return { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        actions: global.actions, | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |