|
|
@@ -24,13 +24,13 @@
|
|
|
:pageSize="sum"
|
|
|
></Table>
|
|
|
</div>
|
|
|
- <div class="page" v-if="sum !==0">
|
|
|
+ <div class="page" v-if="sum !== 0">
|
|
|
<Tablepage
|
|
|
:totalPage="totalPage"
|
|
|
:currentPage="currentPage"
|
|
|
@change_page="changePage"
|
|
|
@jump_page="jumpPage"
|
|
|
- :sum='sum'
|
|
|
+ :sum="sum"
|
|
|
></Tablepage>
|
|
|
<Count :sum="sum"></Count>
|
|
|
</div>
|
|
|
@@ -69,6 +69,7 @@ export default {
|
|
|
optionList: [],
|
|
|
selectedForm: "",
|
|
|
selectedplateForm: {},
|
|
|
+ plateFormId: "", // 平台的id
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -112,32 +113,47 @@ export default {
|
|
|
},
|
|
|
// 点击编辑
|
|
|
edit(index, newCount) {
|
|
|
- let id = this.tableData[index]['id'];
|
|
|
- let publishPlatformId = this.optionList[index]['id'];
|
|
|
- this.updateGroupInfo(id, newCount, publishPlatformId).then(() => {
|
|
|
- this.selectMediaPublishList();
|
|
|
- })
|
|
|
+ let id = this.tableData[index]["id"];
|
|
|
+ this.updateGroupInfo(id, newCount, this.plateFormId).then(() => {
|
|
|
+ let res = {
|
|
|
+ publishPlatformId: this.plateFormId,
|
|
|
+ };
|
|
|
+ this.selectMediaPublishList(res);
|
|
|
+ });
|
|
|
},
|
|
|
// 点击删除
|
|
|
deleteData(index) {
|
|
|
- let id = this.tableData[index]['id'];
|
|
|
- let publishPlatformId = this.optionList[index]['id'];
|
|
|
- this.deleteGroupInfo(id, publishPlatformId).then(() => {
|
|
|
- this.selectMediaPublishList();
|
|
|
- })
|
|
|
+ let id = this.tableData[index]["id"];
|
|
|
+ let res = {
|
|
|
+ id,
|
|
|
+ publishPlatformId: this.plateFormId,
|
|
|
+ };
|
|
|
+ this.deleteMediaPublishInfo(res).then(() => {
|
|
|
+ let dataObj = {
|
|
|
+ publishPlatformId: this.plateFormId,
|
|
|
+ };
|
|
|
+ this.selectMediaPublishList(dataObj);
|
|
|
+ });
|
|
|
},
|
|
|
// 模态框保存
|
|
|
submit: function (time, num, obj) {
|
|
|
let addTime = time.replace("-", "/");
|
|
|
- this.addMediaPublishInfo(+num, addTime, obj.platformName, obj.id);
|
|
|
+ this.addMediaPublishInfo(+num, addTime, obj.platformName, obj.id).then(
|
|
|
+ () => {
|
|
|
+ let req = {
|
|
|
+ publishPlatformId: this.plateFormId,
|
|
|
+ };
|
|
|
+ this.selectMediaPublishList(req);
|
|
|
+ }
|
|
|
+ );
|
|
|
this.modalFlag = false;
|
|
|
},
|
|
|
- // slectPlatForm
|
|
|
+ // 选择上传平台
|
|
|
slectPlatForm: function (e) {
|
|
|
let index = e.target.options.selectedIndex;
|
|
|
this.selectedplateForm = this.optionList[index];
|
|
|
- let id = this.optionList[index]['id'];
|
|
|
- let req = { id };
|
|
|
+ this.plateFormId = this.optionList[index]["id"];
|
|
|
+ let req = { publishPlatformId: this.plateFormId };
|
|
|
this.selectMediaPublishList(req);
|
|
|
},
|
|
|
// 新增 接口
|
|
|
@@ -204,7 +220,7 @@ export default {
|
|
|
data: {
|
|
|
id,
|
|
|
publishCount,
|
|
|
- publishPlatformId
|
|
|
+ publishPlatformId,
|
|
|
},
|
|
|
})
|
|
|
.then((res) => {
|
|
|
@@ -224,15 +240,12 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 删除 接口
|
|
|
- deleteGroupInfo: function (id, publishPlatformId) {
|
|
|
+ deleteMediaPublishInfo: function (data) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.$http({
|
|
|
method: "post",
|
|
|
- url: "/sys/group/deleteGroupInfo",
|
|
|
- data: {
|
|
|
- id,
|
|
|
- publishPlatformId
|
|
|
- },
|
|
|
+ url: "/base/mediaPublishManager/deleteMediaPublishInfo",
|
|
|
+ data,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data && res.data.code === 200) {
|
|
|
@@ -277,16 +290,17 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
- mounted() {
|
|
|
- },
|
|
|
+ mounted() {},
|
|
|
created() {
|
|
|
- this.selectPublishPlatformPage().then(() => {
|
|
|
- let publishPlatformId = this.optionList[0]['id'];
|
|
|
- let req = { publishPlatformId };
|
|
|
- this.selectMediaPublishList(req);
|
|
|
- }).catch((err) =>{
|
|
|
- console.log(err)
|
|
|
- })
|
|
|
+ this.selectPublishPlatformPage()
|
|
|
+ .then(() => {
|
|
|
+ let publishPlatformId = this.optionList[0]["id"];
|
|
|
+ let req = { publishPlatformId };
|
|
|
+ this.selectMediaPublishList(req);
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ });
|
|
|
},
|
|
|
};
|
|
|
</script>
|