浏览代码

12.4.1 ok

bding 1 年之前
父节点
当前提交
50d3d639d2
共有 1 个文件被更改,包括 10 次插入17 次删除
  1. 10 17
      pages/index/index.vue

+ 10 - 17
pages/index/index.vue

@@ -216,6 +216,7 @@ export default {
         PageSize: this.pageSize,
         CurrentIndex: this.page_no,
         TagIds: this.actIdLable,
+        ChartPermissionId: this.industrytabActId,
       });
       if (res.Ret === 200) {
         this.status = !res.Data.Paging.IsEnd ? "loadmore" : "nomore";
@@ -409,26 +410,19 @@ export default {
     async homeTagListCustom() {
       const res = await Home.homeTagListCustom();
       if (res.Ret === 200) {
-        const arr = res.Data || [];
-        this.dataListLable = arr.map((item) => {
-          return {
-            ...item,
-            isAct: false,
-          };
-        });
+        this.dataListLable = res.Data.List || [];
+        this.industryTablList = res.Data.ListPermission || [];
       }
     },
-    //获取一级事件
-    getClassify() {
-      Reports.getClassify().then((res) => {
-        if (res.Ret !== 200) return;
-        this.industryTablList = res.Data.List || [];
-      });
-    },
     // 行业选择的筛选
     toggleIndustryTab(item) {
-      if (this.industrytabActId === item.ChartPermissionId) return (this.industrytabActId = "");
-      this.industrytabActId = item.ChartPermissionId;
+      if (this.industrytabActId === item.ChartPermissionId) {
+        this.industrytabActId = 0;
+      } else {
+        this.industrytabActId = item.ChartPermissionId;
+      }
+      this.page_no = 1;
+      this.getNewList();
     },
   },
   mounted() {
@@ -443,7 +437,6 @@ export default {
     this.homeTagListCustom();
     let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
     this.isTopHeight = menuButtonInfo.height + menuButtonInfo.top + 7 + "px";
-    this.getClassify();
   },
   onShow() {
     this.getUserInfo();