|
@@ -12,14 +12,14 @@
|
|
<a-button type='primary' slot="tabBarExtraContent" @click="goBatch">
|
|
<a-button type='primary' slot="tabBarExtraContent" @click="goBatch">
|
|
+ 头条批量创建
|
|
+ 头条批量创建
|
|
</a-button>
|
|
</a-button>
|
|
-
|
|
|
|
|
|
+
|
|
</a-tabs>
|
|
</a-tabs>
|
|
</div>
|
|
</div>
|
|
</keep-alive>
|
|
</keep-alive>
|
|
<div class="topOptions">
|
|
<div class="topOptions">
|
|
<span class="OptinItem topOpt">
|
|
<span class="OptinItem topOpt">
|
|
<!-- <Treeselect :appId.sync="accountID" :multiple="false" request="2,4" reqUrl='/ctop/projectMember/getProjectAccountByUserId' ref="treeSelect" style="margin-bottom:8px " /> -->
|
|
<!-- <Treeselect :appId.sync="accountID" :multiple="false" request="2,4" reqUrl='/ctop/projectMember/getProjectAccountByUserId' ref="treeSelect" style="margin-bottom:8px " /> -->
|
|
-
|
|
|
|
|
|
+
|
|
<a-tree-select
|
|
<a-tree-select
|
|
show-search
|
|
show-search
|
|
allow-clear
|
|
allow-clear
|
|
@@ -28,12 +28,12 @@
|
|
style="width: 60%"
|
|
style="width: 60%"
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
:tree-data="treeData"
|
|
:tree-data="treeData"
|
|
- placeholder="请选择具体账户"
|
|
|
|
|
|
+ placeholder="请选择具体账户"
|
|
:filterOption='filterOption'
|
|
:filterOption='filterOption'
|
|
treeNodeFilterProp='title'
|
|
treeNodeFilterProp='title'
|
|
- @change='accountIDChange'
|
|
|
|
|
|
+ @change='accountIDChange'
|
|
>
|
|
>
|
|
-
|
|
|
|
|
|
+
|
|
</a-tree-select>
|
|
</a-tree-select>
|
|
</span>
|
|
</span>
|
|
<span class="OptinItem">
|
|
<span class="OptinItem">
|
|
@@ -127,7 +127,7 @@
|
|
<div class="table">
|
|
<div class="table">
|
|
<a-table
|
|
<a-table
|
|
:columns="columns"
|
|
:columns="columns"
|
|
- :data-source="data"
|
|
|
|
|
|
+ :data-source="data"
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
|
|
bordered
|
|
bordered
|
|
:pagination="ipagination"
|
|
:pagination="ipagination"
|
|
@@ -137,7 +137,7 @@
|
|
<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(text)">
|
|
<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>
|
|
<span slot="budget" slot-scope="text,record">
|
|
<span slot="budget" slot-scope="text,record">
|
|
<editableCell :text="text" slotName='budget' @change="onCellChange(record.key, 'budget', $event)" />
|
|
<editableCell :text="text" slotName='budget' @change="onCellChange(record.key, 'budget', $event)" />
|
|
@@ -154,6 +154,21 @@
|
|
<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-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
</span>
|
|
</span>
|
|
|
|
+ <a-popover placement="right">
|
|
|
|
+ <template slot="content">
|
|
|
|
+ <p>Content</p>
|
|
|
|
+ <p>Content</p>
|
|
|
|
+ </template>
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <span>Title</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- <a-button>Right</a-button> -->
|
|
|
|
+ <span slot="createImg" slot-scope="text,record">
|
|
|
|
+ <!-- <a-switch size="default" :checked=text @change="switchChange(text,record)"/> -->
|
|
|
|
+ <img :src="record.imageId_dictText" alt="" style="width:100px">
|
|
|
|
+ </span>
|
|
|
|
+ </a-popover>
|
|
|
|
+
|
|
<!-- <span slot="options" slot-scope="record">
|
|
<!-- <span slot="options" slot-scope="record">
|
|
<a href="javascript:;" style="margin-right:10px">编辑</a>
|
|
<a href="javascript:;" style="margin-right:10px">编辑</a>
|
|
<a href="javascript:;" v-if="tabkey=='plan'" @click="copyPlan(record)">复制</a>
|
|
<a href="javascript:;" v-if="tabkey=='plan'" @click="copyPlan(record)">复制</a>
|
|
@@ -179,7 +194,7 @@
|
|
<!-- 出价的模态框 -->
|
|
<!-- 出价的模态框 -->
|
|
<div class="batchModal" >
|
|
<div class="batchModal" >
|
|
<a-modal v-model="offerPriceVisiable" :title="'批量修改'+ModalTitle" @ok="modifyChangeOk" width='55%' id="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="selectePlan">已选{{}}个广告计划</div>
|
|
<div class="modifyRules">
|
|
<div class="modifyRules">
|
|
<span class="rules">修改规则:</span>
|
|
<span class="rules">修改规则:</span>
|
|
@@ -192,7 +207,7 @@
|
|
</a-radio-button>
|
|
</a-radio-button>
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
<span class="totalPrice" v-if="modifyRulesValue=='total'"><span>{{ModalTitle=='出价'?'出价:':'总预算:'}}</span>
|
|
<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" /> 元
|
|
<a-input-number :min="0" v-model="inputValue" :step="0.1" @change="totalbudgetChange" size="small" /> 元
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
@@ -213,12 +228,12 @@
|
|
</span>
|
|
</span>
|
|
<span slot="currentCost" slot-scope="currentCost">{{ currentCost | decimalsHandle }}</span>
|
|
<span slot="currentCost" slot-scope="currentCost">{{ currentCost | decimalsHandle }}</span>
|
|
<span slot="budget" slot-scope="text">
|
|
<span slot="budget" slot-scope="text">
|
|
-
|
|
|
|
|
|
+
|
|
<span >日预算:{{ text | decimalsHandle }}</span>
|
|
<span >日预算:{{ text | decimalsHandle }}</span>
|
|
</span>
|
|
</span>
|
|
<span slot="bid" slot-scope="text" >
|
|
<span slot="bid" slot-scope="text" >
|
|
<span >oCPM: {{text | decimalsHandle}}</span>
|
|
<span >oCPM: {{text | decimalsHandle}}</span>
|
|
-
|
|
|
|
|
|
+
|
|
</span>
|
|
</span>
|
|
</a-table>
|
|
</a-table>
|
|
</div>
|
|
</div>
|
|
@@ -243,7 +258,7 @@
|
|
</a-select>
|
|
</a-select>
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
|
|
+
|
|
</a-modal>
|
|
</a-modal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -416,7 +431,7 @@ const planColumns = [
|
|
];
|
|
];
|
|
const ideaColumns = [
|
|
const ideaColumns = [
|
|
{
|
|
{
|
|
- title: '状态',
|
|
|
|
|
|
+ title: '开关',
|
|
dataIndex: 'createStatus',
|
|
dataIndex: 'createStatus',
|
|
key: 'status',
|
|
key: 'status',
|
|
align: 'center',
|
|
align: 'center',
|
|
@@ -429,29 +444,45 @@ const ideaColumns = [
|
|
// align: 'center',
|
|
// align: 'center',
|
|
// scopedSlots: { customRender: 'options' }
|
|
// scopedSlots: { customRender: 'options' }
|
|
// },
|
|
// },
|
|
- {
|
|
|
|
- title: '创意ID',
|
|
|
|
- dataIndex: 'id',
|
|
|
|
- key: 'id',
|
|
|
|
- align: 'center',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
|
|
+ {
|
|
|
|
+ title: '创意',
|
|
|
|
+ dataIndex: 'createImg',
|
|
|
|
+ key: 'createImg',
|
|
|
|
+ align: 'center',
|
|
|
|
+ width:120,
|
|
|
|
+ scopedSlots: { customRender: 'createImg' }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ /*{
|
|
title: '广告创意',
|
|
title: '广告创意',
|
|
dataIndex: 'img',
|
|
dataIndex: 'img',
|
|
key: 'img',
|
|
key: 'img',
|
|
align: 'center',
|
|
align: 'center',
|
|
- },
|
|
|
|
|
|
+ },*/
|
|
{
|
|
{
|
|
title: '创意标题',
|
|
title: '创意标题',
|
|
dataIndex: 'title',
|
|
dataIndex: 'title',
|
|
key: 'title',
|
|
key: 'title',
|
|
align: 'center',
|
|
align: 'center',
|
|
},
|
|
},
|
|
- {
|
|
|
|
|
|
+ {
|
|
|
|
+ title: '创意ID',
|
|
|
|
+ dataIndex: 'id',
|
|
|
|
+ key: 'id',
|
|
|
|
+ align: 'center',
|
|
|
|
+ },
|
|
|
|
+ /*{
|
|
title: '创意方式',
|
|
title: '创意方式',
|
|
dataIndex: 'iaID',
|
|
dataIndex: 'iaID',
|
|
key: 'idaID',
|
|
key: 'idaID',
|
|
align: 'center',
|
|
align: 'center',
|
|
|
|
+ },*/
|
|
|
|
+ {
|
|
|
|
+ title: '创意状态',
|
|
|
|
+ dataIndex: 'status_dictText',
|
|
|
|
+ key: 'status_dictText',
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'status_dictText' }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '账户',
|
|
title: '账户',
|
|
@@ -460,26 +491,27 @@ const ideaColumns = [
|
|
align: 'center',
|
|
align: 'center',
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '投放时间',
|
|
|
|
- dataIndex: 'LaunchTime',
|
|
|
|
- key: 'LaunchTime',
|
|
|
|
|
|
+ title: '所属计划',
|
|
|
|
+ dataIndex: 'planId_dictText',
|
|
|
|
+ key: 'planId_dictText',
|
|
align: 'center',
|
|
align: 'center',
|
|
- scopedSlots: { customRender: 'LaunchTime' }
|
|
|
|
|
|
+ scopedSlots: { customRender: 'planId_dictText' }
|
|
},
|
|
},
|
|
|
|
+
|
|
{
|
|
{
|
|
|
|
+ title: '创建时间',
|
|
|
|
+ dataIndex: 'creativeCreateTime',
|
|
|
|
+ key: 'creativeCreateTime',
|
|
|
|
+ align: 'center',
|
|
|
|
+ scopedSlots: { customRender: 'creativeCreateTime' }
|
|
|
|
+ },
|
|
|
|
+ /* {
|
|
title: '投放位置',
|
|
title: '投放位置',
|
|
dataIndex: 'LaunchPosition',
|
|
dataIndex: 'LaunchPosition',
|
|
key: 'LaunchPosition',
|
|
key: 'LaunchPosition',
|
|
align: 'center',
|
|
align: 'center',
|
|
scopedSlots: { customRender: 'LaunchPosition' }
|
|
scopedSlots: { customRender: 'LaunchPosition' }
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '所属计划',
|
|
|
|
- dataIndex: 'planId_dictText',
|
|
|
|
- key: 'planId_dictText',
|
|
|
|
- align: 'center',
|
|
|
|
- scopedSlots: { customRender: 'planId_dictText' }
|
|
|
|
- },
|
|
|
|
|
|
+ },*/
|
|
];
|
|
];
|
|
|
|
|
|
|
|
|
|
@@ -516,12 +548,12 @@ export default {
|
|
columns,
|
|
columns,
|
|
selectedRowKeys:[],
|
|
selectedRowKeys:[],
|
|
selectedRows:[],
|
|
selectedRows:[],
|
|
-
|
|
|
|
|
|
+
|
|
editID:0,
|
|
editID:0,
|
|
//批量修改里的表格
|
|
//批量修改里的表格
|
|
typeValue,
|
|
typeValue,
|
|
modifyTableData:[
|
|
modifyTableData:[
|
|
-
|
|
|
|
|
|
+
|
|
],
|
|
],
|
|
modifyTableCol,
|
|
modifyTableCol,
|
|
modifyTableloading:false,
|
|
modifyTableloading:false,
|
|
@@ -536,7 +568,7 @@ export default {
|
|
campaignList: "/ctop/byteDanceCampaign/list",
|
|
campaignList: "/ctop/byteDanceCampaign/list",
|
|
planList: "/ctop/byteDanceAdvertisePlan/list",
|
|
planList: "/ctop/byteDanceAdvertisePlan/list",
|
|
creativeList: "/ctop/byteDanceCreative/list",
|
|
creativeList: "/ctop/byteDanceCreative/list",
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
@@ -573,7 +605,7 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
// table里的函数
|
|
// table里的函数
|
|
-
|
|
|
|
|
|
+
|
|
// table里的函数在上
|
|
// table里的函数在上
|
|
|
|
|
|
accountIDChange(val){
|
|
accountIDChange(val){
|
|
@@ -589,7 +621,7 @@ export default {
|
|
|
|
|
|
this.search();
|
|
this.search();
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
filterOption(input, option){
|
|
filterOption(input, option){
|
|
console.log(input, option)
|
|
console.log(input, option)
|
|
return (
|
|
return (
|
|
@@ -600,11 +632,11 @@ export default {
|
|
callback(key) {
|
|
callback(key) {
|
|
console.log(key);
|
|
console.log(key);
|
|
this.tabkey=key;
|
|
this.tabkey=key;
|
|
-
|
|
|
|
|
|
+
|
|
// this.columns=[];
|
|
// this.columns=[];
|
|
if(key=='group'){
|
|
if(key=='group'){
|
|
- this.columns=columns;
|
|
|
|
- }else if(key=='plan'){
|
|
|
|
|
|
+ this.columns=columns;
|
|
|
|
+ }else if(key=='plan'){
|
|
this.columns=planColumns;
|
|
this.columns=planColumns;
|
|
}else if(key=='idea'){
|
|
}else if(key=='idea'){
|
|
this.columns=ideaColumns;
|
|
this.columns=ideaColumns;
|
|
@@ -613,7 +645,7 @@ export default {
|
|
if(this.accountID){
|
|
if(this.accountID){
|
|
this.tabkey=key;
|
|
this.tabkey=key;
|
|
this.loading=true
|
|
this.loading=true
|
|
- if(key=='group'){
|
|
|
|
|
|
+ if(key=='group'){
|
|
let params = {};
|
|
let params = {};
|
|
this.refreshCampaignList({
|
|
this.refreshCampaignList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
@@ -623,7 +655,7 @@ export default {
|
|
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({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
@@ -632,7 +664,7 @@ export default {
|
|
endDate:this.dateString[1],
|
|
endDate:this.dateString[1],
|
|
pageNo:this.ipagination.current
|
|
pageNo:this.ipagination.current
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
}else if(key=='idea'){
|
|
}else if(key=='idea'){
|
|
let params = {};
|
|
let params = {};
|
|
this.refreshCreativeList({
|
|
this.refreshCreativeList({
|
|
@@ -645,7 +677,7 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//跳转到批量页面
|
|
//跳转到批量页面
|
|
goBatch(){
|
|
goBatch(){
|
|
@@ -675,7 +707,7 @@ export default {
|
|
//查询按钮事件
|
|
//查询按钮事件
|
|
search(){
|
|
search(){
|
|
// console.log(this.accountID,this.dateString,this.statusValue,this.optionId);
|
|
// console.log(this.accountID,this.dateString,this.statusValue,this.optionId);
|
|
-
|
|
|
|
|
|
+
|
|
if(this.accountID){
|
|
if(this.accountID){
|
|
this.loading=true
|
|
this.loading=true
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
@@ -712,8 +744,8 @@ export default {
|
|
}else{
|
|
}else{
|
|
this.$message.error('请选择账户后重试')
|
|
this.$message.error('请选择账户后重试')
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// postAction('',{
|
|
// postAction('',{
|
|
|
|
|
|
// }).then((res)=>{
|
|
// }).then((res)=>{
|
|
@@ -737,10 +769,10 @@ export default {
|
|
},
|
|
},
|
|
//状态改变
|
|
//状态改变
|
|
switchChange(text,record){
|
|
switchChange(text,record){
|
|
-
|
|
|
|
|
|
+
|
|
console.log(text,record);
|
|
console.log(text,record);
|
|
let recordData=JSON.parse(JSON.stringify(record))
|
|
let recordData=JSON.parse(JSON.stringify(record))
|
|
-
|
|
|
|
|
|
+
|
|
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';
|
|
@@ -763,14 +795,14 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}else if(this.tabkey=='plan'){
|
|
}else if(this.tabkey=='plan'){
|
|
-
|
|
|
|
|
|
+
|
|
if(text){
|
|
if(text){
|
|
- recordData.toutiaoStatus='AD_STATUS_DISABLE';
|
|
|
|
|
|
+ recordData.toutiaoStatus='AD_STATUS_DISABLE';
|
|
}else{
|
|
}else{
|
|
recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
|
|
}
|
|
}
|
|
this.batchEditHttp('status',[recordData])
|
|
this.batchEditHttp('status',[recordData])
|
|
-
|
|
|
|
|
|
+
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
let ids=record.id;
|
|
let ids=record.id;
|
|
let status=text?'disable':'enable';
|
|
let status=text?'disable':'enable';
|
|
@@ -795,7 +827,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
@@ -816,7 +848,7 @@ export default {
|
|
}else{
|
|
}else{
|
|
ids+=`,${item.id}`
|
|
ids+=`,${item.id}`
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
let status=''
|
|
let status=''
|
|
if(this.optValue=='pause'){
|
|
if(this.optValue=='pause'){
|
|
@@ -860,10 +892,10 @@ export default {
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
console.log(this.selectedRows);
|
|
console.log(this.selectedRows);
|
|
this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
-
|
|
|
|
|
|
+
|
|
}else if(this.tabkey=='plan'){
|
|
}else if(this.tabkey=='plan'){
|
|
console.log(0)
|
|
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'
|
|
})
|
|
})
|
|
@@ -872,13 +904,13 @@ export default {
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
this.editGroupStatus('/ctop/byteDanceCreative/editStatus')
|
|
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('/ctop/byteDanceCampaign/editStatus');
|
|
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'
|
|
})
|
|
})
|
|
@@ -886,8 +918,8 @@ export default {
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
this.batchEditHttp('status',this.selectedRows)
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
this.selectedRows=[];
|
|
this.selectedRows=[];
|
|
@@ -903,7 +935,7 @@ export default {
|
|
if(this.tabkey=='group'){
|
|
if(this.tabkey=='group'){
|
|
this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
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'
|
|
})
|
|
})
|
|
@@ -912,11 +944,11 @@ export default {
|
|
this.$message.success('删除成功');
|
|
this.$message.success('删除成功');
|
|
}else if(this.tabkey=='idea'){
|
|
}else if(this.tabkey=='idea'){
|
|
this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
},
|
|
},
|
|
//取消删除
|
|
//取消删除
|
|
@@ -953,9 +985,9 @@ export default {
|
|
})
|
|
})
|
|
// console.log(this.xiugaiData)
|
|
// console.log(this.xiugaiData)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}else if(this.typeValue=='出价'){
|
|
}else if(this.typeValue=='出价'){
|
|
- if(e.target.value ){
|
|
|
|
|
|
+ if(e.target.value ){
|
|
this.xiugaiData.forEach((item)=>{
|
|
this.xiugaiData.forEach((item)=>{
|
|
if(item.id==record.id){
|
|
if(item.id==record.id){
|
|
item.bid==e.target.value*1
|
|
item.bid==e.target.value*1
|
|
@@ -990,7 +1022,7 @@ export default {
|
|
this.offerPriceVisiable = false;
|
|
this.offerPriceVisiable = false;
|
|
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=''
|
|
let changeZiduan=''
|
|
if(this.typeValue=='预算'){
|
|
if(this.typeValue=='预算'){
|
|
@@ -1013,13 +1045,13 @@ export default {
|
|
})
|
|
})
|
|
this.batchEditHttp('budget',batchArr)
|
|
this.batchEditHttp('budget',batchArr)
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.modifyTableData=[];
|
|
this.modifyTableData=[];
|
|
this.selectedRowKeys=[]
|
|
this.selectedRowKeys=[]
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
batchEditHttp(type,params){
|
|
batchEditHttp(type,params){
|
|
postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
|
|
postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
|
|
@@ -1065,27 +1097,69 @@ export default {
|
|
|
|
|
|
onCellChange(key, dataIndex, value) {
|
|
onCellChange(key, dataIndex, value) {
|
|
console.log(key, dataIndex, value)
|
|
console.log(key, dataIndex, value)
|
|
- const dataSource = [...this.data];
|
|
|
|
- const target = dataSource.find(item => item.key === key);
|
|
|
|
- if (target) {
|
|
|
|
- target[dataIndex] = value;
|
|
|
|
- console.log(target)
|
|
|
|
- //单独修改预算
|
|
|
|
- if(this.tabkey=='group'){
|
|
|
|
- if(dataIndex=='name'){
|
|
|
|
- postAction('/ctop/byteDanceCampaign/edit',{
|
|
|
|
- accountId:this.accountID,
|
|
|
|
- id:key,
|
|
|
|
- campaignName:value,
|
|
|
|
- }).then((res)=>{
|
|
|
|
|
|
+
|
|
|
|
+ const dataSource = [...this.data];
|
|
|
|
+ const target = dataSource.find(item => item.key === key);
|
|
|
|
+ if (target) {
|
|
|
|
+ target[dataIndex] = value;
|
|
|
|
+ console.log(target)
|
|
|
|
+ //单独修改预算
|
|
|
|
+ if(this.tabkey=='group'){
|
|
|
|
+ if(dataIndex=='name'){
|
|
|
|
+ postAction('/ctop/byteDanceCampaign/edit',{
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ id:key,
|
|
|
|
+ campaignName:value,
|
|
|
|
+ }).then((res)=>{
|
|
|
|
+ console.log(res);
|
|
|
|
+ if(res.success){
|
|
|
|
+ this.data=dataSource
|
|
|
|
+ this.$message.success(res.message)
|
|
|
|
+ }else{
|
|
|
|
+ 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
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }else if(dataIndex=='budget'){
|
|
|
|
+ postAction('/ctop/byteDanceCampaign/edit',{
|
|
|
|
+ accountId:this.accountID,
|
|
|
|
+ id:key,
|
|
|
|
+ budget:value,
|
|
|
|
+ }).then((res)=>{
|
|
|
|
+ console.log(res);
|
|
|
|
+ if(res.success){
|
|
|
|
+ // this.data = dataSource;
|
|
|
|
+ target[dataIndex] = value;
|
|
|
|
+ this.$message.success({
|
|
|
|
+ content:res.message,
|
|
|
|
+ duration:2
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.$message.error({
|
|
|
|
+ content:res.message,
|
|
|
|
+ duration:2
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }else if(this.tabkey=='plan'){
|
|
|
|
+ postAction('/ctop/byteDanceAdvertisePlan/edit',target).then((res)=>{
|
|
console.log(res);
|
|
console.log(res);
|
|
if(res.success){
|
|
if(res.success){
|
|
- this.data=dataSource
|
|
|
|
- this.$message.success(res.message)
|
|
|
|
|
|
+ this.data = dataSource;
|
|
|
|
+ this.$message.success('修改成功!')
|
|
}else{
|
|
}else{
|
|
- this.$message.error(res.message)
|
|
|
|
- this.data=[];
|
|
|
|
- this.refreshCampaignList({
|
|
|
|
|
|
+ this.$message.error(res.message);
|
|
|
|
+ this.getplanList({
|
|
accountId:this.accountID,
|
|
accountId:this.accountID,
|
|
name:this.optionId,
|
|
name:this.optionId,
|
|
status:this.statusValue,
|
|
status:this.statusValue,
|
|
@@ -1095,53 +1169,13 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }else if(dataIndex=='budget'){
|
|
|
|
- postAction('/ctop/byteDanceCampaign/edit',{
|
|
|
|
- accountId:this.accountID,
|
|
|
|
- id:key,
|
|
|
|
- budget:value,
|
|
|
|
- }).then((res)=>{
|
|
|
|
- console.log(res);
|
|
|
|
- if(res.success){
|
|
|
|
- // this.data = dataSource;
|
|
|
|
- target[dataIndex] = value;
|
|
|
|
- this.$message.success({
|
|
|
|
- content:res.message,
|
|
|
|
- duration:2
|
|
|
|
- })
|
|
|
|
- }else{
|
|
|
|
- this.$message.error({
|
|
|
|
- content:res.message,
|
|
|
|
- duration:2
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ }else if(this.tabkey=='idea'){
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
- }else if(this.tabkey=='plan'){
|
|
|
|
- postAction('/ctop/byteDanceAdvertisePlan/edit',target).then((res)=>{
|
|
|
|
- console.log(res);
|
|
|
|
- if(res.success){
|
|
|
|
- this.data = dataSource;
|
|
|
|
- this.$message.success('修改成功!')
|
|
|
|
- }else{
|
|
|
|
- this.$message.error(res.message);
|
|
|
|
- this.getplanList({
|
|
|
|
- accountId:this.accountID,
|
|
|
|
- name:this.optionId,
|
|
|
|
- status:this.statusValue,
|
|
|
|
- startDate:this.dateString[0],
|
|
|
|
- endDate:this.dateString[1],
|
|
|
|
- pageNo:this.ipagination.current
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }else if(this.tabkey=='idea'){
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
console.log(this.data)
|
|
console.log(this.data)
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1182,13 +1216,13 @@ export default {
|
|
this.data=[]
|
|
this.data=[]
|
|
console.log(res)
|
|
console.log(res)
|
|
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;
|
|
console.log(this.data)
|
|
console.log(this.data)
|
|
this.selectedRowKeys=[];
|
|
this.selectedRowKeys=[];
|
|
@@ -1221,14 +1255,14 @@ export default {
|
|
// console.log(res);
|
|
// console.log(res);
|
|
if(res.result){
|
|
if(res.result){
|
|
res.result.forEach((element,index) => {
|
|
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].title=element.project.projectName +'_('+ element.project.advertiserName +')';
|
|
this.treeData[index].value='project'+element.project.projectId;
|
|
this.treeData[index].value='project'+element.project.projectId;
|
|
this.treeData[index].key=element.project.projectId;
|
|
this.treeData[index].key=element.project.projectId;
|
|
this.treeData[index].mediaId=element.project.mediaId;
|
|
this.treeData[index].mediaId=element.project.mediaId;
|
|
this.treeData[index].children=[];
|
|
this.treeData[index].children=[];
|
|
-
|
|
|
|
|
|
+
|
|
if(element.account.length){
|
|
if(element.account.length){
|
|
element.account.forEach((ele,i)=>{
|
|
element.account.forEach((ele,i)=>{
|
|
this.treeData[index].children.push({});
|
|
this.treeData[index].children.push({});
|
|
@@ -1236,12 +1270,12 @@ export default {
|
|
this.treeData[index].children[i].value=ele.accountId;
|
|
this.treeData[index].children[i].value=ele.accountId;
|
|
this.treeData[index].children[i].key=ele.accountId;
|
|
this.treeData[index].children[i].key=ele.accountId;
|
|
})
|
|
})
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
});
|
|
});
|
|
// console.log(this.treeData)
|
|
// console.log(this.treeData)
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -1249,7 +1283,7 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
console.log(this);
|
|
console.log(this);
|
|
-
|
|
|
|
|
|
+
|
|
// let params = {}
|
|
// let params = {}
|
|
// // this.dateString=[moment().format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")]
|
|
// // this.dateString=[moment().format("YYYY-MM-DD"),moment().format("YYYY-MM-DD")]
|
|
// //初始
|
|
// //初始
|