2 Commits 26852f0ef2 ... 157723bef3

Tác giả SHA1 Thông báo Ngày
  bding 157723bef3 Merge branch 'cygx_13.9' into debug 3 tuần trước cách đây
  bding 3e9ff30db4 增加固收时间线 3 tuần trước cách đây

+ 23 - 0
src/api/modules/rai/timeLine.js

@@ -22,6 +22,29 @@ const timeLineApi = {
   tacticsTimeLineDelete: (params) => {
     return http.post("/cygx/tacticsTimeLine/delete", params);
   },
+
+  // 固收时间线列表
+  getGushouTimeLineList: (params) => {
+    return http.get("/cygx/gushouTimeLine/list", params);
+  },
+  // 新增固收时间线
+  gushouTimeLinePreserveAndPublish: (params) => {
+    return http.post("/cygx/gushouTimeLine/preserveAndPublish", params);
+  },
+  // 固收一键发布/取消发布报告接口
+  gushouTimeLineAllCancel: (params) => {
+    return http.post("/cygx/gushouTimeLine/all/publishAndcancel", params);
+  },
+  // 固收发布/取消发布报告
+  gushouTimeLineCancel: (params) => {
+    return http.post("/cygx/gushouTimeLine/publishAndcancel", params);
+  },
+  // 固收删除
+  gushouTimeLineDelete: (params) => {
+    return http.post("/cygx/gushouTimeLine/delete", params);
+  },
+
+
   // 新建报告类型
   reportMappingAdd: (params) => {
     return http.post("/cygx/reportMapping/add", params);

+ 6 - 0
src/routes/modules/cygxRoutes.js

@@ -261,6 +261,12 @@ export default [
         name: "策略时间线",
         hidden: false,
       },
+      {
+        path: "fixedIncomeTimeLine",
+        component: () => import("@/views/rai_manage/reportManage/tacticsTimeLine.vue"),
+        name: "固收时间线",
+        hidden: false,
+      },
       {
         path: "internalTesting",
         component: () => import("@/views/rai_manage/reportManage/internalTesting.vue"),

+ 38 - 28
src/views/rai_manage/reportManage/tacticsTimeLine.vue

@@ -58,25 +58,10 @@
       </el-col>
     </el-card>
     <!-- 弹框部分 -->
-    <el-dialog
-      :visible.sync="addOfEditDialog"
-      :title="addOfEditText"
-      v-dialogDrag
-      :close-on-click-modal="false"
-      :modal-append-to-body="false"
-      center
-      width="661px"
-      @close="handleClose"
-    >
+    <el-dialog :visible.sync="addOfEditDialog" :title="addOfEditText" v-dialogDrag :close-on-click-modal="false" :modal-append-to-body="false" center width="661px" @close="handleClose">
       <el-form :model="dataForm" :rules="dataRules" ref="ruleForm">
         <el-form-item prop="PublishTime">
-          <el-date-picker
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="请选择日期"
-            v-model="dataForm.PublishTime"
-            style="width: 100%"
-          ></el-date-picker>
+          <el-date-picker type="date" value-format="yyyy-MM-dd" placeholder="请选择日期" v-model="dataForm.PublishTime" style="width: 100%"></el-date-picker>
         </el-form-item>
         <el-form-item prop="Content">
           <div class="fr-wrapper">
@@ -151,20 +136,31 @@ export default {
           },
         },
       },
+      routerType: "",
     };
   },
   mounted() {
     this.getDataList();
   },
+  watch: {
+    "$route.path": {
+      handler(newval) {
+        this.routerType = newval == "/fixedIncomeTimeLine" ? "固收" : "策略";
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
   computed: {},
   methods: {
     // 获取数据
     async getDataList() {
-      const res = await raiInterface.getTacticsTimeLineList({
+      let params = {
         PageSize: this.PageSize,
         CurrentIndex: this.page_no,
         Status: this.statusValue === 0 || this.statusValue === 1 ? this.statusValue : 2,
-      });
+      };
+      const res = this.routerType == "固收" ? await raiInterface.getGushouTimeLineList(params) : await raiInterface.getTacticsTimeLineList(params);
       if (res.Ret === 200) {
         this.total = res.Data.Paging.Totals || 0;
         this.dataTableList = res.Data.List;
@@ -203,9 +199,14 @@ export default {
       this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
           this.dataForm.Content = this.dataForm.Content.replace(/<p data-f-id=\"pbf\".*?<\/p>/g, "");
-          const res = await raiInterface.tacticsTimeLinePreserveAndPublish({
-            ...this.dataForm,
-          });
+          const res =
+            this.routerType == "固收"
+              ? await raiInterface.gushouTimeLinePreserveAndPublish({
+                  ...this.dataForm,
+                })
+              : await raiInterface.tacticsTimeLinePreserveAndPublish({
+                  ...this.dataForm,
+                });
           if (res.Ret === 200) {
             this.$message.success("操作成功");
             this.handleClose();
@@ -216,7 +217,8 @@ export default {
     },
     // 导出pv uv
     exportPvUv(item) {
-      const url = process.env.API_ROOT + "/cygx/tacticsTimeLine/PvExport?TimeLineId=" + item.TimeLineId + "&" + localStorage.getItem("auth") || "";
+      let urlType = this.routerType == "固收" ? "gushou" : "tactics";
+      const url = process.env.API_ROOT + `/cygx/${urlType}TimeLine/PvExport?TimeLineId=` + item.TimeLineId + "&" + localStorage.getItem("auth") || "";
       return url;
     },
     // 删除
@@ -227,7 +229,10 @@ export default {
         type: "warning",
       })
         .then(async () => {
-          const res = await raiInterface.tacticsTimeLineDelete({ TimeLineId: item.TimeLineId });
+          let params = {
+            TimeLineId: item.TimeLineId,
+          };
+          const res = this.routerType == "固收" ? await raiInterface.gushouTimeLineDelete(params) : await raiInterface.tacticsTimeLineDelete(params);
           if (res.Ret === 200) {
             this.$message.success("删除成功!");
             let page_num = Math.ceil((this.total - 1) / this.PageSize);
@@ -256,7 +261,7 @@ export default {
     },
     // 一键发布/取消发布报告接口
     async tacticsTimeLineAllCancel() {
-      const res = await raiInterface.tacticsTimeLineAllCancel();
+      const res = this.routerType == "固收" ? await raiInterface.gushouTimeLineAllCancel() : await raiInterface.tacticsTimeLineAllCancel();
       if (res.Ret === 200) {
         this.$message.success("操作成功");
       }
@@ -264,9 +269,14 @@ export default {
     },
     // 发布/取消发布报告 显示隐藏
     async tacticsTimeLineCancel(item) {
-      const res = await raiInterface.tacticsTimeLineCancel({
-        TimeLineId: item.TimeLineId,
-      });
+      const res =
+        this.routerType == "固收"
+          ? await raiInterface.gushouTimeLineCancel({
+              TimeLineId: item.TimeLineId,
+            })
+          : await raiInterface.tacticsTimeLineCancel({
+              TimeLineId: item.TimeLineId,
+            });
       if (res.Ret === 200) {
         this.$message.success("操作成功");
       }