|
@@ -170,8 +170,8 @@
|
|
|
<div class="newPlanStatic">
|
|
|
<div class="tabbody">
|
|
|
<a-tabs v-model="tabKey" @change="tabChange">
|
|
|
- <!-- <a-tab-pane :key="1" tab="头条">
|
|
|
- </a-tab-pane> -->
|
|
|
+ <a-tab-pane :key="1" tab="头条">
|
|
|
+ </a-tab-pane>
|
|
|
<a-tab-pane :key="2" tab="快手">
|
|
|
</a-tab-pane>
|
|
|
</a-tabs>
|
|
@@ -346,26 +346,26 @@ let TTcolumns=[
|
|
|
},
|
|
|
{
|
|
|
title: '账户所属人',
|
|
|
- dataIndex: 'people',
|
|
|
- scopedSlots: { customRender: 'people' },
|
|
|
+ dataIndex: 'userName',
|
|
|
+ scopedSlots: { customRender: 'userName' },
|
|
|
align: 'center',
|
|
|
- key:'people'
|
|
|
+ key:'userName'
|
|
|
|
|
|
},
|
|
|
{
|
|
|
- title: '上新计划数',
|
|
|
- dataIndex: 'newPlan',
|
|
|
- scopedSlots: { customRender: 'newPlan' },
|
|
|
+ title: '新上计划数',
|
|
|
+ dataIndex: 'new',
|
|
|
+ scopedSlots: { customRender: 'new' },
|
|
|
align: 'center',
|
|
|
- key:'newPlan'
|
|
|
+ key:'new'
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '最近上新',
|
|
|
- dataIndex: 'statDate',
|
|
|
- scopedSlots: { customRender: 'statDate' },
|
|
|
+ dataIndex: 'maxCreateTime',
|
|
|
+ scopedSlots: { customRender: 'maxCreateTime' },
|
|
|
align: 'center',
|
|
|
- key:'statDate'
|
|
|
+ key:'maxCreateTime'
|
|
|
|
|
|
},
|
|
|
]
|
|
@@ -388,26 +388,26 @@ let TTcolumnsVaild=[
|
|
|
},
|
|
|
{
|
|
|
title: '账户所属人',
|
|
|
- dataIndex: 'people',
|
|
|
- scopedSlots: { customRender: 'people' },
|
|
|
+ dataIndex: 'userName',
|
|
|
+ scopedSlots: { customRender: 'userName' },
|
|
|
align: 'center',
|
|
|
- key:'people'
|
|
|
+ key:'userName'
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '有效计划数',
|
|
|
- dataIndex: 'newPlan',
|
|
|
- scopedSlots: { customRender: 'newPlan' },
|
|
|
+ dataIndex: 'valid',
|
|
|
+ scopedSlots: { customRender: 'valid' },
|
|
|
align: 'center',
|
|
|
- key:'newPlan'
|
|
|
+ key:'valid'
|
|
|
|
|
|
},
|
|
|
{
|
|
|
title: '最近上新',
|
|
|
- dataIndex: 'statDate',
|
|
|
- scopedSlots: { customRender: 'statDate' },
|
|
|
+ dataIndex: 'maxCreateTime',
|
|
|
+ scopedSlots: { customRender: 'maxCreateTime' },
|
|
|
align: 'center',
|
|
|
- key:'statDate'
|
|
|
+ key:'maxCreateTime'
|
|
|
|
|
|
},
|
|
|
]
|
|
@@ -447,7 +447,7 @@ let KScolumns=[
|
|
|
|
|
|
},
|
|
|
{
|
|
|
- title: '上新推广组',
|
|
|
+ title: '新上推广组',
|
|
|
dataIndex: 'new',
|
|
|
scopedSlots: { customRender: 'new' },
|
|
|
align: 'center',
|
|
@@ -529,7 +529,7 @@ let sectionOption={
|
|
|
},
|
|
|
},
|
|
|
legend: {
|
|
|
- data: ['新上计划数','有效计划数']
|
|
|
+ data: ['新上推广组','有效推广组']
|
|
|
},
|
|
|
grid: {
|
|
|
left: '2%',
|
|
@@ -579,7 +579,7 @@ let sectionOption={
|
|
|
],
|
|
|
series: [
|
|
|
{
|
|
|
- name: '新上计划数',
|
|
|
+ name: '新上推广组',
|
|
|
type: 'line',
|
|
|
smooth: true,
|
|
|
data: [],
|
|
@@ -599,7 +599,7 @@ let sectionOption={
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- name: '有效计划数',
|
|
|
+ name: '有效推广组',
|
|
|
type: 'line',
|
|
|
smooth: true,
|
|
|
data: [],
|
|
@@ -633,6 +633,12 @@ export default {
|
|
|
|
|
|
data: function() {
|
|
|
return {
|
|
|
+ KSaccountList:[],
|
|
|
+ TTaccountList:[],
|
|
|
+
|
|
|
+ KSoperateList:[],
|
|
|
+ TToperateList:[],
|
|
|
+
|
|
|
accountDisabled:false,
|
|
|
operateDisabled:false,
|
|
|
userId:JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id,
|
|
@@ -679,6 +685,7 @@ export default {
|
|
|
//选择一个后禁用其他
|
|
|
if(val.length==1){
|
|
|
this.operateDisabled=true;
|
|
|
+ this.opendate=''
|
|
|
if(val[0]*1){
|
|
|
let selectindex=0
|
|
|
this.treeData.forEach((ele,index)=>{
|
|
@@ -723,16 +730,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
// console.log(this.mediaId)
|
|
|
- if(this.mediaId=='1'){
|
|
|
-
|
|
|
- this.discountDisabled=true;
|
|
|
- this.rebatePropDisabled=false;
|
|
|
- this.discount=this.rebateProp;
|
|
|
- }else{
|
|
|
- this.rebatePropDisabled=true;
|
|
|
- this.discountDisabled=false;
|
|
|
- this.discount=this.discountSelect;
|
|
|
- }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if(val.length==0){
|
|
@@ -747,7 +745,7 @@ export default {
|
|
|
|
|
|
});
|
|
|
this.operateDisabled=false;
|
|
|
- this.opendate=''
|
|
|
+
|
|
|
}
|
|
|
if(val){
|
|
|
val.forEach((ele,index)=>{
|
|
@@ -798,14 +796,18 @@ export default {
|
|
|
|
|
|
if(key==1){
|
|
|
// toutiao
|
|
|
+ this.treeData=this.TTaccountList;
|
|
|
+ this.operateList=this.TToperateList
|
|
|
this.columns=this.tableTab==1?[...TTcolumns]:[...TTcolumnsVaild]
|
|
|
this.sectionOption.legend.data=['新上计划数','有效计划数']
|
|
|
}else{
|
|
|
// kuaishou
|
|
|
+ this.operateList=this.KSoperateList
|
|
|
+ this.treeData=this.KSaccountList;
|
|
|
this.columns=this.tableTab==1?[...KScolumns]:[...KScolumnsVaild]
|
|
|
this.sectionOption.legend.data=['新上推广组','有效推广组']
|
|
|
}
|
|
|
- this.accountHttp()
|
|
|
+ this.getNewPlan()
|
|
|
},
|
|
|
operateChange(value){
|
|
|
console.log(value);
|
|
@@ -926,39 +928,65 @@ export default {
|
|
|
|
|
|
|
|
|
//请求项目和账户内容
|
|
|
- accountHttp(){
|
|
|
-
|
|
|
- this.treeValue=[];
|
|
|
- getAction(`/ctop/projectMember/getProjectAccountByUserId?mediaType=${this.tabKey}`, {}).then(res => {
|
|
|
+ accountHttp(key){
|
|
|
+ this.treeData=[]
|
|
|
+ this.treeValue=[];
|
|
|
+ getAction(`/ctop/projectMember/getProjectAccountByUserId?mediaType=${key}`, {}).then(res => {
|
|
|
if(res.success){
|
|
|
// console.log(res);
|
|
|
|
|
|
if(res.result){
|
|
|
- this.treeData=[];
|
|
|
- res.result.forEach((element,index) => {
|
|
|
- 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({});
|
|
|
- this.treeData[index].children[i].title=ele.userName+'_'+ele.authName+'_'+element.project.projectName +'_('+(ele.accountStatus?'已停投':'投放中')+')';
|
|
|
- this.treeData[index].children[i].value=ele.accountId;
|
|
|
- this.treeData[index].children[i].key=ele.accountId;
|
|
|
- // this.treeData[index].children[i].accountStatus=ele.accountStatus;
|
|
|
- })
|
|
|
+ res.result.forEach((element,index) => {
|
|
|
+ if(element){
|
|
|
+ if(key==1){
|
|
|
+ this.TTaccountList.push({});
|
|
|
+ this.TTaccountList[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
|
|
|
+ this.TTaccountList[index].value='project'+element.project.projectId;
|
|
|
+ this.TTaccountList[index].key=element.project.projectId;
|
|
|
+ this.TTaccountList[index].mediaId=element.project.mediaId;
|
|
|
+ this.TTaccountList[index].children=[];
|
|
|
+
|
|
|
+ if(element.account.length){
|
|
|
+ element.account.forEach((ele,i)=>{
|
|
|
+ this.TTaccountList[index].children.push({});
|
|
|
+ this.TTaccountList[index].children[i].title=ele.userName+'_'+ele.authName+'_'+element.project.projectName;
|
|
|
+ this.TTaccountList[index].children[i].value=ele.accountId;
|
|
|
+ this.TTaccountList[index].children[i].key=ele.accountId;
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- // console.log(this.treeData)
|
|
|
-
|
|
|
- }
|
|
|
+ }else if(key==2){
|
|
|
+ this.KSaccountList.push({});
|
|
|
+ this.KSaccountList[index].title=element.project.projectName +'_('+ element.project.advertiserName +')';
|
|
|
+ this.KSaccountList[index].value='project'+element.project.projectId;
|
|
|
+ this.KSaccountList[index].key=element.project.projectId;
|
|
|
+ this.KSaccountList[index].mediaId=element.project.mediaId;
|
|
|
+ this.KSaccountList[index].children=[];
|
|
|
+
|
|
|
+ if(element.account.length){
|
|
|
+ element.account.forEach((ele,i)=>{
|
|
|
+ this.KSaccountList[index].children.push({});
|
|
|
+ this.KSaccountList[index].children[i].title=ele.userName+'_'+ele.authName+'_'+element.project.projectName;
|
|
|
+ this.KSaccountList[index].children[i].value=ele.accountId;
|
|
|
+ this.KSaccountList[index].children[i].key=ele.accountId;
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if(this.tabKey==1){
|
|
|
+ this.treeData=this.TTaccountList
|
|
|
+ }else{
|
|
|
+ this.treeData=this.KSaccountList
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // console.log(this.treeData)
|
|
|
+
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -971,11 +999,12 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 获取所有运营
|
|
|
- getAllOperator(){
|
|
|
+ getAllOperator(key){
|
|
|
let url=''
|
|
|
- if(this.tabKeykey==1){
|
|
|
+ this.operateList=[]
|
|
|
+ if(key==1){
|
|
|
// 头条
|
|
|
- url=''
|
|
|
+ url='/ctop/bytedance/newPlan/report/AllOperator'
|
|
|
}else{
|
|
|
// 快手
|
|
|
url='/ctop/kuaishou/newPlan/report/AllOperator'
|
|
@@ -983,7 +1012,18 @@ export default {
|
|
|
postAction(url,{}).then(res=>{
|
|
|
console.log(res);
|
|
|
if(res.success){
|
|
|
- this.operateList=res.result
|
|
|
+ if(key==1){
|
|
|
+ this.TToperateList=res.result;
|
|
|
+ }else{
|
|
|
+ this.KSoperateList=res.result;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(this.tabKey==1){
|
|
|
+ this.operateList=this.TToperateList
|
|
|
+ }else{
|
|
|
+ this.operateList=this.KSoperateList
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -994,22 +1034,32 @@ export default {
|
|
|
let url=''
|
|
|
if(this.tabKey==1){
|
|
|
// 头条
|
|
|
- url=''
|
|
|
+ url='/ctop/bytedance/newPlan/report/data'
|
|
|
}else{
|
|
|
// 快手
|
|
|
url='/ctop/kuaishou/newPlan/report/data'
|
|
|
}
|
|
|
- if(this.accountId){
|
|
|
- this.operate='';
|
|
|
- }else if(this.operate){
|
|
|
- this.accountId=''
|
|
|
- }
|
|
|
+ // if(this.accountId){
|
|
|
+ // this.operate='';
|
|
|
+ // }else if(this.operate){
|
|
|
+ // this.accountId=''
|
|
|
+ // }
|
|
|
this.loading=true;
|
|
|
|
|
|
this.sectionOption=JSON.parse(JSON.stringify(sectionOption));
|
|
|
+ if(this.tabKey==1){
|
|
|
+ this.sectionOption.legend.data=['新上计划数','有效计划数']
|
|
|
+ this.sectionOption.series[0].name='新上计划数'
|
|
|
+ this.sectionOption.series[1].name='有效计划数'
|
|
|
+ }else{
|
|
|
+ this.sectionOption.legend.data=['新上推广组','有效推广组']
|
|
|
+ this.sectionOption.series[0].name='新上推广组'
|
|
|
+ this.sectionOption.series[1].name='有效推广组'
|
|
|
+ }
|
|
|
+
|
|
|
postAction(url,{
|
|
|
accountIds:this.accountId,
|
|
|
- userId:this.operate ,
|
|
|
+ userId:this.operate || '',
|
|
|
startDate:this.dateValue[0].format('YYYY-MM-DD'),
|
|
|
endDate:this.dateValue[1].format('YYYY-MM-DD'),
|
|
|
target:this.tableTab=='1'?'new':'valid',
|
|
@@ -1029,21 +1079,14 @@ export default {
|
|
|
this.sectionOption.series[0].data.push(item.new)
|
|
|
this.sectionOption.series[1].data.push(item.valid)
|
|
|
})
|
|
|
- if(this.tabKey==1){
|
|
|
- this.sectionOption.legend.data=['新上计划数','有效计划数']
|
|
|
- this.sectionOption.series[0].name='新上计划数'
|
|
|
- this.sectionOption.series[1].name='有效计划数'
|
|
|
- }else{
|
|
|
- this.sectionOption.legend.data=['新上推广组','有效推广组']
|
|
|
- this.sectionOption.series[0].name='新上推广组'
|
|
|
- this.sectionOption.series[1].name='有效推广组'
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
|
|
|
this.getEchartData('sectionChart', this.sectionOption);
|
|
|
|
|
|
}
|
|
|
})
|
|
|
+ this.getEchartData('sectionChart', this.sectionOption);
|
|
|
},
|
|
|
|
|
|
// 查询按钮
|
|
@@ -1075,15 +1118,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.accountHttp()
|
|
|
+ this.accountHttp(1);
|
|
|
+ this.accountHttp(2);
|
|
|
+ this.getAllOperator(1)
|
|
|
+ this.getAllOperator(2)
|
|
|
},
|
|
|
activated: function() {
|
|
|
this.$nextTick(()=>{
|
|
|
- this.accountHttp()
|
|
|
this.getEchartData('sectionChart', this.sectionOption);
|
|
|
-
|
|
|
- this.getAllOperator()
|
|
|
- this.tabChange(2)
|
|
|
+
|
|
|
+ // this.tabChange(2)
|
|
|
let userInfo=localStorage.getItem('pro__Login_Userinfo')
|
|
|
if(userInfo){
|
|
|
this.userId=JSON.parse(userInfo).value.id;
|