|
@@ -1,70 +1,74 @@
|
|
<template>
|
|
<template>
|
|
- <div class="layout-navbars-breadcrumb-user" :style="{ flex: layoutUserFlexNum }">
|
|
|
|
- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onComponentSizeChange">
|
|
|
|
- <div class="layout-navbars-breadcrumb-user-icon">
|
|
|
|
- <i class="iconfont icon-ziti" :title="$t('message.user.title0')"></i>
|
|
|
|
- </div>
|
|
|
|
- <template #dropdown>
|
|
|
|
- <el-dropdown-menu>
|
|
|
|
- <el-dropdown-item command="large" :disabled="disabledSize === 'large'">{{ $t('message.user.dropdownLarge') }}</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="default" :disabled="disabledSize === 'default'">{{ $t('message.user.dropdownDefault') }}</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="small" :disabled="disabledSize === 'small'">{{ $t('message.user.dropdownSmall') }}</el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </template>
|
|
|
|
- </el-dropdown>
|
|
|
|
- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onLanguageChange">
|
|
|
|
- <div class="layout-navbars-breadcrumb-user-icon">
|
|
|
|
- <i class="iconfont" :class="disabledI18n === 'en' ? 'icon-fuhao-yingwen' : 'icon-fuhao-zhongwen'" :title="$t('message.user.title1')"></i>
|
|
|
|
- </div>
|
|
|
|
- <template #dropdown>
|
|
|
|
- <el-dropdown-menu>
|
|
|
|
- <el-dropdown-item command="zh-cn" :disabled="disabledI18n === 'zh-cn'">简体中文</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="en" :disabled="disabledI18n === 'en'">English</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="zh-tw" :disabled="disabledI18n === 'zh-tw'">繁體中文</el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </template>
|
|
|
|
- </el-dropdown>
|
|
|
|
- <div class="layout-navbars-breadcrumb-user-icon" @click="onSearchClick">
|
|
|
|
- <el-icon :title="$t('message.user.title2')">
|
|
|
|
- <ele-Search />
|
|
|
|
- </el-icon>
|
|
|
|
- </div>
|
|
|
|
- <div class="layout-navbars-breadcrumb-user-icon" @click="onLayoutSetingClick">
|
|
|
|
- <i class="icon-skin iconfont" :title="$t('message.user.title3')"></i>
|
|
|
|
- </div>
|
|
|
|
- <div class="layout-navbars-breadcrumb-user-icon">
|
|
|
|
- <el-popover placement="bottom" trigger="click" :width="300">
|
|
|
|
- <template #reference>
|
|
|
|
- <el-badge :is-dot="true">
|
|
|
|
- <el-icon :title="$t('message.user.title4')">
|
|
|
|
- <ele-Bell />
|
|
|
|
- </el-icon>
|
|
|
|
- </el-badge>
|
|
|
|
- </template>
|
|
|
|
- <UserNews />
|
|
|
|
- </el-popover>
|
|
|
|
- </div>
|
|
|
|
- <div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick">
|
|
|
|
- <i class="iconfont" :title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')" :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"></i>
|
|
|
|
- </div>
|
|
|
|
- <el-dropdown :show-timeout="70" :hide-timeout="50" @command="onHandleCommandClick">
|
|
|
|
- <span class="layout-navbars-breadcrumb-user-link">
|
|
|
|
- <img :src="getUserInfos.avatar" class="layout-navbars-breadcrumb-user-link-photo mr5" />
|
|
|
|
- {{ getUserInfos.userName === '' ? 'common' : getUserInfos.userName }}
|
|
|
|
- <el-icon class="el-icon--right">
|
|
|
|
- <ele-ArrowDown />
|
|
|
|
- </el-icon>
|
|
|
|
- </span>
|
|
|
|
- <template #dropdown>
|
|
|
|
- <el-dropdown-menu>
|
|
|
|
- <el-dropdown-item command="/home">{{ $t('message.user.dropdown1') }}</el-dropdown-item>
|
|
|
|
- <el-dropdown-item command="/personal">{{ $t('message.user.dropdown2') }}</el-dropdown-item>
|
|
|
|
- <el-dropdown-item divided command="logOut">{{ $t('message.user.dropdown5') }}</el-dropdown-item>
|
|
|
|
- </el-dropdown-menu>
|
|
|
|
- </template>
|
|
|
|
- </el-dropdown>
|
|
|
|
- <Search ref="searchRef" />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="layout-navbars-breadcrumb-user" :style="{ flex: layoutUserFlexNum }">
|
|
|
|
+ <!-- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onComponentSizeChange">
|
|
|
|
+ <div class="layout-navbars-breadcrumb-user-icon">
|
|
|
|
+ <i class="iconfont icon-ziti" :title="$t('message.user.title0')"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <template #dropdown>
|
|
|
|
+ <el-dropdown-menu>
|
|
|
|
+ <el-dropdown-item command="large" :disabled="disabledSize === 'large'">{{ $t('message.user.dropdownLarge') }}</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="default" :disabled="disabledSize === 'default'">{{ $t('message.user.dropdownDefault') }}</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="small" :disabled="disabledSize === 'small'">{{ $t('message.user.dropdownSmall') }}</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dropdown> -->
|
|
|
|
+ <!-- <el-dropdown :show-timeout="70" :hide-timeout="50" trigger="click" @command="onLanguageChange">
|
|
|
|
+ <div class="layout-navbars-breadcrumb-user-icon">
|
|
|
|
+ <i class="iconfont" :class="disabledI18n === 'en' ? 'icon-fuhao-yingwen' : 'icon-fuhao-zhongwen'" :title="$t('message.user.title1')"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <template #dropdown>
|
|
|
|
+ <el-dropdown-menu>
|
|
|
|
+ <el-dropdown-item command="zh-cn" :disabled="disabledI18n === 'zh-cn'">简体中文</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="en" :disabled="disabledI18n === 'en'">English</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="zh-tw" :disabled="disabledI18n === 'zh-tw'">繁體中文</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dropdown> -->
|
|
|
|
+ <div class="layout-navbars-breadcrumb-user-icon" @click="onSearchClick">
|
|
|
|
+ <el-icon :title="$t('message.user.title2')">
|
|
|
|
+ <ele-Search />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layout-navbars-breadcrumb-user-icon" @click="onLayoutSetingClick">
|
|
|
|
+ <i class="icon-skin iconfont" :title="$t('message.user.title3')"></i>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layout-navbars-breadcrumb-user-icon">
|
|
|
|
+ <el-popover placement="bottom" trigger="click" :width="300">
|
|
|
|
+ <template #reference>
|
|
|
|
+ <el-badge :is-dot="true">
|
|
|
|
+ <el-icon :title="$t('message.user.title4')">
|
|
|
|
+ <ele-Bell />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </el-badge>
|
|
|
|
+ </template>
|
|
|
|
+ <UserNews />
|
|
|
|
+ </el-popover>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="layout-navbars-breadcrumb-user-icon mr10" @click="onScreenfullClick">
|
|
|
|
+ <i
|
|
|
|
+ class="iconfont"
|
|
|
|
+ :title="isScreenfull ? $t('message.user.title6') : $t('message.user.title5')"
|
|
|
|
+ :class="!isScreenfull ? 'icon-fullscreen' : 'icon-tuichuquanping'"
|
|
|
|
+ ></i>
|
|
|
|
+ </div>
|
|
|
|
+ <el-dropdown :show-timeout="70" :hide-timeout="50" @command="onHandleCommandClick">
|
|
|
|
+ <span class="layout-navbars-breadcrumb-user-link">
|
|
|
|
+ <img :src="getUserInfos.avatar" class="layout-navbars-breadcrumb-user-link-photo mr5" />
|
|
|
|
+ {{ getUserInfos.userName === '' ? 'common' : getUserInfos.userName }}
|
|
|
|
+ <el-icon class="el-icon--right">
|
|
|
|
+ <ele-ArrowDown />
|
|
|
|
+ </el-icon>
|
|
|
|
+ </span>
|
|
|
|
+ <template #dropdown>
|
|
|
|
+ <el-dropdown-menu>
|
|
|
|
+ <el-dropdown-item command="/home">{{ $t('message.user.dropdown1') }}</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item command="/personal">{{ $t('message.user.dropdown2') }}</el-dropdown-item>
|
|
|
|
+ <el-dropdown-item divided command="logOut">{{ $t('message.user.dropdown5') }}</el-dropdown-item>
|
|
|
|
+ </el-dropdown-menu>
|
|
|
|
+ </template>
|
|
|
|
+ </el-dropdown>
|
|
|
|
+ <Search ref="searchRef" />
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
@@ -155,13 +159,13 @@ export default defineComponent({
|
|
},
|
|
},
|
|
})
|
|
})
|
|
.then(async () => {
|
|
.then(async () => {
|
|
|
|
+ await api.login.logout();
|
|
Session.clear(); // 清除缓存/token等
|
|
Session.clear(); // 清除缓存/token等
|
|
await resetRoute(); // 删除/重置路由
|
|
await resetRoute(); // 删除/重置路由
|
|
ElMessage.success(t('message.user.logOutSuccess'));
|
|
ElMessage.success(t('message.user.logOutSuccess'));
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
window.location.href = ''; // 去登录页
|
|
window.location.href = ''; // 去登录页
|
|
}, 500);
|
|
}, 500);
|
|
- api.login.logout();
|
|
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
} else if (path === 'wareHouse') {
|
|
} else if (path === 'wareHouse') {
|