zhangwencui
10 小时以前 ff817dab1f7b3e762896446afbcd68579381adcf
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>
@@ -221,7 +221,6 @@
  import useUserStore from "@/store/modules/user";
  const userStore = useUserStore();
  const factoryId = ref("");
  const show = ref(false);
  const factoryList = ref([]);
  const factoryListTem = ref([]);
@@ -307,6 +306,10 @@
    {
      icon: "/static/images/icon/caigoutaizhang@2x.png",
      label: "危险源管理",
    },
    {
      icon: "/static/images/icon/caigoutaizhang@2x.png",
      label: "危险作业",
    },
  ]);
  // 协同办公功能数据
@@ -680,6 +683,11 @@
          url: "/pages/safeProduction/hazardSourceLedger/index",
        });
        break;
      case "危险作业":
        uni.navigateTo({
          url: "/pages/cooperativeOffice/collaborativeApproval/index8",
        });
        break;
      default:
        uni.showToast({
          title: `点击了${item.label}`,
@@ -701,7 +709,6 @@
          res.data.forEach(item => {
            factoryList.value[0].push(item.deptName);
          });
          factoryId.value = userStore.currentDeptId;
        } else {
          // 如果res.data不是数组,设置为空数组
          factoryList.value = [];
@@ -804,7 +811,6 @@
    const loginForm = {
      username: userStore.name,
      password: uni.getStorageSync("remembered_password"),
      factoryId: factoryId,
    };
    modal.loading("刷新中,请耐心等待...");
    userStore