Browse Source

feature_20260209_质感日报同步首页指标

zhujindu 2 weeks ago
parent
commit
0cb6059b4a
2 changed files with 24 additions and 4 deletions
  1. 14 3
      src/views/home/HomeTarget.vue
  2. 10 1
      src/views/week/dailyApproval.vue

+ 14 - 3
src/views/home/HomeTarget.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="ABtarage">
-    <p class="updataTime" v-if="updataTimeFlag">更新时间:{{ updataTime }}</p>
+    <p class="updataTime" v-if="updataTime">更新时间:{{ updataTime }}</p>
     <template>
-      <div class="container linep" :style="{ margin: updataTimeFlag ? '10px' : '0px' }">
+      <div class="container linep" :style="{ margin: updataTime ? '10px' : '0px' }">
         <van-collapse v-model="activeNames">
           <div v-for="(homePageItem, index) in homePageIndicatorList" :key="index">
             <van-collapse-item
@@ -143,6 +143,12 @@ export default {
       type: Boolean,
       default: false,
     },
+    homePageIndicatorDate: {
+      type: Array,
+    },
+    homePageIndicatorUpdateTime: {
+      type: String,
+    },
   },
   data() {
     return {
@@ -242,7 +248,12 @@ export default {
     },
     initData() {
       console.log(this.tabVal);
-      this.getReportInfo();
+      if (this.homePageIndicatorUpdateTime) this.updataTime = this.homePageIndicatorUpdateTime;
+      if (!this.homePageIndicatorDate) {
+        this.getReportInfo();
+      } else {
+        this.homePageIndicatorList = this.homePageIndicatorDate;
+      }
       this.userTodayPlanNum();
     },
     getReportInfo() {

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

@@ -12,7 +12,10 @@
     <!--        主体内容-->
     <div class="container linep" v-if="reportTargetAll">
       <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-        <HomeTarget :tabVal="2" ref="HomeTarget"></HomeTarget>
+        <HomeTarget
+          :tabVal="2"
+          ref="HomeTarget"
+          :homePageIndicatorDate="homePageIndicatorList"></HomeTarget>
       </template>
       <template v-else>
         <van-collapse v-model="activeNames" v-if="!YFQuota">
@@ -615,6 +618,7 @@ export default {
       titlejz: '',
       visitIMG1Flag: false,
       postName: '',
+      homePageIndicatorList: null,
       //
     };
   },
@@ -739,6 +743,11 @@ export default {
       });
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         this.postName = res.data.postName;
+        if (this.postName == '质感销售负责人' || this.postName == '质感销售专员') {
+          this.homePageIndicatorList = res.data.homePageIndicatorList;
+        } else {
+          this.homePageIndicatorList = null;
+        }
         this.GZQuota = false;
         this.JZQuota = false;
         this.YFQuota = res.data.postType == 'YF' ? true : false;