zhangwencui
4 天以前 bbee79e33542ae459efbf1e39a0081bda0137648
src/pages/index.vue
@@ -1,24 +1,24 @@
<template>
  <view class="content">
<!--    <view class="header-section">-->
<!--      <view class="currentFactory">-->
<!--        <up-text type="primary"-->
<!--                 :text="userStore.currentFactoryName"-->
<!--                 @click="show = true"-->
<!--                 size="18"-->
<!--                 class="factoryName"-->
<!--                 suffixIcon="arrow-right"-->
<!--                 :iconStyle="iconStyle"></up-text>-->
<!--      </view>-->
<!--      <up-picker :show="show"-->
<!--                 :columns="factoryList"-->
<!--                 @confirm="changeFactory"-->
<!--                 @cancel="show = false"></up-picker>-->
<!--    </view>-->
    <!--    <view class="header-section">-->
    <!--      <view class="currentFactory">-->
    <!--        <up-text type="primary"-->
    <!--                 :text="userStore.currentFactoryName"-->
    <!--                 @click="show = true"-->
    <!--                 size="18"-->
    <!--                 class="factoryName"-->
    <!--                 suffixIcon="arrow-right"-->
    <!--                 :iconStyle="iconStyle"></up-text>-->
    <!--      </view>-->
    <!--      <up-picker :show="show"-->
    <!--                 :columns="factoryList"-->
    <!--                 @confirm="changeFactory"-->
    <!--                 @cancel="show = false"></up-picker>-->
    <!--    </view>-->
    <view class="hero-section">
      <view class="bg-img">
        <view class="hero-content">
<!--          <text class="hero-title">军泰伟业</text>-->
          <!--          <text class="hero-title">军泰伟业</text>-->
        </view>
        <view class="hero-wave"></view>
      </view>
@@ -133,6 +133,30 @@
        </up-grid>
      </view>
    </view>
    <!-- 人力资源模块 -->
    <view class="common-module collaboration-module">
      <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 humanResourcesItems"
                        :key="index"
                        @click="handleCommonItemClick(item)">
            <view class="icon-container"
                  :style="{ background: item.bgColor }">
              <up-icon :name="item.icon"
                       :size="58"
                       color="#ffffff"></up-icon>
            </view>
            <text class="item-label">{{item.label}}</text>
          </up-grid-item>
        </up-grid>
      </view>
    </view>
    <!-- 生产管控模块 -->
    <!--      <view class="common-module production-module">-->
    <!--         <view class="module-header">-->
@@ -220,7 +244,7 @@
  import modal from "@/plugins/modal";
  import useUserStore from "@/store/modules/user";
  const userStore = useUserStore();;
  const userStore = useUserStore();
  const show = ref(false);
  const factoryList = ref([]);
  const factoryListTem = ref([]);
@@ -298,6 +322,16 @@
      label: "供应商往来",
    },
  ]);
  const humanResourcesItems = reactive([
    {
      icon: "/static/images/icon/caigoutaizhang@2x.png",
      label: "打卡签到",
    },
    {
      icon: "/static/images/icon/caigoutaizhang@2x.png",
      label: "人员薪资",
    },
  ]);
  const safetyItems = reactive([
    {
      icon: "/static/images/icon/caigoutaizhang@2x.png",
@@ -305,7 +339,31 @@
    },
    {
      icon: "/static/images/icon/caigoutaizhang@2x.png",
      label: "危险源管理",
      label: "危险源台账",
    },
    {
      icon: "/static/images/icon/caigoutaizhang@2x.png",
      label: "危险作业",
    },
    {
      icon: "/static/images/icon/guzhangfenxi@2x.png",
      label: "隐患排查",
    },
    {
      icon: "/static/images/icon/guzhangfenxi@2x.png",
      label: "危险物料",
    },
    {
      icon: "/static/images/icon/guzhangfenxi@2x.png",
      label: "应急预案",
    },
    {
      icon: "/static/images/icon/guzhangfenxi@2x.png",
      label: "事故上报",
    },
    {
      icon: "/static/images/icon/guzhangfenxi@2x.png",
      label: "安全培训",
    },
  ]);
  // 协同办公功能数据
@@ -396,10 +454,6 @@
      label: "设备保养",
    },
    {
      icon: "/static/images/icon/xunjianshangchuan@2x.png",
      label: "巡检上传",
    },
    {
      icon: "/static/images/icon/guzhangfenxi@2x.png",
      label: "分析追溯",
      bgColor: "#ff9800",
@@ -418,6 +472,10 @@
      icon: "/static/images/icon/jieguoyanzheng@2x.png",
      label: "结果验证",
      bgColor: "#9c27b0",
    },
    {
      icon: "/static/images/icon/xunjianshangchuan@2x.png",
      label: "巡检上传",
    },
  ]);
@@ -674,9 +732,44 @@
          url: "/pages/safeProduction/safeQualifications/index",
        });
        break;
      case "危险源管理":
      case "危险源台账":
        uni.navigateTo({
          url: "/pages/safeProduction/hazardSourceLedger/index",
        });
        break;
      case "危险作业":
        uni.navigateTo({
          url: "/pages/cooperativeOffice/collaborativeApproval/index8",
        });
        break;
      case "隐患排查":
        uni.navigateTo({
          url: "/pages/safeProduction/dangerInvestigation/index",
        });
        break;
      case "危险物料":
        uni.navigateTo({
          url: "/pages/safeProduction/hazardousMaterialsControl/index",
        });
        break;
      case "应急预案":
        uni.navigateTo({
          url: "/pages/safeProduction/emergencyPlanReview/index",
        });
        break;
      case "事故上报":
        uni.navigateTo({
          url: "/pages/safeProduction/accidentReportingRecord/index",
        });
        break;
      case "安全培训":
        uni.navigateTo({
          url: "/pages/safeProduction/safetyTrainingAssessment/index",
        });
        break;
      case "打卡签到":
        uni.navigateTo({
          url: "/pages/attendance/checkin",
        });
        break;
      default:
@@ -699,7 +792,7 @@
          factoryListTem.value = res.data;
          res.data.forEach(item => {
            factoryList.value[0].push(item.deptName);
          })
          });
        } else {
          // 如果res.data不是数组,设置为空数组
          factoryList.value = [];