瀏覽代碼

修改bug

lxr 2 月之前
父節點
當前提交
ce1431c0dd
共有 1 個文件被更改,包括 12 次插入9 次删除
  1. 12 9
      src/stores/modules/auth.ts

+ 12 - 9
src/stores/modules/auth.ts

@@ -85,7 +85,6 @@ export const useAuthStore = defineStore({
                 menu.meta.isHide = false;
                 break;
               case "人员配置":
-                // 美食(1)和KTV(3)不显示人员配置,其他业务类型都显示
                 menu.meta.isHide = !storeId;
                 break;
               case "食品经营许可证":
@@ -113,7 +112,7 @@ export const useAuthStore = defineStore({
                 break;
               case "演出":
                 // 有店铺且为休闲娱乐(businessSection=2) 时显示演出
-                menu.meta.isHide = !storeId || businessSection == 2;
+                menu.meta.isHide = !storeId || businessSection !== 2;
                 break;
               case "门店装修":
                 menu.meta.isHide = !storeId;
@@ -123,13 +122,17 @@ export const useAuthStore = defineStore({
 
           // 门店装修:根据 storeTickets 只显示其一,0=只显示「门店装修」,1=只显示「装修公司」
           if (menu.name === "storeDecorationManagement" && menu.children?.length) {
-            menu.children.forEach((child: any) => {
-              if (child.name === "decorationManagement") {
-                child.meta.isHide = storeTickets !== 0;
-              } else if (child.name === "decorationCompany") {
-                child.meta.isHide = storeTickets !== 1;
-              }
-            });
+            if (storeTickets != 0 && storeTickets != 1) {
+              menu.meta.isHide = true;
+            } else {
+              menu.children.forEach((child: any) => {
+                if (child.name === "decorationManagement") {
+                  child.meta.isHide = storeTickets !== 0;
+                } else if (child.name === "decorationCompany") {
+                  child.meta.isHide = storeTickets !== 1;
+                }
+              });
+            }
           }
 
           // 处理子菜单