From 057c13502ecedf49d85d47ab23f3492859f16653 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期六, 29 十一月 2025 10:43:15 +0800
Subject: [PATCH] fix: 技术文件变更时,生产就不能继续报工了。

---
 src/pages/index/index.vue |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 4e045ba..b5db940 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -93,6 +93,7 @@
 import WorkerCallingCard from "@/components/worker-calling-card/index.vue";
 import HomeApi from "@/api/home";
 import { useUserStore } from "@/store/modules/user";
+import { setTeamId, setPrepareId } from "@/utils/cache";
 
 const visitStatsData = ref<VisitStatsVO>({
   todayUvCount: 0,
@@ -249,15 +250,26 @@
   checkVersion();
   const { data } = await HomeApi.getIndex();
 
+  // 瀛樺偍鐝粍ID鍜岀敓浜у噯澶嘔D
+  if (data) {
+    if (data.id) {
+      setTeamId(data.id);
+    }
+    if (data.prepareId) {
+      setPrepareId(data.prepareId);
+    }
+  }
+
   // 鍒ゆ柇鏄惁涓哄贰妫�鍛樿鑹�
-  if (isInspector.value) {
-    // 濡傛灉鏄贰妫�鍛橈紝鏄剧ず宸℃鑿滃崟
-    navList[2].show = true;
-  } else if (data.deviceGroupName == "鏃舵晥缁�") {
+  if (data.deviceGroupName == "鏃舵晥缁�") {
     navList[1].show = true;
   } else {
     navList[0].show = true;
   }
+  if (isInspector.value) {
+    // 濡傛灉鏄贰妫�鍛橈紝鏄剧ず宸℃鑿滃崟
+    navList[2].show = true;
+  }
 };
 
 /**

--
Gitblit v1.9.3