|
@@ -135,10 +135,12 @@
|
|
@change="sort"
|
|
@change="sort"
|
|
>
|
|
>
|
|
<template slot="name" slot-scope="text,record">
|
|
<template slot="name" slot-scope="text,record">
|
|
- <editableCell :text="text" slotName='campaignName' @change="onCellChange(record.key, 'name', $event)" />
|
|
|
|
|
|
+ <a href="javascript:;" @click="goNextPage(text)">
|
|
|
|
+ <editableCell :text="text" slotName='name' @change="onCellChange(record.key, 'name', $event)" />
|
|
|
|
+ </a>
|
|
</template>
|
|
</template>
|
|
<span slot="budget" slot-scope="text,record">
|
|
<span slot="budget" slot-scope="text,record">
|
|
- <editableCell :text="text" slotName='groupBudget' @change="onCellChange(record.key, 'budget', $event)" />
|
|
|
|
|
|
+ <editableCell :text="text" slotName='budget' @change="onCellChange(record.key, 'budget', $event)" />
|
|
</span>
|
|
</span>
|
|
<span slot="bid" slot-scope="text,record">
|
|
<span slot="bid" slot-scope="text,record">
|
|
<editableCell :text="text" slotName='bid' @change="onCellChange(record.key, 'bid', $event)" />
|
|
<editableCell :text="text" slotName='bid' @change="onCellChange(record.key, 'bid', $event)" />
|
|
@@ -146,6 +148,9 @@
|
|
<span slot="campaignStatus" slot-scope="text,record">
|
|
<span slot="campaignStatus" slot-scope="text,record">
|
|
<a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
<a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
</span>
|
|
</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">
|
|
<span slot="status" slot-scope="text,record">
|
|
<a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
<a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
</span>
|
|
</span>
|
|
@@ -412,10 +417,10 @@ const planColumns = [
|
|
const ideaColumns = [
|
|
const ideaColumns = [
|
|
{
|
|
{
|
|
title: '状态',
|
|
title: '状态',
|
|
- dataIndex: 'status',
|
|
|
|
|
|
+ dataIndex: 'createStatus',
|
|
key: 'status',
|
|
key: 'status',
|
|
align: 'center',
|
|
align: 'center',
|
|
- scopedSlots: { customRender: 'status' }
|
|
|
|
|
|
+ scopedSlots: { customRender: 'createStatus' }
|
|
},
|
|
},
|
|
// {
|
|
// {
|
|
// title: '操作',
|
|
// title: '操作',
|
|
@@ -432,6 +437,12 @@ const ideaColumns = [
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '广告创意',
|
|
title: '广告创意',
|
|
|
|
+ dataIndex: 'img',
|
|
|
|
+ key: 'img',
|
|
|
|
+ align: 'center',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ title: '创意标题',
|
|
dataIndex: 'title',
|
|
dataIndex: 'title',
|
|
key: 'title',
|
|
key: 'title',
|
|
align: 'center',
|
|
align: 'center',
|
|
@@ -469,13 +480,6 @@ const ideaColumns = [
|
|
align: 'center',
|
|
align: 'center',
|
|
scopedSlots: { customRender: 'planId_dictText' }
|
|
scopedSlots: { customRender: 'planId_dictText' }
|
|
},
|
|
},
|
|
- {
|
|
|
|
- title: '所属广告组',
|
|
|
|
- dataIndex: 'parentGroup',
|
|
|
|
- key: 'parentGroup',
|
|
|
|
- align: 'center',
|
|
|
|
- scopedSlots: { customRender: 'parentGroup' }
|
|
|
|
- },
|
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
@@ -551,7 +555,7 @@ export default {
|
|
onSelect: (record, selected, selectedRows) => {
|
|
onSelect: (record, selected, selectedRows) => {
|
|
console.log(record, selected, selectedRows);
|
|
console.log(record, selected, selectedRows);
|
|
this.modifyTableData=selectedRows;
|
|
this.modifyTableData=selectedRows;
|
|
-
|
|
|
|
|
|
+
|
|
this.selectedRows=selectedRows;
|
|
this.selectedRows=selectedRows;
|
|
},
|
|
},
|
|
onSelectAll: (selected, selectedRows, changeRows) => {
|
|
onSelectAll: (selected, selectedRows, changeRows) => {
|
|
@@ -578,6 +582,8 @@ export default {
|
|
this.accountID=undefined;
|
|
this.accountID=undefined;
|
|
this.openID=val
|
|
this.openID=val
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ this.search();
|
|
},
|
|
},
|
|
|
|
|
|
filterOption(input, option){
|
|
filterOption(input, option){
|
|
@@ -590,19 +596,46 @@ export default {
|
|
callback(key) {
|
|
callback(key) {
|
|
console.log(key);
|
|
console.log(key);
|
|
this.tabkey=key;
|
|
this.tabkey=key;
|
|
- this.loading=true
|
|
|
|
|
|
+
|
|
|
|
+ // this.columns=[];
|
|
if(key=='group'){
|
|
if(key=='group'){
|
|
- this.columns=columns;
|
|
|
|
- let params = {};
|
|
|
|
- this.refreshCampaignList();
|
|
|
|
- }else if(key=='plan'){
|
|
|
|
- this.getplanList({})
|
|
|
|
|
|
+ this.columns=columns;
|
|
|
|
+ }else if(key=='plan'){
|
|
this.columns=planColumns;
|
|
this.columns=planColumns;
|
|
}else if(key=='idea'){
|
|
}else if(key=='idea'){
|
|
- this.columns=ideaColumns;
|
|
|
|
- let params = {};
|
|
|
|
- // this.refreshCreativeList();
|
|
|
|
|
|
+ this.columns=ideaColumns;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if(this.accountID){
|
|
|
|
+ this.tabkey=key;
|
|
|
|
+ this.loading=true
|
|
|
|
+ this.columns=[];
|
|
|
|
+ if(key=='group'){
|
|
|
|
+ let params = {};
|
|
|
|
+ this.refreshCampaignList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current
|
|
|
|
+ });
|
|
|
|
+ }else if(key=='plan'){
|
|
|
|
+ this.getplanList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ toutiaoStatus:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }else if(key=='idea'){
|
|
|
|
+ let params = {};
|
|
|
|
+ this.refreshCreativeList();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
},
|
|
},
|
|
//跳转到批量页面
|
|
//跳转到批量页面
|
|
goBatch(){
|
|
goBatch(){
|
|
@@ -636,6 +669,7 @@ export default {
|
|
if(this.accountID){
|
|
if(this.accountID){
|
|
this.loading=true
|
|
this.loading=true
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
|
|
+ this.columns=columns;
|
|
this.refreshCampaignList({
|
|
this.refreshCampaignList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
@@ -645,6 +679,7 @@ export default {
|
|
pageNo:this.ipagination.current
|
|
pageNo:this.ipagination.current
|
|
})
|
|
})
|
|
}else if(this.tabkey=='plan'){
|
|
}else if(this.tabkey=='plan'){
|
|
|
|
+ this.columns=planColumns;
|
|
this.getplanList({
|
|
this.getplanList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
@@ -654,7 +689,15 @@ export default {
|
|
pageNo:this.ipagination.current
|
|
pageNo:this.ipagination.current
|
|
})
|
|
})
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
-
|
|
|
|
|
|
+ this.columns=ideaColumns;
|
|
|
|
+ this.refreshCreativeList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
this.$message.error('请选择账户后重试')
|
|
this.$message.error('请选择账户后重试')
|
|
@@ -718,12 +761,53 @@ export default {
|
|
recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
}
|
|
}
|
|
// console.log(recordData)
|
|
// 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
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
@@ -738,7 +822,7 @@ export default {
|
|
console.log(value)
|
|
console.log(value)
|
|
this.optValue=value;
|
|
this.optValue=value;
|
|
},
|
|
},
|
|
- editGroupStatus(){
|
|
|
|
|
|
+ editGroupStatus(url){
|
|
let ids='';
|
|
let ids='';
|
|
this.selectedRows.forEach((item,index)=>{
|
|
this.selectedRows.forEach((item,index)=>{
|
|
if(index==0){
|
|
if(index==0){
|
|
@@ -756,7 +840,7 @@ export default {
|
|
}else if(this.optValue=='delete'){
|
|
}else if(this.optValue=='delete'){
|
|
status='delete'
|
|
status='delete'
|
|
}
|
|
}
|
|
- postAction('/ctop/byteDanceCampaign/editStatus',qs.stringify({
|
|
|
|
|
|
+ postAction(url,qs.stringify({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
ids,
|
|
ids,
|
|
status,
|
|
status,
|
|
@@ -781,35 +865,39 @@ export default {
|
|
//批量操作的确定按钮
|
|
//批量操作的确定按钮
|
|
isOkHandle(){
|
|
isOkHandle(){
|
|
this.selectDisable=true;
|
|
this.selectDisable=true;
|
|
|
|
+
|
|
if(this.optValue){
|
|
if(this.optValue){
|
|
|
|
+
|
|
if(this.optValue=='pause'){
|
|
if(this.optValue=='pause'){
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
console.log(this.selectedRows);
|
|
console.log(this.selectedRows);
|
|
- this.editGroupStatus()
|
|
|
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
|
|
|
|
}else if(this.tabkey=='plan'){
|
|
}else if(this.tabkey=='plan'){
|
|
|
|
+ console.log(0)
|
|
if(this.selectedRowKeys.length>0){
|
|
if(this.selectedRowKeys.length>0){
|
|
this.selectedRows.forEach((item)=>{
|
|
this.selectedRows.forEach((item)=>{
|
|
item.toutiaoStatus='AD_STATUS_DISABLE'
|
|
item.toutiaoStatus='AD_STATUS_DISABLE'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.batchEditHttp(this.selectedRows)
|
|
|
|
|
|
+ console.log(0)
|
|
|
|
+ this.batchEditHttp('status',this.selectedRows)
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
-
|
|
|
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCreative/editStatus')
|
|
}
|
|
}
|
|
|
|
|
|
}else if(this.optValue=='open'){
|
|
}else if(this.optValue=='open'){
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
- this.editGroupStatus();
|
|
|
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCampaign/editStatus');
|
|
}else if(this.tabkey=='plan'){
|
|
}else if(this.tabkey=='plan'){
|
|
if(this.selectedRowKeys.length>0){
|
|
if(this.selectedRowKeys.length>0){
|
|
this.selectedRows.forEach((item)=>{
|
|
this.selectedRows.forEach((item)=>{
|
|
item.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
item.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.batchEditHttp(this.selectedRows)
|
|
|
|
|
|
+ this.batchEditHttp('status',this.selectedRows)
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
-
|
|
|
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -823,17 +911,17 @@ export default {
|
|
// console.log(e);
|
|
// console.log(e);
|
|
if(this.optValue=='delete'){
|
|
if(this.optValue=='delete'){
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
- this.editGroupStatus()
|
|
|
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
}else if(this.tabkey=='plan'){
|
|
}else if(this.tabkey=='plan'){
|
|
if(this.selectedRowKeys.length>0){
|
|
if(this.selectedRowKeys.length>0){
|
|
this.selectedRows.forEach((item)=>{
|
|
this.selectedRows.forEach((item)=>{
|
|
item.toutiaoStatus='AD_STATUS_DELETE'
|
|
item.toutiaoStatus='AD_STATUS_DELETE'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- this.batchEditHttp(this.selectedRows)
|
|
|
|
|
|
+ this.batchEditHttp('status',this.selectedRows)
|
|
this.$message.success('删除成功');
|
|
this.$message.success('删除成功');
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
-
|
|
|
|
|
|
+ this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -913,33 +1001,38 @@ export default {
|
|
console.log(this.inputValue);
|
|
console.log(this.inputValue);
|
|
if(this.modifyRulesValue=='separately'){
|
|
if(this.modifyRulesValue=='separately'){
|
|
|
|
|
|
- let batchArr=[...this.xiugaiData]
|
|
|
|
|
|
+ let batchArr=[...this.xiugaiData];
|
|
|
|
+ let changeZiduan=''
|
|
|
|
+ if(this.typeValue=='预算'){
|
|
|
|
+ changeZiduan='budget'
|
|
|
|
+ }else if(this.typeValue=='出价'){
|
|
|
|
+ changeZiduan='bid'
|
|
|
|
+ }
|
|
// console.log(batchArr)
|
|
// console.log(batchArr)
|
|
- this.batchEditHttp(batchArr)
|
|
|
|
|
|
+ this.batchEditHttp(changeZiduan,batchArr)
|
|
}else if(this.modifyRulesValue=='total'){
|
|
}else if(this.modifyRulesValue=='total'){
|
|
let batchArr=[...this.modifyTableData]
|
|
let batchArr=[...this.modifyTableData]
|
|
if(this.typeValue=='出价'){
|
|
if(this.typeValue=='出价'){
|
|
batchArr.forEach((item)=>{
|
|
batchArr.forEach((item)=>{
|
|
item.bid=this.inputValue
|
|
item.bid=this.inputValue
|
|
})
|
|
})
|
|
|
|
+ this.batchEditHttp('bid',batchArr)
|
|
}else if(this.typeValue=='预算'){
|
|
}else if(this.typeValue=='预算'){
|
|
batchArr.forEach((item)=>{
|
|
batchArr.forEach((item)=>{
|
|
item.budget=this.inputValue
|
|
item.budget=this.inputValue
|
|
})
|
|
})
|
|
|
|
+ this.batchEditHttp('budget',batchArr)
|
|
}
|
|
}
|
|
- this.batchEditHttp(batchArr)
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
this.modifyTableData=[];
|
|
this.modifyTableData=[];
|
|
this.selectedRowKeys=[]
|
|
this.selectedRowKeys=[]
|
|
- // console.log(this.rowSelection)
|
|
|
|
- // this.rowSelection.onChange('',[]);
|
|
|
|
- // this.rowSelection.onSelect({},false,[]);
|
|
|
|
- // this.rowSelection.onSelectAll([],[],[]);
|
|
|
|
|
|
+
|
|
|
|
|
|
},
|
|
},
|
|
- batchEditHttp(params){
|
|
|
|
- postAction('/ctop/byteDanceAdvertisePlan/batchEdit',params).then((res)=>{
|
|
|
|
|
|
+ batchEditHttp(type,params){
|
|
|
|
+ postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
|
|
console.log(res);
|
|
console.log(res);
|
|
if(res.success){
|
|
if(res.success){
|
|
if(res.result.length>0){
|
|
if(res.result.length>0){
|
|
@@ -954,6 +1047,8 @@ export default {
|
|
pageNo:this.ipagination.current
|
|
pageNo:this.ipagination.current
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ this.optValue=undefined;
|
|
|
|
+ this.selectedRowKeys=[]
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1108,6 +1203,23 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ refreshCreativeList(params){
|
|
|
|
+ getAction(this.url.creativeList, params).then(res => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ if (res.success) {
|
|
|
|
+ this.ipagination.total = res.result.total
|
|
|
|
+ this.loading = false;
|
|
|
|
+ res.result.records.forEach((item)=>{
|
|
|
|
+ item.key=item.id
|
|
|
|
+ })
|
|
|
|
+ this.data = res.result.records;
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ console.log(res.message);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//请求项目和账户内容
|
|
//请求项目和账户内容
|
|
accountHttp(){
|
|
accountHttp(){
|
|
this.treeData=[];
|
|
this.treeData=[];
|