|
@@ -12,14 +12,14 @@
|
|
|
<a-button type='primary' slot="tabBarExtraContent" @click="goBatch">
|
|
|
+ 头条批量创建
|
|
|
</a-button>
|
|
|
-
|
|
|
+
|
|
|
</a-tabs>
|
|
|
</div>
|
|
|
</keep-alive>
|
|
|
<div class="topOptions">
|
|
|
<span class="OptinItem topOpt">
|
|
|
<!-- <Treeselect :appId.sync="accountID" :multiple="false" request="2,4" reqUrl='/ctop/projectMember/getProjectAccountByUserId' ref="treeSelect" style="margin-bottom:8px " /> -->
|
|
|
-
|
|
|
+
|
|
|
<a-tree-select
|
|
|
show-search
|
|
|
allow-clear
|
|
@@ -28,12 +28,12 @@
|
|
|
style="width: 60%"
|
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
:tree-data="treeData"
|
|
|
- placeholder="请选择具体账户"
|
|
|
+ placeholder="请选择具体账户"
|
|
|
:filterOption='filterOption'
|
|
|
treeNodeFilterProp='title'
|
|
|
- @change='accountIDChange'
|
|
|
+ @change='accountIDChange'
|
|
|
>
|
|
|
-
|
|
|
+
|
|
|
</a-tree-select>
|
|
|
</span>
|
|
|
<span class="OptinItem">
|
|
@@ -127,7 +127,7 @@
|
|
|
<div class="table">
|
|
|
<a-table
|
|
|
:columns="columns"
|
|
|
- :data-source="data"
|
|
|
+ :data-source="data"
|
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
|
|
|
bordered
|
|
|
:pagination="ipagination"
|
|
@@ -137,7 +137,7 @@
|
|
|
<template slot="name" slot-scope="text,record">
|
|
|
<a href="javascript:;" @click="goNextPage(text)">
|
|
|
<editableCell :text="text" slotName='name' @change="onCellChange(record.key, 'name', $event)" />
|
|
|
- </a>
|
|
|
+ </a>
|
|
|
</template>
|
|
|
<span slot="budget" slot-scope="text,record">
|
|
|
<editableCell :text="text" slotName='budget' @change="onCellChange(record.key, 'budget', $event)" />
|
|
@@ -179,7 +179,7 @@
|
|
|
<!-- 出价的模态框 -->
|
|
|
<div class="batchModal" >
|
|
|
<a-modal v-model="offerPriceVisiable" :title="'批量修改'+ModalTitle" @ok="modifyChangeOk" width='55%' id="batchModal" >
|
|
|
- <div id="batchModal">
|
|
|
+ <div id="batchModal">
|
|
|
<div class="selectePlan">已选{{}}个广告计划</div>
|
|
|
<div class="modifyRules">
|
|
|
<span class="rules">修改规则:</span>
|
|
@@ -192,7 +192,7 @@
|
|
|
</a-radio-button>
|
|
|
</a-radio-group>
|
|
|
<span class="totalPrice" v-if="modifyRulesValue=='total'"><span>{{ModalTitle=='出价'?'出价:':'总预算:'}}</span>
|
|
|
-
|
|
|
+
|
|
|
<a-input-number :min="0" v-model="inputValue" :step="0.1" @change="totalbudgetChange" size="small" /> 元
|
|
|
</span>
|
|
|
</div>
|
|
@@ -213,12 +213,12 @@
|
|
|
</span>
|
|
|
<span slot="currentCost" slot-scope="currentCost">{{ currentCost | decimalsHandle }}</span>
|
|
|
<span slot="budget" slot-scope="text">
|
|
|
-
|
|
|
+
|
|
|
<span >日预算:{{ text | decimalsHandle }}</span>
|
|
|
</span>
|
|
|
<span slot="bid" slot-scope="text" >
|
|
|
<span >oCPM: {{text | decimalsHandle}}</span>
|
|
|
-
|
|
|
+
|
|
|
</span>
|
|
|
</a-table>
|
|
|
</div>
|
|
@@ -243,7 +243,7 @@
|
|
|
</a-select>
|
|
|
</p>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
</a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -435,24 +435,24 @@ const ideaColumns = [
|
|
|
key: 'id',
|
|
|
align: 'center',
|
|
|
},
|
|
|
- {
|
|
|
+ /*{
|
|
|
title: '广告创意',
|
|
|
dataIndex: 'img',
|
|
|
key: 'img',
|
|
|
align: 'center',
|
|
|
- },
|
|
|
+ },*/
|
|
|
{
|
|
|
title: '创意标题',
|
|
|
dataIndex: 'title',
|
|
|
key: 'title',
|
|
|
align: 'center',
|
|
|
},
|
|
|
- {
|
|
|
+ /*{
|
|
|
title: '创意方式',
|
|
|
dataIndex: 'iaID',
|
|
|
key: 'idaID',
|
|
|
align: 'center',
|
|
|
- },
|
|
|
+ },*/
|
|
|
{
|
|
|
title: '账户',
|
|
|
dataIndex: 'accountId_dictText',
|
|
@@ -460,26 +460,33 @@ const ideaColumns = [
|
|
|
align: 'center',
|
|
|
},
|
|
|
{
|
|
|
- title: '投放时间',
|
|
|
- dataIndex: 'LaunchTime',
|
|
|
- key: 'LaunchTime',
|
|
|
+ title: '所属计划',
|
|
|
+ dataIndex: 'planId_dictText',
|
|
|
+ key: 'planId_dictText',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'LaunchTime' }
|
|
|
+ scopedSlots: { customRender: 'planId_dictText' }
|
|
|
},
|
|
|
{
|
|
|
- title: '投放位置',
|
|
|
- dataIndex: 'LaunchPosition',
|
|
|
- key: 'LaunchPosition',
|
|
|
+ title: '创意状态',
|
|
|
+ dataIndex: 'status_dictText',
|
|
|
+ key: 'status_dictText',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'LaunchPosition' }
|
|
|
+ scopedSlots: { customRender: 'status_dictText' }
|
|
|
},
|
|
|
{
|
|
|
- title: '所属计划',
|
|
|
- dataIndex: 'planId_dictText',
|
|
|
- key: 'planId_dictText',
|
|
|
+ title: '创建时间',
|
|
|
+ dataIndex: 'creativeCreateTime',
|
|
|
+ key: 'creativeCreateTime',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'planId_dictText' }
|
|
|
+ scopedSlots: { customRender: 'creativeCreateTime' }
|
|
|
},
|
|
|
+ /* {
|
|
|
+ title: '投放位置',
|
|
|
+ dataIndex: 'LaunchPosition',
|
|
|
+ key: 'LaunchPosition',
|
|
|
+ align: 'center',
|
|
|
+ scopedSlots: { customRender: 'LaunchPosition' }
|
|
|
+ },*/
|
|
|
];
|
|
|
|
|
|
|
|
@@ -516,12 +523,12 @@ export default {
|
|
|
columns,
|
|
|
selectedRowKeys:[],
|
|
|
selectedRows:[],
|
|
|
-
|
|
|
+
|
|
|
editID:0,
|
|
|
//批量修改里的表格
|
|
|
typeValue,
|
|
|
modifyTableData:[
|
|
|
-
|
|
|
+
|
|
|
],
|
|
|
modifyTableCol,
|
|
|
modifyTableloading:false,
|
|
@@ -536,7 +543,7 @@ export default {
|
|
|
campaignList: "/ctop/byteDanceCampaign/list",
|
|
|
planList: "/ctop/byteDanceAdvertisePlan/list",
|
|
|
creativeList: "/ctop/byteDanceCreative/list",
|
|
|
-
|
|
|
+
|
|
|
|
|
|
},
|
|
|
|
|
@@ -573,7 +580,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
// table里的函数
|
|
|
-
|
|
|
+
|
|
|
// table里的函数在上
|
|
|
|
|
|
accountIDChange(val){
|
|
@@ -589,7 +596,7 @@ export default {
|
|
|
|
|
|
this.search();
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
filterOption(input, option){
|
|
|
console.log(input, option)
|
|
|
return (
|
|
@@ -600,11 +607,11 @@ export default {
|
|
|
callback(key) {
|
|
|
console.log(key);
|
|
|
this.tabkey=key;
|
|
|
-
|
|
|
+
|
|
|
// this.columns=[];
|
|
|
if(key=='group'){
|
|
|
- this.columns=columns;
|
|
|
- }else if(key=='plan'){
|
|
|
+ this.columns=columns;
|
|
|
+ }else if(key=='plan'){
|
|
|
this.columns=planColumns;
|
|
|
}else if(key=='idea'){
|
|
|
this.columns=ideaColumns;
|
|
@@ -613,7 +620,7 @@ export default {
|
|
|
if(this.accountID){
|
|
|
this.tabkey=key;
|
|
|
this.loading=true
|
|
|
- if(key=='group'){
|
|
|
+ if(key=='group'){
|
|
|
let params = {};
|
|
|
this.refreshCampaignList({
|
|
|
accountId:this.accountID,
|
|
@@ -623,7 +630,7 @@ export default {
|
|
|
endDate:this.dateString[1],
|
|
|
pageNo:this.ipagination.current
|
|
|
});
|
|
|
- }else if(key=='plan'){
|
|
|
+ }else if(key=='plan'){
|
|
|
this.getplanList({
|
|
|
accountId:this.accountID,
|
|
|
name:this.optionId,
|
|
@@ -632,7 +639,7 @@ export default {
|
|
|
endDate:this.dateString[1],
|
|
|
pageNo:this.ipagination.current
|
|
|
})
|
|
|
-
|
|
|
+
|
|
|
}else if(key=='idea'){
|
|
|
let params = {};
|
|
|
this.refreshCreativeList({
|
|
@@ -645,7 +652,7 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
//跳转到批量页面
|
|
|
goBatch(){
|
|
@@ -675,7 +682,7 @@ export default {
|
|
|
//查询按钮事件
|
|
|
search(){
|
|
|
// console.log(this.accountID,this.dateString,this.statusValue,this.optionId);
|
|
|
-
|
|
|
+
|
|
|
if(this.accountID){
|
|
|
this.loading=true
|
|
|
if(this.tabkey=='group'){
|
|
@@ -712,8 +719,8 @@ export default {
|
|
|
}else{
|
|
|
this.$message.error('请选择账户后重试')
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
// postAction('',{
|
|
|
|
|
|
// }).then((res)=>{
|
|
@@ -738,10 +745,10 @@ export default {
|
|
|
},
|
|
|
//状态改变
|
|
|
switchChange(text,record){
|
|
|
-
|
|
|
+
|
|
|
console.log(text,record);
|
|
|
let recordData=JSON.parse(JSON.stringify(record))
|
|
|
-
|
|
|
+
|
|
|
if(this.tabkey=='group'){
|
|
|
let ids=record.id;
|
|
|
let status=text?'disable':'enable';
|
|
@@ -764,14 +771,14 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}else if(this.tabkey=='plan'){
|
|
|
-
|
|
|
+
|
|
|
if(text){
|
|
|
- recordData.toutiaoStatus='AD_STATUS_DISABLE';
|
|
|
+ recordData.toutiaoStatus='AD_STATUS_DISABLE';
|
|
|
}else{
|
|
|
recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
|
}
|
|
|
this.batchEditHttp('status',[recordData])
|
|
|
-
|
|
|
+
|
|
|
}else if(this.tabkey=='idea'){
|
|
|
let ids=record.id;
|
|
|
let status=text?'disable':'enable';
|
|
@@ -796,7 +803,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
|
|
|
|
|
@@ -817,7 +824,7 @@ export default {
|
|
|
}else{
|
|
|
ids+=`,${item.id}`
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
})
|
|
|
let status=''
|
|
|
if(this.optValue=='pause'){
|
|
@@ -852,17 +859,17 @@ export default {
|
|
|
//批量操作的确定按钮
|
|
|
isOkHandle(){
|
|
|
this.selectDisable=true;
|
|
|
-
|
|
|
+
|
|
|
if(this.optValue){
|
|
|
-
|
|
|
- if(this.optValue=='pause'){
|
|
|
+
|
|
|
+ if(this.optValue=='pause'){
|
|
|
if(this.tabkey=='group'){
|
|
|
console.log(this.selectedRows);
|
|
|
this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
|
-
|
|
|
+
|
|
|
}else if(this.tabkey=='plan'){
|
|
|
console.log(0)
|
|
|
- if(this.selectedRowKeys.length>0){
|
|
|
+ if(this.selectedRowKeys.length>0){
|
|
|
this.selectedRows.forEach((item)=>{
|
|
|
item.toutiaoStatus='AD_STATUS_DISABLE'
|
|
|
})
|
|
@@ -871,13 +878,13 @@ export default {
|
|
|
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('/ctop/byteDanceCampaign/editStatus');
|
|
|
}else if(this.tabkey=='plan'){
|
|
|
- if(this.selectedRowKeys.length>0){
|
|
|
+ if(this.selectedRowKeys.length>0){
|
|
|
this.selectedRows.forEach((item)=>{
|
|
|
item.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
|
})
|
|
@@ -885,11 +892,11 @@ export default {
|
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
|
}else if(this.tabkey=='idea'){
|
|
|
this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
this.selectedRows=[];
|
|
|
},
|
|
@@ -900,7 +907,7 @@ export default {
|
|
|
if(this.tabkey=='group'){
|
|
|
this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
|
}else if(this.tabkey=='plan'){
|
|
|
- if(this.selectedRowKeys.length>0){
|
|
|
+ if(this.selectedRowKeys.length>0){
|
|
|
this.selectedRows.forEach((item)=>{
|
|
|
item.toutiaoStatus='AD_STATUS_DELETE'
|
|
|
})
|
|
@@ -909,11 +916,11 @@ export default {
|
|
|
this.$message.success('删除成功');
|
|
|
}else if(this.tabkey=='idea'){
|
|
|
this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
|
|
|
},
|
|
|
//取消删除
|
|
@@ -950,9 +957,9 @@ export default {
|
|
|
})
|
|
|
// console.log(this.xiugaiData)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}else if(this.typeValue=='出价'){
|
|
|
- if(e.target.value ){
|
|
|
+ if(e.target.value ){
|
|
|
this.xiugaiData.forEach((item)=>{
|
|
|
if(item.id==record.id){
|
|
|
item.bid==e.target.value*1
|
|
@@ -987,7 +994,7 @@ export default {
|
|
|
this.offerPriceVisiable = false;
|
|
|
console.log(this.inputValue);
|
|
|
if(this.modifyRulesValue=='separately'){
|
|
|
-
|
|
|
+
|
|
|
let batchArr=[...this.xiugaiData];
|
|
|
let changeZiduan=''
|
|
|
if(this.typeValue=='预算'){
|
|
@@ -1010,13 +1017,13 @@ export default {
|
|
|
})
|
|
|
this.batchEditHttp('budget',batchArr)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.modifyTableData=[];
|
|
|
this.selectedRowKeys=[]
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
batchEditHttp(type,params){
|
|
|
postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
|
|
@@ -1120,12 +1127,12 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- }else if(this.tabkey=='plan'){
|
|
|
+
|
|
|
+ }else if(this.tabkey=='plan'){
|
|
|
postAction('/ctop/byteDanceAdvertisePlan/edit',target).then((res)=>{
|
|
|
console.log(res);
|
|
|
if(res.success){
|
|
|
- this.data = dataSource;
|
|
|
+ this.data = dataSource;
|
|
|
this.$message.success({
|
|
|
content:'修改成功!',
|
|
|
duration:2
|
|
@@ -1135,8 +1142,8 @@ export default {
|
|
|
}else if(this.tabkey=='idea'){
|
|
|
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
console.log(this.data)
|
|
|
},
|
|
@@ -1175,13 +1182,13 @@ export default {
|
|
|
this.data=[]
|
|
|
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;
|
|
|
console.log(this.data)
|
|
|
this.selectedRowKeys=[];
|
|
@@ -1214,14 +1221,14 @@ export default {
|
|
|
// console.log(res);
|
|
|
if(res.result){
|
|
|
res.result.forEach((element,index) => {
|
|
|
- if(element){
|
|
|
- this.treeData.push({});
|
|
|
+ if(element){
|
|
|
+ this.treeData.push({});
|
|
|
this.treeData[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
|
|
|
this.treeData[index].value='project'+element.project.projectId;
|
|
|
this.treeData[index].key=element.project.projectId;
|
|
|
this.treeData[index].mediaId=element.project.mediaId;
|
|
|
this.treeData[index].children=[];
|
|
|
-
|
|
|
+
|
|
|
if(element.account.length){
|
|
|
element.account.forEach((ele,i)=>{
|
|
|
this.treeData[index].children.push({});
|
|
@@ -1229,12 +1236,12 @@ export default {
|
|
|
this.treeData[index].children[i].value=ele.accountId;
|
|
|
this.treeData[index].children[i].key=ele.accountId;
|
|
|
})
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
// console.log(this.treeData)
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -1242,7 +1249,7 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
console.log(this);
|
|
|
-
|
|
|
+
|
|
|
// let params = {}
|
|
|
// // this.dateString=[moment().format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")]
|
|
|
// //初始
|