后台隐藏头部
parent
c50517a26c
commit
1b80070208
|
@ -1,13 +1,12 @@
|
|||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container"
|
||||
@toggleClick="toggleSideBar" />
|
||||
<hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!settingsStore.topNav" />
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="settingsStore.topNav" />
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="appStore.device !== 'mobile'">
|
||||
<el-tag class="cur-comp" v-if="data.comName">当前租户:{{ data.comName }}</el-tag>
|
||||
<el-tag class="cur-comp" v-if="data.comName && false ">当前租户:{{ data.comName }}</el-tag>
|
||||
<current-project id="current-project" class="right-menu-item" />
|
||||
|
||||
<header-search id="header-search" class="right-menu-item" />
|
||||
|
@ -22,7 +21,9 @@
|
|||
<el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
<img :src="userStore.avatar" class="user-avatar" />
|
||||
<el-icon><caret-bottom /></el-icon>
|
||||
<el-icon>
|
||||
<caret-bottom />
|
||||
</el-icon>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
|
@ -63,20 +64,20 @@ const data = reactive({
|
|||
comName: '',
|
||||
})
|
||||
function toggleSideBar() {
|
||||
appStore.toggleSideBar();
|
||||
userStore.getTasks(); // 动态获取用户代办任务
|
||||
appStore.toggleSideBar()
|
||||
userStore.getTasks() // 动态获取用户代办任务
|
||||
}
|
||||
|
||||
function handleCommand(command) {
|
||||
switch (command) {
|
||||
case "setLayout":
|
||||
setLayout();
|
||||
break;
|
||||
case "logout":
|
||||
logout();
|
||||
break;
|
||||
case 'setLayout':
|
||||
setLayout()
|
||||
break
|
||||
case 'logout':
|
||||
logout()
|
||||
break
|
||||
default:
|
||||
break;
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,17 +85,19 @@ function logout() {
|
|||
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
userStore.logOut().then(() => {
|
||||
location.href = '#/index';
|
||||
type: 'warning',
|
||||
})
|
||||
}).catch(() => { });
|
||||
.then(() => {
|
||||
userStore.logOut().then(() => {
|
||||
location.href = '#/index'
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
|
||||
const emits = defineEmits(['setLayout'])
|
||||
function setLayout() {
|
||||
emits('setLayout');
|
||||
emits('setLayout')
|
||||
}
|
||||
data.comName = userStore.currentComName
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue