|
@@ -187,11 +187,15 @@ import localNavs from "@/constants/navs";
|
|
import { deepCopy } from "@/plugins/utils";
|
|
import { deepCopy } from "@/plugins/utils";
|
|
import { sysMenu, logout } from "../modules/login/api";
|
|
import { sysMenu, logout } from "../modules/login/api";
|
|
import ResetPwd from "../modules/base/components/ResetPwd";
|
|
import ResetPwd from "../modules/base/components/ResetPwd";
|
|
|
|
+import { SYS_ADMIN_NAME } from "@/constants/enumerate";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "home",
|
|
name: "home",
|
|
components: { ResetPwd },
|
|
components: { ResetPwd },
|
|
data() {
|
|
data() {
|
|
|
|
+ const IS_SUPER_ADMIN =
|
|
|
|
+ this.$ls.get("user", { loginName: "" }).loginName === SYS_ADMIN_NAME;
|
|
|
|
+
|
|
return {
|
|
return {
|
|
menus: [],
|
|
menus: [],
|
|
curMenu: { name: "" },
|
|
curMenu: { name: "" },
|
|
@@ -202,7 +206,8 @@ export default {
|
|
userRoles: this.$ls.get("user", { roleList: [] }).roleList,
|
|
userRoles: this.$ls.get("user", { roleList: [] }).roleList,
|
|
schoolLogo: this.$ls.get("schoolLogo"),
|
|
schoolLogo: this.$ls.get("schoolLogo"),
|
|
schoolName: this.$ls.get("schoolName"),
|
|
schoolName: this.$ls.get("schoolName"),
|
|
- menuDailogIsShow: false
|
|
|
|
|
|
+ menuDailogIsShow: false,
|
|
|
|
+ IS_SUPER_ADMIN
|
|
};
|
|
};
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -355,7 +360,7 @@ export default {
|
|
this.$router.push({ name: "Login" });
|
|
this.$router.push({ name: "Login" });
|
|
},
|
|
},
|
|
toSelectSchool() {
|
|
toSelectSchool() {
|
|
- this.$router.push({ name: "SelectSchool" });
|
|
|
|
|
|
+ if (this.IS_SUPER_ADMIN) this.$router.push({ name: "SelectSchool" });
|
|
},
|
|
},
|
|
// popover menu
|
|
// popover menu
|
|
showMenu() {
|
|
showMenu() {
|