|
|
@ -5,7 +5,7 @@ import { push } from 'react-router-redux'; |
|
|
|
import moment from "moment"; |
|
|
|
|
|
|
|
const Header = (props) => { |
|
|
|
const { dispatch, actions, user, match, weatherRealtime, history } = props |
|
|
|
const { dispatch, actions, user, match, weatherRealtime, history, groupDetail } = props |
|
|
|
const [queryUserId, setQueryUserId] = useState('') |
|
|
|
const [date, setDate] = useState(moment()); |
|
|
|
const dayMap = { 0: '日', 1: '一', 2: '二', 3: '三', 4: '四', 5: '五', 6: '六' } |
|
|
@ -25,11 +25,9 @@ const Header = (props) => { |
|
|
|
dispatch(actions.auth.getWeatherRealtime()) |
|
|
|
} |
|
|
|
useEffect(() => { |
|
|
|
console.log(props?.location); |
|
|
|
let search = props?.location?.search || ''; |
|
|
|
let params = new URLSearchParams(search); |
|
|
|
let userId = params.get('pomsU') |
|
|
|
console.log(userId); |
|
|
|
setQueryUserId(userId) |
|
|
|
|
|
|
|
const setTime = () => { |
|
|
@ -81,7 +79,7 @@ const Header = (props) => { |
|
|
|
display: 'flex', alignItems: 'center', justifyContent: 'space-between' |
|
|
|
}}> |
|
|
|
<span style={{ fontSize: 'xx-large', fontWeight: 'bolder' }}> |
|
|
|
{match?.path == '/projectGroup/bigscreen' ? `${JSON.parse(localStorage.getItem('project_group'))?.find(v => v.userId == user?.id)?.name}数据统计大屏` : '运维中台大屏'} |
|
|
|
{match?.path == '/projectGroup/bigscreen' ? `${groupDetail?.name}数据统计大屏` : '运维中台大屏'} |
|
|
|
</span> |
|
|
|
<span style={{ |
|
|
|
display: 'flex', alignItems: 'center', flexDirection: 'row' |
|
|
|