From 755e7038caf74126eb4d696ef88f11f0871ff0ee Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 11 十二月 2025 09:01:33 +0800
Subject: [PATCH] fix: 完成菜单权限调整

---
 src/manifest.json         |    2 +-
 src/pages/index/index.vue |   36 +++++++++++++++++++++++++-----------
 2 files changed, 26 insertions(+), 12 deletions(-)

diff --git a/src/manifest.json b/src/manifest.json
index 0802486..5546cac 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -2,7 +2,7 @@
     "name" : "绾跨紗涓婃姤",
     "appid" : "__UNI__F64E0A4",
     "description" : "",
-    "versionName" : "1.0.25",
+    "versionName" : "1.0.26",
     "versionCode" : "100",
     "transformPx" : false,
     /* 5+App鐗规湁鐩稿叧 */
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 5de2d23..2b23c76 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -123,6 +123,18 @@
   return userInfo.value.roles.some((role: any) => role.roleKey === "qualitative-inspector");
 });
 
+// 鍒ゆ柇鏄惁涓哄嚭搴撹鑹�
+const isStorage = computed(() => {
+  if (!userInfo.value || !userInfo.value.roles || !Array.isArray(userInfo.value.roles)) {
+    return false;
+  }
+  console.log(
+    "userInfo.value.roles",
+    userInfo.value.roles.some((role: any) => role.roleKey === "storage")
+  );
+  return userInfo.value.roles.some((role: any) => role.roleKey === "storage");
+});
+
 const fileProgress = reactive({
   show: false,
   progress: 0,
@@ -189,12 +201,12 @@
   //   url: "/pages/work/config/index",
   //   prem: "sys:config:query",
   // },
-  {
-    icon: "/static/icons/log.png",
-    title: "鏃舵晥鎶ュ伐",
-    url: "/pages/timely/index",
-    show: false,
-  },
+  // {
+  //   icon: "/static/icons/log.png",
+  //   title: "鏃舵晥鎶ュ伐",
+  //   url: "/pages/timely/index",
+  //   show: false,
+  // },
   {
     icon: "/static/icons/routingInspection.png",
     title: "宸℃",
@@ -205,7 +217,7 @@
     icon: "/static/icons/log.png",
     title: "鍑哄簱",
     url: "/pages/outbound/index",
-    show: true,
+    show: false,
   },
 ]);
 
@@ -266,14 +278,16 @@
     }
   }
 
-  // 鍒ゆ柇鏄惁涓哄贰妫�鍛樿鑹�
-  if (data.deviceGroupName == "鏃舵晥缁�") {
-    navList[1].show = true;
-  } else {
+  if (data.deviceGroupName.includes("涓�") || data.deviceGroupName.includes("缁�")) {
+    // 濡傛灉鏄笣鎴栫粸锛屾樉绀虹敓浜х鐞嗚彍鍗�
     navList[0].show = true;
   }
   if (isInspector.value) {
     // 濡傛灉鏄贰妫�鍛橈紝鏄剧ず宸℃鑿滃崟
+    navList[1].show = true;
+  }
+  if (isStorage.value) {
+    // 濡傛灉鏄嚭搴撹鑹诧紝鏄剧ず鍑哄簱鑿滃崟
     navList[2].show = true;
   }
 };

--
Gitblit v1.9.3