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