<template>
<div class="seccontainer">
    <el-row class="flex ai-c max-h">
        <el-col :span="8" class="flex ai-c">
          <img style="width: 37px;height:34px;margin-right:10px;margin-left: 20px;" src="/public/images/cim/logo-white.png" />
          <span style="height:23px;margin-right:10px;margin-top:-18px;color: #FFFFFF;font-size: 28px;">{{ title }}</span>
        </el-col>
        <el-col :span="12">
          <div>
  
          </div>
        </el-col>
        <el-col :span="4" class="flex jc-e">
          <div class="managebox" @click="gomanage">后台管理</div>
          <div style="width: 120px" class="flex ai-c">
            <el-dropdown>
              <span>
                <div class="flex ai-c">
                    <img style="width: 26px;height:28px;margin-top: -5px;" src="/public/images/cim/user.png" alt="">
                    <div style="color: #fff;margin: -5px 10px 0">{{ userName }}</div>
                </div>
              </span>
              <template #dropdown>
                <el-dropdown-menu>
                  <el-dropdown-item @click="handleLoginOut()">退出登录</el-dropdown-item>
                </el-dropdown-menu>
              </template>
            </el-dropdown>
          </div>
        </el-col>
      </el-row>
</div>
</template>
<script lang="ts" setup>
import { ref, watch, onMounted, computed } from 'vue';
import { useUserStore } from '@/store/modules/user';
import { useRouter } from 'vue-router';

const route: any = useRouter();
const userStore = useUserStore();
const title = ref('费县企业资产信息调查一体化平台')
const userName = ref()

onMounted(() => {
    userName.value = localStorage.getItem('fireUserLoginName');
})
function handleLoginOut() {
    userStore.confirmLoginOut();
}
function gomanage(){
  route.push({ path: '/informationbank/enterpriseinfo' })
}             

</script>
<style scoped>
.flex{
    display: flex;
}
.ai-c{
    align-items: center;
}
.jc-c{
    justify-content: center;
}
.jc-sb{
    justify-content: space-between;
}
.js-sa{
    justify-content: space-around
}
.jc-e{
    justify-content: end
}
.max-h{
    height: 100%;
}
.seccontainer{
    width: 100%;
    height: 57px;
    background: url("/images/cim/headerbg.png");
    background-size: 100% 100%;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
}
.managebox{
  color: #fff;
  font-size: 14px;
  margin-right: 20px;
  cursor: pointer;
}
</style>