Browse Source

13.9 固收时间线

bding 4 months ago
parent
commit
4d4e58eadc
3 changed files with 59 additions and 38 deletions
  1. 14 6
      components/report/timeLine.vue
  2. 8 0
      config/modules/Reports.js
  3. 37 32
      pages/reportForm/reportForm.vue

+ 14 - 6
components/report/timeLine.vue

@@ -62,9 +62,13 @@ export default {
   methods: {
     async goDetailFromTimeLine(item, index) {
       item.TimeLineId &&
-        (await Reports.postTacticsHistory({
-          TimeLineId: item.TimeLineId,
-        }));
+        (item.ChartPermissionName && item.ChartPermissionName == "固收"
+          ? await Reports.postGushouHistory({
+              TimeLineId: item.TimeLineId,
+            })
+          : await Reports.postTacticsHistory({
+              TimeLineId: item.TimeLineId,
+            }));
       if (item.Content.length !== 0 && !item.ArticleId && !item.ChartId) return;
       if (item.SubCategoryName === "路演精华") {
         //跳转路演精华
@@ -120,9 +124,13 @@ export default {
     // 去往文章详情的
     async handleExpand(item, index) {
       if (item.TimeLineId) {
-        await Reports.postTacticsHistory({
-          TimeLineId: item.TimeLineId,
-        });
+        item.ChartPermissionName && item.ChartPermissionName == "固收"
+          ? await Reports.postGushouHistory({
+              TimeLineId: item.TimeLineId,
+            })
+          : await Reports.postTacticsHistory({
+              TimeLineId: item.TimeLineId,
+            });
       } else {
         await Reports.morning_meeting_history({ Id: item.Id, SourcePage: "展开" });
         this.getRecordTracking("展开收起", { Id: item.Id });

+ 8 - 0
config/modules/Reports.js

@@ -123,10 +123,18 @@ export const Reports = {
   getTacticsTimeLine: (params) => {
     return getHttp("/tactics/tacticsTimeLine/list", params);
   },
+  /* 固收时间线列表 */
+  getGushowTimeLine: (params) => {
+    return getHttp("/gushou/gushouTimeLine/list", params);
+  },
   /* 时间线列表点击 */
   postTacticsHistory: (params) => {
     return postHttp("/tactics/tacticsTimeLine/history", params, 0);
   },
+  /* 固收时间线列表点击 */
+  postGushouHistory: (params) => {
+    return postHttp("/gushou/gushouTimeLine/history", params, 0);
+  },
   /* 标的点击记录 报告精选 */
   reportClickHistory: (params) => {
     return postHttp("/report_selection/click/history", params, 0);

+ 37 - 32
pages/reportForm/reportForm.vue

@@ -466,40 +466,45 @@ export default {
       this.tabBarsTow[this.strategyIndexTwo].IsRed = is;
     },
     // h获取时间线
-    getTimeLineList() {
-      Reports.getTacticsTimeLine({
-        PageSize: this.pageSize,
-        CurrentIndex: this.page_no,
-      }).then((res) => {
-        if (res.Ret === 200) {
-          this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
-          this.totalPage = res.Data.Paging.Pages;
-          let list = res.Data.List || [];
-          list = list.map((item) => {
-            let temp = item;
-            temp.date = item.PublishTime.split(" ")[0];
-            if (item.Content.length) {
-              item.isShowBtn = item.Content.length > 60 ? true : false;
-              item.isExpand = item.Content.length > 60 ? false : true;
-            }
-            return temp;
-          });
-          if (this.page_no === 1) {
-            this.timeLine = list;
-            this.haveData = this.timeLine.length ? true : false;
-            if (this.refresh) {
-              uni.stopPullDownRefresh();
-              this.refresh = false;
-            }
-          } else {
-            this.timeLine = this.timeLine.concat(list);
+    async getTimeLineList() {
+      const res =
+        this.tabAct_id == 23
+          ? await Reports.getTacticsTimeLine({
+              PageSize: this.pageSize,
+              CurrentIndex: this.page_no,
+            })
+          : await Reports.getGushowTimeLine({
+              PageSize: this.pageSize,
+              CurrentIndex: this.page_no,
+            });
+      if (res.Ret === 200) {
+        this.status = this.page_no < res.Data.Paging.Pages ? "loadmore" : "nomore";
+        this.totalPage = res.Data.Paging.Pages;
+        let list = res.Data.List || [];
+        list = list.map((item) => {
+          let temp = item;
+          temp.date = item.PublishTime.split(" ")[0];
+          if (item.Content.length) {
+            item.isShowBtn = item.Content.length > 60 ? true : false;
+            item.isExpand = item.Content.length > 60 ? false : true;
           }
+          return temp;
+        });
+        if (this.page_no === 1) {
+          this.timeLine = list;
+          this.haveData = this.timeLine.length ? true : false;
+          if (this.refresh) {
+            uni.stopPullDownRefresh();
+            this.refresh = false;
+          }
+        } else {
+          this.timeLine = this.timeLine.concat(list);
         }
-        setTimeout(() => {
-          this.$refs.timeChild.loadTimeLine = true;
-          this.$refs.timeChild.getConentsHeight();
-        }, 0);
-      });
+      }
+      setTimeout(() => {
+        this.$refs.timeChild.loadTimeLine = true;
+        this.$refs.timeChild.getConentsHeight();
+      }, 0);
     },
     /* 搜索 */
     async goSearch() {