bding 2 years ago
parent
commit
695f40be48

+ 1 - 1
pageMy/myCollection/myCollection.vue

@@ -84,7 +84,7 @@ export default {
         { name: "微路演", id: 2 },
         { name: "图表", id: 3 },
       ],
-      tabsActive: 3,
+      tabsActive: 1,
     };
   },
   onLoad() {

+ 9 - 4
pages/reportForm/components/strategy.vue

@@ -82,12 +82,17 @@ export default {
         if (this.status === "nomore") return;
         this.status = "loading";
         this.page_no++;
-        this.getCollectList();
+        this.tabAct_idTwo && this.getCollectList();
       },
     },
     tabAct_idTwo: {
-      handler() {
-        (this.page_no = 1), (this.pageSize = 10), this.getCollectList();
+      handler(newValue) {
+        this.collectList = [];
+        if (newValue) {
+          this.page_no = 1;
+          this.pageSize = 10;
+          this.getCollectList();
+        }
       },
       // immediate:true
     },
@@ -95,7 +100,7 @@ export default {
       handler() {
         if (this.pageNumFather) {
           this.page_no = 1;
-          this.getCollectList();
+          this.tabAct_idTwo && this.getCollectList();
           this.$parent.pageNumFather = "";
         }
       },

+ 1 - 1
pages/reportForm/index.scss

@@ -115,7 +115,7 @@
 
     .tab-cont-two {
       position: sticky;
-      top: 252rpx;
+      top: 236rpx;
       left: 0;
       width: 100%;
       z-index: 99;

+ 8 - 4
pages/reportForm/reportForm.vue

@@ -19,7 +19,7 @@
       </view>
     </view>
     <!-- 内容 -->
-    <view class="strategy" v-if="strategyIndex == 4">
+    <view class="strategy" v-if="strategyIndex >= 4">
       <view class="tab-cont-two">
         <block v-for="(item, index) in tabBarsTow" :key="item.CategoryId">
           <view :id="'__' + index" class="scroll-tab-item" :class="{ active: tabAct_idTwo == item.CategoryId }" @click.stop="toggleTabTwo(item, index)">
@@ -244,7 +244,9 @@ export default {
     },
     //获取二级事件
     getstrategyAll() {
-      Reports.getstrategyAll().then((res) => {
+      Reports.getstrategyAll({
+        ChartPermissionId: this.tabAct_id,
+      }).then((res) => {
         this.tabBarsTow = res.Data.List;
         if (!this.tabAct_idTwo) {
           this.tabAct_idTwo = res.Data.List[0].CategoryId;
@@ -255,8 +257,10 @@ export default {
     //tabs切换事件
     toggleTab(item, index) {
       this.strategyIndex = index;
+      this.tabAct_idTwo = "";
       this.deepCoverFocus = [];
       this.labelListData = [];
+      this.tabBarsTow = [];
       if (this.tabAct_id !== item.ChartPermissionId) {
         this.tabAct_id = item.ChartPermissionId;
         this.$store.dispatch("statistics", {
@@ -400,7 +404,7 @@ export default {
         this.getIndustryList();
         this.getTradeList();
       }
-      this.strategyIndex == 4 ? this.getstrategyAll() : (this.tabAct_idTwo = "");
+      this.strategyIndex >= 4 && this.getstrategyAll();
       this.isNum = 1;
     },
     /* 页面加载 */
@@ -574,7 +578,7 @@ export default {
     }
     .second-tabs {
       width: 100%;
-       padding-left: 30rpx;
+      padding-left: 30rpx;
       display: flex;
       overflow-x: auto;
       background-color: #fff;