Просмотр исходного кода

Merge branch 'feature_20260402_指标修改' into uat(dev)

# Conflicts:
#	src/api/index.js
#	src/views/home/bottomBtn.vue
#	src/views/home/index.vue
#	src/views/week/doubleWeekly.vue
#	src/views/week/weekly.vue
#	src/views/week/weeklyApproval.vue
#	src/views/week/weeklyApprovalDetils.vue
#	src/views/week/weeklyHistoricalDetils.vue
zhujindu 1 неделя назад
Родитель
Сommit
1a9bd4cf36

+ 14 - 3
src/components/share.vue

@@ -64,8 +64,18 @@
         </template>
         <!-- 日报指标 -->
         <template v-if="isTarget">
-          <shareAtarget :reportInfo="reportTarget"></shareAtarget>
-          <shareBtarget :reportInfo="reportTarget"></shareBtarget>
+          <template v-if="reportTarget.targetType == '1'">
+            <!--targetType 0-历史指标  1-动态指标,String类型 -->
+            <shareCommonTarget
+              :homePageIndicatorDate="reportTarget.homePageIndicatorList"></shareCommonTarget>
+          </template>
+          <template v-else>
+            <!-- YFQuota:应用服务平台 不显示各项指标 -->
+            <shareAtarget :reportInfo="reportTarget"></shareAtarget>
+            <shareBtarget :reportInfo="reportTarget"></shareBtarget>
+          </template>
+          <!-- <shareAtarget :reportInfo="reportTarget"></shareAtarget>
+          <shareBtarget :reportInfo="reportTarget"></shareBtarget> -->
         </template>
         <!-- 日报填写内容 -->
         <template v-if="isReportCustom">
@@ -142,9 +152,10 @@ import ShareAtarget from './shareAtarget.vue';
 import shareBtarget from './shareBtarget.vue';
 import shareReportCustom from './shareReportCustom.vue';
 import uploadAliOss from '@/utils/uploadAliOss';
+import shareCommonTarget from './shareCommonTarget.vue';
 export default {
   name: 'share',
-  components: { VueQr, ShareAtarget, shareReportCustom, shareBtarget },
+  components: { VueQr, ShareAtarget, shareReportCustom, shareBtarget, shareCommonTarget },
   props: {
     // 日报数据
     reportTarget: {

+ 643 - 0
src/components/shareCommonTarget.vue

@@ -0,0 +1,643 @@
+<template>
+  <div class="shareCommonTarget">
+    <!-- labelStyle 垃圾,不能全匹配,需要特殊处理 -->
+    <template>
+      <div class="container linep">
+        <van-collapse v-model="activeNames">
+          <div v-for="(homePageItem, index) in homePageIndicatorList" :key="index">
+            <van-collapse-item v-if="homePageItem.labelStyle == 1" :name="(index + 1).toString()">
+              <template #title>
+                <div class="text">{{ homePageItem.name }}</div>
+              </template>
+              <van-row>
+                <!-- 动态渲染标题栏 -->
+                <div
+                  v-for="(periodItem, periodIndex) in homePageItem.children"
+                  :key="'title-' + periodIndex">
+                  <van-col span="12" v-if="periodItem.name">
+                    <span :class="periodIndex % 2 === 0 ? 'leftTitle' : 'rightTitle'">{{
+                      periodItem.name
+                    }}</span>
+                  </van-col>
+                </div>
+                <!-- 动态渲染指标项 -->
+                <div v-if="homePageItem.children.length >= 2">
+                  <!-- 遍历第一个周期的所有指标 -->
+                  <div
+                    v-for="(metric, metricIndex) in homePageItem.children[0].children"
+                    :key="'metric-' + metricIndex">
+                    <!-- 左侧指标 -->
+                    <van-col span="12">
+                      <p>
+                        {{ metric.name }}:
+                        <span class="colorblack">
+                          {{ metric.indicatorDisplayValue }}
+                        </span>
+                      </p>
+                    </van-col>
+                    <!-- 对应右侧指标 -->
+                    <van-col span="12">
+                      <p>
+                        {{ homePageItem.children[1]?.children[metricIndex]?.name || '-' }}:
+                        <span class="colorblack">
+                          {{
+                            homePageItem.children[1]?.children[metricIndex]?.indicatorDisplayValue
+                          }}
+                        </span>
+                      </p>
+                    </van-col>
+                  </div>
+                </div>
+              </van-row>
+            </van-collapse-item>
+            <van-collapse-item v-if="homePageItem.labelStyle == 2" :name="(index + 1).toString()">
+              <template #title>
+                <div class="text">{{ homePageItem.name }}</div>
+              </template>
+              <!-- 外层循环:遍历主要类别 -->
+              <van-row
+                v-for="(category, index) in homePageItem.children"
+                :key="index"
+                :style="{ marginTop: index > 0 ? '10px' : '0' }">
+                <van-col span="24" v-if="category.name">
+                  <span :class="index % 2 === 0 ? 'leftTitle' : 'rightTitle'">{{
+                    category.name
+                  }}</span>
+                </van-col>
+
+                <!-- 内层循环:遍历各个统计项 -->
+                <div v-for="(item, idx) in category.children" :key="idx">
+                  <van-col :span="idx == 0 ? 24 : 12">
+                    <p>
+                      {{ item.name }}:<span
+                        :style="labelStyle(item.clickable)"
+                        @click="onClick(item.clickable)"
+                        class="colorbalck"
+                        >{{ item.indicatorDisplayValue }}</span
+                      >
+                    </p>
+                  </van-col>
+                </div>
+              </van-row>
+            </van-collapse-item>
+            <van-collapse-item v-if="homePageItem.labelStyle == 3" :name="(index + 1).toString()">
+              <template #title>
+                <div class="text">{{ homePageItem.name }}</div>
+              </template>
+              <!-- 外层循环:遍历主要类别 -->
+              <van-row
+                v-for="(category, index) in homePageItem.children"
+                :key="index"
+                :style="{ marginTop: index == 0 ? '-10px' : '0' }">
+                <!-- 内层循环:遍历各个统计项 -->
+                <div v-for="(item, idx) in category.children" :key="idx">
+                  <van-col :span="idx == 0 ? 24 : 12">
+                    <p>
+                      {{ item.name }}:<span
+                        :style="labelStyle(item.clickable)"
+                        @click="onClick(item.clickable)"
+                        class="colorbalck"
+                        >{{ item.indicatorDisplayValue }}</span
+                      >
+                    </p>
+                  </van-col>
+                </div>
+              </van-row>
+            </van-collapse-item>
+            <van-collapse-item v-if="homePageItem.labelStyle == 4" :name="(index + 1).toString()">
+              <template #title>
+                <div class="text">{{ homePageItem.name }}</div>
+              </template>
+              <!-- 外层循环:遍历主要类别 -->
+              <template v-for="(category, index) in homePageItem.children">
+                <van-row
+                  :style="{
+                    width: category.name ? '49%' : '100%',
+                    float: category.name ? 'left' : 'none',
+                  }">
+                  <van-col
+                    span="20"
+                    :class="index % 2 === 0 ? 'leftTitle' : 'rightTitle'"
+                    v-if="category.name">
+                    <span>{{ category.name }}</span>
+                  </van-col>
+
+                  <!-- 内层循环:遍历各个统计项 -->
+                  <div v-for="(item, idx) in category.children" :key="idx">
+                    <van-col :span="24">
+                      <p>
+                        {{ item.name }}:<span
+                          :style="labelStyle(item.clickable)"
+                          @click="onClick(item.clickable)"
+                          class="colorbalck"
+                          >{{ item.indicatorDisplayValue }}</span
+                        >
+                      </p>
+                    </van-col>
+                  </div>
+                </van-row>
+              </template>
+            </van-collapse-item>
+            <van-collapse-item v-if="homePageItem.labelStyle == 5" :name="(index + 1).toString()">
+              <template #title>
+                <div class="text">{{ homePageItem.name }}</div>
+              </template>
+              <!-- 外层循环:遍历主要类别 -->
+              <van-row
+                v-for="(category, index) in homePageItem.children"
+                :key="index"
+                :style="{ marginTop: index == 0 ? '-10px' : '0' }">
+                <!-- 内层循环:遍历各个统计项 -->
+                <div v-for="(item, idx) in category.children" :key="idx">
+                  <van-col :span="24">
+                    <p>
+                      {{ item.name }}:<span
+                        :style="labelStyle(item.clickable)"
+                        @click="onClick(item.clickable)"
+                        class="colorbalck"
+                        >{{ item.indicatorDisplayValue }}</span
+                      >
+                    </p>
+                  </van-col>
+                </div>
+              </van-row>
+            </van-collapse-item>
+          </div>
+        </van-collapse>
+      </div>
+    </template>
+  </div>
+</template>
+
+<script>
+import store from '@/store';
+import { userTodayPlanNum, getReportInfo } from '@/api/index';
+import { mapState } from 'vuex';
+export default {
+  name: 'home',
+  computed: {
+    ...mapState({
+      reportInfo: (state) => state.user.reportInfo,
+    }),
+  },
+  props: {
+    tabVal: {
+      type: [String, Number],
+      default: '-1',
+    },
+  },
+  data() {
+    return {
+      shows: true,
+      show: true,
+      num: 0,
+      todayGoal: {},
+      progressWidth: 0,
+      updataTime: '',
+      activeNames: [
+        '1',
+        '2',
+        '3',
+        '4',
+        '5',
+        '6',
+        '7',
+        '8',
+        '10',
+        '11',
+        '12',
+        '16',
+        '17',
+        '20',
+        '21',
+        '22',
+        '23',
+        '24',
+        '25',
+        '26',
+        '27',
+        '28',
+        '29',
+        '30',
+        '31',
+        '32',
+        '33',
+        '34',
+        '35',
+        '36',
+        '37',
+        '38',
+        '39',
+        '40',
+        '41',
+        '42',
+        '43',
+      ],
+      activeNameType: [],
+      powerGradeShow: false,
+      showButton: false,
+      isCommit: null,
+      powerGrade: '2',
+      deptLevel: '',
+      // positionId:等级(1-销售员 2-销售部主管 3-大区主管 4-区域公司总经理 5-DIY公司)
+      reportTargetAll: {},
+      homePageIndicatorList: [],
+      approvalPendingNum: 0,
+      isDiy: false,
+      approvalButton: false,
+      times: 5,
+      timer: null,
+      type: '-1',
+      monthNoVisit: {},
+      flag: true,
+      reportInfoData: {},
+      applyNumber: '',
+      proccessPendingNum: 0,
+      JZQuota: false,
+      GZdata: false,
+    };
+  },
+  watch: {
+    // tabVal: {
+    //   handler(val) {
+    //     if (val == 2) {
+    //       // keep-alive 模式watch执行了两次
+    //       this.initData();
+    //     }
+    //   },
+    //   immediate: true,
+    // },
+    reportInfo: {
+      handler(val) {
+        if (val) {
+          this.initData();
+        }
+      },
+      immediate: true,
+    },
+  },
+  methods: {
+    labelStyle(val) {
+      return {
+        'text-decoration': 'none',
+        color: '#fff',
+      };
+    },
+    // 跳转详情
+    onClick(val) {
+      if (val == 1) {
+        store.dispatch('setActivaTypeStore', 'FuWuShang');
+        this.$router.push({ path: '/noVisit' });
+      }
+    },
+    initData() {
+      console.log(this.tabVal);
+      this.getReportInfo();
+      this.userTodayPlanNum();
+    },
+    getReportInfo() {
+      if (this.reportInfo && this.reportInfo.homePageIndicatorList != null) {
+        this.homePageIndicatorList = this.reportInfo.homePageIndicatorList;
+        this.updataTime = this.reportInfo.homePageIndicatorUpdateTime;
+      }
+      return;
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '加载中...',
+        forbidClick: true,
+      });
+      getReportInfo({ isContent: false }).then((res) => {
+        if (res.code == 200) {
+          loading1.clear();
+          localStorage.setItem('powerGrade', res.data.positionId);
+          localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
+          localStorage.setItem('isDiy', res.data.diy);
+          localStorage.setItem('uType', res.data.userType);
+          localStorage.setItem('jzType', res.data.jzType);
+          localStorage.setItem('customerVisits', res.data.customerManagerVisits);
+          localStorage.setItem('postType', res.data.postType);
+          if (res.data.homePageIndicatorList != null) {
+            this.homePageIndicatorList = res.data.homePageIndicatorList;
+            this.updataTime = res.data.homePageIndicatorUpdateTime;
+          }
+          this.type = res.data.userType;
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
+    userTodayPlanNum() {
+      localStorage.setItem('outvstoreName', '');
+      localStorage.setItem('outvchainName', '');
+      localStorage.removeItem('outvstoreLabelTypes');
+      localStorage.removeItem('outvjpdStoreLevelTypes');
+      localStorage.removeItem('outvstoreCategoryList');
+      localStorage.setItem('outvchainCode', '');
+      localStorage.setItem('outvstoreName', '');
+      localStorage.setItem('deviveStoreName', '');
+      localStorage.setItem('outvsortType', '');
+      localStorage.setItem('outsortParam', '');
+      localStorage.setItem('lat', '');
+      localStorage.setItem('lon', '');
+      userTodayPlanNum().then((res) => {
+        if (res.code == 200) {
+          this.todayGoal = res.data;
+          this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + '%';
+          localStorage.setItem('nickName', res.data.user.nickName);
+          localStorage.setItem('postName', res.data.user.postName);
+          localStorage.setItem('zipPhoto', res.data.zipPhoto);
+          localStorage.setItem('storeType', res.data.user.type);
+          localStorage.setItem('deptLevel', res.data.user.depts[0].deptLevel);
+          localStorage.setItem('userId', res.data.user.userId);
+          localStorage.setItem('deptIds', JSON.stringify(res.data.user.deptIds));
+          this.monthNoVisit = res.data.monthNoVisit;
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
+  },
+};
+</script>
+<style scoped>
+.shareCommonTarget {
+  .homeTitle {
+    padding: 6px 16px;
+  }
+
+  .homeTitle .van-icon__image {
+    width: 1.4em;
+    height: auto;
+  }
+
+  .container {
+    margin: 10px 0;
+  }
+
+  .container .van-collapse-item {
+    margin-bottom: 10px;
+    overflow: hidden;
+  }
+
+  .progressContentlist {
+    font-size: 14px;
+    padding: 10px 0;
+  }
+
+  .linep p {
+    margin: 10px 0 0 0;
+    font-size: 14px;
+    color: #fff;
+  }
+
+  .leftTitle {
+    /* background-color: #74a4d9; */
+    color: #fff;
+    display: inline-block;
+    /* border-radius: 2px; */
+  }
+
+  .rightTitle {
+    /* background-color: #e7b4bb; */
+    color: #fff;
+    display: inline-block;
+    /* border-radius: 2px; */
+    white-space: nowrap;
+  }
+  .colorblack {
+    color: #fff;
+  }
+  .colorbalck {
+    color: #fff;
+  }
+}
+</style>
+<style lang="scss">
+.shareCommonTarget {
+  .myTab .van-tabs__nav--card {
+    margin: 0 !important;
+  }
+
+  .myTab .van-tabs__wrap,
+  .van-tabs__nav--card {
+    height: 39px;
+  }
+
+  .myTab .van-tab {
+    line-height: 40px;
+  }
+
+  .linep .van-collapse-item__content {
+    color: #fff;
+  }
+
+  .linep .van-collapse-item__content {
+    color: #fff;
+  }
+
+  .linep .van-cell__title {
+    color: #fff;
+    font-weight: 500;
+    font-size: 16px;
+  }
+
+  .homeCellIcon {
+    line-height: 34px;
+  }
+
+  .homeTitle .van-cell__title {
+    color: #fff;
+    font-size: 16px;
+    font-weight: bold;
+    padding-left: 4px;
+    line-height: 36px;
+    height: 36px;
+  }
+
+  .updataTime {
+    color: #fff;
+    font-size: 12px;
+    text-align: center;
+  }
+
+  .homeTitle .van-tag--danger {
+    /* border-radius: 20px; */
+  }
+
+  .van-dialog__confirm,
+  .van-dialog__confirm:active {
+    color: #fff;
+  }
+
+  .van-collapse-item__content {
+    padding: 0px !important;
+    overflow: hidden;
+    background-color: unset !important;
+  }
+
+  .storeTypeHome .storeTypeHomeList .van-cell__title {
+    color: #fff;
+    font-size: 14px;
+  }
+
+  .storeTypeHome .monthNoVisit {
+    padding: 10px;
+    margin: 10px;
+    border-radius: 5px;
+    background-color: #ebf4ff;
+  }
+
+  .storeTypeHome .leftContent {
+    padding-right: 68px;
+    position: relative;
+  }
+
+  .storeTypeHome .monthNoVisitStatstext {
+    font-size: 12px;
+    background-color: #0057ba;
+    position: absolute;
+    right: 0;
+    top: 6px;
+    padding: 2px 6px 2px 12px;
+    color: #fff;
+  }
+
+  .colBack {
+    width: 100%;
+    height: 100%;
+    display: block;
+    /* overflow: unset; */
+    position: relative;
+    z-index: 2;
+    float: left;
+    z-index: 2;
+
+    .back {
+      position: absolute;
+      background: rgb(226, 240, 217);
+      height: 100%;
+      display: block;
+      overflow: hidden;
+      /* z-index: 1; */
+      border-radius: 12px;
+      bottom: -4px;
+    }
+
+    .backLeft {
+      width: 45%;
+      left: -12px;
+    }
+
+    .backRight {
+      width: 50%;
+      left: calc(50% - 12px);
+    }
+
+    .van-col {
+      position: relative;
+      z-index: 3;
+    }
+  }
+}
+.shareCommonTarget {
+  color: #fff;
+  .van-cell {
+    background-color: unset !important;
+    padding: 0 !important;
+  }
+  :deep(*) {
+    border: none !important;
+  }
+
+  .table-headermdhome {
+    font-size: 14px;
+  }
+
+  .table-headermdhome th.el-table__cell > .cell {
+    white-space: pre;
+  }
+
+  .table-headermd .el-table__header,
+  .table-headermd .el-table__body {
+    width: 100% !important;
+  }
+
+  .table-headermdhome.van-cell {
+    padding: 0 6px;
+    height: 100%;
+  }
+
+  .table-headermd th.el-table__cell > .cell {
+    padding: 0 4px;
+    text-align: center;
+  }
+
+  .table-headermdhometh.el-table__cell:first-child > .cell {
+    text-align: left;
+  }
+
+  .table-headermd th.el-table__cell {
+    background-color: #1989fa;
+    color: #fff;
+  }
+
+  .table-headermdhome th.el-table__cell {
+    // background-color: #fff;
+    color: #fff;
+  }
+
+  .table-headermd .el-table__cell {
+    padding: 4px 0;
+  }
+
+  .table-headermdhome.el-table .cell {
+    padding: 0 4px;
+    text-align: center;
+  }
+
+  .table-headermdhome .tipTitle {
+    overflow: hidden;
+    text-overflow: ellipsis;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    -webkit-line-clamp: 2;
+    text-align: center;
+  }
+
+  .table-headermd::before {
+    height: 0;
+  }
+
+  .table-headermd .cell,
+  .el-table--border .el-table__cell:first-child .cell {
+    padding: 0 4px;
+  }
+  .van-hairline--top-bottom::after,
+  .van-hairline-unset--top-bottom::after {
+    border-width: 0;
+  }
+  .van-cell::after {
+    border-width: 0;
+  }
+  .van-collapse-item--border::after {
+    border-width: 0;
+  }
+  .van-cell__right-icon {
+    display: none;
+  }
+  .text {
+    background: url('../assets/textBack.png') no-repeat;
+    width: 100%;
+    height: vw(94);
+    background-size: cover;
+    color: #7d0207;
+    font-size: vw(36);
+    text-align: center;
+    line-height: vw(94);
+    // margin-top: vw(152);
+    // margin-bottom: vw(45);
+    margin: vw(35) 0 vw(15) 0;
+    font-weight: bold;
+  }
+}
+</style>

+ 43 - 5
src/store/modules/user.js

@@ -1,4 +1,4 @@
-import { getMobileUserInfo, getDictOption, loginLog } from '@/api/index';
+import { getMobileUserInfo, getDictOption, loginLog, getReportInfo } from '@/api/index';
 
 const user = {
   state: {
@@ -6,6 +6,7 @@ const user = {
     activaTypeStore: null, //未拜访门店
     activaCreateTypeStore: null, //建店未完工、未结案门店
     storeType: [],
+    reportInfo: null,
   },
 
   mutations: {
@@ -21,6 +22,9 @@ const user = {
     SET_ACTIVA_CREATE_TYPE_STORE: (state, value) => {
       state.activaCreateTypeStore = value;
     },
+    SET_REPORT_INFO: (state, reportInfo) => {
+      state.reportInfo = reportInfo;
+    },
   },
 
   actions: {
@@ -41,10 +45,22 @@ const user = {
             localStorage.setItem('getRequestFlage', 'true');
             // userDeptLevel用户部门等级字段,0-总部,1-公司,2-大区,3-销售部,4-业务员
             localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
-            // 门店类型
-            getDictOption({}, 'sfa_store_type').then((res) => {
-              commit('SET_STORE_TYPE', res.data);
-              resolve();
+            getReportInfo({ isContent: false }).then((res) => {
+              if (res.code == 200) {
+                commit('SET_REPORT_INFO', res.data);
+                localStorage.setItem('powerGrade', res.data.positionId);
+                localStorage.setItem('isDiy', res.data.diy);
+                localStorage.setItem('uType', res.data.userType);
+                localStorage.setItem('jzType', res.data.jzType);
+                localStorage.setItem('customerVisits', res.data.customerManagerVisits);
+                localStorage.setItem('postType', res.data.postType);
+                localStorage.setItem('reportType', res.data.reportType);
+                // 门店类型
+                getDictOption({}, 'sfa_store_type').then((res) => {
+                  commit('SET_STORE_TYPE', res.data);
+                  resolve();
+                });
+              }
             });
             // 登录日志
             var appVersion = navigator.appVersion;
@@ -80,6 +96,28 @@ const user = {
     activaCreateTypeStore({ commit }, value) {
       commit('SET_ACTIVA_CREATE_TYPE_STORE', value);
     },
+    // 获取用户ReportInfo
+    getReportInfoDeta({ dispatch, commit, state }) {
+      return new Promise((resolve, reject) => {
+        getReportInfo({ isContent: false })
+          .then((res) => {
+            if (res.code == 200) {
+              commit('SET_REPORT_INFO', res.data);
+              localStorage.setItem('powerGrade', res.data.positionId);
+              localStorage.setItem('isDiy', res.data.diy);
+              localStorage.setItem('uType', res.data.userType);
+              localStorage.setItem('jzType', res.data.jzType);
+              localStorage.setItem('customerVisits', res.data.customerManagerVisits);
+              localStorage.setItem('postType', res.data.postType);
+              localStorage.setItem('reportType', res.data.reportType);
+              resolve();
+            }
+          })
+          .catch((error) => {
+            reject(error);
+          });
+      });
+    },
   },
 };
 

+ 0 - 32
src/views/componentsTarget/createStoreBJ.vue

@@ -27,22 +27,6 @@
         <span class="colorbalck" v-else>({{ '-' }})</span>
       </p>
     </van-col>
-    <van-col span="12">
-      <p>
-        <span class="colLabel colLabel_FX">分销店</span>
-        <span class="colorbalck">{{ Micrometer(reportTargetAll.allShopMonthAct) }}</span>
-      </p>
-    </van-col>
-    <van-col span="12">
-      <p>
-        <span class="colLabel colLabel_FX">分销店</span>
-        <span class="colorbalck">{{ Micrometer(reportTargetAll.allShopYearAct) }}</span>
-        <span class="colorbalck" v-if="reportTargetAll.allShopYearRate"
-          >({{ reportTargetAll.allShopYearRate }}%)</span
-        >
-        <span class="colorbalck" v-else>({{ '-' }})</span>
-      </p>
-    </van-col>
     <div>
       <div class="backLeft back"></div>
       <div class="backRight back"></div>
@@ -62,22 +46,6 @@
           <span class="colorbalck" v-else>({{ '-' }})</span>
         </p>
       </van-col>
-      <van-col span="12">
-        <p>
-          <span class="colLabel colLabel_JPBJ">金牌店布机</span>
-          <span class="colorbalck">{{ Micrometer(reportTargetAll.goldShopBjMonthAct) }}</span>
-        </p>
-      </van-col>
-      <van-col span="12">
-        <p>
-          <span class="colLabel colLabel_JPBJ">金牌店布机</span>
-          <span class="colorbalck">{{ Micrometer(reportTargetAll.goldShopBjYearAct) }}</span>
-          <span class="colorbalck" v-if="reportTargetAll.goldShopBjYearRate">
-            ({{ reportTargetAll.goldShopBjYearRate }}%)
-          </span>
-          <span class="colorbalck" v-else>({{ '-' }})</span>
-        </p>
-      </van-col>
       <van-col span="12">
         <p>
           <span class="colLabel colLabel_TCFX">同城分销</span>

+ 6 - 30
src/views/componentsTarget/visitedRealTime.vue

@@ -68,19 +68,6 @@
         <span class="colorbalck">({{ reportTargetAll.controlledShopVisitMonthRate }}%)</span>
       </p>
     </van-col>
-    <van-col span="12">
-      <p>
-        <span class="colLabel colLabel_FX">分销店</span>
-        <span class="colorbalck">{{ Micrometer(reportTargetAll.fxShopVisitDayNum) }}</span>
-      </p>
-    </van-col>
-    <van-col span="12">
-      <p>
-        <span class="colLabel colLabel_FX">分销店</span>
-        <span class="colorbalck">{{ Micrometer(reportTargetAll.fxShopVisitMonthNum) }}</span>
-        <span class="colorbalck"> ({{ reportTargetAll.fxShopVisitMonthRate }}%) </span>
-      </p>
-    </van-col>
     <div>
       <div class="backLeft back"></div>
       <div class="backRight back"></div>
@@ -97,30 +84,19 @@
           <span class="colorbalck"> ({{ reportTargetAll.jpShopVisitMonthRate }}%) </span>
         </p>
       </van-col>
-      <van-col span="12">
-        <p>
-          <span class="colLabel colLabel_TCFX">同城分销</span>
-        </p>
-      </van-col>
-      <van-col span="12">
-        <p>
-          <span class="colLabel colLabel_TCFX">同城分销</span>
-        </p>
-      </van-col>
-      <van-col span="12">
+      <van-col span="24">
         <p>
-          涂料店:
-          <span class="colorbalck">{{ Micrometer(reportTargetAll.tcfxTlShopVisitDayNum) }}</span>
+          <span class="colLabel colLabel_TCFX">同城分销近3月</span>
         </p>
       </van-col>
-      <van-col span="12">
+      <van-col span="24">
         <p>
-          <span style="font-weight: 600">近2月</span>涂料店:
+          <span style="font-weight: 600">近3月</span>
           <span class="colorbalck">{{ Micrometer(reportTargetAll.tcfxTlShopVisitMonthNum) }}</span>
           <span class="colorbalck"> ({{ reportTargetAll.tcfxTlShopVisitMonthRate }}%) </span>
         </p>
       </van-col>
-      <van-col span="12">
+      <!-- <van-col span="12">
         <p style="margin-top: 0">
           厨卫店:<span class="colorbalck">{{
             Micrometer(reportTargetAll.tcfxOtherShopVisitDayNum)
@@ -134,7 +110,7 @@
           }}</span>
           <span class="colorbalck"> ({{ reportTargetAll.tcfxOtherShopVisitMonthRate }}%) </span>
         </p>
-      </van-col>
+      </van-col> -->
     </div>
   </van-row>
 </template>

+ 2 - 2
src/views/home/ABtarget.vue

@@ -81,9 +81,9 @@
             :title="'瓷砖胶SAP(千元)'">
             <cizhuanjiaoSAP :reportTargetAll="reportTargetAll"></cizhuanjiaoSAP>
           </van-collapse-item>
-          <!-- <van-collapse-item v-if="GZdata" name="43" title="纯态之家SAP(千元)">
+          <van-collapse-item v-if="GZdata" name="43" title="纯态之家SAP(千元)">
             <chunTaiSAP :reportTargetAll="reportTargetAll"></chunTaiSAP>
-          </van-collapse-item> -->
+          </van-collapse-item>
           <van-collapse-item v-if="GZdata" name="42" title="商机关联的质感外墙业绩SAP(千元)">
             <van-row style="margin-top: -10px">
               <van-col span="12"><span class="leftTitle">本月</span></van-col

+ 3 - 4
src/views/home/Atarget.vue

@@ -47,11 +47,10 @@
           v-if="!JZQuota && !GZdata && [1, 4, 5].indexOf(powerGrade) !== -1"
           name="8"
           :title="'瓷砖胶SAP(千元)'">
-          <cizhuanjiaoSAP :reportTargetAll="reportTargetAll"></cizhuanjiaoSAP>
-        </van-collapse-item>
-        <!-- <van-collapse-item v-if="GZdata" name="9" title="纯态之家SAP(千元)">
+          <cizhuanjiaoSAP :reportTargetAll="reportTargetAll"></cizhuanjiaoSAP> </van-collapse-item
+        ><van-collapse-item v-if="GZdata" name="9" title="纯态之家SAP(千元)">
           <chunTaiSAP :reportTargetAll="reportTargetAll"></chunTaiSAP>
-        </van-collapse-item> -->
+        </van-collapse-item>
         <van-collapse-item v-if="GZdata" name="10" title="商机关联的质感外墙业绩SAP(千元)">
           <van-row style="margin-top: -10px">
             <van-col span="12"><span class="leftTitle">本月</span></van-col

+ 93 - 32
src/views/home/HomeTarget.vue

@@ -1,6 +1,7 @@
 <template>
-  <div class="ABtarage">
+  <div class="ABtarage HomeTarget">
     <p class="updataTime">更新时间:{{ updataTime }}</p>
+    <!-- labelStyle 垃圾,不能全匹配,需要特殊处理 -->
     <template>
       <div class="container linep">
         <van-collapse v-model="activeNames">
@@ -14,13 +15,12 @@
                 <div
                   v-for="(periodItem, periodIndex) in homePageItem.children"
                   :key="'title-' + periodIndex">
-                  <van-col span="12">
+                  <van-col span="12" v-if="periodItem.name">
                     <span :class="periodIndex % 2 === 0 ? 'leftTitle' : 'rightTitle'">{{
                       periodItem.name
                     }}</span>
                   </van-col>
                 </div>
-
                 <!-- 动态渲染指标项 -->
                 <div v-if="homePageItem.children.length >= 2">
                   <!-- 遍历第一个周期的所有指标 -->
@@ -32,13 +32,7 @@
                       <p>
                         {{ metric.name }}:
                         <span class="colorblack">
-                          <template v-if="metric.indicatorUnit === '%'"
-                            >{{ metric.indicatorValue }}%</template
-                          >
-                          <template v-else>
-                            {{ Micrometer(metric.indicatorValue) }}
-                            {{ metric.indicatorUnit }}
-                          </template>
+                          {{ metric.indicatorDisplayValue }}
                         </span>
                       </p>
                     </van-col>
@@ -47,20 +41,9 @@
                       <p>
                         {{ homePageItem.children[1]?.children[metricIndex]?.name || '-' }}:
                         <span class="colorblack">
-                          <template
-                            v-if="
-                              homePageItem.children[1]?.children[metricIndex]?.indicatorUnit === '%'
-                            ">
-                            {{ homePageItem.children[1]?.children[metricIndex]?.indicatorValue }}%
-                          </template>
-                          <template v-else>
-                            {{
-                              Micrometer(
-                                homePageItem.children[1]?.children[metricIndex]?.indicatorValue,
-                              )
-                            }}
-                            {{ homePageItem.children[1]?.children[metricIndex]?.indicatorUnit }}
-                          </template>
+                          {{
+                            homePageItem.children[1]?.children[metricIndex]?.indicatorDisplayValue
+                          }}
                         </span>
                       </p>
                     </van-col>
@@ -77,7 +60,7 @@
                 v-for="(category, index) in homePageItem.children"
                 :key="index"
                 :style="{ marginTop: index > 0 ? '10px' : '0' }">
-                <van-col span="24">
+                <van-col span="24" v-if="category.name">
                   <span :class="index % 2 === 0 ? 'leftTitle' : 'rightTitle'">{{
                     category.name
                   }}</span>
@@ -91,7 +74,7 @@
                         :style="labelStyle(item.clickable)"
                         @click="onClick(item.clickable)"
                         class="colorbalck"
-                        >{{ Micrometer(item.indicatorValue) }}{{ item.indicatorUnit }}</span
+                        >{{ item.indicatorDisplayValue }}</span
                       >
                     </p>
                   </van-col>
@@ -115,7 +98,65 @@
                         :style="labelStyle(item.clickable)"
                         @click="onClick(item.clickable)"
                         class="colorbalck"
-                        >{{ Micrometer(item.indicatorValue) }}{{ item.indicatorUnit }}</span
+                        >{{ item.indicatorDisplayValue }}</span
+                      >
+                    </p>
+                  </van-col>
+                </div>
+              </van-row>
+            </van-collapse-item>
+            <van-collapse-item
+              v-if="homePageItem.labelStyle == 4"
+              :name="(index + 1).toString()"
+              :title="homePageItem.name">
+              <!-- 外层循环:遍历主要类别 -->
+              <template v-for="(category, index) in homePageItem.children">
+                <van-row
+                  :style="{
+                    width: category.name ? '49%' : '100%',
+                    float: category.name ? 'left' : 'none',
+                  }">
+                  <van-col
+                    span="20"
+                    :class="index % 2 === 0 ? 'leftTitle' : 'rightTitle'"
+                    v-if="category.name">
+                    <span>{{ category.name }}</span>
+                  </van-col>
+
+                  <!-- 内层循环:遍历各个统计项 -->
+                  <div v-for="(item, idx) in category.children" :key="idx">
+                    <van-col :span="24">
+                      <p>
+                        {{ item.name }}:<span
+                          :style="labelStyle(item.clickable)"
+                          @click="onClick(item.clickable)"
+                          class="colorbalck"
+                          >{{ item.indicatorDisplayValue }}</span
+                        >
+                      </p>
+                    </van-col>
+                  </div>
+                </van-row>
+              </template>
+            </van-collapse-item>
+            <van-collapse-item
+              v-if="homePageItem.labelStyle == 5"
+              :name="(index + 1).toString()"
+              :title="homePageItem.name">
+              <!-- 外层循环:遍历主要类别 -->
+              <van-row
+                v-for="(category, index) in homePageItem.children"
+                :key="index"
+                :style="{ marginTop: index == 0 ? '-10px' : '0' }">
+                <!-- 内层循环:遍历各个统计项 -->
+                <div v-for="(item, idx) in category.children" :key="idx">
+                  <van-col :span="24">
+                    <p>
+                      {{ item.name }}:<span
+                        :style="labelStyle(item.clickable)"
+                        @click="onClick(item.clickable)"
+                        class="colorbalck"
+                        >{{ item.indicatorDisplayValue }}</span
                       >
                     </p>
                   </van-col>
@@ -132,8 +173,14 @@
 <script>
 import store from '@/store';
 import { userTodayPlanNum, getReportInfo } from '@/api/index';
+import { mapState } from 'vuex';
 export default {
   name: 'home',
+  computed: {
+    ...mapState({
+      reportInfo: (state) => state.user.reportInfo,
+    }),
+  },
   props: {
     tabVal: {
       type: [String, Number],
@@ -212,10 +259,18 @@ export default {
     };
   },
   watch: {
-    tabVal: {
+    // tabVal: {
+    //   handler(val) {
+    //     if (val == 2) {
+    //       // keep-alive 模式watch执行了两次
+    //       this.initData();
+    //     }
+    //   },
+    //   immediate: true,
+    // },
+    reportInfo: {
       handler(val) {
-        if (val == 2) {
-          // keep-alive 模式watch执行了两次
+        if (val) {
           this.initData();
         }
       },
@@ -242,6 +297,11 @@ export default {
       this.userTodayPlanNum();
     },
     getReportInfo() {
+      if (this.reportInfo && this.reportInfo.homePageIndicatorList != null) {
+        this.homePageIndicatorList = this.reportInfo.homePageIndicatorList;
+        this.updataTime = this.reportInfo.homePageIndicatorUpdateTime;
+      }
+      return;
       let loading1 = this.$toast.loading({
         duration: 0,
         message: '加载中...',
@@ -423,8 +483,9 @@ export default {
   padding: 14px 0px;
 }
 
-.storeTypeHome .van-collapse-item__content {
-  padding: 0;
+.HomeTarget .van-collapse-item__content {
+  padding: 0px 15px 15px 15px;
+  overflow: hidden;
 }
 
 .storeTypeHome .storeTypeHomeList .van-cell__title {

+ 43 - 2
src/views/home/bottomBtn.vue

@@ -105,7 +105,13 @@
 </template>
 <script>
 import { getReportInfo } from '@/api/index';
+import { mapState } from 'vuex';
 export default {
+  computed: {
+    ...mapState({
+      reportInfo: (state) => state.user.reportInfo,
+    }),
+  },
   props: {
     tabVal: {
       type: [String, Number],
@@ -130,11 +136,46 @@ export default {
       reportType: null,
     };
   },
+  watch: {
+    reportInfo: {
+      handler(val) {
+        if (val) {
+          this.getReportInfo();
+        }
+      },
+      immediate: true,
+    },
+  },
   activated() {
-    this.getReportInfo();
+    // this.getReportInfo();
   },
   methods: {
-    getReportInfo(callback) {
+    getReportInfo() {
+      if (this.reportInfo) {
+        let reportInfo = this.reportInfo;
+        if (reportInfo.postType == 'GZ') {
+          this.GZdata = true;
+        } else {
+          this.GZdata = false;
+        }
+        this.proccessPendingNum = reportInfo.proccessPendingNum;
+        this.reportInfoData = reportInfo;
+        this.approvalButton = reportInfo.approvalButton;
+        this.powerGrade = reportInfo.positionId;
+        this.showButton = reportInfo.showButton;
+        this.reportType = reportInfo.reportType;
+        if (reportInfo.reportTargetAll != null) {
+          this.updataTime = reportInfo.reportTargetAll.updateTime;
+        }
+        this.approvalPendingNum = reportInfo.approvalPendingNum;
+        this.type = reportInfo.userType;
+        // 金牌店老板生日提醒
+        if (reportInfo.ownerBirthdayReminds && reportInfo.ownerBirthdayReminds.length) {
+          this.ownerBirthdayBoxFlag = true;
+          this.ownerBirthdayReminds = reportInfo.ownerBirthdayReminds.join(',');
+        }
+      }
+      return;
       getReportInfo({ isContent: false }).then((res) => {
         if (res.code == 200) {
           if (res.data.postType == 'GZ') {

+ 51 - 28
src/views/home/hintTabPage/index.vue

@@ -452,30 +452,7 @@ export default {
             ],
           },
           {
-            title: '同城分销-涂料店',
-            titleProp: 'TuLiao',
-            bagColor: '#88abda',
-            visitDetail: [
-              {
-                leftTable: '本月累计:',
-                leftProp: 'month',
-                leftUnit: '家',
-                leftIsClick: false,
-              },
-              {
-                leftTable: '今年累计:',
-                leftProp: 'year',
-                leftUnit: '家',
-                leftIsClick: false,
-                rightTable: '7天未结案:',
-                rightProp: 'TuLiaoAbnormalNum',
-                rightUnit: '家',
-                rightIsClick: true,
-              },
-            ],
-          },
-          {
-            title: '同城分销-其他店',
+            title: '仿石漆店',
             titleProp: 'QiTa',
             bagColor: '#8f82bc',
             visitDetail: [
@@ -490,13 +467,59 @@ export default {
                 leftProp: 'year',
                 leftUnit: '家',
                 leftIsClick: false,
-                rightTable: '7天未结案:',
-                rightProp: 'QiTaAbnormalNum',
-                rightUnit: '家',
-                rightIsClick: true,
+                // rightTable: '7天未结案:',
+                // rightProp: 'QiTaAbnormalNum',
+                // rightUnit: '家',
+                // rightIsClick: true,
               },
             ],
           },
+          // {
+          //   title: '同城分销-涂料店',
+          //   titleProp: 'TuLiao',
+          //   bagColor: '#88abda',
+          //   visitDetail: [
+          //     {
+          //       leftTable: '本月累计:',
+          //       leftProp: 'month',
+          //       leftUnit: '家',
+          //       leftIsClick: false,
+          //     },
+          //     {
+          //       leftTable: '今年累计:',
+          //       leftProp: 'year',
+          //       leftUnit: '家',
+          //       leftIsClick: false,
+          //       rightTable: '7天未结案:',
+          //       rightProp: 'TuLiaoAbnormalNum',
+          //       rightUnit: '家',
+          //       rightIsClick: true,
+          //     },
+          //   ],
+          // },
+          // {
+          //   title: '同城分销-其他店',
+          //   titleProp: 'QiTa',
+          //   bagColor: '#8f82bc',
+          //   visitDetail: [
+          //     {
+          //       leftTable: '本月累计:',
+          //       leftProp: 'month',
+          //       leftUnit: '家',
+          //       leftIsClick: false,
+          //     },
+          //     {
+          //       leftTable: '今年累计:',
+          //       leftProp: 'year',
+          //       leftUnit: '家',
+          //       leftIsClick: false,
+          //       rightTable: '7天未结案:',
+          //       rightProp: 'QiTaAbnormalNum',
+          //       rightUnit: '家',
+          //       rightIsClick: true,
+          //     },
+          //   ],
+          // },
         ],
         resData: null,
       },

+ 34 - 30
src/views/home/index.vue

@@ -47,12 +47,14 @@ import HomeTarget from './HomeTarget.vue';
 import { mapState } from 'vuex';
 import bottomBtn from './bottomBtn.vue';
 import { WXdigest } from '@/utils/digest';
+import store from '@/store';
 export default {
   name: 'home',
   components: { tabBar, hintTabPage, ABtarget, HomeTarget, bottomBtn },
   computed: {
     ...mapState({
       userInfo: (state) => state.user.userInfo,
+      reportInfo: (state) => state.user.reportInfo,
     }),
   },
   data() {
@@ -82,15 +84,8 @@ export default {
     },
   },
   activated() {
+    this.getReportInfo();
     WXdigest();
-    if (this.tabVal == '-1') {
-      // 从其他页面跳转过来如果;要重新获取对应tab数据
-      // if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
-    } else if (this.tabVal == '0') {
-      // if (this.$refs.Atarget) this.$refs.Atarget.initData();
-    } else if (this.tabVal == '1') {
-      // if (this.$refs.Btarget) this.$refs.Btarget.initData();
-    }
   },
   created() {
     this.getDict();
@@ -109,19 +104,32 @@ export default {
       this.isLoading = false;
     },
     async getDict(isRefresh) {
+      let postType = this.userInfo.postType;
       let postName = this.userInfo.postName;
       if (postName == '质感销售负责人' || postName == '质感销售专员') {
         this.onlyShowHomeTarget = true;
       } else {
-        this.onlyShowHomeTarget = false;
-        let postType = this.userInfo.postType;
-        // postType:人员类型,JZ(家装)、GZ(公装)、YF(应服)、DIY(DIY)
-        if (postType == 'JZ' || postType == 'GZ') {
-          localStorage.setItem('isGZorJZ', 'true');
-          this.isGZorJZ = 'true';
+        // <!-- 0-历史指标  1-动态指标,String类型 -->
+        if (postType == 'GZ' || postType == 'BMD') {
+          if (this.reportInfo.targetType == '0') {
+            this.onlyShowHomeTarget = false;
+          } else if (this.reportInfo.targetType == '1') {
+            this.onlyShowHomeTarget = true;
+          }
+          if (postType == 'GZ') {
+            localStorage.setItem('isGZorJZ', 'true');
+            this.isGZorJZ = 'true';
+          }
         } else {
-          localStorage.setItem('isGZorJZ', 'false');
-          this.isGZorJZ = 'false';
+          this.onlyShowHomeTarget = false;
+          // postType:人员类型,JZ(家装)、GZ(公装)、YF(应服)、DIY(DIY)
+          if (postType == 'JZ') {
+            localStorage.setItem('isGZorJZ', 'true');
+            this.isGZorJZ = 'true';
+          } else {
+            localStorage.setItem('isGZorJZ', 'false');
+            this.isGZorJZ = 'false';
+          }
         }
       }
       // 家装或工装不显示提示类tab
@@ -170,20 +178,16 @@ export default {
       // window.location.href = process.env.VUE_APP_SSB_LINK + "/homeIndex"
     },
     getReportInfo() {
-      getReportInfo({ isContent: false }).then((res) => {
-        if (res.code == 200) {
-          localStorage.setItem('powerGrade', res.data.positionId);
-          localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
-          localStorage.setItem('isDiy', res.data.diy);
-          localStorage.setItem('uType', res.data.userType);
-          localStorage.setItem('jzType', res.data.jzType);
-          localStorage.setItem('customerVisits', res.data.customerManagerVisits);
-          localStorage.setItem('postType', res.data.postType);
-          this.userType = res.data.userType;
-        } else {
-          this.$toast(res.msg);
-        }
-      });
+      this.toastLoading(0, '加载中...', true);
+      // 获取移动端获取用户信息接口
+      store
+        .dispatch('getReportInfoDeta')
+        .then(() => {
+          this.toastLoading().clear();
+        })
+        .catch(() => {
+          this.toastLoading().clear();
+        });
     },
     deepseek() {
       buryingPoint({

+ 16 - 3
src/views/week/daily.vue

@@ -32,9 +32,22 @@
       <template v-else>
         <van-collapse v-model="activeNames" style="margin-top: -3px">
           <template v-if="!YFQuota">
-            <!-- YFQuota:应用服务平台 不显示各项指标 -->
-            <Atarget :reportInfo="reportTarget"></Atarget>
-            <Btarget :reportInfo="reportTarget"></Btarget>
+            <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+              <!-- 0-历史指标  1-动态指标,String类型 -->
+              <target
+                v-if="reportTarget.targetType == '1'"
+                :homePageIndicatorDate="homePageIndicatorList"></target>
+              <template v-else>
+                <!-- 历史指标 -->
+                <Atarget :reportInfo="reportTarget"></Atarget>
+                <Btarget :reportInfo="reportTarget"></Btarget>
+              </template>
+            </template>
+            <template v-else>
+              <!-- YFQuota:应用服务平台 不显示各项指标 -->
+              <Atarget :reportInfo="reportTarget"></Atarget>
+              <Btarget :reportInfo="reportTarget"></Btarget>
+            </template>
           </template>
         </van-collapse>
       </template>

+ 12 - 1
src/views/week/dailyApproval.vue

@@ -16,7 +16,18 @@
       </template>
       <template v-else>
         <van-collapse v-model="activeNames" style="margin-top: -3px">
-          <template v-if="!YFQuota">
+          <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+            <!-- 0-历史指标  1-动态指标,String类型 -->
+            <target
+              v-if="reportTarget.targetType == '1'"
+              :homePageIndicatorDate="homePageIndicatorList"></target>
+            <template v-else>
+              <!-- 历史指标 -->
+              <Atarget :reportInfo="reportTarget"></Atarget>
+              <Btarget :reportInfo="reportTarget"></Btarget>
+            </template>
+          </template>
+          <template v-else-if="!YFQuota">
             <!-- YFQuota:应用服务平台 不显示各项指标 -->
             <Atarget :reportInfo="reportTarget"></Atarget>
             <Btarget :reportInfo="reportTarget"></Btarget>

+ 16 - 3
src/views/week/dailyDetails.vue

@@ -35,9 +35,22 @@
         <template v-else>
           <van-collapse v-model="activeNames" style="margin-top: -3px">
             <template v-if="!YFQuota">
-              <!-- YFQuota:应用服务平台 不显示各项指标 -->
-              <Atarget :reportInfo="reportTarget"></Atarget>
-              <Btarget :reportInfo="reportTarget"></Btarget>
+              <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+                <!-- 0-历史指标  1-动态指标,String类型 -->
+                <target
+                  v-if="reportTarget.targetType == '1'"
+                  :homePageIndicatorDate="homePageIndicatorList"></target>
+                <template v-else>
+                  <!-- 历史指标 -->
+                  <Atarget :reportInfo="reportTarget"></Atarget>
+                  <Btarget :reportInfo="reportTarget"></Btarget>
+                </template>
+              </template>
+              <template v-else>
+                <!-- YFQuota:应用服务平台 不显示各项指标 -->
+                <Atarget :reportInfo="reportTarget"></Atarget>
+                <Btarget :reportInfo="reportTarget"></Btarget>
+              </template>
             </template>
           </van-collapse>
         </template>

+ 16 - 3
src/views/week/dailyHistoricalDetails.vue

@@ -43,9 +43,22 @@
         <template v-else>
           <van-collapse v-model="activeNames" style="margin-top: -3px">
             <template v-if="!YFQuota">
-              <!-- YFQuota:应用服务平台 不显示各项指标 -->
-              <Atarget :reportInfo="reportTarget"></Atarget>
-              <Btarget :reportInfo="reportTarget"></Btarget>
+              <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+                <!-- 0-历史指标  1-动态指标,String类型 -->
+                <target
+                  v-if="reportTarget.targetType == '1'"
+                  :homePageIndicatorDate="homePageIndicatorList"></target>
+                <template v-else>
+                  <!-- 历史指标 -->
+                  <Atarget :reportInfo="reportTarget"></Atarget>
+                  <Btarget :reportInfo="reportTarget"></Btarget>
+                </template>
+              </template>
+              <template v-else>
+                <!-- YFQuota:应用服务平台 不显示各项指标 -->
+                <Atarget :reportInfo="reportTarget"></Atarget>
+                <Btarget :reportInfo="reportTarget"></Btarget>
+              </template>
             </template>
           </van-collapse>
         </template>

+ 17 - 3
src/views/week/doubleWeekly.vue

@@ -27,8 +27,20 @@
       <div class="lineGrey"></div>
       <div class="lineGrey"></div>
       <van-collapse v-model="activeNames">
-        <Atarget :reportInfo="reportTarget"></Atarget>
-        <Btarget :reportInfo="reportTarget"></Btarget>
+        <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+          <!-- 0-历史指标  1-动态指标,String类型 -->
+          <template v-if="reportTarget.targetType == '1'">
+            <target :homePageIndicatorDate="homePageIndicatorList"></target>
+          </template>
+          <template v-if="reportTarget.targetType == '0'">
+            <Atarget :reportInfo="reportTarget"></Atarget>
+            <Btarget :reportInfo="reportTarget"></Btarget>
+          </template>
+        </template>
+        <template v-else>
+          <Atarget :reportInfo="reportTarget"></Atarget>
+          <Btarget :reportInfo="reportTarget"></Btarget>
+        </template>
         <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
         <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
           <reportCustom
@@ -118,7 +130,8 @@ import neiwaiqiangpingtu from '@/views/componentsTarget/neiwaiqiangpingtu';
 import zhiganwaiqiangSAP from '@/views/componentsTarget/zhiganwaiqiangSAP';
 import Atarget from '@/views/home/Atarget.vue';
 import Btarget from '@/views/home/Btarget.vue';
-import reportCustom from './reportCustom';
+import reportCustom from './reportCustom.vue';
+import target from './target.vue';
 
 export default {
   name: 'home',
@@ -133,6 +146,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {

+ 16 - 2
src/views/week/doubleWeeklyApproval.vue

@@ -13,8 +13,20 @@
       <div class="lineGrey"></div>
       <div class="lineGrey"></div>
       <van-collapse v-model="activeNames">
-        <Atarget :reportInfo="reportTarget"></Atarget>
-        <Btarget :reportInfo="reportTarget"></Btarget>
+        <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+          <!-- 0-历史指标  1-动态指标,String类型 -->
+          <template v-if="reportTarget.targetType == '1'">
+            <target :homePageIndicatorDate="homePageIndicatorList"></target>
+          </template>
+          <template v-if="reportTarget.targetType == '0'">
+            <Atarget :reportInfo="reportTarget"></Atarget>
+            <Btarget :reportInfo="reportTarget"></Btarget>
+          </template>
+        </template>
+        <template v-else>
+          <Atarget :reportInfo="reportTarget"></Atarget>
+          <Btarget :reportInfo="reportTarget"></Btarget>
+        </template>
         <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
           <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
 
@@ -125,6 +137,7 @@ import zhiganwaiqiangSAP from '@/views/componentsTarget/zhiganwaiqiangSAP';
 import Atarget from '@/views/home/Atarget.vue';
 import Btarget from '@/views/home/Btarget.vue';
 import reportCustom from './reportCustom.vue';
+import target from './target.vue';
 
 export default {
   name: 'home',
@@ -139,6 +152,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {

+ 16 - 2
src/views/week/doubleWeeklyDetils.vue

@@ -14,8 +14,20 @@
     <!--        主体内容-->
     <div class="container linep">
       <van-collapse v-model="activeNames">
-        <Atarget :reportInfo="reportTarget"></Atarget>
-        <Btarget :reportInfo="reportTarget"></Btarget>
+        <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+          <!-- 0-历史指标  1-动态指标,String类型 -->
+          <template v-if="reportTarget.targetType == '1'">
+            <target :homePageIndicatorDate="homePageIndicatorList"></target>
+          </template>
+          <template v-if="reportTarget.targetType == '0'">
+            <Atarget :reportInfo="reportTarget"></Atarget>
+            <Btarget :reportInfo="reportTarget"></Btarget>
+          </template>
+        </template>
+        <template v-else>
+          <Atarget :reportInfo="reportTarget"></Atarget>
+          <Btarget :reportInfo="reportTarget"></Btarget>
+        </template>
         <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
           <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
           <reportCustom
@@ -137,6 +149,7 @@ import zhiganwaiqiangSAP from '@/views/componentsTarget/zhiganwaiqiangSAP';
 import Atarget from '@/views/home/Atarget.vue';
 import Btarget from '@/views/home/Btarget.vue';
 import reportCustom from './reportCustom.vue';
+import target from './target.vue';
 
 export default {
   name: 'home',
@@ -151,6 +164,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {

+ 169 - 34
src/views/week/target.vue

@@ -1,9 +1,10 @@
 <template>
-  <div class="ABtarage">
+  <div class="ABtarage HomeTarget">
+    <!-- labelStyle 垃圾,不能全匹配,需要特殊处理 -->
     <template>
-      <div class="container linep" style="margin: 0">
+      <div class="container linep">
         <van-collapse v-model="activeNames">
-          <div v-for="(homePageItem, index) in homePageIndicatorDate" :key="index">
+          <div v-for="(homePageItem, index) in homePageIndicatorList" :key="index">
             <van-collapse-item
               v-if="homePageItem.labelStyle == 1"
               :name="(index + 1).toString()"
@@ -13,13 +14,12 @@
                 <div
                   v-for="(periodItem, periodIndex) in homePageItem.children"
                   :key="'title-' + periodIndex">
-                  <van-col span="12">
+                  <van-col span="12" v-if="periodItem.name">
                     <span :class="periodIndex % 2 === 0 ? 'leftTitle' : 'rightTitle'">{{
                       periodItem.name
                     }}</span>
                   </van-col>
                 </div>
-
                 <!-- 动态渲染指标项 -->
                 <div v-if="homePageItem.children.length >= 2">
                   <!-- 遍历第一个周期的所有指标 -->
@@ -31,13 +31,7 @@
                       <p>
                         {{ metric.name }}:
                         <span class="colorblack">
-                          <template v-if="metric.indicatorUnit === '%'"
-                            >{{ metric.indicatorValue }}%</template
-                          >
-                          <template v-else>
-                            {{ Micrometer(metric.indicatorValue) }}
-                            {{ metric.indicatorUnit }}
-                          </template>
+                          {{ metric.indicatorDisplayValue }}
                         </span>
                       </p>
                     </van-col>
@@ -46,20 +40,9 @@
                       <p>
                         {{ homePageItem.children[1]?.children[metricIndex]?.name || '-' }}:
                         <span class="colorblack">
-                          <template
-                            v-if="
-                              homePageItem.children[1]?.children[metricIndex]?.indicatorUnit === '%'
-                            ">
-                            {{ homePageItem.children[1]?.children[metricIndex]?.indicatorValue }}%
-                          </template>
-                          <template v-else>
-                            {{
-                              Micrometer(
-                                homePageItem.children[1]?.children[metricIndex]?.indicatorValue,
-                              )
-                            }}
-                            {{ homePageItem.children[1]?.children[metricIndex]?.indicatorUnit }}
-                          </template>
+                          {{
+                            homePageItem.children[1]?.children[metricIndex]?.indicatorDisplayValue
+                          }}
                         </span>
                       </p>
                     </van-col>
@@ -76,7 +59,7 @@
                 v-for="(category, index) in homePageItem.children"
                 :key="index"
                 :style="{ marginTop: index > 0 ? '10px' : '0' }">
-                <van-col span="24">
+                <van-col span="24" v-if="category.name">
                   <span :class="index % 2 === 0 ? 'leftTitle' : 'rightTitle'">{{
                     category.name
                   }}</span>
@@ -90,7 +73,7 @@
                         :style="labelStyle(item.clickable)"
                         @click="onClick(item.clickable)"
                         class="colorbalck"
-                        >{{ Micrometer(item.indicatorValue) }}{{ item.indicatorUnit }}</span
+                        >{{ item.indicatorDisplayValue }}</span
                       >
                     </p>
                   </van-col>
@@ -114,7 +97,65 @@
                         :style="labelStyle(item.clickable)"
                         @click="onClick(item.clickable)"
                         class="colorbalck"
-                        >{{ Micrometer(item.indicatorValue) }}{{ item.indicatorUnit }}</span
+                        >{{ item.indicatorDisplayValue }}</span
+                      >
+                    </p>
+                  </van-col>
+                </div>
+              </van-row>
+            </van-collapse-item>
+            <van-collapse-item
+              v-if="homePageItem.labelStyle == 4"
+              :name="(index + 1).toString()"
+              :title="homePageItem.name">
+              <!-- 外层循环:遍历主要类别 -->
+              <template v-for="(category, index) in homePageItem.children">
+                <van-row
+                  :style="{
+                    width: category.name ? '49%' : '100%',
+                    float: category.name ? 'left' : 'none',
+                  }">
+                  <van-col
+                    span="20"
+                    :class="index % 2 === 0 ? 'leftTitle' : 'rightTitle'"
+                    v-if="category.name">
+                    <span>{{ category.name }}</span>
+                  </van-col>
+
+                  <!-- 内层循环:遍历各个统计项 -->
+                  <div v-for="(item, idx) in category.children" :key="idx">
+                    <van-col :span="24">
+                      <p>
+                        {{ item.name }}:<span
+                          :style="labelStyle(item.clickable)"
+                          @click="onClick(item.clickable)"
+                          class="colorbalck"
+                          >{{ item.indicatorDisplayValue }}</span
+                        >
+                      </p>
+                    </van-col>
+                  </div>
+                </van-row>
+              </template>
+            </van-collapse-item>
+            <van-collapse-item
+              v-if="homePageItem.labelStyle == 5"
+              :name="(index + 1).toString()"
+              :title="homePageItem.name">
+              <!-- 外层循环:遍历主要类别 -->
+              <van-row
+                v-for="(category, index) in homePageItem.children"
+                :key="index"
+                :style="{ marginTop: index == 0 ? '-10px' : '0' }">
+                <!-- 内层循环:遍历各个统计项 -->
+                <div v-for="(item, idx) in category.children" :key="idx">
+                  <van-col :span="24">
+                    <p>
+                      {{ item.name }}:<span
+                        :style="labelStyle(item.clickable)"
+                        @click="onClick(item.clickable)"
+                        class="colorbalck"
+                        >{{ item.indicatorDisplayValue }}</span
                       >
                     </p>
                   </van-col>
@@ -130,11 +171,19 @@
 
 <script>
 import store from '@/store';
+import { userTodayPlanNum, getReportInfo } from '@/api/index';
+import { mapState } from 'vuex';
 export default {
   name: 'home',
+  computed: {
+    ...mapState({
+      reportInfo: (state) => state.user.reportInfo,
+    }),
+  },
   props: {
-    homePageIndicatorDate: {
-      type: Array,
+    tabVal: {
+      type: [String, Number],
+      default: '-1',
     },
   },
   data() {
@@ -208,6 +257,25 @@ export default {
       GZdata: false,
     };
   },
+  watch: {
+    // tabVal: {
+    //   handler(val) {
+    //     if (val == 2) {
+    //       // keep-alive 模式watch执行了两次
+    //       this.initData();
+    //     }
+    //   },
+    //   immediate: true,
+    // },
+    reportInfo: {
+      handler(val) {
+        if (val) {
+          this.initData();
+        }
+      },
+      immediate: true,
+    },
+  },
   methods: {
     labelStyle(val) {
       return {
@@ -222,6 +290,72 @@ export default {
         this.$router.push({ path: '/noVisit' });
       }
     },
+    initData() {
+      console.log(this.tabVal);
+      this.getReportInfo();
+      this.userTodayPlanNum();
+    },
+    getReportInfo() {
+      if (this.reportInfo && this.reportInfo.homePageIndicatorList != null) {
+        this.homePageIndicatorList = this.reportInfo.homePageIndicatorList;
+        this.updataTime = this.reportInfo.homePageIndicatorUpdateTime;
+      }
+      return;
+      let loading1 = this.$toast.loading({
+        duration: 0,
+        message: '加载中...',
+        forbidClick: true,
+      });
+      getReportInfo({ isContent: false }).then((res) => {
+        if (res.code == 200) {
+          loading1.clear();
+          localStorage.setItem('powerGrade', res.data.positionId);
+          localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
+          localStorage.setItem('isDiy', res.data.diy);
+          localStorage.setItem('uType', res.data.userType);
+          localStorage.setItem('jzType', res.data.jzType);
+          localStorage.setItem('customerVisits', res.data.customerManagerVisits);
+          localStorage.setItem('postType', res.data.postType);
+          if (res.data.homePageIndicatorList != null) {
+            this.homePageIndicatorList = res.data.homePageIndicatorList;
+            this.updataTime = res.data.homePageIndicatorUpdateTime;
+          }
+          this.type = res.data.userType;
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
+    userTodayPlanNum() {
+      localStorage.setItem('outvstoreName', '');
+      localStorage.setItem('outvchainName', '');
+      localStorage.removeItem('outvstoreLabelTypes');
+      localStorage.removeItem('outvjpdStoreLevelTypes');
+      localStorage.removeItem('outvstoreCategoryList');
+      localStorage.setItem('outvchainCode', '');
+      localStorage.setItem('outvstoreName', '');
+      localStorage.setItem('deviveStoreName', '');
+      localStorage.setItem('outvsortType', '');
+      localStorage.setItem('outsortParam', '');
+      localStorage.setItem('lat', '');
+      localStorage.setItem('lon', '');
+      userTodayPlanNum().then((res) => {
+        if (res.code == 200) {
+          this.todayGoal = res.data;
+          this.progressWidth = (this.todayGoal.finishNum / this.todayGoal.planNum) * 100 + '%';
+          localStorage.setItem('nickName', res.data.user.nickName);
+          localStorage.setItem('postName', res.data.user.postName);
+          localStorage.setItem('zipPhoto', res.data.zipPhoto);
+          localStorage.setItem('storeType', res.data.user.type);
+          localStorage.setItem('deptLevel', res.data.user.depts[0].deptLevel);
+          localStorage.setItem('userId', res.data.user.userId);
+          localStorage.setItem('deptIds', JSON.stringify(res.data.user.deptIds));
+          this.monthNoVisit = res.data.monthNoVisit;
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
   },
 };
 </script>
@@ -236,7 +370,7 @@ export default {
 }
 
 .container {
-  /* margin: 10px; */
+  margin: 10px 0;
 }
 
 .container .van-collapse-item {
@@ -348,8 +482,9 @@ export default {
   padding: 14px 0px;
 }
 
-.storeTypeHome .van-collapse-item__content {
-  padding: 0;
+.HomeTarget .van-collapse-item__content {
+  padding: 0px 15px 15px 15px;
+  overflow: hidden;
 }
 
 .storeTypeHome .storeTypeHomeList .van-cell__title {

+ 17 - 3
src/views/week/weekly.vue

@@ -29,8 +29,20 @@
       <van-collapse v-model="activeNames" style="margin-top: -3px">
         <template v-if="!YFQuota">
           <!-- YFQuota:应用服务平台 不显示各项指标 -->
-          <Atarget :reportInfo="reportTarget"></Atarget>
-          <Btarget :reportInfo="reportTarget"></Btarget>
+          <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+            <!-- 0-历史指标  1-动态指标,String类型 -->
+            <template v-if="reportTarget.targetType == '1'">
+              <target :homePageIndicatorDate="homePageIndicatorList"></target>
+            </template>
+            <template v-if="reportTarget.targetType == '0'">
+              <Atarget :reportInfo="reportTarget"></Atarget>
+              <Btarget :reportInfo="reportTarget"></Btarget>
+            </template>
+          </template>
+          <template v-else>
+            <Atarget :reportInfo="reportTarget"></Atarget>
+            <Btarget :reportInfo="reportTarget"></Btarget>
+          </template>
         </template>
         <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
         <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
@@ -161,7 +173,8 @@ import moshouqiSAP from '@/views/componentsTarget/moshouqiSAP';
 import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
 import Atarget from '@/views/home/Atarget.vue';
 import Btarget from '@/views/home/Btarget.vue';
-import reportCustom from '@/views/week/reportCustom';
+import reportCustom from './reportCustom.vue';
+import target from './target.vue';
 export default {
   name: 'home',
   components: {
@@ -179,6 +192,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {

+ 17 - 3
src/views/week/weeklyApproval.vue

@@ -14,8 +14,20 @@
       <van-collapse v-model="activeNames">
         <template v-if="!YFQuota">
           <!-- YFQuota:应用服务平台 不显示各项指标 -->
-          <Atarget :reportInfo="reportTarget"></Atarget>
-          <Btarget :reportInfo="reportTarget"></Btarget>
+          <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+            <!-- 0-历史指标  1-动态指标,String类型 -->
+            <template v-if="reportTarget.targetType == '1'">
+              <target :homePageIndicatorDate="homePageIndicatorList"></target>
+            </template>
+            <template v-if="reportTarget.targetType == '0'">
+              <Atarget :reportInfo="reportTarget"></Atarget>
+              <Btarget :reportInfo="reportTarget"></Btarget>
+            </template>
+          </template>
+          <template v-else>
+            <Atarget :reportInfo="reportTarget"></Atarget>
+            <Btarget :reportInfo="reportTarget"></Btarget>
+          </template>
         </template>
         <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
           <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
@@ -160,7 +172,8 @@ import moshouqiSAP from '@/views/componentsTarget/moshouqiSAP';
 import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
 import Atarget from '@/views/home/Atarget.vue';
 import Btarget from '@/views/home/Btarget.vue';
-import reportCustom from '@/views/week/reportCustom';
+import reportCustom from './reportCustom.vue';
+import target from './target.vue';
 export default {
   name: 'weeklyApproval',
   components: {
@@ -178,6 +191,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {

+ 24 - 4
src/views/week/weeklyApprovalDetils.vue

@@ -14,12 +14,23 @@
       <van-collapse v-model="activeNames">
         <template v-if="!YFQuota">
           <!-- YFQuota:应用服务平台 不显示各项指标 -->
-          <Atarget :reportInfo="reportTarget"></Atarget>
-          <Btarget :reportInfo="reportTarget"></Btarget>
+          <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+            <!-- 0-历史指标  1-动态指标,String类型 -->
+            <template v-if="reportTarget.targetType == '1'">
+              <target :homePageIndicatorDate="homePageIndicatorList"></target>
+            </template>
+            <template v-if="reportTarget.targetType == '0'">
+              <Atarget :reportInfo="reportTarget"></Atarget>
+              <Btarget :reportInfo="reportTarget"></Btarget>
+            </template>
+          </template>
+          <template v-else>
+            <Atarget :reportInfo="reportTarget"></Atarget>
+            <Btarget :reportInfo="reportTarget"></Btarget>
+          </template>
         </template>
         <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
           <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
-
           <reportCustom
             ref="reportCustom"
             :disabled="true"
@@ -174,7 +185,9 @@ import moshouqiSAP from '@/views/componentsTarget/moshouqiSAP';
 import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
 import Atarget from '@/views/home/Atarget.vue';
 import Btarget from '@/views/home/Btarget.vue';
-import reportCustom from '@/views/week/reportCustom';
+import reportCustom from './reportCustom.vue';
+import HomeTarget from '@/views/home/HomeTarget.vue';
+import target from './target.vue';
 
 export default {
   name: 'home',
@@ -193,6 +206,8 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    HomeTarget,
+    target,
   },
   data() {
     return {
@@ -238,14 +253,18 @@ export default {
       JZQuota: false,
       YFQuota: false, //应用服务
       GZdata: false,
+      homePageIndicatorList: null,
     };
   },
   created() {
+    this.postName = localStorage.getItem('postName');
+    this.homePageIndicatorList = null;
     this.powerGrade = localStorage.getItem('powerGrade');
     this.getDetailById();
   },
   watch: {
     $route(to, from) {
+      this.postName = localStorage.getItem('postName');
       this.powerGrade = localStorage.getItem('powerGrade');
       if (to.path == '/weeklyApprovalDetils') {
         this.getDetailById();
@@ -278,6 +297,7 @@ export default {
           } else {
             this.GZdata = false;
           }
+          this.homePageIndicatorList = res.data.homePageIndicatorList || null;
           var dayTime = res.data.date;
           this.type = res.data.userType;
           this.ptitle = res.data.pdeptName + '-' + res.data.ppostName + '-' + res.data.pnickName;

+ 17 - 3
src/views/week/weeklyHistoricalDetils.vue

@@ -15,8 +15,20 @@
       <van-collapse v-model="activeNames">
         <template v-if="!YFQuota">
           <!-- YFQuota:应用服务平台 不显示各项指标 -->
-          <Atarget :reportInfo="reportTarget"></Atarget>
-          <Btarget :reportInfo="reportTarget"></Btarget>
+          <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+            <!-- 0-历史指标  1-动态指标,String类型 -->
+            <template v-if="reportTarget.targetType == '1'">
+              <target :homePageIndicatorDate="homePageIndicatorList"></target>
+            </template>
+            <template v-if="reportTarget.targetType == '0'">
+              <Atarget :reportInfo="reportTarget"></Atarget>
+              <Btarget :reportInfo="reportTarget"></Btarget>
+            </template>
+          </template>
+          <template v-else>
+            <Atarget :reportInfo="reportTarget"></Atarget>
+            <Btarget :reportInfo="reportTarget"></Btarget>
+          </template>
         </template>
         <div class="contentContainer" v-if="reportTarget.isHistory == '0'">
           <!-- isHistory 是否为历史汇报:0-新汇报 1-历史汇报 -->
@@ -186,7 +198,8 @@ import moshouqiSAP from '@/views/componentsTarget/moshouqiSAP';
 import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
 import Atarget from '@/views/home/Atarget.vue';
 import Btarget from '@/views/home/Btarget.vue';
-import reportCustom from '@/views/week/reportCustom';
+import reportCustom from './reportCustom.vue';
+import target from './target.vue';
 export default {
   name: 'home',
   components: {
@@ -204,6 +217,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {