Преглед изворни кода

feature_20260402_指标修改

zhujindu пре 1 недеља
родитељ
комит
00dbd85afb

+ 20 - 3
src/components/share.vue

@@ -64,8 +64,24 @@
         </template>
         <!-- 日报指标 -->
         <template v-if="isTarget">
-          <shareAtarget :reportInfo="reportTarget"></shareAtarget>
-          <shareBtarget :reportInfo="reportTarget"></shareBtarget>
+          <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
+            <!-- 0-历史指标  1-动态指标,String类型 -->
+            <target
+              v-if="reportTarget.targetType == '1'"
+              :homePageIndicatorDate="reportTarget.homePageIndicatorList"></target>
+            <template v-else>
+              <!-- 历史指标 -->
+              <shareAtarget :reportInfo="reportTarget"></shareAtarget>
+              <shareBtarget :reportInfo="reportTarget"></shareBtarget>
+            </template>
+          </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 +158,10 @@ import ShareAtarget from './shareAtarget.vue';
 import shareBtarget from './shareBtarget.vue';
 import shareReportCustom from './shareReportCustom.vue';
 import uploadAliOss from '@/utils/uploadAliOss';
+import target from '@/views/week/target.vue';
 export default {
   name: 'share',
-  components: { VueQr, ShareAtarget, shareReportCustom, shareBtarget },
+  components: { VueQr, ShareAtarget, shareReportCustom, shareBtarget, target },
   props: {
     // 日报数据
     reportTarget: {

+ 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>

+ 10 - 2
src/views/home/HomeTarget.vue

@@ -111,8 +111,15 @@
               :title="homePageItem.name">
               <!-- 外层循环:遍历主要类别 -->
               <template v-for="(category, index) in homePageItem.children">
-                <van-row :style="{ width: category.name ? '45%' : '1005' }" v-if="category.name">
-                  <van-col span="24" :class="index % 2 === 0 ? 'leftTitle' : 'rightTitle'">
+                <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>
 
@@ -478,6 +485,7 @@ export default {
 
 .HomeTarget .van-collapse-item__content {
   padding: 0px 15px 15px 15px;
+  overflow: hidden;
 }
 
 .storeTypeHome .storeTypeHomeList .van-cell__title {

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

@@ -448,30 +448,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: [
@@ -486,13 +463,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,
       },

+ 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>

+ 17 - 4
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>
@@ -199,7 +212,7 @@
             align-items: center;
             cursor: pointer;
           "
-          v-if="reportTarget.isHistory == '0'"
+          v-if="reportTarget.isHistory == '0' && !YFQuota"
           @click="isTarget = !isTarget">
           <van-checkbox v-model="isTarget" style="margin-right: 10px" @click.stop></van-checkbox>
           <span>日报指标</span>

+ 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>

+ 16 - 2
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
@@ -119,6 +131,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',
@@ -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-历史汇报 -->
 
@@ -124,6 +136,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',
@@ -138,6 +151,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {

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

@@ -12,8 +12,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
@@ -144,6 +156,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',
@@ -158,6 +171,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 {

+ 16 - 2
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'">
@@ -162,6 +174,7 @@ import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
 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',
   components: {
@@ -179,6 +192,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {

+ 16 - 2
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-历史汇报 -->
@@ -161,6 +173,7 @@ import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
 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: 'weeklyApproval',
   components: {
@@ -178,6 +191,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {

+ 1 - 5
src/views/week/weeklyApprovalDetils.vue

@@ -14,11 +14,7 @@
       <van-collapse v-model="activeNames">
         <template v-if="!YFQuota">
           <!-- YFQuota:应用服务平台 不显示各项指标 -->
-          <!-- 需求真垃圾 -->
-          <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-            <target :homePageIndicatorDate="homePageIndicatorList"></target>
-          </template>
-          <template v-else-if="GZdata">
+          <template v-if="reportTarget.postType == 'GZ' || reportTarget.postType == 'BMD'">
             <!-- 0-历史指标  1-动态指标,String类型 -->
             <template v-if="reportTarget.targetType == '1'">
               <target :homePageIndicatorDate="homePageIndicatorList"></target>

+ 16 - 2
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-历史汇报 -->
@@ -187,6 +199,7 @@ import fangshuiSAP from '@/views/componentsTarget/fangshuiSAP';
 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',
   components: {
@@ -204,6 +217,7 @@ export default {
     Atarget,
     Btarget,
     reportCustom,
+    target,
   },
   data() {
     return {