|
@ -29,6 +29,7 @@ const Header = props => { |
|
|
const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false) |
|
|
const [deviceManageTabsVisible, setDeviceManageTabsVisible] = useState(false) |
|
|
const [currentSubMenuTab, setCurrentSubMenuTab] = useState('') |
|
|
const [currentSubMenuTab, setCurrentSubMenuTab] = useState('') |
|
|
const [tab, setTab] = useState('leader') |
|
|
const [tab, setTab] = useState('leader') |
|
|
|
|
|
const [projectName, setProjectName ]= useState('') |
|
|
const [weather, setWeather] = useState([]) |
|
|
const [weather, setWeather] = useState([]) |
|
|
let headerTitleStyle = { |
|
|
let headerTitleStyle = { |
|
|
position: 'absolute', |
|
|
position: 'absolute', |
|
@ -39,6 +40,7 @@ const Header = props => { |
|
|
fontWeight: 600, |
|
|
fontWeight: 600, |
|
|
fontFamily: 'PangMenZhengDao', |
|
|
fontFamily: 'PangMenZhengDao', |
|
|
letterSpacing: '.5231rem', |
|
|
letterSpacing: '.5231rem', |
|
|
|
|
|
width:'39rem' |
|
|
} |
|
|
} |
|
|
let headerTabStyle = { |
|
|
let headerTabStyle = { |
|
|
width: '4.375rem', |
|
|
width: '4.375rem', |
|
@ -52,12 +54,15 @@ const Header = props => { |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
queryWeather() |
|
|
queryWeather() |
|
|
|
|
|
const projectName = JSON.parse(sessionStorage.getItem('user')).projectName |
|
|
|
|
|
setProjectName(projectName) |
|
|
const timeUpdate = setInterval(() => { |
|
|
const timeUpdate = setInterval(() => { |
|
|
queryWeather() |
|
|
queryWeather() |
|
|
}, WEATHERMARGIN) |
|
|
}, WEATHERMARGIN) |
|
|
return () => { |
|
|
return () => { |
|
|
clearInterval(timeUpdate) |
|
|
clearInterval(timeUpdate) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, []) |
|
|
}, []) |
|
|
|
|
|
|
|
|
const queryWeather = () => { |
|
|
const queryWeather = () => { |
|
@ -105,7 +110,7 @@ const Header = props => { |
|
|
<div className={styles['header-fold']}> |
|
|
<div className={styles['header-fold']}> |
|
|
{/* <img src='/assets/images/logo.svg' style={{ margin: '-14px 12px 0 0', height: 24 }} /> */} |
|
|
{/* <img src='/assets/images/logo.svg' style={{ margin: '-14px 12px 0 0', height: 24 }} /> */} |
|
|
<div className={styles['header-title']} style={{}}> |
|
|
<div className={styles['header-title']} style={{}}> |
|
|
<span style={headerTitleStyle}>河州路河州路河州路河州路河州路</span> |
|
|
<span style={headerTitleStyle}>{projectName}</span> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div |
|
|
<div |
|
|