|
@@ -10,7 +10,7 @@
|
|
|
<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"
|
|
|
+ <a-select
|
|
|
v-model="accountIds"
|
|
|
style="width: 400px"
|
|
|
placeholder="请选择账户"
|
|
@@ -33,7 +33,7 @@
|
|
|
v-if="tabKey==1"
|
|
|
v-model="directionalId"
|
|
|
show-search
|
|
|
- style="width: 300px;height:30px"
|
|
|
+ style="width: 350px;height:30px"
|
|
|
:dropdownMatchSelectWidth='true'
|
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
tree-checkable
|
|
@@ -52,7 +52,7 @@
|
|
|
v-if="tabKey==2"
|
|
|
v-model="materialId"
|
|
|
show-search
|
|
|
- style="width: 300px;height:30px"
|
|
|
+ style="width: 350px;height:30px"
|
|
|
:dropdownMatchSelectWidth='true'
|
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
tree-checkable
|
|
@@ -61,9 +61,9 @@
|
|
|
placeholder="选择策略以及素材"
|
|
|
treeNodeFilterProp="title"
|
|
|
:allowClear="true"
|
|
|
- @change="treeChange"
|
|
|
+ @change="materialTreeChange"
|
|
|
:maxTagCount='1'
|
|
|
- :tree-data="treeData"
|
|
|
+ :tree-data="materialTreeData"
|
|
|
:filterOption='filterOption'
|
|
|
>
|
|
|
</a-tree-select>
|
|
@@ -360,7 +360,21 @@
|
|
|
slot-scope="gameAddictionRate"
|
|
|
>{{ gameAddictionRate | toPercentage }}</span>
|
|
|
<span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span>
|
|
|
- <!-- <span slot="nextDayOpenRate" slot-scope="nextDayOpenRate">{{ nextDayOpenRate | toPercentage }}</span> -->
|
|
|
+
|
|
|
+ <span slot="coverUrl" slot-scope="text,record">
|
|
|
+ <a-popover placement="right">
|
|
|
+ <template slot="content">
|
|
|
+
|
|
|
+ <video :src="record.videoId_dictText" style="width:250px" controls ></video>
|
|
|
+ </template>
|
|
|
+ <template slot="title">
|
|
|
+
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <img :src="record.imageId_dictText" alt="" style="width:100px">
|
|
|
+ </a-popover>
|
|
|
+ </span>
|
|
|
+
|
|
|
</a-table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -453,7 +467,7 @@ const regionColumns = [
|
|
|
key: 'region',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'region' },
|
|
|
- width:80,
|
|
|
+ width:120,
|
|
|
fixed: 'left' ,
|
|
|
},
|
|
|
];
|
|
@@ -464,7 +478,7 @@ const sexColumns = [
|
|
|
key: 'sex',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'sex' },
|
|
|
- width:80,
|
|
|
+ width:120,
|
|
|
fixed: 'left' ,
|
|
|
},
|
|
|
];
|
|
@@ -475,92 +489,84 @@ const ageColumns = [
|
|
|
key: 'age',
|
|
|
align: 'center',
|
|
|
scopedSlots: { customRender: 'age' },
|
|
|
- width:80,
|
|
|
+ width:120,
|
|
|
fixed: 'left' ,
|
|
|
},
|
|
|
];
|
|
|
const material = [
|
|
|
{
|
|
|
title: '素材',
|
|
|
- dataIndex: 'url',
|
|
|
- key: 'url',
|
|
|
+ dataIndex: 'coverUrl',
|
|
|
+ key: 'coverUrl',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'url' },
|
|
|
+ scopedSlots: { customRender: 'coverUrl' },
|
|
|
width:120,
|
|
|
fixed: 'left' ,
|
|
|
},
|
|
|
{
|
|
|
title: '关联创意数',
|
|
|
- dataIndex: 'relativeCreate',
|
|
|
- key: 'relativeCreate',
|
|
|
+ dataIndex: 'creativeCount',
|
|
|
+ key: 'creativeCount',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'relativeCreate' },
|
|
|
- width:80,
|
|
|
- fixed: 'left' ,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '关联广告组数',
|
|
|
- dataIndex: 'relativeGroup',
|
|
|
- key: 'relativeGroup',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'relativeGroup' },
|
|
|
- width:80,
|
|
|
- fixed: 'left' ,
|
|
|
+ scopedSlots: { customRender: 'creativeCount' },
|
|
|
+
|
|
|
},
|
|
|
+// {
|
|
|
+// title: '关联广告组数',
|
|
|
+// dataIndex: 'relativeGroup',
|
|
|
+// key: 'relativeGroup',
|
|
|
+// align: 'center',
|
|
|
+// scopedSlots: { customRender: 'relativeGroup' },
|
|
|
+
|
|
|
+// },
|
|
|
{
|
|
|
title: '广告场景',
|
|
|
- dataIndex: 'secen',
|
|
|
- key: 'secen',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'secen' },
|
|
|
- width:80,
|
|
|
- fixed: 'left' ,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '3s播放数',
|
|
|
- dataIndex: '3',
|
|
|
- key: '3',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: '3' },
|
|
|
- width:80,
|
|
|
- fixed: 'left' ,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '10s播放数',
|
|
|
- dataIndex: '10',
|
|
|
- key: '10',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: '10' },
|
|
|
- width:80,
|
|
|
- fixed: 'left' ,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '3s完播率',
|
|
|
- dataIndex: 'playOver',
|
|
|
- key: 'playOver',
|
|
|
+ dataIndex: 'scenes',
|
|
|
+ key: 'scenes',
|
|
|
align: 'center',
|
|
|
- scopedSlots: { customRender: 'playOver' },
|
|
|
- width:80,
|
|
|
- fixed: 'left' ,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '10s完播率',
|
|
|
- dataIndex: '10playOver',
|
|
|
- key: '10playOver',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: '10playOver' },
|
|
|
- width:80,
|
|
|
- fixed: 'left' ,
|
|
|
- },
|
|
|
- {
|
|
|
- title: '完播率',
|
|
|
- dataIndex: 'playOverRate',
|
|
|
- key: 'playOverRate',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'playOverRate' },
|
|
|
- width:80,
|
|
|
- fixed: 'left' ,
|
|
|
+ scopedSlots: { customRender: 'scenes' },
|
|
|
+
|
|
|
},
|
|
|
+// {
|
|
|
+// title: '3s播放数',
|
|
|
+// dataIndex: '3',
|
|
|
+// key: '3',
|
|
|
+// align: 'center',
|
|
|
+// scopedSlots: { customRender: '3' },
|
|
|
+
|
|
|
+// },
|
|
|
+// {
|
|
|
+// title: '10s播放数',
|
|
|
+// dataIndex: '10',
|
|
|
+// key: '10',
|
|
|
+// align: 'center',
|
|
|
+// scopedSlots: { customRender: '10' },
|
|
|
+
|
|
|
+// },
|
|
|
+// {
|
|
|
+// title: '3s完播率',
|
|
|
+// dataIndex: 'playOver',
|
|
|
+// key: 'playOver',
|
|
|
+// align: 'center',
|
|
|
+// scopedSlots: { customRender: 'playOver' },
|
|
|
+
|
|
|
+// },
|
|
|
+// {
|
|
|
+// title: '10s完播率',
|
|
|
+// dataIndex: '10playOver',
|
|
|
+// key: '10playOver',
|
|
|
+// align: 'center',
|
|
|
+// scopedSlots: { customRender: '10playOver' },
|
|
|
+
|
|
|
+// },
|
|
|
+// {
|
|
|
+// title: '完播率',
|
|
|
+// dataIndex: 'playOverRate',
|
|
|
+// key: 'playOverRate',
|
|
|
+// align: 'center',
|
|
|
+// scopedSlots: { customRender: 'playOverRate' },
|
|
|
+
|
|
|
+// },
|
|
|
];
|
|
|
const directional = [
|
|
|
{
|
|
@@ -773,6 +779,7 @@ const publicColumns = [
|
|
|
spinning:false,
|
|
|
materialId:[],
|
|
|
treeData: [],
|
|
|
+ materialTreeData:[],
|
|
|
SHOW_PARENT,
|
|
|
userId:'',
|
|
|
tabKey:1,
|
|
@@ -797,13 +804,13 @@ const publicColumns = [
|
|
|
},
|
|
|
|
|
|
tableValue:1,
|
|
|
- accountIds:[],
|
|
|
+ accountIds:undefined,
|
|
|
accountList:[],
|
|
|
directionalId:undefined,
|
|
|
value:1,
|
|
|
columns:[...regionColumns,...publicColumns],
|
|
|
tableData:[],
|
|
|
- dateRange: [moment(), moment()],
|
|
|
+ dateRange: [],
|
|
|
topOption: JSON.parse(JSON.stringify(option)),
|
|
|
scrollX:2500,
|
|
|
materialipagination: {
|
|
@@ -838,7 +845,7 @@ const publicColumns = [
|
|
|
this.directionalId = [];
|
|
|
//选择一个后禁用其他
|
|
|
if(val.length==1){
|
|
|
- if(val[0]*1){
|
|
|
+ if(val[0].indexOf('strategy')==-1){
|
|
|
let selectindex=0
|
|
|
this.treeData.forEach((ele,index)=>{
|
|
|
if(ele.children){
|
|
@@ -897,7 +904,7 @@ const publicColumns = [
|
|
|
}
|
|
|
if(val){
|
|
|
val.forEach((ele,index)=>{
|
|
|
- if(ele*1){
|
|
|
+ if(ele.indexOf('strategy')==-1){
|
|
|
this.directionalId.push(ele)
|
|
|
}else{
|
|
|
let projectArr=this.treeData.filter((item)=>{
|
|
@@ -914,16 +921,7 @@ const publicColumns = [
|
|
|
}
|
|
|
|
|
|
console.log(this.directionalId);
|
|
|
- let LHKaccountInfo=[]
|
|
|
- this.directionalId.forEach(item=>{
|
|
|
- this.treeData.forEach(element=>{
|
|
|
- element.children.forEach(ele=>{
|
|
|
- if(item==ele.value){
|
|
|
- LHKaccountInfo.push(ele)
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
+ this.getRelativeData()
|
|
|
|
|
|
|
|
|
},
|
|
@@ -937,26 +935,28 @@ const publicColumns = [
|
|
|
accountHttp(){
|
|
|
this.treeData=[];
|
|
|
this.directionalId=[];
|
|
|
- getAction('/ctop/projectMember/getProjectAccountByUserId?mediaType=1', {}).then(res => {
|
|
|
+ getAction('/ai/analyze/getStrategyAndTarget', {
|
|
|
+ accountId:this.accountIds
|
|
|
+ }).then(res => {
|
|
|
if(res.success){
|
|
|
// console.log(res);
|
|
|
if(res.result){
|
|
|
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].title=element.strategy_name +'_('+ element.id +')';
|
|
|
+ this.treeData[index].value='strategy'+element.id;
|
|
|
+ this.treeData[index].key=element.id;
|
|
|
+
|
|
|
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;
|
|
|
- this.treeData[index].children[i].value=ele.accountId;
|
|
|
- this.treeData[index].children[i].key=ele.accountId;
|
|
|
- })
|
|
|
+ if(element.targets.length&&element.targets[0]){
|
|
|
+ element.targets.forEach((ele,i)=>{
|
|
|
+ this.treeData[index].children.push({});
|
|
|
+ this.treeData[index].children[i].title=ele.target_type+'_'+ele.target_content
|
|
|
+ this.treeData[index].children[i].value=element.id+'_'+ele.id;
|
|
|
+ this.treeData[index].children[i].key=element.id+'_'+ele.id;
|
|
|
+ })
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -967,11 +967,138 @@ const publicColumns = [
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ accountMaterialHttp(){
|
|
|
+ this.materialTreeData=[];
|
|
|
+ this.materialId=[];
|
|
|
+ getAction('/ai/analyze/getStrategyAndMaterial', {
|
|
|
+ accountId:this.accountIds
|
|
|
+ }).then(res => {
|
|
|
+ if(res.success){
|
|
|
+ // console.log(res);
|
|
|
+ if(res.result){
|
|
|
+ res.result.forEach((element,index) => {
|
|
|
+ if(element){
|
|
|
+ this.materialTreeData.push({});
|
|
|
+ this.materialTreeData[index].title=element.strategy_name +'_('+ element.id +')';
|
|
|
+ this.materialTreeData[index].value='strategy'+element.id;
|
|
|
+ this.materialTreeData[index].key=element.id;
|
|
|
+
|
|
|
+ this.materialTreeData[index].children=[];
|
|
|
+
|
|
|
+ if(element.materials.length&&element.materials[0]){
|
|
|
+ element.materials.forEach((ele,i)=>{
|
|
|
+ this.materialTreeData[index].children.push({});
|
|
|
+ this.materialTreeData[index].children[i].title=ele.material_name
|
|
|
+ this.materialTreeData[index].children[i].value=element.id+'_'+ele.code;
|
|
|
+ this.materialTreeData[index].children[i].key=element.id+'_'+ele.code;
|
|
|
+ this.materialTreeData[index].children[i].coverUrl=ele.cover_url;
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // console.log(this.treeData)
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ materialTreeChange(val){
|
|
|
+ console.log(val)
|
|
|
+ this.materialId = [];
|
|
|
+ //选择一个后禁用其他
|
|
|
+ if(val.length==1){
|
|
|
+ if(val[0].indexOf('strategy')==-1){
|
|
|
+ let selectindex=0
|
|
|
+ this.materialTreeData.forEach((ele,index)=>{
|
|
|
+ if(ele.children){
|
|
|
+ ele.children.map((item,ind)=>{
|
|
|
+ if(item.value==val[0]){
|
|
|
+ selectindex=index;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // console.log(selectindex)
|
|
|
+ if(selectindex ||selectindex==0){
|
|
|
+ this.materialTreeData.forEach((ele,index)=>{
|
|
|
+ if(index!=selectindex){
|
|
|
+ ele.disableCheckbox = true;
|
|
|
+ if(ele.children){
|
|
|
+ ele.children.map((item,ind)=>{
|
|
|
+ item.disableCheckbox = true;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ // console.log(1)
|
|
|
+ this.materialTreeData.forEach((ele,index)=>{
|
|
|
+ if(ele.value!=val[0]){
|
|
|
+ ele.disableCheckbox = true;
|
|
|
+
|
|
|
+ if(ele.children){
|
|
|
+ ele.children.forEach((item,ind)=>{
|
|
|
+ item.disableCheckbox = true;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // console.log(this.mediaId)
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(val.length==0){
|
|
|
+ this.materialTreeData.forEach((ele,index)=>{
|
|
|
+ ele.disableCheckbox = false;
|
|
|
+
|
|
|
+ if(ele.children){
|
|
|
+ ele.children.forEach((item,ind)=>{
|
|
|
+ item.disableCheckbox = false;
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ if(val){
|
|
|
+ val.forEach((ele,index)=>{
|
|
|
+ if(ele.indexOf('strategy')==-1){
|
|
|
+ this.materialId.push(ele)
|
|
|
+ }else{
|
|
|
+ let projectArr=this.materialTreeData.filter((item)=>{
|
|
|
+ return item.value==ele
|
|
|
+ });
|
|
|
+ console.log(projectArr)
|
|
|
+ projectArr[0].children.forEach((element)=>{
|
|
|
+ this.materialId.push(element.value)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ console.log(this.materialId);
|
|
|
+ this.getRelativeData()
|
|
|
+ },
|
|
|
|
|
|
|
|
|
accountChange(val){
|
|
|
console.log(val);
|
|
|
+ if(val){
|
|
|
+ if(this.tabKey==1){
|
|
|
+ this.accountHttp()
|
|
|
+ }else if(this.tabKey==2){
|
|
|
+ this.accountMaterialHttp()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
},
|
|
|
disabledDate(current) {
|
|
@@ -1280,18 +1407,22 @@ const publicColumns = [
|
|
|
|
|
|
tabChange(key){
|
|
|
console.log(key)
|
|
|
+ this.accountIds=undefined;
|
|
|
+ this.directionalId=[];
|
|
|
+ this.materialId=[];
|
|
|
if(key==1){
|
|
|
-
|
|
|
+ this.materialColumns=[...material,...publicColumns]
|
|
|
}else{
|
|
|
-
|
|
|
+ this.materialColumns=[...directional,...publicColumns]
|
|
|
}
|
|
|
+ this.getRelativeData()
|
|
|
},
|
|
|
|
|
|
getEchartData(){
|
|
|
- this.spinning=true
|
|
|
- postAction('',{
|
|
|
-
|
|
|
- }).then(res=>{
|
|
|
+ this.spinning=true;
|
|
|
+ let params=this.handlerParams();
|
|
|
+ params.dataType=this.value
|
|
|
+ postAction('',params).then(res=>{
|
|
|
console.log(res)
|
|
|
|
|
|
var province = ['北京', '广东', '浙江', '湖南', '河南', '安徽', '重庆', '山东', '江西', '四川', '江苏', '湖北', '福建', '上海', '广西', '河北', '陕西', '云南', '海南', '黑龙江', '辽宁', '山西', '天津', '甘肃', '内蒙古', '新疆', '宁夏', '吉林', '贵州', '青海', '西藏', '澳门', '香港', '台湾'];
|
|
@@ -1336,9 +1467,9 @@ const publicColumns = [
|
|
|
|
|
|
getDetailTableData(){
|
|
|
this.loading=true
|
|
|
- postAction('',{
|
|
|
-
|
|
|
- }).then(res=>{
|
|
|
+ let params=this.handlerParams();
|
|
|
+ params.dataType=this.tableValue
|
|
|
+ postAction('',params).then(res=>{
|
|
|
console.log(res)
|
|
|
this.loading=false
|
|
|
this.tableData=res.result
|
|
@@ -1347,18 +1478,50 @@ const publicColumns = [
|
|
|
|
|
|
getRelativeData(){
|
|
|
this.materialloading=true
|
|
|
- postAction('',{
|
|
|
-
|
|
|
- }).then(res=>{
|
|
|
+ let params=this.handlerParams();
|
|
|
+ // params.dataType=this.tableValue
|
|
|
+ postAction('/ai/analyze/report/targetOrMaterial',params).then(res=>{
|
|
|
console.log(res)
|
|
|
this.materialloading=false
|
|
|
- this.materialtableData=res.result
|
|
|
+ if(res.success){
|
|
|
+ this.materialtableData=res.result
|
|
|
+ this.ipagination.total=res.result.total;
|
|
|
+ }else{
|
|
|
+ this.$message.error('出错了')
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
|
|
|
search(){
|
|
|
-
|
|
|
+ this.getRelativeData()
|
|
|
},
|
|
|
+
|
|
|
+ handlerParams(){
|
|
|
+ let params={};
|
|
|
+ params.accountId=this.accountIds
|
|
|
+ if(this.tabKey==1){
|
|
|
+ params.type='target'
|
|
|
+ params.strategyId=this.directionalId[0].split('_')[0]
|
|
|
+ params.targetIds=this.directionalId.map(item=>{
|
|
|
+ return item.split('_')[1]
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ params.type='material'
|
|
|
+ params.strategyId=this.materialId[0].split('_')[0]
|
|
|
+ params.codes=this.materialId.map(item=>{
|
|
|
+ return item.split('_')[1]
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(this.dateRange&&this.dateRange.length>0){
|
|
|
+ params.startDate=this.dateRange[0].format('YYYY-MM-DD')
|
|
|
+ params.endDate=this.dateRange[1].format('YYYY-MM-DD')
|
|
|
+ }
|
|
|
+ params.pageNo=this.ipagination.current;
|
|
|
+ params.pageSize=this.ipagination.pageSize
|
|
|
+ return params
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
|