|
@@ -9,13 +9,30 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
|
|
|
- <div class="toolbox-automate-rules-create-content_title"><h3>广告策略</h3></div>
|
|
|
+ <div class="toolbox-automate-rules-create-content_title">
|
|
|
+ <h3>广告策略</h3>
|
|
|
+ <a-button type='primary' @click="goCreateStrategy" class="goCreateStrategy">新建策略</a-button>
|
|
|
+ </div>
|
|
|
|
|
|
<div class="topOptions">
|
|
|
-
|
|
|
+ <span class="OptinItem ">
|
|
|
+ <!-- reqUrl='/ctop/userAllocation/getAccountIdListByUserId' -->
|
|
|
+ <!-- <Treeselect :appId.sync="accountIds" :multiple="true" request="2,4" reqUrl='/ctop/userAllocation/getAccountIdsByUserId' ref="treeSelect" style="margin-bottom:8px " /> -->
|
|
|
+ <a-select mode="multiple"
|
|
|
+ v-model="accountIds"
|
|
|
+ style="width: 400px"
|
|
|
+ placeholder="请选择账户"
|
|
|
+ :maxTagCount='1'
|
|
|
+ allowClear
|
|
|
+ >
|
|
|
+ <a-select-option v-for="item in accountList" :key="item.account_id" :value='item.account_id'>
|
|
|
+ {{ item.auth_name+'_('+(item.project_name||"无所属项目")+')' }}
|
|
|
+ </a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </span>
|
|
|
<span class="OptinItem">
|
|
|
- <a-select style="width: 200px" v-model="strategyStatus" @change="statusChange" placeholder="请选择策略状态">
|
|
|
- <a-select-option value="" >
|
|
|
+ <a-select style="width: 180px" v-model="strategyStatus" @change="statusChange" placeholder="请选择策略状态">
|
|
|
+ <a-select-option :value='3' >
|
|
|
不限
|
|
|
</a-select-option>
|
|
|
<a-select-option :value="1" >
|
|
@@ -28,14 +45,14 @@
|
|
|
</span>
|
|
|
|
|
|
<span class="OptinItem">
|
|
|
- <a-input-search placeholder="策略名称" v-model="strategyName" style="width: 300px" />
|
|
|
+ <a-input-search placeholder="策略名称" v-model="strategyName" style="width: 280px" />
|
|
|
</span>
|
|
|
<span class="OptinItem">
|
|
|
- <a-input-search placeholder="策略ID" v-model="strategyId" style="width: 300px" />
|
|
|
+ <a-input-search placeholder="策略ID" v-model="strategyId" style="width: 280px" />
|
|
|
</span>
|
|
|
- <span class="OptinItem">
|
|
|
+ <!-- <span class="OptinItem">
|
|
|
<a-input-search placeholder="所属账户" v-model="accountId" style="width: 300px" />
|
|
|
- </span>
|
|
|
+ </span> -->
|
|
|
<span class="optionBtn">
|
|
|
<a-button type='primary' @click="search" class="searchBtn">查询</a-button>
|
|
|
<!-- <a-button type='default' @click="reset">重置</a-button> -->
|
|
@@ -60,9 +77,9 @@
|
|
|
<a-select-option value="pause">
|
|
|
暂停
|
|
|
</a-select-option>
|
|
|
- <a-select-option value="delete">
|
|
|
+ <!-- <a-select-option value="delete">
|
|
|
删除
|
|
|
- </a-select-option>
|
|
|
+ </a-select-option> -->
|
|
|
</a-select>
|
|
|
</span>
|
|
|
<span class="OptinItem">
|
|
@@ -94,7 +111,7 @@
|
|
|
|
|
|
>
|
|
|
|
|
|
- <span slot="campaignStatus" slot-scope="text,record">
|
|
|
+ <span slot="switchStatus" slot-scope="text,record">
|
|
|
<a-spin :spinning="record.spin" size="small" >
|
|
|
<div class="spin-content">
|
|
|
<a-switch size="default" :checked=text @change="switchChange(text,record)"/>
|
|
@@ -103,22 +120,7 @@
|
|
|
|
|
|
</span>
|
|
|
|
|
|
- <span slot="createStatus" slot-scope="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>
|
|
|
-
|
|
|
- </span>
|
|
|
- <span slot="planStatus" slot-scope="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>
|
|
|
-
|
|
|
- </span>
|
|
|
+
|
|
|
|
|
|
<span slot="createImg" slot-scope="text,record">
|
|
|
|
|
@@ -148,6 +150,9 @@
|
|
|
<span slot="operator" slot-scope="text,record">
|
|
|
<a href="javascript:;" @click="goPlanList(record)">详情</a>
|
|
|
</span>
|
|
|
+ <span slot="scenes" slot-scope="text">
|
|
|
+ <span>{{text|scensFilter}}</span>
|
|
|
+ </span>
|
|
|
|
|
|
</a-table>
|
|
|
</div>
|
|
@@ -172,19 +177,19 @@ let typeValue='预算'
|
|
|
const strategyColumns = [
|
|
|
{
|
|
|
title: '开关',
|
|
|
- dataIndex: 'campaignStatus',
|
|
|
- key: 'campaignStatus',
|
|
|
+ dataIndex: 'switchStatus',
|
|
|
+ key: 'switchStatus',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'campaignStatus' },
|
|
|
+ scopedSlots: { customRender: 'switchStatus' },
|
|
|
width:80,
|
|
|
fixed: 'left' ,
|
|
|
},
|
|
|
{
|
|
|
title: '广告策略名称',
|
|
|
- dataIndex: 'name',
|
|
|
- key: 'name',
|
|
|
+ dataIndex: 'strategyName',
|
|
|
+ key: 'strategyName',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'name' },
|
|
|
+ scopedSlots: { customRender: 'strategyName' },
|
|
|
width:150,
|
|
|
fixed: 'left' ,
|
|
|
},
|
|
@@ -213,36 +218,36 @@ const strategyColumns = [
|
|
|
key: 'createTime',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'createTime' },
|
|
|
- width:100,
|
|
|
+
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '所属账户',
|
|
|
- dataIndex: 'campaignCreateTime',
|
|
|
- key: 'campaignCreateTime',
|
|
|
+ dataIndex: 'accountId',
|
|
|
+ key: 'accountId',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'campaignCreateTime' },
|
|
|
+ scopedSlots: { customRender: 'accountId' },
|
|
|
},
|
|
|
{
|
|
|
title: '状态',
|
|
|
- dataIndex: 'campaignCreateTime',
|
|
|
- key: 'campaignCreateTime',
|
|
|
+ dataIndex: 'status',
|
|
|
+ key: 'status',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'campaignCreateTime' },
|
|
|
+ scopedSlots: { customRender: 'status' },
|
|
|
},
|
|
|
{
|
|
|
title: '创建场景',
|
|
|
- dataIndex: 'campaignCreateTime',
|
|
|
- key: 'campaignCreateTime',
|
|
|
+ dataIndex: 'scenes',
|
|
|
+ key: 'scenes',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'campaignCreateTime' },
|
|
|
+ scopedSlots: { customRender: 'scenes' },
|
|
|
},
|
|
|
{
|
|
|
title: '策略预算',
|
|
|
- dataIndex: 'cpaignCreateTime',
|
|
|
- key: 'campaignCateTime',
|
|
|
+ dataIndex: 'budget',
|
|
|
+ key: 'budget',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'campaignCrteTime' },
|
|
|
+ scopedSlots: { customRender: 'budget' },
|
|
|
},
|
|
|
|
|
|
];
|
|
@@ -255,7 +260,7 @@ const publicColumns = [
|
|
|
tip: '广告在投放期间的花费总额',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'cost' },
|
|
|
- sorter: () => {}
|
|
|
+ // sorter: () => {}
|
|
|
},
|
|
|
{
|
|
|
title: '封面曝光数',
|
|
@@ -263,7 +268,7 @@ const publicColumns = [
|
|
|
tip: '广告在瀑布流被观看次数',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'photoShow' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '封面点击数',
|
|
@@ -272,25 +277,25 @@ const publicColumns = [
|
|
|
align: 'center',
|
|
|
|
|
|
scopedSlots: { customRender: 'photoClick' },
|
|
|
- sorter: () => {}
|
|
|
+ // sorter: () => {}
|
|
|
},
|
|
|
{
|
|
|
title: '素材曝光数',
|
|
|
- dataIndex: 'aClick',
|
|
|
+ dataIndex: 'aclick',
|
|
|
tip: '用户进入视频播放页观看的次数(数据会进行反作弊去重)',
|
|
|
align: 'center',
|
|
|
|
|
|
scopedSlots: { customRender: 'aClick' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '行为数',
|
|
|
- dataIndex: 'bClick',
|
|
|
+ dataIndex: 'bclick',
|
|
|
tip: '用户在视频播放页单击转化按钮的次数/展示数*100%',
|
|
|
align: 'center',
|
|
|
|
|
|
scopedSlots: { customRender: 'bClick' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '封面点击率',
|
|
@@ -298,7 +303,7 @@ const publicColumns = [
|
|
|
tip: '封面点击数占封面展示数百分比',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'clickRate' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '行为率',
|
|
@@ -306,7 +311,7 @@ const publicColumns = [
|
|
|
tip: '行为数占素材曝光数百分比',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'bClickRate' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '平均千次封面曝光花费(元)',
|
|
@@ -314,7 +319,7 @@ const publicColumns = [
|
|
|
tip: '花费/封面曝光数*1000',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'cpm' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '平均封面点击单价(元)',
|
|
@@ -322,23 +327,16 @@ const publicColumns = [
|
|
|
tip: '花费/封面点击数',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'cpc' },
|
|
|
- sorter:() => {}
|
|
|
- },
|
|
|
- {
|
|
|
- title: '平均行为单价(元)',
|
|
|
- dataIndex: 'cpb',
|
|
|
- tip: '总花费/行为数',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'cpb' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
title: '激活数',
|
|
|
dataIndex: 'active',
|
|
|
tip: '广告主回传的应用激活次数',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'active' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '激活单价',
|
|
@@ -346,7 +344,7 @@ const publicColumns = [
|
|
|
tip: '花费/激活数',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'activeCost' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '下载完成激活率',
|
|
@@ -354,7 +352,7 @@ const publicColumns = [
|
|
|
tip: '激活数/安卓下载完成数',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'activeRate' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '注册数',
|
|
@@ -362,7 +360,7 @@ const publicColumns = [
|
|
|
tip: '付费金额/当日消耗',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'register' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '注册成本',
|
|
@@ -370,7 +368,7 @@ const publicColumns = [
|
|
|
tip: '当日消耗/当日回传注册数',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'activeRegisterCost' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '注册率',
|
|
@@ -378,7 +376,7 @@ const publicColumns = [
|
|
|
tip: '当日回传注册数/当日激活数',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'activeRegisterRate' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
{
|
|
|
title: '次留数',
|
|
@@ -386,7 +384,7 @@ const publicColumns = [
|
|
|
tip: '前一日激活用户在次日继续访问的PV',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'nextDayOpen' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
|
|
|
{
|
|
@@ -395,7 +393,7 @@ const publicColumns = [
|
|
|
tip: '前一日激活用户在次日继续访问的PV/前一日激活数',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'nextDayOpenRate' },
|
|
|
- sorter:() => {}
|
|
|
+ // sorter:() => {}
|
|
|
},
|
|
|
]
|
|
|
|
|
@@ -408,10 +406,11 @@ export default {
|
|
|
// mixins: [JeecgListMixin],
|
|
|
data() {
|
|
|
return {
|
|
|
+ accountList:[],
|
|
|
strategyStatus:undefined,
|
|
|
strategyName:'',
|
|
|
- strategyId:'',
|
|
|
- accountId:'',
|
|
|
+ strategyId:undefined,
|
|
|
+ accountIds:[],
|
|
|
scrollX:3500,
|
|
|
ipagination: {
|
|
|
current: 1,
|
|
@@ -435,14 +434,11 @@ export default {
|
|
|
spinning:false,
|
|
|
moment,
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
optionId:'',//input输入的id或关键词
|
|
|
|
|
|
|
|
|
selectDisable:true,
|
|
|
- optValue:'',//操作设置的值 删除 暂停 开启
|
|
|
+ optValue:undefined,//操作设置的值 删除 暂停 开启
|
|
|
visible: false,//出价里的弹出框
|
|
|
|
|
|
//主页的表格
|
|
@@ -452,16 +448,11 @@ export default {
|
|
|
selectedRows:[],
|
|
|
loading:false,
|
|
|
editID:0,
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- url: {
|
|
|
-
|
|
|
- planList: "/kuaishou/batch/getUnitList",
|
|
|
- groupList:'/kuaishou/batch/getUnitList',
|
|
|
-
|
|
|
- strategyList:'/jeecg-boot/kuaishouStrategy/list'
|
|
|
|
|
|
+ url: {
|
|
|
+ planList: "/ai/list/pageCampaign",
|
|
|
+ groupList:'/ai/list/pageUnit',
|
|
|
+ strategyList:'/ai/list/pageStrategy'
|
|
|
},
|
|
|
|
|
|
|
|
@@ -492,12 +483,16 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ goCreateStrategy(){
|
|
|
+ this.$router.push('/autoLaunch/newStrategy')
|
|
|
+ },
|
|
|
goPlanList(record){
|
|
|
console.log(record)
|
|
|
-
|
|
|
+ this.$parent.currentStrategyId=record.id;
|
|
|
+ this.$parent.currentTabComponent='planList'
|
|
|
},
|
|
|
|
|
|
-
|
|
|
+
|
|
|
//状态改变
|
|
|
statusChange(value){
|
|
|
console.log(value);
|
|
@@ -506,90 +501,40 @@ export default {
|
|
|
|
|
|
//查询按钮事件
|
|
|
search(){
|
|
|
- this.getStrategyList()
|
|
|
-
|
|
|
+ this.ipagination.current=1;
|
|
|
+ this.getStrategyList()
|
|
|
},
|
|
|
//点击分页
|
|
|
sort(pagination, filters, sorter, { currentDataSource }){
|
|
|
-
|
|
|
+ console.log(pagination)
|
|
|
this.ipagination.current=pagination.current;
|
|
|
|
|
|
this.ipagination.pageSize=pagination.pageSize;
|
|
|
- this.search()
|
|
|
+ this.getStrategyList()
|
|
|
},
|
|
|
|
|
|
//状态改变
|
|
|
switchChange(text,record){
|
|
|
// this.spinning=true;
|
|
|
- // console.log(text,record);
|
|
|
- let recordData=JSON.parse(JSON.stringify(record))
|
|
|
+ console.log(text,record)
|
|
|
record.spin=true;
|
|
|
- if(this.tabkey=='group'){
|
|
|
- let ids=record.id;
|
|
|
- let status=text?'disable':'enable';
|
|
|
- postAction('/ctop/byteDanceCampaign/editStatus',qs.stringify({
|
|
|
- accountId:this.accountID,
|
|
|
- ids:`${ids}`,
|
|
|
- status:status,
|
|
|
- })).then((res)=>{
|
|
|
- // console.log(res);
|
|
|
- // this.spinning=false;
|
|
|
- record.spin=false;
|
|
|
- if(res.success){
|
|
|
- this.refreshCampaignList({
|
|
|
- accountId:this.accountID,
|
|
|
- name:this.optionId,
|
|
|
- status:this.statusValue,
|
|
|
- startDate:this.dateString[0],
|
|
|
- endDate:this.dateString[1],
|
|
|
- pageNo:this.ipagination.current,
|
|
|
- pageSize:this.ipagination.pageSize,
|
|
|
-
|
|
|
- })
|
|
|
- this.$message.success(res.message)
|
|
|
- }else{
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
- }else if(this.tabkey=='plan'){
|
|
|
-
|
|
|
- if(text){
|
|
|
- recordData.optStatus='AD_STATUS_DISABLE';
|
|
|
+
|
|
|
+ let ids=record.id;
|
|
|
+ let state=text?'2':'1';
|
|
|
+ postAction('/kuaishouStrategy/edit',{
|
|
|
+ ids:[record.id],
|
|
|
+ state
|
|
|
+ }).then((res)=>{
|
|
|
+
|
|
|
+ record.spin=false;
|
|
|
+ if(res.success){
|
|
|
+ this.getStrategyList()
|
|
|
+ this.$message.success(res.message)
|
|
|
}else{
|
|
|
- recordData.optStatus='AD_STATUS_ENABLE'
|
|
|
+ this.$message.error(res.message)
|
|
|
}
|
|
|
- this.batchEditHttp('status',[recordData])
|
|
|
-
|
|
|
- }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=[];
|
|
|
- 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,
|
|
|
- pageSize:this.ipagination.pageSize,
|
|
|
- planId:this.currentPlan.id,
|
|
|
-
|
|
|
- })
|
|
|
- }else{
|
|
|
- record.spin=false;
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ })
|
|
|
+
|
|
|
|
|
|
},
|
|
|
|
|
@@ -603,110 +548,40 @@ export default {
|
|
|
// console.log(value)
|
|
|
this.optValue=value;
|
|
|
},
|
|
|
- editGroupStatus(url){
|
|
|
- let ids='';
|
|
|
- this.selectedRows.forEach((item,index)=>{
|
|
|
- if(index==0){
|
|
|
- ids=`${item.id}`
|
|
|
- }else{
|
|
|
- ids+=`,${item.id}`
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
- let status=''
|
|
|
- if(this.optValue=='pause'){
|
|
|
- status='disable'
|
|
|
- }else if(this.optValue=='open'){
|
|
|
- status='enable'
|
|
|
- }else if(this.optValue=='delete'){
|
|
|
- status='delete'
|
|
|
- }
|
|
|
- postAction(url,qs.stringify({
|
|
|
- accountId:this.accountID,
|
|
|
- ids,
|
|
|
- status,
|
|
|
- })).then((res)=>{
|
|
|
- console.log(res);
|
|
|
- // this.loading=false
|
|
|
- this.optValue=undefined;
|
|
|
- if(res.success){
|
|
|
- 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,
|
|
|
- pageSize:this.ipagination.pageSize,
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.loading=false
|
|
|
- // if(this.selectedRows.length>0){
|
|
|
- // this.selectedRows.forEach(item=>{
|
|
|
- // item.spin=false;
|
|
|
- // })
|
|
|
- // }
|
|
|
- this.selectedRowKeys=[];
|
|
|
- this.selectedRows=[];
|
|
|
- this.optValue=undefined;
|
|
|
- this.$message.error(res.message)
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
+
|
|
|
//批量操作的确定按钮
|
|
|
isOkHandle(){
|
|
|
- console.log(this.optValue&&this.selectedRowKeys.length>0)
|
|
|
+ console.log(this.optValue,this.selectedRowKeys)
|
|
|
if(this.optValue&&this.selectedRowKeys.length>0){
|
|
|
// this.selectedRows.forEach(item=>{
|
|
|
// item.spin=true;
|
|
|
// })
|
|
|
-
|
|
|
+ let params ={}
|
|
|
if(this.optValue=='pause'){
|
|
|
- this.loading=true;
|
|
|
- if(this.tabkey=='group'){
|
|
|
- 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.optStatus='AD_STATUS_DISABLE'
|
|
|
- })
|
|
|
- }
|
|
|
- console.log(0)
|
|
|
- this.batchEditHttp('status',this.selectedRows)
|
|
|
- }else if(this.tabkey=='idea'){
|
|
|
- this.loading=true;
|
|
|
- this.editGroupStatus('/ctop/byteDanceCreative/editStatus')
|
|
|
- }
|
|
|
-
|
|
|
+ this.loading=true;
|
|
|
+
|
|
|
+ // if(this.selectedRowKeys.length>0){
|
|
|
+ // this.selectedRows.forEach((item)=>{
|
|
|
+ // item.optStatus='AD_STATUS_DISABLE'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ params['ids']= this.selectedRowKeys
|
|
|
+ params.state='2'
|
|
|
+ this.batchEditHttp(params)
|
|
|
}else if(this.optValue=='open'){
|
|
|
this.loading=true;
|
|
|
- if(this.tabkey=='group'){
|
|
|
- this.editGroupStatus('/ctop/byteDanceCampaign/editStatus');
|
|
|
- }else if(this.tabkey=='plan'){
|
|
|
- if(this.selectedRowKeys.length>0){
|
|
|
- this.selectedRows.forEach((item)=>{
|
|
|
- item.optStatus='AD_STATUS_ENABLE'
|
|
|
- })
|
|
|
- }
|
|
|
- this.batchEditHttp('status',this.selectedRows)
|
|
|
- }else if(this.tabkey=='idea'){
|
|
|
- this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ // if(this.selectedRowKeys.length>0){
|
|
|
+ // this.selectedRows.forEach((item)=>{
|
|
|
+ // item.optStatus='AD_STATUS_ENABLE'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ params['ids']= this.selectedRowKeys
|
|
|
+ params.state='1'
|
|
|
+ this.batchEditHttp(params)
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
- // this.selectedRows=[];
|
|
|
- // this.selectedRowKeys=[];
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
},
|
|
@@ -716,19 +591,15 @@ export default {
|
|
|
this.loading=true;
|
|
|
if(this.optValue=='delete'){
|
|
|
|
|
|
- if(this.tabkey=='group'){
|
|
|
- this.editGroupStatus('/ctop/byteDanceCampaign/editStatus')
|
|
|
- }else if(this.tabkey=='plan'){
|
|
|
- if(this.selectedRowKeys.length>0){
|
|
|
- this.selectedRows.forEach((item)=>{
|
|
|
- item.optStatus='AD_STATUS_DELETE'
|
|
|
- })
|
|
|
- }
|
|
|
- this.batchEditHttp('status',this.selectedRows)
|
|
|
+
|
|
|
+ // if(this.selectedRowKeys.length>0){
|
|
|
+ // this.selectedRows.forEach((item)=>{
|
|
|
+ // item.optStatus='AD_STATUS_DELETE'
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ this.batchEditHttp(this.selectedRows)
|
|
|
this.$message.success('删除成功');
|
|
|
- }else if(this.tabkey=='idea'){
|
|
|
- this.editGroupStatus('/ctop/byteDanceCreative/editStatus');
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|
|
@@ -736,30 +607,17 @@ export default {
|
|
|
|
|
|
},
|
|
|
|
|
|
- batchEditHttp(type,params){
|
|
|
- postAction(`/ctop/byteDanceAdvertisePlan/batchEdit/${type}`,params).then((res)=>{
|
|
|
+ batchEditHttp(params){
|
|
|
+ postAction(`/kuaishouStrategy/edit`,params).then((res)=>{
|
|
|
// console.log(res);
|
|
|
this.optValue=undefined;
|
|
|
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,
|
|
|
- pageSize:this.ipagination.pageSize,
|
|
|
- campaignId:this.currentGroup.id
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
+ this.getStrategyList()
|
|
|
// params.spin=false;
|
|
|
- params.forEach(item=>{
|
|
|
- item.spin=false;
|
|
|
- })
|
|
|
+ // params.forEach(item=>{
|
|
|
+ // item.spin=false;
|
|
|
+ // })
|
|
|
this.optValue=undefined;
|
|
|
this.selectedRowKeys=[];
|
|
|
this.$message.success(res.message)
|
|
@@ -769,31 +627,21 @@ export default {
|
|
|
// item.spin=false;
|
|
|
// })
|
|
|
this.loading=false;
|
|
|
- this.getplanList({
|
|
|
- accountId:this.accountID,
|
|
|
- name:this.optionId,
|
|
|
- status:this.statusValue,
|
|
|
- startDate:this.dateString[0],
|
|
|
- endDate:this.dateString[1],
|
|
|
- pageNo:this.ipagination.current,
|
|
|
- pageSize:this.ipagination.pageSize,
|
|
|
- campaignId:this.currentGroup.id
|
|
|
- })
|
|
|
+ this.getStrategyList()
|
|
|
this.$message.error(res.message)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
getStrategyList(){
|
|
|
-
|
|
|
- getAction(this.url.strategyList,{
|
|
|
- strategyId:this.strategyId,
|
|
|
+ this.loading = true
|
|
|
+ postAction(this.url.strategyList,{
|
|
|
+ strategyId:this.strategyId==undefined?null:this.strategyId,
|
|
|
strategyName:this.strategyName,
|
|
|
- strategyStatus:this.strategyStatus==undefined?'':this.strategyStatus,
|
|
|
- accountId:this.accountId,
|
|
|
+ strategyStatus:this.strategyStatus==3?null:this.strategyStatus,
|
|
|
+ accountIds:this.accountIds,
|
|
|
pageNo:this.ipagination.current,
|
|
|
pageSize:this.ipagination.pageSize
|
|
|
}).then((res)=>{
|
|
@@ -804,15 +652,16 @@ export default {
|
|
|
|
|
|
this.ipagination.total = res.result.total
|
|
|
|
|
|
- res.result.records.forEach((item)=>{
|
|
|
+ res.result.list.forEach((item)=>{
|
|
|
item.key=item.id
|
|
|
})
|
|
|
|
|
|
- this.data = res.result.records.map(item=>{
|
|
|
+ this.data = res.result.list.map(item=>{
|
|
|
|
|
|
return {
|
|
|
...item,
|
|
|
- spin:false
|
|
|
+ spin:false,
|
|
|
+ switchStatus:item.strategyState=='1'?true:false,
|
|
|
}
|
|
|
});
|
|
|
// console.log(this.data)
|
|
@@ -821,18 +670,31 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
-
|
|
|
+ getAccountList(){
|
|
|
+ let userInfo=localStorage.getItem('pro__Login_Userinfo');
|
|
|
+ let userId=''
|
|
|
+ if(userInfo){
|
|
|
+ userId=JSON.parse(userInfo).value.id
|
|
|
+ }
|
|
|
+ getAction('/ctop/userAllocation/getAccountIdsByUserId',{
|
|
|
+ userId,
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res)
|
|
|
+ if(res.success){
|
|
|
+ this.accountList=res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
+ this.getAccountList()
|
|
|
+ this.getStrategyList()
|
|
|
},
|
|
|
|
|
|
activated() {
|
|
|
- // this.accountHttp()
|
|
|
+ this.getStrategyList()
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
-
|
|
|
-
|
|
|
|
|
|
},
|
|
|
filters: {
|
|
@@ -922,6 +784,24 @@ export default {
|
|
|
return '-'
|
|
|
}
|
|
|
|
|
|
+ },
|
|
|
+ scensFilter(val){
|
|
|
+ let str='';
|
|
|
+ switch (val) {
|
|
|
+ case '1':
|
|
|
+ str='素材+出价'
|
|
|
+ break;
|
|
|
+ case '2':
|
|
|
+ str='素材+定向'
|
|
|
+ break;
|
|
|
+ case '3':
|
|
|
+ str='时间+出价'
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return str
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1002,6 +882,7 @@ export default {
|
|
|
.OptinItem{
|
|
|
display: inline-block;
|
|
|
margin-right: 15px;
|
|
|
+ margin-top: 15px;
|
|
|
.ok{
|
|
|
margin-right: 15px;
|
|
|
}
|
|
@@ -1020,7 +901,7 @@ export default {
|
|
|
// display: inline-block;
|
|
|
float: right;
|
|
|
.searchBtn{
|
|
|
- margin-right: 10px;
|
|
|
+ // margin-right: 10px;
|
|
|
}
|
|
|
}
|
|
|
.tableArea{
|
|
@@ -1035,6 +916,7 @@ export default {
|
|
|
justify-content: flex-start;
|
|
|
align-items: center;
|
|
|
margin-bottom: 28px;
|
|
|
+ position: relative;
|
|
|
h3 {
|
|
|
font-size: 22px;
|
|
|
margin: 0;
|
|
@@ -1042,6 +924,11 @@ export default {
|
|
|
height: 30px;
|
|
|
line-height: 30px;
|
|
|
}
|
|
|
+ .goCreateStrategy{
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 4px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|