|
@@ -10,6 +10,10 @@
|
|
|
<i class="el-icon-s-home"></i>
|
|
|
<span>切换学校</span>
|
|
|
</li>
|
|
|
+ <li class="menu-item menu-item-account">
|
|
|
+ <i class="el-icon-s-custom"></i>
|
|
|
+ <span :title="username">{{ username }}</span>
|
|
|
+ </li>
|
|
|
<li class="menu-item" @click="toLogout">
|
|
|
<i class="el-icon-switch-button"></i>
|
|
|
<span>退出登录</span>
|
|
@@ -80,6 +84,7 @@
|
|
|
|
|
|
<script>
|
|
|
import localNavs from "@/constants/adminNavs";
|
|
|
+import { SYS_ADMIN_NAME } from "@/constants/enumerate";
|
|
|
import { logout } from "@/modules/login/api";
|
|
|
|
|
|
export default {
|
|
@@ -99,6 +104,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ const loginName = this.$ls.get("user", { loginName: "" }).loginName;
|
|
|
+ if (loginName !== SYS_ADMIN_NAME) {
|
|
|
+ this.$message.error("非法操作!");
|
|
|
+ this.$router.replace({ name: "Login" });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
if (this.$route.name === "Admin") {
|
|
|
this.$router.replace({
|
|
|
name: "AdminUserManage"
|