<template>
  <div class="rxHeader">
    <div class="icon-box" @click="CHANGECOLL">
      <i class="el-icon-s-fold" style="width: 25px;height: 25px;font-size: 25px;" v-if="!leftMenuCollapsed"/>
      <i class="el-icon-s-unfold" style="width: 25px;height: 25px;font-size: 25px;" v-if="leftMenuCollapsed"/>
    </div>
    <!--        <Breadcrumb></Breadcrumb>-->
    <div class="avator-box">

      <i class="el-icon-bell" style="width: 25px;height: 25px;font-size: 25px;margin-right: 20px;"/>
      <span style="color:red;" @click="logout">退出登录</span>
    </div>
  </div>
</template>

<script>
import {mapGetters, mapMutations} from 'vuex'
import {exitFullscreen, launchFullscreen} from '@/util/index'


export default {
  name: "rxHeader",

  methods: {

    logout(){
      this.$router.push({
        name:"login"
      })
    },
    ...mapMutations(['CHANGECOLL']),
    handleCommand(command) {
      if (command == 'logOut') {
        document.cookie = `sh-token=`
        this.$router.push({name: "login"})
      }
      if (command == 'changeShop') {
        this.dialogVisible = true
        this.getAuthShop()
      }
    },
  },
  mounted() {

  },
  computed: {
    ...mapGetters(['leftMenuCollapsed','userInfo']),

  },
  watch: {
    isFull(v) {
      if (v) {
        launchFullscreen(document.documentElement)
      } else {
        exitFullscreen();
      }
    },
  },
  data() {
    return {
      isFull: false,
      dialogVisible: false,
      employeeName: '',
      employeeId: '',
      url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'
    }
  },

}
</script>

<style scoped lang="less">
.rxHeader {
  padding: 0 20px;
  box-sizing: border-box;
  height: 61px;
  background-color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /*border-bottom: 1px solid #e6e6e6;*/

  .screen-icon-box {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .icon-box {
    /*margin-left: 20px;*/
    font-size: 20px;
    cursor: pointer;

    &:hover {
      color: #001529;
    }
  }

  .avator-box {
    display: flex;
    align-items: center;
    flex-direction: row;

    .username {
      margin-left: 15px;
      font-size: 16px;
    }


    .avatar {
      margin-right: 20px;
    }
  }

  .el-dropdown-link {
    display: flex;
    align-items: center;
  }
}
</style>
