Jelajahi Sumber

feat(auth): 启用根据businessSection动态控制菜单显示逻辑

- 恢复并启用酒单管理菜单的显示控制逻辑
- 恢复并启用菜单管理菜单的显示控制逻辑
- 恢复并启用人员配置菜单的显示控制逻辑
- 恢复并启用设施与服务菜单的显示控制逻辑
- 根据businessSection值动态设置各菜单的隐藏状态
- 移除之前注释掉的条件判断代码块
spy 2 minggu lalu
induk
melakukan
3714949c57
1 mengubah file dengan 20 tambahan dan 20 penghapusan
  1. 20 20
      src/stores/modules/auth.ts

+ 20 - 20
src/stores/modules/auth.ts

@@ -61,26 +61,26 @@ export const useAuthStore = defineStore({
           }
 
           // 根据businessSection判断菜单显示
-          // if (menu.meta && menu.meta.title) {
-          //   switch (menu.meta.title) {
-          //     case "酒单管理":
-          //       // 为11时显示酒单管理
-          //       menu.meta.isHide = businessSection !== 11;
-          //       break;
-          //     case "菜单管理":
-          //       // 为11时不显示菜单管理
-          //       menu.meta.isHide = businessSection === 11;
-          //       break;
-          //     case "人员配置":
-          //       // 为11时显示人员配置(即人员管理),否则不显示
-          //       menu.meta.isHide = businessSection !== 11;
-          //       break;
-          //     case "设施与服务":
-          //       // 为4和7时显示设施与服务,否则不显示
-          //       menu.meta.isHide = ![4, 7].includes(businessSection);
-          //       break;
-          //   }
-          // }
+          if (menu.meta && menu.meta.title) {
+            switch (menu.meta.title) {
+              case "酒单管理":
+                // 为11时显示酒单管理
+                menu.meta.isHide = businessSection !== 11;
+                break;
+              case "菜单管理":
+                // 为11时不显示菜单管理
+                menu.meta.isHide = businessSection === 11;
+                break;
+              case "人员配置":
+                // 为11时显示人员配置(即人员管理),否则不显示
+                menu.meta.isHide = businessSection !== 11;
+                break;
+              case "设施与服务":
+                // 为4和7时显示设施与服务,否则不显示
+                menu.meta.isHide = ![4, 7].includes(businessSection);
+                break;
+            }
+          }
 
           // 处理子菜单
           if (menu.children && menu.children.length > 0) {