|
@@ -1,29 +1,34 @@
|
|
<template>
|
|
<template>
|
|
<el-container>
|
|
<el-container>
|
|
- <el-header style="padding: 0"
|
|
|
|
- ><el-menu class="el-menu-demo" mode="horizontal">
|
|
|
|
|
|
+ <el-header style="padding: 0">
|
|
|
|
+ <el-menu class="el-menu-demo" mode="horizontal">
|
|
<el-menu-item index="1">
|
|
<el-menu-item index="1">
|
|
- <router-link to="/home/overview"> 云平台 </router-link></el-menu-item
|
|
|
|
|
|
+ <router-link to="/home/overview" style="text-decoration-line: none">
|
|
|
|
+ 云平台主页
|
|
|
|
+ </router-link>
|
|
|
|
+ </el-menu-item>
|
|
|
|
+ <el-submenu
|
|
|
|
+ index="2"
|
|
|
|
+ style="float: right;"
|
|
|
|
+ popper-class="submenu-style"
|
|
|
|
+ class="fr"
|
|
>
|
|
>
|
|
- <el-submenu index="2" style="float: right" class="fr">
|
|
|
|
<template slot="title">{{ user.rootOrgName }}</template>
|
|
<template slot="title">{{ user.rootOrgName }}</template>
|
|
- <el-menu-item index="2-1" style="width: 100px">
|
|
|
|
- <a href="javascript:void(0)" @click="openUserDialog">
|
|
|
|
- {{ user.displayName }}
|
|
|
|
- </a></el-menu-item
|
|
|
|
- >
|
|
|
|
- <el-menu-item index="2-2" style="width: 100px"
|
|
|
|
- ><a href="javascript:void(0)" @click="logout">
|
|
|
|
- <span>退出</span>
|
|
|
|
- </a></el-menu-item
|
|
|
|
- >
|
|
|
|
|
|
+ <el-menu-item index="2-1">
|
|
|
|
+ <span @click="openUserDialog" style="cursor: pointer">{{
|
|
|
|
+ user.displayName
|
|
|
|
+ }}</span>
|
|
|
|
+ </el-menu-item>
|
|
|
|
+ <el-menu-item index="2-2">
|
|
|
|
+ <span @click="logout" style="cursor: pointer">退出</span>
|
|
|
|
+ </el-menu-item>
|
|
</el-submenu>
|
|
</el-submenu>
|
|
</el-menu>
|
|
</el-menu>
|
|
</el-header>
|
|
</el-header>
|
|
|
|
|
|
<el-container>
|
|
<el-container>
|
|
- <HomeSide :key="$route.path" />
|
|
|
|
- <el-container>
|
|
|
|
|
|
+ <HomeSide v-if="ifShowHomeSide" :key="sideKey" />
|
|
|
|
+ <el-container class="main-body">
|
|
<router-view></router-view>
|
|
<router-view></router-view>
|
|
<el-footer>© 启明泰和 2019</el-footer>
|
|
<el-footer>© 启明泰和 2019</el-footer>
|
|
</el-container>
|
|
</el-container>
|
|
@@ -31,7 +36,7 @@
|
|
|
|
|
|
<!-- 添加用户信息弹出框 -->
|
|
<!-- 添加用户信息弹出框 -->
|
|
<el-dialog title="个人信息" :visible.sync="userDialog">
|
|
<el-dialog title="个人信息" :visible.sync="userDialog">
|
|
- <el-tabs>
|
|
|
|
|
|
+ <el-tabs value="first">
|
|
<el-tab-pane label="用户权限" name="first">
|
|
<el-tab-pane label="用户权限" name="first">
|
|
<el-form :inline="true" label-position="right" label-width="90px">
|
|
<el-form :inline="true" label-position="right" label-width="90px">
|
|
<el-row :gutter="10">
|
|
<el-row :gutter="10">
|
|
@@ -133,7 +138,14 @@ export default {
|
|
},
|
|
},
|
|
components: { HomeSide },
|
|
components: { HomeSide },
|
|
computed: {
|
|
computed: {
|
|
- ...mapState({ user: state => state.user })
|
|
|
|
|
|
+ ...mapState({ user: state => state.user }),
|
|
|
|
+ ifShowHomeSide() {
|
|
|
|
+ return location.pathname.startsWith("/home") === false;
|
|
|
|
+ },
|
|
|
|
+ sideKey() {
|
|
|
|
+ const module = this.$route.fullPath.split("/")[1];
|
|
|
|
+ return module;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapActions([USER_SIGNOUT]),
|
|
...mapActions([USER_SIGNOUT]),
|
|
@@ -224,7 +236,18 @@ export default {
|
|
text-align: center;
|
|
text-align: center;
|
|
line-height: 60px;
|
|
line-height: 60px;
|
|
}
|
|
}
|
|
|
|
+
|
|
body > .el-container {
|
|
body > .el-container {
|
|
margin-bottom: 40px;
|
|
margin-bottom: 40px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.main-body {
|
|
|
|
+ min-height: calc(100vh - 60px);
|
|
|
|
+}
|
|
|
|
+</style>
|
|
|
|
+
|
|
|
|
+<style>
|
|
|
|
+.submenu-style .el-menu {
|
|
|
|
+ min-width: 100px !important;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|