<template>
  <div class="header flex aic jcb">
    <div class="left flex aic">
      <!-- <img
        class="pointer"
        width="32"
        src="../../../assets/img/logo.png"
        alt="LOGO"
        @click="handleGoHome"
      /> -->
      <h1 class="title pointer" @click="handleGoHome">
        智慧政务一体化综合管理平台
      </h1>
      <HeaderSite class="mr50 ml20"></HeaderSite>
      <!-- 导航 -->
      <el-menu
        :default-active="activeMenu"
        mode="horizontal"
        router
        background-color="#2681e8"
        text-color="rgba(254, 254, 254, 0.65)"
      >
        <el-menu-item v-for="v in meuns" :key="v.path" :index="v.path">
          <i :class="v.meta.icon"></i>
          {{ v.meta.title }}
        </el-menu-item>
      </el-menu>
    </div>
    <!-- 返回门户 -->
    <div class="back-btn">
      <el-tooltip effect="dark" content="返回门户" placement="bottom">
        <a class="pointer" :href="portal">
          <i class="el-icon-s-home"></i> 返回门户
        </a>
      </el-tooltip>
    </div>
  </div>
</template>

<script>
import HeaderSite from "./HeaderSite.vue";
export default {
  components: {
    HeaderSite,
  },
  data() {
    return {
      portal: process.env.VUE_APP_API_portal_URL + "/#/home/siteArrange",
    };
  },
  computed: {
    activeMenu() {
      return this.$route.path;
    },
    meuns() {
      return this.$store.state.menus;
    },
  },
  created() {},
  methods: {
    handleGoHome() {
      this.$router.push("/basicsset");
    },
  },
};
</script>

<style lang="less" scoped>
.header {
  height: 64px;
  width: 100%;
  padding: 0px 24px;
  background-color: #2681e8;
  color: #fff;
  .title {
    font-size: 16px;
    font-weight: 500;
  }
  .back-btn {
    a {
      color: #fff;
      font-size: 14px;
    }
  }
}
/deep/.el-menu {
  border: none !important;
}
/deep/.el-menu-item {
  border: none !important;
  display: flex;
  align-items: center;
  i {
    color: rgba(254, 254, 254, 0.65);
  }
  &:hover {
    background-color: #2681e8 !important;
    color: #fff !important;
  }
}

/deep/.is-active {
  border: none !important;
  color: #fff !important;
  background-color: #1890ff !important;
}
</style>