| | |
| | | <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"> |
| | | <img class="top-bar__img" :src="userInfo.avatar" alt="" /> |
| | | </span> |
| | |
| | | <!-- <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 |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | env === 'development' ? this.$router.push({ path: '/login' }) : window.location.replace(`${adminUrl}#/login`) |
| | | this.$router.push({ path: '/login' }) |
| | | // env === 'development' ? this.$router.push({ path: '/login' }) : window.location.replace(`${adminUrl}#/login`) |
| | | }) |
| | | }) |
| | | }, |
| | | jumpMH () { |
| | | const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | window.location.href = `${adminUrl}#/gatewayPage` |
| | | // const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL |
| | | // window.location.href = `${adminUrl}#/gatewayPage` |
| | | }, |
| | | }, |
| | | } |
| | |
| | | |
| | | .top-bar__img { |
| | | margin-top: 5px; |
| | | width: 16px; |
| | | height: 21px; |
| | | width: 20px; |
| | | height: 20px; |
| | | border: 2px solid #383874; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .el-dropdown-link { |