/** * 录制记录列表 */ import React, { Component } from "react"; import { connect } from "dva"; import { Layout } from "antd"; import styles from "./header.less"; import {gup} from "../../../utils/utils"; const { Header } = Layout; @connect((state) => ({ mapStyle: state.command.mapStyle, layoutAuthority: state.command.layoutAuthority })) export default class HeaderMenu extends Component { constructor(props) { super(props); this.state = { currentGroup: props.currentIndex, }; } componentDidMount() { } render() { const { CommandRouter, headerLogo, mapStyle, layoutAuthority } = this.props let _CommandRouter = CommandRouter.filter(item => item.menuName != "") return (
{ // (headerLogo && headerLogo.length > 0) && layoutAuthority.commonLogo && layoutAuthority.darkLogo ? : (headerLogo && headerLogo.length > 0) && } {/*

{headerLogoName}

*/}
{_CommandRouter.map((item, index) => { return ( { this.props.currentRouter(item); this.setState({ currentGroup: index, }); if (index == 1) { window.location.reload(); return; } if (item.path == 'dataScreen') { // this.props.dispatch({ // type: 'command/setMapStyle', // payload: 'dark' // }) } else { this.props.dispatch({ type: 'command/setMapStyle', payload: 'normal' }) } }} className={ this.state.currentGroup === index ? styles.selected : "" } > {item.menuName} ); })}
); } }