|
@@ -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("操作成功");
|
|
|
}
|