| | |
| | | </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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | |
| | | import logo from '@/assets/images/topContainer/logo.png' |
| | | |
| | | import { mapGetters } from 'vuex' |
| | |
| | | }, |
| | | 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 |
| | |
| | | } |
| | | |
| | | .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; |
| | | } |
| | | |
| | | >* { |
| | |
| | | } |
| | | |
| | | .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 { |