gaoluyang
2026-05-28 0333d66e4b397c161c6a44ce1e2a121c2cc41082
src/pages/works.vue
@@ -208,28 +208,27 @@
      </view>
    </view>
    <!-- 售后服务模块 -->
    <view class="common-module after-sales-module"
          v-if="hasAfterSalesServiceItems">
      <view class="module-header">
        <view class="module-title-container">
          <text class="module-title">售后服务</text>
        </view>
      </view>
      <view class="module-content">
        <up-grid :border="false"
                 col="4">
          <up-grid-item v-for="(item, index) in afterSalesServiceItems"
                        :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 after-sales-module"-->
<!--          v-if="hasAfterSalesServiceItems">-->
<!--      <view class="module-header">-->
<!--        <view class="module-title-container">-->
<!--          <text class="module-title">售后服务</text>-->
<!--        </view>-->
<!--      </view>-->
<!--      <view class="module-content">-->
<!--        <up-grid :border="false"-->
<!--                 col="4">-->
<!--          <up-grid-item v-for="(item, index) in afterSalesServiceItems"-->
<!--                        :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="hasQualityItems">
@@ -277,28 +276,28 @@
      </view>
    </view>
    <!-- 安全生产模块 -->
    <view class="common-module collaboration-module"
          v-if="hasSafetyItems">
      <view class="module-header">
        <view class="module-title-container">
          <text class="module-title">安全生产</text>
        </view>
      </view>
      <view class="module-content">
        <up-grid :border="false"
                 col="4">
          <up-grid-item v-for="(item, index) in safetyItems"
                        :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="hasSafetyItems">-->
<!--      <view class="module-header">-->
<!--        <view class="module-title-container">-->
<!--          <text class="module-title">安全生产</text>-->
<!--        </view>-->
<!--      </view>-->
<!--      <view class="module-content">-->
<!--        <up-grid :border="false"-->
<!--                 col="4">-->
<!--          <up-grid-item v-for="(item, index) in safetyItems"-->
<!--                        :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>-->
    <DownloadProgressMask />
  </view>
</template>
@@ -308,6 +307,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";
@@ -570,44 +570,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: "生产追溯",
    },
    {
      icon: "/static/images/icon/shengchanbaogong1.svg",
      label: "工序生产实况",
    },
    {
      icon: "/static/images/icon/shengchanbaogong1.svg",
      label: "工序实况",
    },
  ]);
@@ -637,6 +630,10 @@
  // 处理常用功能点击
  const handleCommonItemClick = item => {
    if (item.path) {
      uni.navigateTo({ url: item.path });
      return;
    }
    // 根据不同的功能项进行跳转
    switch (item.label) {
      case "客户档案":
@@ -1253,6 +1250,7 @@
    // 过滤各个模块
    filterArray(marketingItems);
    filterArray(designItems);
    filterArray(purchaseItems, menuMapping.purchase.specialMapping);
    filterArray(financeManagementItems);
    filterArray(collaborationItems, menuMapping.collaboration.specialMapping);
@@ -1263,6 +1261,7 @@
    filterArray(productionItems);
    filterArray(equipmentItems);
    filterArray(archiveManagementItems);
    filterArray(afterSalesServiceItems);
  };
  // 检查模块是否有菜单项需要显示
@@ -1275,6 +1274,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);
@@ -1653,6 +1653,10 @@
    --module-color: #4caf50;
  }
  .oa-module {
    --module-color: #673ab7;
  }
  .production-module {
    --module-color: #ff9800;
  }
@@ -1895,6 +1899,10 @@
    --module-color: #4caf50;
  }
  .oa-module {
    --module-color: #673ab7;
  }
  .production-module {
    --module-color: #ff9800;
  }