yyb
2026-05-22 552ec6b7d8ccc56c379da195fc6c9c74312b1070
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,36 +599,37 @@
  // 生产管控功能数据
  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: "生产核算",
    },
    {
      icon: "/static/images/icon/shengchanbaogong1.svg",
      label: "生产追溯",
    },
  ]);
@@ -629,6 +659,10 @@
  // 处理常用功能点击
  const handleCommonItemClick = item => {
    if (item.path) {
      uni.navigateTo({ url: item.path });
      return;
    }
    // 根据不同的功能项进行跳转
    switch (item.label) {
      case "客户档案":
@@ -877,6 +911,11 @@
      case "生产追溯":
        uni.navigateTo({
          url: "/pages/productionManagement/productionTraceability/index",
        });
        break;
      case "工序生产实况":
        uni.navigateTo({
          url: "/pages/productionManagement/processStatistics/index",
        });
        break;
      case "设备台账":
@@ -1240,6 +1279,7 @@
    // 过滤各个模块
    filterArray(marketingItems);
    filterArray(designItems);
    filterArray(purchaseItems, menuMapping.purchase.specialMapping);
    filterArray(financeManagementItems);
    filterArray(collaborationItems, menuMapping.collaboration.specialMapping);
@@ -1250,6 +1290,7 @@
    filterArray(productionItems);
    filterArray(equipmentItems);
    filterArray(archiveManagementItems);
    filterArray(afterSalesServiceItems);
  };
  // 检查模块是否有菜单项需要显示
@@ -1262,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);
@@ -1640,6 +1682,10 @@
    --module-color: #4caf50;
  }
  .oa-module {
    --module-color: #673ab7;
  }
  .production-module {
    --module-color: #ff9800;
  }
@@ -1882,6 +1928,10 @@
    --module-color: #4caf50;
  }
  .oa-module {
    --module-color: #673ab7;
  }
  .production-module {
    --module-color: #ff9800;
  }