吉安感知网项目-前端
张含笑
2026-01-27 dd57e0e9a989e7ee8b3e3473a7ee6a1dff06a4ae
applications/drone-command/src/page/index/top/index.vue
@@ -6,31 +6,24 @@
    </div>
    <div class="top-bar__right">
      <div class="icon-box">
        <top-lock v-if="setting.lock" />
        <top-qna />
        <top-full v-if="setting.fullscreen" title="全屏" />
        <img class="gateway" @click="jumpMH" src="@/assets/images/mh.svg" alt="进入门户" title="进入门户" width="20"
          height="20">
      </div>
      <div class="top-user">
        <img class="top-bar__img" :src="userInfo.avatar" alt="" />
        <div class="icon-box">
         <img class="gateway" @click="jumpMH" src="@/assets/images/mh.png" alt="进入门户" title="进入门户">
        </div>
        <el-dropdown>
        <el-dropdown popper-class="command-custom-dropdown">
          <span class="el-dropdown-link">
            {{ userInfo.real_name }}
            <el-icon class="el-icon--right">
              <arrow-down />
            </el-icon>
            <img class="top-bar__img" :src="userInfo.avatar" alt="" />
          </span>
          <template #dropdown>
            <el-dropdown-menu>
              <!--              <el-dropdown-item>
                <router-link to="/">{{ $t('navbar.dashboard') }}</router-link>
              </el-dropdown-item>-->
              <el-dropdown-item>
              <!-- <el-dropdown-item>
                <router-link to="/info/index">{{ $t('navbar.userinfo') }}</router-link>
              </el-dropdown-item>
              </el-dropdown-item> -->
              <el-dropdown-item @click="logout" divided>{{ $t('navbar.logOut') }}
              </el-dropdown-item>
            </el-dropdown-menu>
@@ -43,6 +36,8 @@
</template>
<script>
import { ElMessage, ElMessageBox } from 'element-plus'
import logo from '@/assets/images/topContainer/logo.png'
import { mapGetters } from 'vuex'
@@ -91,10 +86,11 @@
  },
  methods: {
    logout () {
      this.$confirm(this.$t('logoutTip'), this.$t('提示'), {
        confirmButtonText: this.$t('submitText'),
        cancelButtonText: this.$t('cancelText'),
      ElMessageBox.confirm(`是否退出系统, 是否继续?`, '提示', {
        type: 'warning',
        customClass: 'command-page-view-message-box',
        confirmButtonClass: 'command-message-box-confirm',
        cancelButtonClass: 'command-message-box-cancel',
      }).then(() => {
        this.$store.dispatch('LogOut').then(() => {
          const env = import.meta.env.VITE_APP_ENV
@@ -117,6 +113,7 @@
  justify-content: space-between;
  height: 100%;
  background: url('@/assets/images/topContainer/top-bg.png') center / 100% 100% no-repeat !important;
  pointer-events: none;
}
.top-bar__left {
@@ -153,19 +150,25 @@
}
.top-bar__right {
  margin-right: 28px;
  padding-top: 16px;
  flex: 0 0 auto;
  display: flex !important;
  align-items: center;
  align-items: flex-start;
  height: 100%;
  pointer-events: auto;
  box-sizing: border-box;
  .icon-box {
    margin-top: 6px;
    margin-right: 30px;
    display: flex;
    align-items: center;
    gap: 0 20px;
    .gateway {
      width: 25px;
      height: 25px;
      width: 21px;
      height: 18px;
    }
    >* {
@@ -185,10 +188,11 @@
}
.top-bar__img {
  width: 32px;
  height: 32px;
  margin-top: 5px;
  width: 20px;
  height: 20px;
  border: 2px solid #383874;
  border-radius: 50%;
  margin-right: 10px;
}
.el-dropdown-link {