|
@ -4,7 +4,8 @@ import { Skeleton, Button, Pagination, Form, Popconfirm, Table, Toast } from '@d |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
|
|
|
|
|
|
const Header = (props) => { |
|
|
const Header = (props) => { |
|
|
const { dispatch, actions, weatherRealtime } = props |
|
|
const { dispatch, actions, user,match, weatherRealtime, history } = props |
|
|
|
|
|
|
|
|
const [date, setDate] = useState(moment()); |
|
|
const [date, setDate] = useState(moment()); |
|
|
const dayMap = { 0: '日', 1: '一', 2: '二', 3: '三', 4: '四', 5: '五', 6: '六' } |
|
|
const dayMap = { 0: '日', 1: '一', 2: '二', 3: '三', 4: '四', 5: '五', 6: '六' } |
|
|
const weatherMap = { |
|
|
const weatherMap = { |
|
@ -71,7 +72,9 @@ const Header = (props) => { |
|
|
padding: '0 24px', |
|
|
padding: '0 24px', |
|
|
display: 'flex', alignItems: 'center', justifyContent: 'space-between' |
|
|
display: 'flex', alignItems: 'center', justifyContent: 'space-between' |
|
|
}}> |
|
|
}}> |
|
|
<span style={{ fontSize: 'xx-large', fontWeight: 'bolder' }}>运维中台大屏</span> |
|
|
<span style={{ fontSize: 'xx-large', fontWeight: 'bolder' }}> |
|
|
|
|
|
{match?.path == '/projectGroup/bigscreen' ? `${JSON.parse(localStorage.getItem('project_group'))?.find(v => v.userId == user?.id)?.name}数据统计大屏` : '运维中台大屏'} |
|
|
|
|
|
</span> |
|
|
<span style={{ |
|
|
<span style={{ |
|
|
display: 'flex', alignItems: 'center', flexDirection: 'row' |
|
|
display: 'flex', alignItems: 'center', flexDirection: 'row' |
|
|
}}> |
|
|
}}> |
|
@ -110,19 +113,26 @@ const Header = (props) => { |
|
|
{weatherMap[weatherRealtime?.skycon]} |
|
|
{weatherMap[weatherRealtime?.skycon]} |
|
|
</span> |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
<div style={lineBetweenStyle} /> |
|
|
|
|
|
<div style={{ |
|
|
{match?.path == '/projectGroup/bigscreen' ? <> |
|
|
display: "flex", alignItems: 'center', justifyContent: "space-around", width: 90, |
|
|
<div style={lineBetweenStyle} /> |
|
|
color: 'color: #5A6685' |
|
|
<div style={{ |
|
|
}}> |
|
|
display: "flex", alignItems: 'center', justifyContent: "space-around", width: 90, |
|
|
<img src="/assets/images/projectGroup/backend.png" style={{ width: 14, height: 14 }} alt="" /> |
|
|
color: 'color: #5A6685', fontSize: 14, fontFamily: "SourceHanSansCN-Regular", cursor: 'pointer' |
|
|
返回后台 |
|
|
}} onClick={() => { |
|
|
</div> |
|
|
history.push({ pathname: `/projectGroup/statistic`, }) |
|
|
|
|
|
}}> |
|
|
|
|
|
<img src="/assets/images/projectGroup/backend.png" style={{ width: 14, height: 14 }} alt="" /> |
|
|
|
|
|
返回后台 |
|
|
|
|
|
</div> |
|
|
|
|
|
</> |
|
|
|
|
|
: <></> |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
</span> |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function mapStateToProps (state) { |
|
|
function mapStateToProps (state) { |
|
|
const { auth, global, weatherRealtime } = state; |
|
|
const { auth, global, weatherRealtime } = state; |
|
|
return { |
|
|
return { |
|
|