|
@@ -1,10 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="nav-bar">
|
|
<div class="nav-bar">
|
|
<div class="nav-bar-logo">
|
|
<div class="nav-bar-logo">
|
|
- <img
|
|
|
|
- src="https://img.alicdn.com/tfs/TB13UQpnYGYBuNjy0FoXXciBFXa-242-134.png"
|
|
|
|
- width="40"
|
|
|
|
- />
|
|
|
|
|
|
+ <img :src="schoolLogo" />
|
|
<!-- <span class="site-name">ADMIN LITE</span> -->
|
|
<!-- <span class="site-name">ADMIN LITE</span> -->
|
|
</div>
|
|
</div>
|
|
<div class="nav-bar-menu menu-list">
|
|
<div class="nav-bar-menu menu-list">
|
|
@@ -64,6 +61,9 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
|
|
+ schoolLogo() {
|
|
|
|
+ return this.$store.state.schoolLogo;
|
|
|
|
+ },
|
|
username() {
|
|
username() {
|
|
return this.$store.state.user.name;
|
|
return this.$store.state.user.name;
|
|
},
|
|
},
|
|
@@ -95,6 +95,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
actCurNav() {
|
|
actCurNav() {
|
|
const curRouterName = this.$route.meta.relate || this.$route.name;
|
|
const curRouterName = this.$route.meta.relate || this.$route.name;
|
|
|
|
+ this.curNav = null;
|
|
this.navs.forEach((nav) => {
|
|
this.navs.forEach((nav) => {
|
|
if (this.curNav) return;
|
|
if (this.curNav) return;
|
|
let curRouter = null;
|
|
let curRouter = null;
|
|
@@ -104,12 +105,14 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
- if (curRouter) this.toPage(nav);
|
|
|
|
|
|
+ if (curRouter) {
|
|
|
|
+ this.curNav = nav.name;
|
|
|
|
+ this.$emit("on-nav-change", nav.name);
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
toPage(nav) {
|
|
toPage(nav) {
|
|
- this.curNav = nav.name;
|
|
|
|
- this.$emit("on-nav-change", nav.name);
|
|
|
|
|
|
+ this.$router.push({ name: nav.redirect });
|
|
},
|
|
},
|
|
async toLogout() {
|
|
async toLogout() {
|
|
const result = await this.$confirm("确定要退出登录吗?", "退出确认", {
|
|
const result = await this.$confirm("确定要退出登录吗?", "退出确认", {
|
|
@@ -209,13 +212,13 @@ export default {
|
|
&-logo {
|
|
&-logo {
|
|
width: 220px;
|
|
width: 220px;
|
|
float: left;
|
|
float: left;
|
|
- padding: 14px 30px;
|
|
|
|
|
|
+ padding: 10px 30px;
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
- line-height: 32px;
|
|
|
|
|
|
+ line-height: 40px;
|
|
> img {
|
|
> img {
|
|
display: block;
|
|
display: block;
|
|
max-width: 160px;
|
|
max-width: 160px;
|
|
- height: 32px;
|
|
|
|
|
|
+ height: 40px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
&-menu {
|
|
&-menu {
|