|
@@ -148,6 +148,9 @@
|
|
|
<span slot="campaignStatus" slot-scope="text,record">
|
|
|
<a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
|
</span>
|
|
|
+ <span slot="createStatus" slot-scope="text,record">
|
|
|
+ <a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
|
+ </span>
|
|
|
<span slot="status" slot-scope="text,record">
|
|
|
<a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
|
</span>
|
|
@@ -414,10 +417,10 @@ const planColumns = [
|
|
|
const ideaColumns = [
|
|
|
{
|
|
|
title: '状态',
|
|
|
- dataIndex: 'status',
|
|
|
+ dataIndex: 'createStatus',
|
|
|
key: 'status',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'status' }
|
|
|
+ scopedSlots: { customRender: 'createStatus' }
|
|
|
},
|
|
|
// {
|
|
|
// title: '操作',
|
|
@@ -434,6 +437,12 @@ const ideaColumns = [
|
|
|
},
|
|
|
{
|
|
|
title: '广告创意',
|
|
|
+ dataIndex: 'img',
|
|
|
+ key: 'img',
|
|
|
+ align: 'center',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '创意标题',
|
|
|
dataIndex: 'title',
|
|
|
key: 'title',
|
|
|
align: 'center',
|
|
@@ -471,13 +480,6 @@ const ideaColumns = [
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'planId_dictText' }
|
|
|
},
|
|
|
- {
|
|
|
- title: '所属广告组',
|
|
|
- dataIndex: 'parentGroup',
|
|
|
- key: 'parentGroup',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'parentGroup' }
|
|
|
- },
|
|
|
];
|
|
|
|
|
|
|
|
@@ -595,7 +597,7 @@ export default {
|
|
|
console.log(key);
|
|
|
this.tabkey=key;
|
|
|
|
|
|
- this.columns=[];
|
|
|
+ // this.columns=[];
|
|
|
if(key=='group'){
|
|
|
this.columns=columns;
|
|
|
}else if(key=='plan'){
|
|
@@ -603,6 +605,7 @@ export default {
|
|
|
}else if(key=='idea'){
|
|
|
this.columns=ideaColumns;
|
|
|
}
|
|
|
+
|
|
|
if(this.accountID){
|
|
|
this.tabkey=key;
|
|
|
this.loading=true
|
|
@@ -758,12 +761,53 @@ export default {
|
|
|
recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
|
}
|
|
|
// console.log(recordData)
|
|
|
- postAction('/ctop/byteDanceAdvertisePlan/edit',recordData).then((res)=>{
|
|
|
- console.log(res);
|
|
|
- if(res.success){
|
|
|
- record.status=!text;
|
|
|
- }
|
|
|
- })
|
|
|
+ // postAction('/ctop/byteDanceAdvertisePlan/edit',recordData).then((res)=>{
|
|
|
+ // console.log(res);
|
|
|
+ // if(res.success){
|
|
|
+ // record.status=!text;
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ this.batchEditHttp('status',[recordData])
|
|
|
+ // postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
|
|
|
+ // console.log(res);
|
|
|
+ // if(res.success){
|
|
|
+ // if(res.result.length>0){
|
|
|
+ // this.modifyTableData=[]
|
|
|
+ // this.modifyTableData=res.result
|
|
|
+ // this.getplanList({
|
|
|
+ // accountId:this.accountID,
|
|
|
+ // name:this.optionId,
|
|
|
+ // status:this.statusValue,
|
|
|
+ // startDate:this.dateString[0],
|
|
|
+ // endDate:this.dateString[1],
|
|
|
+ // pageNo:this.ipagination.current
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // this.optValue=undefined;
|
|
|
+ // this.selectedRowKeys=[]
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ }else if(this.tabkey=='idea'){
|
|
|
+ let ids=record.id;
|
|
|
+ let status=text?'disable':'enable';
|
|
|
+ postAction('/ctop//byteDanceCreative/editStatus',qs.stringify({
|
|
|
+ accountId:this.accountID,
|
|
|
+ ids:`${ids}`,
|
|
|
+ status:status,
|
|
|
+ })).then((res)=>{
|
|
|
+ console.log(res);
|
|
|
+ if(res.success){
|
|
|
+ this.data=[];
|
|
|
+ this.refreshCreativeList({
|
|
|
+ accountId:this.accountID,
|
|
|
+ name:this.optionId,
|
|
|
+ status:this.statusValue,
|
|
|
+ startDate:this.dateString[0],
|
|
|
+ endDate:this.dateString[1],
|
|
|
+ pageNo:this.ipagination.current
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -778,7 +822,7 @@ export default {
|
|
|
console.log(value)
|
|
|
this.optValue=value;
|
|
|
},
|
|
|
- editGroupStatus(){
|
|
|
+ editGroupStatus(url){
|
|
|
let ids='';
|
|
|
this.selectedRows.forEach((item,index)=>{
|
|
|
if(index==0){
|
|
@@ -796,7 +840,7 @@ export default {
|
|
|
}else if(this.optValue=='delete'){
|
|
|
status='delete'
|
|
|
}
|
|
|
- postAction('/ctop/byteDanceCampaign/editStatus',qs.stringify({
|
|
|
+ postAction(url,qs.stringify({
|
|
|
accountId:this.accountID,
|
|
|
ids,
|
|
|
status,
|
|
@@ -821,12 +865,13 @@ export default {
|
|
|
//批量操作的确定按钮
|
|
|
isOkHandle(){
|
|
|
this.selectDisable=true;
|
|
|
- console.log(0)
|
|
|
+
|
|
|
if(this.optValue){
|
|
|
+
|
|
|
if(this.optValue=='pause'){
|
|
|
if(this.tabkey=='group'){
|
|
|
console.log(this.selectedRows);
|
|
|
- this.editGroupStatus()
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
|
|
|
|
}else if(this.tabkey=='plan'){
|
|
|
console.log(0)
|
|
@@ -838,12 +883,12 @@ export default {
|
|
|
console.log(0)
|
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
|
}else if(this.tabkey=='idea'){
|
|
|
-
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCreative/editStatus')
|
|
|
}
|
|
|
|
|
|
}else if(this.optValue=='open'){
|
|
|
if(this.tabkey=='group'){
|
|
|
- this.editGroupStatus();
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCampaign/editStatus');
|
|
|
}else if(this.tabkey=='plan'){
|
|
|
if(this.selectedRowKeys.length>0){
|
|
|
this.selectedRows.forEach((item)=>{
|
|
@@ -852,7 +897,7 @@ export default {
|
|
|
}
|
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
|
}else if(this.tabkey=='idea'){
|
|
|
-
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -866,7 +911,7 @@ export default {
|
|
|
// console.log(e);
|
|
|
if(this.optValue=='delete'){
|
|
|
if(this.tabkey=='group'){
|
|
|
- this.editGroupStatus()
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
|
}else if(this.tabkey=='plan'){
|
|
|
if(this.selectedRowKeys.length>0){
|
|
|
this.selectedRows.forEach((item)=>{
|
|
@@ -876,7 +921,7 @@ export default {
|
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
|
this.$message.success('删除成功');
|
|
|
}else if(this.tabkey=='idea'){
|
|
|
-
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
|
}
|
|
|
|
|
|
}
|