|
@@ -18,7 +18,10 @@
|
|
|
{{currentPlan.name }} <a-icon type="close" @click="clearPlan" />
|
|
|
</a-tag>
|
|
|
</a-tab-pane>
|
|
|
- <a-button type='primary' slot="tabBarExtraContent" @click="goBatch" v-if="tabkey=='group'">
|
|
|
+ <a-button type='primary' slot="tabBarExtraContent" @click="goBatch" >
|
|
|
+ + 头条批量创建
|
|
|
+ </a-button>
|
|
|
+ <!-- <a-button type='primary' slot="tabBarExtraContent" @click="goBatch" v-if="tabkey=='group'">
|
|
|
+ 头条批量创建
|
|
|
</a-button>
|
|
|
<a-button type='primary' slot="tabBarExtraContent" @click="createPlan" v-if="tabkey=='plan'">
|
|
@@ -26,7 +29,7 @@
|
|
|
</a-button>
|
|
|
<a-button type='primary' slot="tabBarExtraContent" @click="createIdea" v-if="tabkey=='idea'">
|
|
|
+ 新建创意
|
|
|
- </a-button>
|
|
|
+ </a-button> -->
|
|
|
|
|
|
</a-tabs>
|
|
|
</div>
|
|
@@ -799,9 +802,7 @@ export default {
|
|
|
//跳转到批量页面
|
|
|
goBatch(){
|
|
|
this.$router.push('/modules/BatchCreate/newGroup')
|
|
|
- // if(this.tabkey=='idea'){
|
|
|
- // this.$router.push('/modules/BatchCreate/newCreate')
|
|
|
- // }
|
|
|
+
|
|
|
},
|
|
|
createPlan(){
|
|
|
if(this.currentGroup.name){
|
|
@@ -1012,6 +1013,8 @@ export default {
|
|
|
status,
|
|
|
})).then((res)=>{
|
|
|
console.log(res);
|
|
|
+ // this.loading=false
|
|
|
+ this.optValue=undefined;
|
|
|
if(res.success){
|
|
|
this.$message.success(res.message)
|
|
|
// this.data=[];
|
|
@@ -1024,11 +1027,12 @@ export default {
|
|
|
pageNo:this.ipagination.current
|
|
|
})
|
|
|
}else{
|
|
|
- if(this.selectedRows.length>0){
|
|
|
- this.selectedRows.forEach(item=>{
|
|
|
- item.spin=false;
|
|
|
- })
|
|
|
- }
|
|
|
+ this.loading=false
|
|
|
+ // if(this.selectedRows.length>0){
|
|
|
+ // this.selectedRows.forEach(item=>{
|
|
|
+ // item.spin=false;
|
|
|
+ // })
|
|
|
+ // }
|
|
|
this.selectedRowKeys=[];
|
|
|
this.selectedRows=[];
|
|
|
this.optValue=undefined;
|
|
@@ -1043,16 +1047,19 @@ export default {
|
|
|
isOkHandle(){
|
|
|
console.log(this.optValue&&this.selectedRowKeys.length>0)
|
|
|
if(this.optValue&&this.selectedRowKeys.length>0){
|
|
|
- this.selectedRows.forEach(item=>{
|
|
|
- item.spin=true;
|
|
|
- })
|
|
|
+ // this.selectedRows.forEach(item=>{
|
|
|
+ // item.spin=true;
|
|
|
+ // })
|
|
|
+ // this.loading=true;
|
|
|
if(this.optValue=='pause'){
|
|
|
+
|
|
|
if(this.tabkey=='group'){
|
|
|
- console.log(this.selectedRows);
|
|
|
+ console.log(this.selectedRows);
|
|
|
this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
|
|
|
|
}else if(this.tabkey=='plan'){
|
|
|
console.log(0)
|
|
|
+ this.loading=true;
|
|
|
if(this.selectedRowKeys.length>0){
|
|
|
this.selectedRows.forEach((item)=>{
|
|
|
item.toutiaoStatus='AD_STATUS_DISABLE'
|
|
@@ -1061,10 +1068,12 @@ export default {
|
|
|
console.log(0)
|
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
|
}else if(this.tabkey=='idea'){
|
|
|
+ this.loading=true;
|
|
|
this.editGroupStatus('/ctop/byteDanceCreative/editStatus')
|
|
|
}
|
|
|
|
|
|
}else if(this.optValue=='open'){
|
|
|
+
|
|
|
if(this.tabkey=='group'){
|
|
|
this.editGroupStatus('/ctop/byteDanceCampaign/editStatus');
|
|
|
}else if(this.tabkey=='plan'){
|
|
@@ -1082,14 +1091,16 @@ export default {
|
|
|
|
|
|
// this.selectedRows=[];
|
|
|
// this.selectedRowKeys=[];
|
|
|
- this.optValue=undefined;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|
|
|
//确定删除
|
|
|
confirm(e) {
|
|
|
// console.log(e);
|
|
|
+ this.loading=true;
|
|
|
if(this.optValue=='delete'){
|
|
|
+
|
|
|
if(this.tabkey=='group'){
|
|
|
this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
|
}else if(this.tabkey=='plan'){
|
|
@@ -1214,6 +1225,7 @@ export default {
|
|
|
batchEditHttp(type,params){
|
|
|
postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
|
|
|
// console.log(res);
|
|
|
+ this.optValue=undefined;
|
|
|
if(res.success){
|
|
|
if(res.result.length>0){
|
|
|
this.modifyTableData=[]
|
|
@@ -1238,9 +1250,10 @@ export default {
|
|
|
this.$message.success(res.message)
|
|
|
}else{
|
|
|
// params.spin=false;
|
|
|
- params.forEach(item=>{
|
|
|
- item.spin=false;
|
|
|
- })
|
|
|
+ // params.forEach(item=>{
|
|
|
+ // item.spin=false;
|
|
|
+ // })
|
|
|
+ this.loading=false;
|
|
|
this.getplanList({
|
|
|
accountId:this.accountID,
|
|
|
name:this.optionId,
|
|
@@ -1374,8 +1387,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
if (res.success) {
|
|
|
this.ipagination.total = res.result.total
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
this.data = res.result.records.map(item=>{
|
|
|
|
|
|
return {
|