Browse Source

feature_20260209_质感日报同步首页指标

zhujindu 5 days ago
parent
commit
a2ebc9a0bd

+ 0 - 8
src/views/home/HomeTarget.vue

@@ -139,16 +139,9 @@ export default {
       type: [String, Number],
       type: [String, Number],
       default: '-1',
       default: '-1',
     },
     },
-    updataTimeFlag: {
-      type: Boolean,
-      default: false,
-    },
     homePageIndicatorDate: {
     homePageIndicatorDate: {
       type: Array,
       type: Array,
     },
     },
-    homePageIndicatorUpdateTime: {
-      type: String,
-    },
   },
   },
   data() {
   data() {
     return {
     return {
@@ -248,7 +241,6 @@ export default {
     },
     },
     initData() {
     initData() {
       console.log(this.tabVal);
       console.log(this.tabVal);
-      if (this.homePageIndicatorUpdateTime) this.updataTime = this.homePageIndicatorUpdateTime;
       if (!this.homePageIndicatorDate) {
       if (!this.homePageIndicatorDate) {
         this.getReportInfo();
         this.getReportInfo();
       } else {
       } else {

+ 1 - 1
src/views/home/index.vue

@@ -16,7 +16,7 @@
           <ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget>
           <ABtarget :tabVal="tabVal" ref="Btarget"></ABtarget>
         </van-tab>
         </van-tab>
         <van-tab title="首页指标" name="2" v-if="onlyShowHomeTarget == true">
         <van-tab title="首页指标" name="2" v-if="onlyShowHomeTarget == true">
-          <HomeTarget :tabVal="tabVal" ref="HomeTarget" :updataTimeFlag="true"></HomeTarget>
+          <HomeTarget :tabVal="tabVal" ref="HomeTarget"></HomeTarget>
         </van-tab>
         </van-tab>
       </van-tabs>
       </van-tabs>
       <div class="bottomBtn">
       <div class="bottomBtn">

+ 11 - 1
src/views/week/daily.vue

@@ -27,7 +27,10 @@
     <!--        主体内容-->
     <!--        主体内容-->
     <div class="container linepAdd">
     <div class="container linepAdd">
       <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
       <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-        <HomeTarget :tabVal="2" ref="HomeTarget"></HomeTarget>
+        <HomeTarget
+          :tabVal="2"
+          ref="HomeTarget"
+          :homePageIndicatorDate="homePageIndicatorList"></HomeTarget>
       </template>
       </template>
       <template v-else>
       <template v-else>
         <van-collapse v-model="activeNames" v-if="!YFQuota">
         <van-collapse v-model="activeNames" v-if="!YFQuota">
@@ -607,12 +610,14 @@ export default {
       notVisitReason: '', //今日拜访0家店的原因;
       notVisitReason: '', //今日拜访0家店的原因;
       photoSkuImgSummaryeList: null,
       photoSkuImgSummaryeList: null,
       postName: '',
       postName: '',
+      homePageIndicatorList: null,
     };
     };
   },
   },
   created() {
   created() {
     this.powerGrade = localStorage.getItem('powerGrade');
     this.powerGrade = localStorage.getItem('powerGrade');
     this.temporaryShow = this.$route.query.temporaryShow;
     this.temporaryShow = this.$route.query.temporaryShow;
     this.postName = localStorage.getItem('postName');
     this.postName = localStorage.getItem('postName');
+    this.homePageIndicatorList = null;
     if (this.$route.query.reportId != undefined) {
     if (this.$route.query.reportId != undefined) {
       this.getDetailById();
       this.getDetailById();
     } else {
     } else {
@@ -691,6 +696,11 @@ export default {
                 window.location.replace(window.location.origin + '/mobile/home');
                 window.location.replace(window.location.origin + '/mobile/home');
               });
               });
           } else {
           } else {
+            if (this.postName == '质感销售负责人' || this.postName == '质感销售专员') {
+              this.homePageIndicatorList = res.data.homePageIndicatorList;
+            } else {
+              this.homePageIndicatorList = null;
+            }
             localStorage.setItem('powerGrade', res.data.positionId);
             localStorage.setItem('powerGrade', res.data.positionId);
             localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
             localStorage.setItem('userDeptLevel', res.data.userDeptLevel);
             this.GZQuota = false;
             this.GZQuota = false;

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

@@ -26,7 +26,10 @@
       <!--        主体内容-->
       <!--        主体内容-->
       <div class="container linep">
       <div class="container linep">
         <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
         <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-          <HomeTarget :tabVal="2" ref="HomeTarget"></HomeTarget>
+          <HomeTarget
+            :tabVal="2"
+            ref="HomeTarget"
+            :homePageIndicatorDate="homePageIndicatorList"></HomeTarget>
         </template>
         </template>
         <template v-else>
         <template v-else>
           <van-collapse v-model="activeNames" v-if="!YFQuota">
           <van-collapse v-model="activeNames" v-if="!YFQuota">
@@ -749,6 +752,7 @@ export default {
       shareReportConfig: null,
       shareReportConfig: null,
       managerRemarkContent: '',
       managerRemarkContent: '',
       postName: '',
       postName: '',
+      homePageIndicatorList: null,
     };
     };
   },
   },
   created() {
   created() {
@@ -900,6 +904,11 @@ export default {
       });
       });
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
       getDetailById({ reportId: this.$route.query.reportId }).then((res) => {
         loading1.clear();
         loading1.clear();
+        if (this.postName == '质感销售负责人' || this.postName == '质感销售专员') {
+          this.homePageIndicatorList = res.data.homePageIndicatorList;
+        } else {
+          this.homePageIndicatorList = null;
+        }
         this.postName = res.data.postName;
         this.postName = res.data.postName;
         this.reportTargetAll = res.data.reportTargetAll;
         this.reportTargetAll = res.data.reportTargetAll;
         this.reportTarget = res.data;
         this.reportTarget = res.data;

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

@@ -39,7 +39,10 @@
           提交时间: {{ reportTarget.commitTime }}
           提交时间: {{ reportTarget.commitTime }}
         </p>
         </p>
         <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
         <template v-if="postName == '质感销售负责人' || postName == '质感销售专员'">
-          <HomeTarget :tabVal="2" ref="HomeTarget"></HomeTarget>
+          <HomeTarget
+            :tabVal="2"
+            ref="HomeTarget"
+            :homePageIndicatorDate="homePageIndicatorList"></HomeTarget>
         </template>
         </template>
         <template v-else>
         <template v-else>
           <van-collapse v-model="activeNames" v-if="!YFQuota">
           <van-collapse v-model="activeNames" v-if="!YFQuota">
@@ -782,6 +785,7 @@ export default {
       visitIMG1Flag: false,
       visitIMG1Flag: false,
       shareReportConfig: null,
       shareReportConfig: null,
       postName: '',
       postName: '',
+      homePageIndicatorList: null,
     };
     };
   },
   },
   watch: {
   watch: {
@@ -1010,6 +1014,11 @@ export default {
               });
               });
             });
             });
         } else {
         } else {
+          if (this.postName == '质感销售负责人' || this.postName == '质感销售专员') {
+            this.homePageIndicatorList = res.data.homePageIndicatorList;
+          } else {
+            this.homePageIndicatorList = null;
+          }
           this.postName = res.data.postName;
           this.postName = res.data.postName;
           this.GZQuota = false;
           this.GZQuota = false;
           this.JZQuota = false;
           this.JZQuota = false;