|
@@ -56,6 +56,9 @@ export const userStoreActions = {
|
|
|
setCurrentCompany: "user/setCurrentCompany",
|
|
|
};
|
|
|
const ids = ["36", "37", "44", "109"];
|
|
|
+
|
|
|
+const tearchChenId = "37"
|
|
|
+
|
|
|
const state = {
|
|
|
token: getToken(),
|
|
|
name: "",
|
|
@@ -72,6 +75,7 @@ const state = {
|
|
|
currentCompany: getUserCompany() ? getUserCompany().code : "",
|
|
|
userInfo: _getUserInfo(),
|
|
|
isSupertube: false,
|
|
|
+ isTeacherChen: false,
|
|
|
is_super_admin_ids: false,
|
|
|
companylist: [],
|
|
|
originLevel: "0",
|
|
@@ -106,6 +110,10 @@ const mutations = {
|
|
|
state.is_super_admin_ids = is;
|
|
|
},
|
|
|
|
|
|
+ setIsTearcherChen(state, current){
|
|
|
+ state.isTeacherChen = current
|
|
|
+ },
|
|
|
+
|
|
|
SET_ROLES: (state, roles) => {
|
|
|
state.roles = roles;
|
|
|
},
|
|
@@ -332,8 +340,11 @@ const actions = {
|
|
|
const isSupplier = level === "3";
|
|
|
//保存用户信息
|
|
|
commit("setUserInfo", udata);
|
|
|
+ // const
|
|
|
const isOkIndex = ids.findIndex((s) => String(s) === String(id));
|
|
|
commit("SET_IS_SUPER_ADMIN_IDS", isOkIndex !== -1);
|
|
|
+
|
|
|
+ commit("setIsTearcherChen", String(id) === tearchChenId)
|
|
|
//保存是否超管
|
|
|
commit("setSupplier", isSupplier);
|
|
|
//保存是否超管用户
|
|
@@ -574,14 +585,25 @@ async function getRoleMenuList(level = "") {
|
|
|
// const { id } = _getUserInfo();
|
|
|
// const isOkIndex = ids.findIndex((s) => String(s) === String(id));
|
|
|
const idok = state.is_super_admin_ids;
|
|
|
- console.log(idok);
|
|
|
+
|
|
|
if (!idok) {
|
|
|
list = data.filter(function (item) {
|
|
|
- return item.menu_route !== "system";
|
|
|
+ return item.menu_route !== "system"
|
|
|
});
|
|
|
} else {
|
|
|
list = data ?? [];
|
|
|
}
|
|
|
+
|
|
|
+ // console.log(state.isTeacherChen)
|
|
|
+ // if(state.isTeacherChen){
|
|
|
+ // const _i = list.find(item => {
|
|
|
+
|
|
|
+ // })
|
|
|
+ // // tearchChenId
|
|
|
+ // list = list.filter(item => item.menu_route !=="filing" && item.menu_route !== "supplierFiling")
|
|
|
+ // }
|
|
|
+ // console.log(list)
|
|
|
+
|
|
|
list = list.filter((item) => item.child && item.child.length > 0);
|
|
|
list.forEach((v1) => {
|
|
|
const { menu_route, child } = v1;
|