2 Commits 7b3853ab65 ... c30bd286e7

Author SHA1 Message Date
  bding c30bd286e7 xqc 1 week ago
  bding 217d1a501d 需求次 1 week ago
3 changed files with 39 additions and 25 deletions
  1. 8 0
      config/modules/Reports.js
  2. 19 20
      pages/reportForm/components/strategy.vue
  3. 12 5
      pages/reportForm/reportForm.vue

+ 8 - 0
config/modules/Reports.js

@@ -10,10 +10,18 @@ export const Reports = {
   getstrategyAll: (params) => {
     return getHttp("/permission/strategyAll", params);
   },
+  /* 获取策略周期的分类 */
+  getZhouQistrategyAll: (params) => {
+    return getHttp("/report/zhouqi_tradeList", params);
+  },
   /* 获取策略的文章 */
   getTacticsList: (params) => {
     return getHttp("/tactics/list", params);
   },
+  /* 获取策略的文章 */
+  getZhouQiTacticsList: (params) => {
+    return getHttp("/report/tactics/zhouqi_list", params);
+  },
   /* 获取产业报告分类列表接口*/
   getTradeList: (params) => {
     return getHttp("/report/home/tradeList", params);

+ 19 - 20
pages/reportForm/components/strategy.vue

@@ -47,6 +47,9 @@ export default {
     matchTypeName: {
       type: String,
     },
+    tabAct_id: {
+      type: Number,
+    },
   },
   data() {
     return {
@@ -113,27 +116,23 @@ export default {
   mounted() {},
   methods: {
     /* 获取列表 */
-    getCollectList() {
-      Reports.getTacticsList({
-        PageSize: this.pageSize,
-        CurrentIndex: this.page_no,
-        CategoryId: this.tabAct_idTwo,
-      }).then((res) => {
-        if (res.Ret === 200) {
-          this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
-          this.totalPage = res.Data.Paging.Pages; //总页数
-          if (this.page_no === 1) {
-            this.collectList = res.Data.List || [];
-            this.haveData = this.collectList.length ? true : false;
-            if (this.refresh) {
-              uni.stopPullDownRefresh();
-              this.refresh = false;
-            }
-          } else {
-            this.collectList = this.collectList.concat(res.Data.List);
+    async getCollectList() {
+      let params = { PageSize: this.pageSize, CurrentIndex: this.page_no, CategoryId: this.tabAct_idTwo };
+      const res = this.tabAct_id == 148 || this.tabAct_id == 62 ? await Reports.getZhouQiTacticsList(params) : await Reports.getTacticsList(params);
+      if (res.Ret === 200) {
+        this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
+        this.totalPage = res.Data.Paging.Pages; //总页数
+        if (this.page_no === 1) {
+          this.collectList = res.Data.List || [];
+          this.haveData = this.collectList.length ? true : false;
+          if (this.refresh) {
+            uni.stopPullDownRefresh();
+            this.refresh = false;
           }
+        } else {
+          this.collectList = this.collectList.concat(res.Data.List);
         }
-      });
+      }
     },
     goDetail(item, index) {
       /* 无需授权且已绑定 检验是或否有权限 */
@@ -149,7 +148,7 @@ export default {
         });
       } else if (item.Resource === 1) {
         uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId });
-      }else if (item.Resource === 3) {
+      } else if (item.Resource === 3) {
         uni.navigateTo({ url: "/pages-ficc/reportDetail/reportDetail?id=" + item.ReportId });
       }
     },

+ 12 - 5
pages/reportForm/reportForm.vue

@@ -46,6 +46,7 @@
           :matchTypeName="matchTypeName"
           :tabAct_idTwo="tabAct_idTwo"
           :isNum="isNum"
+          :tabAct_id="tabAct_id"
           :isSwitchover="isSwitchover"
           @hideIsred="hideIsred"
         />
@@ -289,10 +290,16 @@ export default {
       });
     },
     //获取二级事件
-    getstrategyAll() {
-      Reports.getstrategyAll({
-        ChartPermissionId: this.tabAct_id,
-      }).then((res) => {
+    async getstrategyAll() {
+      const res =
+        this.tabAct_id == 148 || this.tabAct_id == 62
+          ? await Reports.getZhouQistrategyAll({
+              ChartPermissionId: this.tabAct_id,
+            })
+          : await Reports.getstrategyAll({
+              ChartPermissionId: this.tabAct_id,
+            });
+      if (res.Ret === 200) {
         this.tabAct_id == 23 &&
           res.Data.List.push({
             CategoryId: 100001,
@@ -327,7 +334,7 @@ export default {
           Items: items, // 当前 GroupId 对应的所有项目
         }));
         this.tabBarsTow = arrayResult;
-      });
+      }
     },
     //tabs切换事件
     toggleTab(item, index) {