<template>
  <div>
    <div v-show="isLogin" class="left-menu">
        <hamburger class="hamburger-container" :is-active="opened" @toggleClick="toggleSideBar" />
      <div>
      </div>
      <div class="title">
        <p style="margin-top:15px">智慧运营管理中心</p>
      </div>
      <el-select class="select-btn" v-model="value" placeholder="主语国际3号楼">
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
        </el-option>
      </el-select>
    </div>
    <div v-show="isLogin" class="right-menu">
      <el-image class="labtap" :src="require('@/assets/images/diannao@3x.png')"></el-image>
      <el-image class="phone" :src="require('@/assets/images/shouji-4@3x.png')"></el-image>
      <el-image class="help" :src="require('@/assets/images/help@3x.png')"></el-image>
      <el-image class="notification" :src="require('@/assets/images/tongzhi@3x.png')"></el-image>
      <div class="userinfo">
        <el-avatar :size="35" :src="circleUrl"></el-avatar>
        <el-dropdown>
          <el-button class="usernameBtn" style="color: white;font-size: 18px">
            <el-icon class="el-icon-user"></el-icon>
            <span style="display: inline-block;margin-left: 8px"></span>
          </el-button>
          <!--|||-->
          <el-dropdown-menu></el-dropdown-menu>
        </el-dropdown>
      </div>
    </div>
  </div>
</template>

<script>
import hamburger from '@/components/Hamburger/index'
export default {
  components: { hamburger },
  props: {
    leftVisible: Boolean,
    //isLogin: Boolean,
  },
  data() {
    return {
      value: '主语国际3号楼',
      options: {

      },
      isLogin: true,
      opened: false,
      name: "test",
      circleUrl: "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
      isCollapse: false
    }
  },
  mounted(){
    this.$emit('collapseControl', this.isCollapse);
  },
  methods: {
    toggleSideBar() {
      this.isCollapse = !this.isCollapse;
      this.$emit('collapseControl', this.isCollapse);
    }
  }
}
</script>

<style lang="less" scoped>
.left-menu {
  float: left;
  height: 100%;
  line-height: 35px;
  width: 700px;

  .hamburger-container {
    position: absolute;
    line-height: 64px;
    left: 0;
    width: 64px;
    float: left;
    cursor: pointer;
    transition: background .3s;
    background-color: #368FCD;
    ;
    -webkit-tap-highlight-color: transparent;

    &:hover {
      background: #266999;
    }
  }

  .title {
    position: absolute;
    left: 130px;
    width: 320px;
    height: 64px;
    color: rgba(255, 255, 255, 1);
    text-align: center;
    letter-spacing: 15px;
    font-size: 25px;
  }

  .select-btn {
    position: absolute;
    left: 480px;
    top: 15px;
    width: 205px;
    height: 36px;
    line-height: 23px;
    color: rgba(226, 229, 231, 1);
    font-size: 16px;
    text-align: center;

    /deep/.el-input__inner {
      background-color: #5186be;
      color: rgba(226, 229, 231, 1);
      border: 1px solid #5186be;
      border-radius: 20px;
    }
  }
}

.right-menu {
  float: right;
  height: 100%;
  line-height: 50px;
  width: 344px;

  &:focus {
    outline: none;
  }

  .el-image {
    &:hover {
      background-color: #186399;
      height: 25px;
      width: 25px;
    }
  }

  .labtap {
    position: absolute;
    float: right;
    right: 355px;
    top: 20px;
    width: 20px;
    height: 20px;
  }

  .phone {
    position: absolute;
    float: right;
    right: 320px;
    top: 20px;
    width: 20px;
    height: 20px;
  }

  .help {
    position: absolute;
    float: right;
    right: 285px;
    top: 20px;
    width: 20px;
    height: 20px;
  }

  .notification {
    position: absolute;
    float: right;
    right: 250px;
    top: 20px;
    width: 20px;
    height: 20px;
  }

  .el-avatar {
    position: absolute;
    float: right;
    right: 100px;
    top: 6px;
    width: 50px;
    height: 50px;
  }

  .userinfo {
    position: absolute;
    float: right;
    right: 86px;
    width: 98px;
    height: 50px;
    top: 7px;
    bottom: 7px;
    color: rgba(255, 255, 255, 1);

    .usernameBtn {
      width: 120px;
      margin: 5px 0 0 15px;
      border: 0;
      border-radius: 10px;
      background-color: #48BBE4;
      height: 40px;

      &:hover {
        background-color: #3c9cd3;
      }

      .el-icon-user {
        margin-right: 100px;
      }
    }
  }
}
</style>
