Compare commits
No commits in common. "5e838368cb6084c078f17ee40fc2c36a3201f3c3" and "6d1663f282c1e331eb1fb5cb85bb6c14f0919dae" have entirely different histories.
5e838368cb
...
6d1663f282
|
@ -1,12 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="navbar">
|
<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" />
|
<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 && false ">当前租户:{{ data.comName }}</el-tag>
|
<el-tag class="cur-comp" v-if="data.comName">当前租户:{{ 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" />
|
||||||
|
@ -21,9 +22,7 @@
|
||||||
<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>
|
<el-icon><caret-bottom /></el-icon>
|
||||||
<caret-bottom />
|
|
||||||
</el-icon>
|
|
||||||
</div>
|
</div>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
|
@ -64,20 +63,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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,19 +84,17 @@ function logout() {
|
||||||
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning',
|
type: 'warning'
|
||||||
})
|
}).then(() => {
|
||||||
.then(() => {
|
|
||||||
userStore.logOut().then(() => {
|
userStore.logOut().then(() => {
|
||||||
location.href = '#/index'
|
location.href = '#/index';
|
||||||
})
|
})
|
||||||
})
|
}).catch(() => { });
|
||||||
.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