lcw
This commit is contained in:
@ -56,12 +56,13 @@ onMounted(() => {
|
||||
active.value = "LZ";
|
||||
});
|
||||
const logout = () => {
|
||||
window.opener = null;
|
||||
window.open('', '_self');
|
||||
window.close();
|
||||
store.commit("app/clearTag", null, { immediate: true });
|
||||
store.commit("permission/deleteRouter", { immediate: true });
|
||||
store.commit("user/deleteKeepLiiveRoute", "home");
|
||||
store.dispatch("user/logout");
|
||||
// window.opener = null;
|
||||
// window.open('', '_self');
|
||||
// window.close();
|
||||
// store.commit("app/clearTag", null, { immediate: true });
|
||||
// store.commit("permission/deleteRouter", { immediate: true });
|
||||
// store.commit("user/deleteKeepLiiveRoute", "home");
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,19 +1,8 @@
|
||||
<template>
|
||||
<el-menu
|
||||
class="el-menu-vertical-demo"
|
||||
:collapse="!$store.getters.sidebarOpened"
|
||||
:default-active="activeMenu"
|
||||
:unique-opened="true"
|
||||
background-color="rgba(0, 0, 0, 0)"
|
||||
:text-color="$store.getters.cssVar.menuText"
|
||||
:active-text-color="$store.getters.cssVar.menuActiveText"
|
||||
router
|
||||
>
|
||||
<SideBarItem
|
||||
v-for="item in routes"
|
||||
:key="item.path"
|
||||
:route="item"
|
||||
></SideBarItem>
|
||||
<el-menu class="el-menu-vertical-demo" :collapse="!$store.getters.sidebarOpened" :default-active="activeMenu"
|
||||
:unique-opened="true" background-color="rgba(0, 0, 0, 0)" :text-color="$store.getters.cssVar.menuText"
|
||||
:active-text-color="$store.getters.cssVar.menuActiveText" router>
|
||||
<SideBarItem v-for="item in routes" :key="item.path" :route="item"></SideBarItem>
|
||||
</el-menu>
|
||||
</template>
|
||||
|
||||
@ -27,7 +16,19 @@ const store = useStore();
|
||||
const router = useRouter();
|
||||
const routes = computed(() => {
|
||||
const fRoutes = filterRoutes(router.getRoutes());
|
||||
return generateMenus(fRoutes);
|
||||
const data = fRoutes.filter(item => {
|
||||
if (item.name != "warningLists"
|
||||
&& item.name != "behaviorWarnings"
|
||||
&& item.name != "identityWarnings"
|
||||
&& item.name != "combinedWarnings"
|
||||
&& item.name != "DeploymentAreas"
|
||||
&& item.name != "mpvPeos"
|
||||
&& item.name != "myControls") {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
)
|
||||
return generateMenus(data);
|
||||
});
|
||||
if (!store.getters.token) {
|
||||
router.push("/login");
|
||||
@ -50,27 +51,28 @@ const activeMenu = computed(() => {
|
||||
::v-deep .el-menu-item {
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
::v-deep .el-sub-menu__title {
|
||||
height: 48px;
|
||||
color: rgb(255, 255, 255);
|
||||
background-color: rgb(20, 46, 78);
|
||||
}
|
||||
|
||||
::v-deep .el-menu-item.is-active {
|
||||
background-image: linear-gradient(to right,#2356d4 0% ,#8efbde 100%);
|
||||
background-image: linear-gradient(to right, #2356d4 0%, #8efbde 100%);
|
||||
margin: 0 14px;
|
||||
border-radius: 4px;
|
||||
// padding-left: 46px !important;
|
||||
}
|
||||
|
||||
::v-deep .el-sub-menu .el-menu-item {
|
||||
height: 48px;
|
||||
line-height: 48px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
.el-menu-vertical-demo:not(.el-menu--collapse) {
|
||||
width: 281px;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user