<template>
  <div class="nav-top">
    <div class="nav-head">
      <div class="nav-title">患者360全息视图</div>
      <div class="nav-right">
        <i class="el-icon-switch-button"></i>
        退出
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  data () {
    return {
      options: [],
      copyOptions: [],
    }
  },
  methods: {
    toggleSideBar () {
      this.$store.dispatch('app/toggleSideBar')
    },
    async logout () {
      this.$confirm('确定注销并退出系统吗？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      })
        .then(() => {
          this.$store.dispatch('LogOut').then(() => {
            // if (!process.env.VUE_APP_CASENABLE) {
            if (process.env.VUE_APP_CASENABLE !== 'true') {
              // location.href = this.$router.options.base + "/index";
              location.href = this.$route.path
              // location.href = "/index";
            }

            // location.href = "/index";
          })
        })
        .catch(() => {
        })
    },
  }
}
</script>

<style lang="scss" scoped>
.nav-top{
  background: #0A69F3;
  color: white;
  height: 50px;
  line-height: 50px;
  .nav-head{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    .nav-title{
      font-weight: bold;
      font-size: 20px;
    }
  }

}
</style>
