样式优化整合
This commit is contained in:
@ -4,20 +4,24 @@ import React, { useEffect, useRef } from 'react';
|
||||
import moment from 'moment'
|
||||
import { connect, history } from 'umi';
|
||||
import { ConnectState } from '@/models/connect';
|
||||
import logo from '../../assets/logo.svg';
|
||||
import logo from '@/assets/logo.svg';
|
||||
import './index.less';
|
||||
import { getMenu, getLogout } from './services'
|
||||
import { getSessionUserData } from "@/utils/session";
|
||||
import { getSessionUserData, getSessionRoleData } from "@/utils/session";
|
||||
import { getToSecondUrl } from '@/pages/LoadingPage/service';
|
||||
import userIcon from '@/assets/user.svg';
|
||||
import homeIcon from '@/assets/home.svg';
|
||||
import shutdownIcon from '@/assets/shutdown.svg';
|
||||
import { logout } from './services';
|
||||
import cookie from 'react-cookies';
|
||||
import divider from '@/assets/divider.png';
|
||||
|
||||
const theme = JSON.parse(PROJECT_THEME);
|
||||
|
||||
const GlobalHeaderRight: React.FC<{}> = (props) => {
|
||||
// let className = styles.right;
|
||||
const data = getSessionUserData();
|
||||
const roleData = getSessionRoleData();
|
||||
const [dataMenu, setDataMenu] = React.useState<any>([]);
|
||||
const urlRef = useRef(null);
|
||||
const handelRole = (item: any) => {
|
||||
@ -98,15 +102,22 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="top-menu">
|
||||
<div className="top-menu" style={{ height: 56 }}>
|
||||
<div className="left-logo">
|
||||
<div className="logo-container" style={{ display: 'flex', alignItems: 'center' }}>
|
||||
<div className="logo-img">
|
||||
<img src={logo} alt="" />
|
||||
<img src={logo} alt="" style={{ width: '66.89px', height: '42.49px' }}/>
|
||||
</div>
|
||||
<div className="logo-text" style={{ display: 'flex', flexDirection: 'column', alignItems: 'flex-start', gap: '0' }}>
|
||||
<span style={{ lineHeight: '1', fontSize: '24px' }}>采购平台供应商统一管理系统</span>
|
||||
<span style={{ lineHeight: '1', fontSize: '14px', fontWeight: 'normal' }}>CHINA COSCO SHIPPING CORPORATION LIMITED</span>
|
||||
<div className="logo-text" style={{ display: 'flex', flexDirection: 'column', gap: '0' }}>
|
||||
<span style={{ fontSize: '24px', lineHeight: '24px', fontWeight: 700, letterSpacing: '2.5px' }}>中远海运集团采购信息系统</span>
|
||||
<span style={{ lineHeight: 'normal', fontSize: '12px', fontWeight: 400 }}>COSCO SHIPPING Group Procurement Information System</span>
|
||||
</div>
|
||||
<div style={{ margin: '0 9px' }}>
|
||||
<img src={divider} alt="" style={{ width: '1px', height: '100%', margin: 0 }}/>
|
||||
</div>
|
||||
<div className="logo-text" style={{ display: 'flex', flexDirection: 'column', gap: '0' }}>
|
||||
<span style={{ fontSize: '24px', lineHeight: '24px', fontWeight: 700, letterSpacing: '2.5px' }}>{roleData?.roleName}</span>
|
||||
<span style={{ lineHeight: 'normal', fontSize: '12px', fontWeight: 400 }}>{roleData?.roleCode}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -115,16 +126,16 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
|
||||
<li>
|
||||
<Avatar size="small" src={userIcon} style={{ width: '30px' }} />
|
||||
<Dropdown overlay={droMenu}>
|
||||
<a className="antd-dropdown-link" style={{ color: "#fff", verticalAlign: 'middle' }}>
|
||||
<a className="antd-dropdown-link" style={{ color: theme['text-color'], verticalAlign: '-2px' }}>
|
||||
{data?.fullName} <DownOutlined />
|
||||
</a>
|
||||
</Dropdown>
|
||||
</li>
|
||||
<li>
|
||||
<img src={homeIcon} style={{width: 22, cursor: 'pointer'}} alt="dashboard" onClick={() => history.push('/Dashboard')}/>
|
||||
<img src={homeIcon} style={{width: 13, cursor: 'pointer'}} alt="dashboard" onClick={() => history.push('/Dashboard')}/>
|
||||
</li>
|
||||
<li>
|
||||
<img src={shutdownIcon} style={{width: 20, cursor: 'pointer'}} alt="shutdown" onClick={() => toLogout()}/>
|
||||
<li style={{ paddingRight: 16 }}>
|
||||
<img src={shutdownIcon} style={{width: 14, cursor: 'pointer' }} alt="shutdown" onClick={() => toLogout()}/>
|
||||
</li>
|
||||
{/* <li><CarryOutOutlined />{moment().format("YYYY-MM-DD")}</li> */}
|
||||
{/* {data?.organizationName == null ? null : (<li><UserSwitchOutlined />{data?.organizationName}</li>)} */}
|
||||
|
Reference in New Issue
Block a user