|
@@ -1,17 +1,32 @@
|
|
<template>
|
|
<template>
|
|
<div class="toutiaoBatch">
|
|
<div class="toutiaoBatch">
|
|
|
|
+ <!-- <a-spin :spinning="spinning"> -->
|
|
|
|
+
|
|
<keep-alive>
|
|
<keep-alive>
|
|
<div class="tabs">
|
|
<div class="tabs">
|
|
<a-tabs v-model="tabkey" @change="callback">
|
|
<a-tabs v-model="tabkey" @change="callback">
|
|
<a-tab-pane key="group" tab="广告组">
|
|
<a-tab-pane key="group" tab="广告组">
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
<a-tab-pane key="plan" tab="广告计划">
|
|
<a-tab-pane key="plan" tab="广告计划">
|
|
|
|
+ <a-tag color="blue" style="height:30px;line-height:30px;font-size:14px;" v-show="currentGroup.name">
|
|
|
|
+ {{currentGroup.name}} <a-icon type="close" @click="clearGroup" />
|
|
|
|
+ </a-tag>
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
<a-tab-pane key="idea" tab="广告创意">
|
|
<a-tab-pane key="idea" tab="广告创意">
|
|
|
|
+
|
|
|
|
+ <a-tag color="blue" style="height:30px;line-height:30px;font-size:14px;" v-show="currentPlan.name ">
|
|
|
|
+ {{currentPlan.name }} <a-icon type="close" @click="clearPlan" />
|
|
|
|
+ </a-tag>
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
- <a-button type='primary' slot="tabBarExtraContent" @click="goBatch">
|
|
|
|
|
|
+ <a-button type='primary' slot="tabBarExtraContent" @click="goBatch" v-if="tabkey=='group'">
|
|
+ 头条批量创建
|
|
+ 头条批量创建
|
|
</a-button>
|
|
</a-button>
|
|
|
|
+ <a-button type='primary' slot="tabBarExtraContent" @click="createPlan" v-if="tabkey=='plan'">
|
|
|
|
+ + 新建计划
|
|
|
|
+ </a-button>
|
|
|
|
+ <a-button type='primary' slot="tabBarExtraContent" @click="createIdea" v-if="tabkey=='idea'">
|
|
|
|
+ + 新建创意
|
|
|
|
+ </a-button>
|
|
|
|
|
|
</a-tabs>
|
|
</a-tabs>
|
|
</div>
|
|
</div>
|
|
@@ -77,7 +92,7 @@
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
</span>
|
|
</span>
|
|
<span class="OptinItem">
|
|
<span class="OptinItem">
|
|
- <a-select style="width: 120px" @change="optChange" placeholder="请选择状态" :disabled='selectedRowKeys.length<=0'>
|
|
|
|
|
|
+ <a-select style="width: 120px" @change="optChange" v-model="optValue" placeholder="请选择状态" :disabled='selectedRowKeys.length<=0'>
|
|
<a-select-option value="open" >
|
|
<a-select-option value="open" >
|
|
启动
|
|
启动
|
|
</a-select-option>
|
|
</a-select-option>
|
|
@@ -127,16 +142,16 @@
|
|
</div>
|
|
</div>
|
|
<div class="table">
|
|
<div class="table">
|
|
<a-table
|
|
<a-table
|
|
- :columns="columns"
|
|
|
|
- :data-source="data"
|
|
|
|
- :rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
|
|
|
|
- bordered
|
|
|
|
- :pagination="ipagination"
|
|
|
|
- :loading="loading"
|
|
|
|
- @change="sort"
|
|
|
|
|
|
+ :columns="columns"
|
|
|
|
+ :data-source="data"
|
|
|
|
+ :rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
|
|
|
|
+ bordered
|
|
|
|
+ :pagination="ipagination"
|
|
|
|
+ :loading="loading"
|
|
|
|
+ @change="sort"
|
|
>
|
|
>
|
|
<template slot="name" slot-scope="text,record">
|
|
<template slot="name" slot-scope="text,record">
|
|
- <a href="javascript:;" @click="goNextPage(text)">
|
|
|
|
|
|
+ <a href="javascript:;" @click="goNextPage(record)">
|
|
<editableCell :text="text" slotName='name' @change="onCellChange(record.key, 'name', $event)" />
|
|
<editableCell :text="text" slotName='name' @change="onCellChange(record.key, 'name', $event)" />
|
|
</a>
|
|
</a>
|
|
</template>
|
|
</template>
|
|
@@ -146,14 +161,31 @@
|
|
<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)" />
|
|
</span>
|
|
</span>
|
|
|
|
+
|
|
<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-spin :spinning="record.spin" size="small" >
|
|
|
|
+ <div class="spin-content">
|
|
|
|
+ <a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
|
|
+ </div>
|
|
|
|
+ </a-spin>
|
|
|
|
+ <!-- <a-switch size="default" :checked=text @change="switchChange(text,record)"/> -->
|
|
</span>
|
|
</span>
|
|
|
|
+
|
|
<span slot="createStatus" slot-scope="text,record">
|
|
<span slot="createStatus" slot-scope="text,record">
|
|
- <a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
|
|
|
|
+ <a-spin :spinning="record.spin" size="small" >
|
|
|
|
+ <div class="spin-content">
|
|
|
|
+ <a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
|
|
+ </div>
|
|
|
|
+ </a-spin>
|
|
|
|
+ <!-- <a-switch size="default" :checked=text @change="switchChange(text,record)"/> -->
|
|
</span>
|
|
</span>
|
|
<span slot="planStatus" slot-scope="text,record">
|
|
<span slot="planStatus" slot-scope="text,record">
|
|
- <a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
|
|
|
|
+ <a-spin :spinning="record.spin" size="small" >
|
|
|
|
+ <div class="spin-content">
|
|
|
|
+ <a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
|
|
+ </div>
|
|
|
|
+ </a-spin>
|
|
|
|
+ <!-- <a-switch size="default" :checked=text @change="switchChange(text,record)"/> -->
|
|
</span>
|
|
</span>
|
|
|
|
|
|
<span slot="createImg" slot-scope="text,record">
|
|
<span slot="createImg" slot-scope="text,record">
|
|
@@ -161,7 +193,7 @@
|
|
<a-popover placement="right">
|
|
<a-popover placement="right">
|
|
<template slot="content">
|
|
<template slot="content">
|
|
<!-- {{record.videoId_dictText}} -->
|
|
<!-- {{record.videoId_dictText}} -->
|
|
- <video :src="record.videoId_dictText" style="width:250px" controls autoplay muted ></video>
|
|
|
|
|
|
+ <video :src="record.videoId_dictText" style="width:250px" controls ></video>
|
|
</template>
|
|
</template>
|
|
<template slot="title">
|
|
<template slot="title">
|
|
<!-- <span>Title</span> -->
|
|
<!-- <span>Title</span> -->
|
|
@@ -262,6 +294,8 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</a-modal>
|
|
</a-modal>
|
|
|
|
+
|
|
|
|
+ <!-- </a-spin> -->
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -525,6 +559,10 @@ export default {
|
|
mixins: [JeecgListMixin],
|
|
mixins: [JeecgListMixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ currentGroup:{},
|
|
|
|
+ currentPlan:{},
|
|
|
|
+
|
|
|
|
+ spinning:false,
|
|
moment,
|
|
moment,
|
|
loading:false,
|
|
loading:false,
|
|
accountID:undefined,
|
|
accountID:undefined,
|
|
@@ -603,8 +641,75 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
// 点击跳转
|
|
// 点击跳转
|
|
- goNextPage(){
|
|
|
|
|
|
+ goNextPage(item){
|
|
|
|
+ console.log(item);
|
|
|
|
+ if(this.tabkey=='group'){
|
|
|
|
+ this.tabkey='plan';
|
|
|
|
+ this.columns=planColumns;
|
|
|
|
+ this.loading=true;
|
|
|
|
+ this.data=[];
|
|
|
|
+ this.currentGroup=item
|
|
|
|
+ console.log(item.id)
|
|
|
|
+ this.getplanList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ campaignId:item.id
|
|
|
|
+ })
|
|
|
|
|
|
|
|
+ let groupInfo=JSON.stringify(item)
|
|
|
|
+ localStorage.setItem('groupInfo',groupInfo)
|
|
|
|
+
|
|
|
|
+ }else if(this.tabkey=='plan'){
|
|
|
|
+ this.tabkey='idea';
|
|
|
|
+ this.columns=ideaColumns;
|
|
|
|
+ this.loading=true;
|
|
|
|
+ this.data=[];
|
|
|
|
+ this.currentPlan=item
|
|
|
|
+ this.refreshCreativeList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ planId:item.id,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current
|
|
|
|
+ })
|
|
|
|
+ let planInfo=JSON.stringify([item])
|
|
|
|
+ localStorage.setItem('planInfo',planInfo)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 清空选中的组信息
|
|
|
|
+ clearGroup(){
|
|
|
|
+ this.currentGroup={};
|
|
|
|
+ this.loading=true;
|
|
|
|
+ this.getplanList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ campaignId:this.currentGroup.id
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 清空选中的计划
|
|
|
|
+ clearPlan(){
|
|
|
|
+ this.currentPlan={};
|
|
|
|
+ this.loading=true;
|
|
|
|
+ this.refreshCreativeList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ planId:this.currentPlan.id,
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// table里的函数
|
|
// table里的函数
|
|
|
|
|
|
@@ -620,7 +725,14 @@ export default {
|
|
this.accountID=undefined;
|
|
this.accountID=undefined;
|
|
this.openID=val
|
|
this.openID=val
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ this.treeData.forEach((item)=>{
|
|
|
|
+ item.children.forEach(ele=>{
|
|
|
|
+ if(ele.value==val){
|
|
|
|
+ let accountInfo=JSON.stringify(ele)
|
|
|
|
+ localStorage.setItem('accountInfo',accountInfo)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
this.search();
|
|
this.search();
|
|
},
|
|
},
|
|
|
|
|
|
@@ -648,14 +760,15 @@ export default {
|
|
this.tabkey=key;
|
|
this.tabkey=key;
|
|
this.loading=true
|
|
this.loading=true
|
|
if(key=='group'){
|
|
if(key=='group'){
|
|
- let params = {};
|
|
|
|
|
|
+
|
|
this.refreshCampaignList({
|
|
this.refreshCampaignList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
status:this.statusValue,
|
|
status:this.statusValue,
|
|
startDate:this.dateString[0],
|
|
startDate:this.dateString[0],
|
|
endDate:this.dateString[1],
|
|
endDate:this.dateString[1],
|
|
- pageNo:this.ipagination.current
|
|
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+
|
|
});
|
|
});
|
|
}else if(key=='plan'){
|
|
}else if(key=='plan'){
|
|
this.getplanList({
|
|
this.getplanList({
|
|
@@ -664,13 +777,15 @@ export default {
|
|
toutiaoStatus:this.statusValue,
|
|
toutiaoStatus:this.statusValue,
|
|
startDate:this.dateString[0],
|
|
startDate:this.dateString[0],
|
|
endDate:this.dateString[1],
|
|
endDate:this.dateString[1],
|
|
- pageNo:this.ipagination.current
|
|
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ campaignId:this.currentGroup.id
|
|
})
|
|
})
|
|
|
|
|
|
}else if(key=='idea'){
|
|
}else if(key=='idea'){
|
|
let params = {};
|
|
let params = {};
|
|
this.refreshCreativeList({
|
|
this.refreshCreativeList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
|
|
+ planId:this.currentPlan.id,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
status:this.statusValue,
|
|
status:this.statusValue,
|
|
startDate:this.dateString[0],
|
|
startDate:this.dateString[0],
|
|
@@ -688,6 +803,31 @@ export default {
|
|
// this.$router.push('/modules/BatchCreate/newCreate')
|
|
// this.$router.push('/modules/BatchCreate/newCreate')
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
|
|
+ createPlan(){
|
|
|
|
+ if(this.currentGroup.name){
|
|
|
|
+ console.log(this.currentGroup)
|
|
|
|
+ this.$router.push('/modules/BatchCreate/newPlan');
|
|
|
|
+ let groupInfo=JSON.stringify(this.currentGroup);
|
|
|
|
+ localStorage.setItem('groupInfo',groupInfo)
|
|
|
|
+ }else {
|
|
|
|
+ this.$router.push('/modules/BatchCreate/newGroup')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ createIdea(){
|
|
|
|
+ if(this.accountID){
|
|
|
|
+ if(this.currentPlan.name){
|
|
|
|
+ console.log(this.currentPlan)
|
|
|
|
+ this.$router.push('/modules/BatchCreate/newCreate');
|
|
|
|
+ let planInfo=JSON.stringify(this.currentGroup);
|
|
|
|
+ localStorage.setItem('groupInfo',groupInfo)
|
|
|
|
+ }else if(!this.currentPlan.name){
|
|
|
|
+ console.log('hhhh 去新建或者选择已有');
|
|
|
|
+ this.$router.push('/modules/BatchCreate/selectPlanList');
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ this.$router.push('/modules/BatchCreate/newGroup')
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//状态改变
|
|
//状态改变
|
|
statusChange(value){
|
|
statusChange(value){
|
|
console.log(value);
|
|
console.log(value);
|
|
@@ -727,10 +867,11 @@ export default {
|
|
this.getplanList({
|
|
this.getplanList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
- toutiaoStatus:this.statusValue,
|
|
|
|
|
|
+ status:this.statusValue,
|
|
startDate:this.dateString[0],
|
|
startDate:this.dateString[0],
|
|
endDate:this.dateString[1],
|
|
endDate:this.dateString[1],
|
|
- pageNo:this.ipagination.current
|
|
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ campaignId:this.currentGroup.id
|
|
})
|
|
})
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
this.columns=ideaColumns;
|
|
this.columns=ideaColumns;
|
|
@@ -740,7 +881,8 @@ export default {
|
|
status:this.statusValue,
|
|
status:this.statusValue,
|
|
startDate:this.dateString[0],
|
|
startDate:this.dateString[0],
|
|
endDate:this.dateString[1],
|
|
endDate:this.dateString[1],
|
|
- pageNo:this.ipagination.current
|
|
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ planId:this.currentPlan.id,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
@@ -756,12 +898,7 @@ export default {
|
|
},
|
|
},
|
|
//点击分页
|
|
//点击分页
|
|
sort(pagination, filters, sorter, { currentDataSource }){
|
|
sort(pagination, filters, sorter, { currentDataSource }){
|
|
- // console.log(pagination, filters, sorter)
|
|
|
|
- // if(sorter.order == 'ascend'){
|
|
|
|
- // this.HttpPost(sorter.columnKey+'+')
|
|
|
|
- // }else if(sorter.order == 'descend'){
|
|
|
|
- // this.HttpPost(sorter.columnKey+'-')
|
|
|
|
- // }
|
|
|
|
|
|
+
|
|
this.ipagination.current=pagination.current;
|
|
this.ipagination.current=pagination.current;
|
|
this.search()
|
|
this.search()
|
|
},
|
|
},
|
|
@@ -771,10 +908,10 @@ export default {
|
|
},
|
|
},
|
|
//状态改变
|
|
//状态改变
|
|
switchChange(text,record){
|
|
switchChange(text,record){
|
|
-
|
|
|
|
|
|
+ // this.spinning=true;
|
|
// console.log(text,record);
|
|
// console.log(text,record);
|
|
let recordData=JSON.parse(JSON.stringify(record))
|
|
let recordData=JSON.parse(JSON.stringify(record))
|
|
-
|
|
|
|
|
|
+ record.spin=true;
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
let ids=record.id;
|
|
let ids=record.id;
|
|
let status=text?'disable':'enable';
|
|
let status=text?'disable':'enable';
|
|
@@ -784,8 +921,9 @@ export default {
|
|
status:status,
|
|
status:status,
|
|
})).then((res)=>{
|
|
})).then((res)=>{
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
|
+ // this.spinning=false;
|
|
|
|
+ record.spin=false;
|
|
if(res.success){
|
|
if(res.success){
|
|
- this.data=[];
|
|
|
|
this.refreshCampaignList({
|
|
this.refreshCampaignList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
@@ -794,6 +932,9 @@ export default {
|
|
endDate:this.dateString[1],
|
|
endDate:this.dateString[1],
|
|
pageNo:this.ipagination.current
|
|
pageNo:this.ipagination.current
|
|
})
|
|
})
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error(res.message)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}else if(this.tabkey=='plan'){
|
|
}else if(this.tabkey=='plan'){
|
|
@@ -814,19 +955,24 @@ export default {
|
|
status:status,
|
|
status:status,
|
|
})).then((res)=>{
|
|
})).then((res)=>{
|
|
// console.log(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
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- this.$message.error(res.message)
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ if(res.success){
|
|
|
|
+ // this.data=[];
|
|
|
|
+ record.spin=false;
|
|
|
|
+ this.refreshCreativeList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ planId:this.currentPlan.id,
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ record.spin=false;
|
|
|
|
+ this.$message.error(res.message)
|
|
|
|
+ }
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -868,18 +1014,27 @@ export default {
|
|
console.log(res);
|
|
console.log(res);
|
|
if(res.success){
|
|
if(res.success){
|
|
this.$message.success(res.message)
|
|
this.$message.success(res.message)
|
|
|
|
+ // this.data=[];
|
|
|
|
+ this.refreshCampaignList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current
|
|
|
|
+ })
|
|
}else{
|
|
}else{
|
|
|
|
+ if(this.selectedRows.length>0){
|
|
|
|
+ this.selectedRows.forEach(item=>{
|
|
|
|
+ item.spin=false;
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ this.selectedRowKeys=[];
|
|
|
|
+ this.selectedRows=[];
|
|
|
|
+ this.optValue=undefined;
|
|
this.$message.error(res.message)
|
|
this.$message.error(res.message)
|
|
}
|
|
}
|
|
- this.data=[];
|
|
|
|
- this.refreshCampaignList({
|
|
|
|
- accountId:this.accountID,
|
|
|
|
- name:this.optionId,
|
|
|
|
- status:this.statusValue,
|
|
|
|
- startDate:this.dateString[0],
|
|
|
|
- endDate:this.dateString[1],
|
|
|
|
- pageNo:this.ipagination.current
|
|
|
|
- })
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -888,7 +1043,9 @@ export default {
|
|
isOkHandle(){
|
|
isOkHandle(){
|
|
console.log(this.optValue&&this.selectedRowKeys.length>0)
|
|
console.log(this.optValue&&this.selectedRowKeys.length>0)
|
|
if(this.optValue&&this.selectedRowKeys.length>0){
|
|
if(this.optValue&&this.selectedRowKeys.length>0){
|
|
-
|
|
|
|
|
|
+ this.selectedRows.forEach(item=>{
|
|
|
|
+ item.spin=true;
|
|
|
|
+ })
|
|
if(this.optValue=='pause'){
|
|
if(this.optValue=='pause'){
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
console.log(this.selectedRows);
|
|
console.log(this.selectedRows);
|
|
@@ -1061,17 +1218,39 @@ export default {
|
|
if(res.result.length>0){
|
|
if(res.result.length>0){
|
|
this.modifyTableData=[]
|
|
this.modifyTableData=[]
|
|
this.modifyTableData=res.result
|
|
this.modifyTableData=res.result
|
|
|
|
+
|
|
this.getplanList({
|
|
this.getplanList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
status:this.statusValue,
|
|
status:this.statusValue,
|
|
startDate:this.dateString[0],
|
|
startDate:this.dateString[0],
|
|
endDate:this.dateString[1],
|
|
endDate:this.dateString[1],
|
|
- pageNo:this.ipagination.current
|
|
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ campaignId:this.currentGroup.id
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ // params.spin=false;
|
|
|
|
+ params.forEach(item=>{
|
|
|
|
+ item.spin=false;
|
|
|
|
+ })
|
|
this.optValue=undefined;
|
|
this.optValue=undefined;
|
|
- this.selectedRowKeys=[]
|
|
|
|
|
|
+ this.selectedRowKeys=[];
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ }else{
|
|
|
|
+ // params.spin=false;
|
|
|
|
+ params.forEach(item=>{
|
|
|
|
+ item.spin=false;
|
|
|
|
+ })
|
|
|
|
+ this.getplanList({
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ name:this.optionId,
|
|
|
|
+ status:this.statusValue,
|
|
|
|
+ startDate:this.dateString[0],
|
|
|
|
+ endDate:this.dateString[1],
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ campaignId:this.currentGroup.id
|
|
|
|
+ })
|
|
|
|
+ this.$message.error(res.message)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -1085,11 +1264,7 @@ export default {
|
|
this.inputValue=0
|
|
this.inputValue=0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //更改文字提示的父节点
|
|
|
|
- // getPopupContainer(){
|
|
|
|
- // // console.log(this);
|
|
|
|
- // return this.$el
|
|
|
|
- // },
|
|
|
|
|
|
+
|
|
|
|
|
|
//点击修改广告名
|
|
//点击修改广告名
|
|
// changecampaignName(text,record){
|
|
// changecampaignName(text,record){
|
|
@@ -1166,7 +1341,8 @@ export default {
|
|
status:this.statusValue,
|
|
status:this.statusValue,
|
|
startDate:this.dateString[0],
|
|
startDate:this.dateString[0],
|
|
endDate:this.dateString[1],
|
|
endDate:this.dateString[1],
|
|
- pageNo:this.ipagination.current
|
|
|
|
|
|
+ pageNo:this.ipagination.current,
|
|
|
|
+ campaignId:this.currentGroup.id
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -1195,16 +1371,22 @@ export default {
|
|
// this.loading=true
|
|
// this.loading=true
|
|
getAction(this.url.campaignList, params).then(res => {
|
|
getAction(this.url.campaignList, params).then(res => {
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
|
+ this.loading = false;
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.ipagination.total = res.result.total
|
|
this.ipagination.total = res.result.total
|
|
- this.loading = false;
|
|
|
|
- res.result.records.forEach((item)=>{
|
|
|
|
- item.key=item.id
|
|
|
|
- })
|
|
|
|
- this.data = res.result.records;
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ this.data = res.result.records.map(item=>{
|
|
|
|
+
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ spin:false,
|
|
|
|
+ key:item.id
|
|
|
|
+ }
|
|
|
|
+ });
|
|
this.selectedRows=[];
|
|
this.selectedRows=[];
|
|
this.selectedRowKeys=[];
|
|
this.selectedRowKeys=[];
|
|
- this.$message.success(res.message)
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
// console.log(res.message);
|
|
// console.log(res.message);
|
|
this.selectedRows=[];
|
|
this.selectedRows=[];
|
|
@@ -1216,16 +1398,23 @@ export default {
|
|
|
|
|
|
getAction(this.url.planList,params).then((res)=>{
|
|
getAction(this.url.planList,params).then((res)=>{
|
|
this.data=[]
|
|
this.data=[]
|
|
- // console.log(res)
|
|
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.loading = false
|
|
if(res.success){
|
|
if(res.success){
|
|
|
|
|
|
this.ipagination.total = res.result.total
|
|
this.ipagination.total = res.result.total
|
|
- this.loading = false
|
|
|
|
|
|
+
|
|
res.result.records.forEach((item)=>{
|
|
res.result.records.forEach((item)=>{
|
|
item.key=item.id
|
|
item.key=item.id
|
|
})
|
|
})
|
|
|
|
|
|
- this.data = res.result.records;
|
|
|
|
|
|
+ this.data = res.result.records.map(item=>{
|
|
|
|
+
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ spin:false
|
|
|
|
+ }
|
|
|
|
+ });
|
|
// console.log(this.data)
|
|
// console.log(this.data)
|
|
this.selectedRowKeys=[];
|
|
this.selectedRowKeys=[];
|
|
}
|
|
}
|
|
@@ -1233,16 +1422,24 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
refreshCreativeList(params){
|
|
refreshCreativeList(params){
|
|
|
|
+ this.loading=true;
|
|
getAction(this.url.creativeList, params).then(res => {
|
|
getAction(this.url.creativeList, params).then(res => {
|
|
// console.log(res);
|
|
// console.log(res);
|
|
|
|
+ this.loading=false;
|
|
if (res.success) {
|
|
if (res.success) {
|
|
this.ipagination.total = res.result.total
|
|
this.ipagination.total = res.result.total
|
|
this.loading = false;
|
|
this.loading = false;
|
|
res.result.records.forEach((item)=>{
|
|
res.result.records.forEach((item)=>{
|
|
item.key=item.id
|
|
item.key=item.id
|
|
})
|
|
})
|
|
- this.data = res.result.records;
|
|
|
|
|
|
+ // this.data = res.result.records;
|
|
|
|
+ this.data = res.result.records.map(item=>{
|
|
|
|
|
|
|
|
+ return {
|
|
|
|
+ ...item,
|
|
|
|
+ spin:false
|
|
|
|
+ }
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
// console.log(res.message);
|
|
// console.log(res.message);
|
|
}
|
|
}
|
|
@@ -1284,12 +1481,7 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
-
|
|
|
|
|
|
|
|
- // let params = {}
|
|
|
|
- // // this.dateString=[moment().format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")]
|
|
|
|
- // //初始
|
|
|
|
- // this.refreshCampaignList(params);
|
|
|
|
this.accountHttp()
|
|
this.accountHttp()
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
@@ -1384,6 +1576,19 @@ export default {
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="scss">
|
|
<style lang="scss">
|
|
|
|
+ #closeIcon{
|
|
|
|
+ color: #0E74D2;
|
|
|
|
+ }
|
|
|
|
+ .toutiaoBatch{
|
|
|
|
+ .ant-tag .anticon-close {
|
|
|
|
+ color: #1890ff;
|
|
|
|
+ }
|
|
|
|
+ .ant-tag .anticon-close:hover{
|
|
|
|
+ color: rgba(0, 0, 0, 0.85);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
.ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
|
|
.ant-tooltip-inner,.ant-tooltip,.ant-tooltip-arrow::before{
|
|
background-color: #fff;
|
|
background-color: #fff;
|
|
color: #333;
|
|
color: #333;
|