From 552ec6b7d8ccc56c379da195fc6c9c74312b1070 Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期五, 22 五月 2026 17:57:46 +0800
Subject: [PATCH] OA部分查询条件变更

---
 src/pages/works.vue |   89 +++++++++++++++++++++++++++++++++++++-------
 1 files changed, 74 insertions(+), 15 deletions(-)

diff --git a/src/pages/works.vue b/src/pages/works.vue
index 04aeb3c..65fd28a 100644
--- a/src/pages/works.vue
+++ b/src/pages/works.vue
@@ -1,5 +1,28 @@
 <template>
   <view class="content">
+    <!-- OA鍔炲叕妯″潡 -->
+    <view class="common-module oa-module"
+          v-if="hasOaItems">
+      <view class="module-header">
+        <view class="module-title-container">
+          <text class="module-title">OA鍔炲叕</text>
+        </view>
+      </view>
+      <view class="module-content">
+        <up-grid :border="false"
+                 col="4">
+          <up-grid-item v-for="(item, index) in oaItems"
+                        :key="index"
+                        @click="handleCommonItemClick(item)">
+            <view class="icon-container">
+              <image :src="item.icon"
+                     class="item-icon"></image>
+            </view>
+            <text class="item-label">{{item.label}}</text>
+          </up-grid-item>
+        </up-grid>
+      </view>
+    </view>
     <!-- 鍗忓悓鍔炲叕妯″潡 -->
     <view class="common-module collaboration-module"
           v-if="hasCollaborationItems">
@@ -308,6 +331,7 @@
   import { userLoginFacotryList } from "@/api/login";
   import { getProductWorkOrderById } from "@/api/productionManagement/productionReporting";
   import DownloadProgressMask from "@/components/DownloadProgressMask.vue";
+  import { OA_WORKBENCH_ITEMS } from "@/config/oaWorkbench.js";
   import modal from "@/plugins/modal";
   import useUserStore from "@/store/modules/user";
 
@@ -535,6 +559,11 @@
       label: "瀹夊叏鍩硅鑰冩牳",
     },
   ]);
+  // OA鍔炲叕鍔熻兘鏁版嵁锛堢函鍓嶇閰嶇疆锛屼笉鍙備笌鍚庣鏉冮檺杩囨护锛�
+  const oaItems = reactive(
+    OA_WORKBENCH_ITEMS.map(item => ({ ...item }))
+  );
+
   // 鍗忓悓鍔炲叕鍔熻兘鏁版嵁
   const collaborationItems = reactive([
     {
@@ -570,31 +599,36 @@
   // 鐢熶骇绠℃帶鍔熻兘鏁版嵁
   const productionItems = reactive([
     {
-      icon: "/static/images/icon/shengchanbaogong1.svg",
-      label: "鐢熶骇璁㈠崟",
-    },
-    // {
-    //   icon: "/static/images/icon/shengchanpaigong@2x.svg",
-    //   label: "鐢熶骇娲惧伐",
-    // },
-    {
-      icon: "/static/images/icon/shengchanbaogong1.svg",
-      label: "鐢熶骇鎺掍骇",
-    },
-    {
-      icon: "/static/images/icon/shengchanbaogong1.svg",
+      icon: "/static/images/icon/shengchanjihua.svg",
       label: "涓荤敓浜ц鍒�",
     },
+    {
+      icon: "/static/images/icon/shengchandingdan.svg",
+      label: "鐢熶骇璁㈠崟",
+    },
+    {
+      icon: "/static/images/icon/shengchanzhuisu.svg",
+      label: "鐢熶骇杩芥函",
+    },
+    {
+      icon: "/static/images/icon/shengchanshikuang.svg",
+      label: "宸ュ簭鐢熶骇瀹炲喌",
+    },
+    {
+      icon: "/static/images/icon/shengchanpaichan.svg",
+      label: "鐢熶骇鎺掍骇",
+    },
+
     {
       icon: "/static/images/icon/shengchanbaogong.svg",
       label: "鐢熶骇鎶ュ伐",
     },
     {
-      icon: "/static/images/icon/shengchanbaogong1.svg",
+      icon: "/static/images/icon/baogongtaizhang.svg",
       label: "鎶ュ伐鍙拌处",
     },
     {
-      icon: "/static/images/icon/shengchanbaogong1.svg",
+      icon: "/static/images/icon/shengchanhesuan.svg",
       label: "鐢熶骇鏍哥畻",
     },
   ]);
@@ -625,6 +659,10 @@
 
   // 澶勭悊甯哥敤鍔熻兘鐐瑰嚮
   const handleCommonItemClick = item => {
+    if (item.path) {
+      uni.navigateTo({ url: item.path });
+      return;
+    }
     // 鏍规嵁涓嶅悓鐨勫姛鑳介」杩涜璺宠浆
     switch (item.label) {
       case "瀹㈡埛妗f":
@@ -868,6 +906,16 @@
       case "鐢熶骇鏍哥畻":
         uni.navigateTo({
           url: "/pages/productionManagement/productionAccounting/index",
+        });
+        break;
+      case "鐢熶骇杩芥函":
+        uni.navigateTo({
+          url: "/pages/productionManagement/productionTraceability/index",
+        });
+        break;
+      case "宸ュ簭鐢熶骇瀹炲喌":
+        uni.navigateTo({
+          url: "/pages/productionManagement/processStatistics/index",
         });
         break;
       case "璁惧鍙拌处":
@@ -1231,6 +1279,7 @@
 
     // 杩囨护鍚勪釜妯″潡
     filterArray(marketingItems);
+    filterArray(designItems);
     filterArray(purchaseItems, menuMapping.purchase.specialMapping);
     filterArray(financeManagementItems);
     filterArray(collaborationItems, menuMapping.collaboration.specialMapping);
@@ -1241,6 +1290,7 @@
     filterArray(productionItems);
     filterArray(equipmentItems);
     filterArray(archiveManagementItems);
+    filterArray(afterSalesServiceItems);
   };
 
   // 妫�鏌ユā鍧楁槸鍚︽湁鑿滃崟椤归渶瑕佹樉绀�
@@ -1253,6 +1303,7 @@
   const hasAfterSalesServiceItems = computed(
     () => afterSalesServiceItems.length > 0
   );
+  const hasOaItems = computed(() => oaItems.length > 0);
   const hasCollaborationItems = computed(() => collaborationItems.length > 0);
   const hasSafetyItems = computed(() => safetyItems.length > 0);
   const hasQualityItems = computed(() => qualityItems.length > 0);
@@ -1631,6 +1682,10 @@
     --module-color: #4caf50;
   }
 
+  .oa-module {
+    --module-color: #673ab7;
+  }
+
   .production-module {
     --module-color: #ff9800;
   }
@@ -1873,6 +1928,10 @@
     --module-color: #4caf50;
   }
 
+  .oa-module {
+    --module-color: #673ab7;
+  }
+
   .production-module {
     --module-color: #ff9800;
   }

--
Gitblit v1.9.3