Browse Source

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

zhuxinbo 4 years ago
parent
commit
43c030eaca

+ 3 - 2
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -9,9 +9,10 @@
                 </a-tab-pane>
                 <a-tab-pane key="idea" tab="广告创意">
                 </a-tab-pane>
-                <a-button type='primary' slot="tabBarExtraContent" @click="goBatch">
+                <a-button type='primary'  slot="tabBarExtraContent" @click="goBatch">
                    + 头条批量创建
                 </a-button>
+                
             </a-tabs>
         </div>
         </keep-alive>
@@ -598,7 +599,7 @@ export default {
         },
         //跳转到批量页面
         goBatch(){
-
+            this.$router.push('/modules/BatchCreate/newGroup')
         },
         //状态改变
         statusChange(value){

+ 15 - 0
src/views/modules/BatchCreate/newCreate.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+chuangyi
+    </div>
+</template>
+
+<script>
+    export default {
+        
+    }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 88 - 24
src/views/modules/BatchCreate/newDirectedPackage.vue

@@ -494,23 +494,39 @@
                         </a-radio-group>
                         <span class="tishi"><a-icon type="exclamation-circle" class="tubiao" />精选流量包仅支持穿山甲、穿山甲-精选游戏广告位</span>
                     </a-form-item>
-                    <!-- <a-form-item label="自定义人群" :label-col="labelCol" :wrapper-col="wrapperCol">
+                    <a-form-item label="自定义人群" :label-col="labelCol" :wrapper-col="wrapperCol">
                         <a-radio-group  v-model="customCrowd" button-style="solid">
-                            <a-radio-button value="EXTERNAL">不限</a-radio-button>
-                            <a-radio-button value="APP_ANDROID">自定义人群</a-radio-button>                           
+                            <a-radio-button value="NONE">不限</a-radio-button>
+                            <a-radio-button value="CUSTOMt_CROWED">自定义人群</a-radio-button>                           
                         </a-radio-group>
                     </a-form-item>
-                    <a-form-item label="定向逻辑" :label-col="labelCol" :wrapper-col="wrapperCol">
-                        <a-radio-group  v-model="customCrowd" button-style="solid">
-                            <a-radio-button value="EXTERNAL">定向</a-radio-button>
-                            <a-radio-button value="APP_ANDROID">排除</a-radio-button>                           
-                            <a-radio-button value="APP_ANDROID">同时定向排除</a-radio-button>                           
+                    <a-form-item label="定向逻辑" :label-col="labelCol" :wrapper-col="wrapperCol" v-if="customCrowd=='CUSTOMt_CROWED'">
+                        <a-radio-group  v-model="directLogic" button-style="solid" @change="directLogicChange">
+                            <a-radio-button value="RETARGETING_INCLUDE">定向</a-radio-button>
+                            <a-radio-button value="RETARGETING_EXCLUDE">排除</a-radio-button>                           
+                            <a-radio-button value="ALL">同时定向排除</a-radio-button>                           
                         </a-radio-group>
-                    </a-form-item> -->
-                    
+                    </a-form-item>
+                    <div class="zidingyirenqun" v-if="customCrowd=='CUSTOMt_CROWED'">
+                      
+                        <a-form-item  class="optItem" :label-col="labelCol" :wrapper-col="wrapperCol">
+                            <a-input placeholder="请输入人群包名称或者ID" v-model="dxInputValue" v-if="directLogic!='ALL'" style="width:50%">
+                                <a-icon type="search" slot="addonAfter"/>
+                            </a-input>
+                            <div class="dingxiang" v-if="directLogic=='RETARGETING_INCLUDE'">
+
+                            </div>
+                            <div class="paichu" v-if="directLogic=='RETARGETING_EXCLUDE'">
+
+                            </div>
+                            <div class="dingxiang_paichu" v-if="directLogic=='ALL'">
+
+                            </div>
+                        </a-form-item>                                   
+                    </div>
                     <a-form-item label="行为兴趣" class="optItem" :label-col="labelCol" :wrapper-col="wrapperCol">
                         <a-radio-group v-model="interestActionMode" button-style="solid">
-                            <a-radio-button value="">不限</a-radio-button>
+                            <a-radio-button value="UNLIMITED">不限</a-radio-button>
                             <a-radio-button value="RECOMMEND">
                                 系统推荐
                                 <a-tooltip>
@@ -525,7 +541,7 @@
                         
                     </a-form-item>
                     <div class="interestActionMode" v-show="interestActionMode=='CUSTOM'">
-                            <a-form-item label="行为" class="optItem"  :label-col="labelCol" :wrapper-col="wrapperCol">
+                            <a-form-item label="行为" class="optItem"  :label-col="labelCol" :wrapper-col="wrapperCol">
                                 <div>
                                     <span style="margin-right:5px">在</span> 
                                     <a-select
@@ -670,12 +686,12 @@
                                     </div>
                                 </div>
                             </a-form-item>
-                            <a-form-item label="兴趣" class="optItem"  :label-col="labelCol" :wrapper-col="wrapperCol">
+                            <a-form-item label="兴趣" class="optItem"  :label-col="labelCol" :wrapper-col="wrapperCol">
 
                             </a-form-item>
                         </div>
                     <a-form-item label="平台" class="optItem" :label-col="labelCol" :wrapper-col="wrapperCol">
-                        <radioCheck :checkArr='platformArr' @getSonValue='getNewUser' />
+                        <radioCheck :checkArr='platformArr' @getSonValue='getPlatForm' />
                     </a-form-item>
                     <a-form-item label="过滤已安装" class="optItem" :label-col="labelCol" :wrapper-col="wrapperCol" v-if="landingTypeValue=='APP_ANDROID'">
                         <a-radio-group  button-style="solid" v-decorator="['hideIfExists', {initialValue:0 }]" >
@@ -698,7 +714,7 @@
                         </a-select>
                     </a-form-item>
                     <a-form-item label="过滤已转化用户" class="optItem" :label-col="labelCol" :wrapper-col="wrapperCol">
-                         <a-radio-group  v-decorator="['gender', {initialValue:'NO_EXCLUDE' }]"  button-style="solid">
+                         <a-radio-group  v-decorator="['filterConvertedUsers', {initialValue:'NO_EXCLUDE' }]"  button-style="solid">
                             <a-radio-button value="NO_EXCLUDE">不过滤</a-radio-button>
                             <a-radio-button value="AD">广告计划</a-radio-button>
                             <a-radio-button value="CAMPAIGN">广告组</a-radio-button>
@@ -708,10 +724,10 @@
                         </span>
                     </a-form-item>
                     <a-form-item label="运营商" class="optItem" :label-col="labelCol" :wrapper-col="wrapperCol">
-                       <radioCheck :checkArr='carrierArr' @getSonValue='getNewUser' />
+                       <radioCheck :checkArr='carrierArr' @getSonValue='getCarrier' />
                     </a-form-item>
                     <a-form-item label="网络" class="optItem" :label-col="labelCol" :wrapper-col="wrapperCol">
-                       <radioCheck :checkArr='networkArr' @getSonValue='getNewUser' />
+                       <radioCheck :checkArr='networkArr' @getSonValue='getAc' />
                     </a-form-item>
                     <a-form-item label="文章类型" class="optItem" :label-col="labelCol" :wrapper-col="wrapperCol">
                        <a-radio-group  button-style="solid" v-model="articleType">
@@ -1008,7 +1024,7 @@ export default {
             labelCol: { span: 4 },
             wrapperCol: { span: 14 },
             launchPrice:'',//手机价格
-            launchPriceArr:[],
+            launchPriceArr:[2000, 7000],
             deviceBrandType:'',
             deviceBrand:[],//手机品牌
             deviceBrandOptions:[],
@@ -1058,7 +1074,7 @@ export default {
             MapselectValue:undefined,//地图的搜索地址
 
             //行为兴趣选择
-            interestActionMode:'',
+            interestActionMode:'UNLIMITED',
             actionScene:[],//行为场景
 
             actionDays:30,//行为天数
@@ -1086,6 +1102,12 @@ export default {
             landingTypeValue:'',//定向包类型的值  用来判断平台的值
             androidOsvArr:[],//受众安卓版本号数组
             iosOsvArr:[],//受众ios版本号数组
+            platform:[],//受众平台-------------传递参数
+            activateType:[],//用户首次激活时间---------传递参数
+
+            customCrowd:'NONE',//自定义人群 选择的值
+            directLogic:'RETARGETING_INCLUDE',//定向逻辑的值
+            dxInputValue:undefined,//自定义人群包下面的搜索框(定向/排除)
         }
     },
     methods: {
@@ -1145,9 +1167,29 @@ export default {
             if(this.launchPrice=='custom'){
                 formData['launchPrice']=this.launchPriceArr
             }
+            if(!this.regionValue==''){
+                console.log('需要处理地域的值')
+            }
+            let userinfo=localStorage.getItem('pro__Login_Userinfo')
+            
+            if(userinfo){
+                let userId=JSON.parse(userinfo).value.id
+                formData['userId']=userId
+            }
+            formData['activateType']=this.activateType
             formData['deviceBrand']=this.deviceBrand
+            formData['autoExtendEnabled']=this.autoExtendEnabled
+            formData['autoExtendTargets']=this.autoExtendTargets
+            formData['articleCategory']=this.articleCategory
+            formData['age']=this.age
+            formData['carrier']=this.carrier
+            formData['ac']=this.ac
+            formData['interestActionMode']=this.interestActionMode
+            
 
-
+            postAction('/ctop/audiencePackage/add',formData).then((res)=>{
+                console.log(res)
+            })
             // formData['launchPrice']=this.
             // this.$router.push('/modules/BatchCreate/directionalPackage')
         },
@@ -1168,6 +1210,12 @@ export default {
         //获取新用户的选中值
         getNewUser(val){
             console.log(val);
+            if(val.length==1&&val[0]==""){
+                this.activateType=[]
+            }else{
+                this.activateType=val;
+            }
+            
         },
         //地域选择里的搜索
         regionOnSearch(value) {
@@ -1220,19 +1268,19 @@ export default {
         getAutoExtendEnabled(val){
             console.log(val)
             this.autoExtendTargets=[];
-            this.autoExtendTargets.push([...val])
+            this.autoExtendTargets.push(...val)
         },
         //获取手机品牌的值
         getDeviceBrand(val){
             console.log(val);
             this.deviceBrand=[];
-            this.deviceBrand.push([...val])
+            this.deviceBrand.push(...val)
         },
         //获取文章分类的值
         getArticleCategory(val){
             console.log(val)
             this.articleCategory=[];
-            this.articleCategory.push([...val])
+            this.articleCategory.push(...val)
         },
 
         //获取选中的年龄段
@@ -1256,13 +1304,29 @@ export default {
         },
 
         //获取受众网络
-        getAc(){
+        getAc(val){
             if(val.length==1&&val[0]==""){
                 this.ac=[]
             }else{
                 this.ac=val;
             }
         },
+
+        // 获取平台
+        getPlatForm(val){
+            console.log(val)
+            if(val.length==1&&val[0]==""){
+                this.platform=[]
+            }else{
+                this.platform=val;
+            }
+            
+        },
+
+        // 自定义人群下的 定向排除
+        directLogicChange(val){
+            this.dxInputValue=undefined
+        },
     },
     mounted() {
         //手机品牌

+ 40 - 0
src/views/modules/BatchCreate/newGroup.vue

@@ -0,0 +1,40 @@
+<template>
+    <div class="newGroup">
+        <div class="steps">
+            <a-steps direction="vertical" :current="0">
+                <a-step title="广告组" description="推广目的" />
+                <a-step title="广告计划"  description="所属广告组  投放范围  投放目标 用户定向 预算与出价 计划名称" />
+                <a-step title="广告创意" description="设置投放位置 制作创意 创意分类 监测链接" />
+            </a-steps>
+        </div>
+        
+        <div class="currentAccount">
+
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            
+        }
+    },
+    methods: {
+        
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.newGroup{
+    background: #FFF;
+    padding: 20px;
+    display: flex;
+    
+    .steps{
+        width: 8%;
+    }
+}
+</style>

+ 15 - 0
src/views/modules/BatchCreate/newPlan.vue

@@ -0,0 +1,15 @@
+<template>
+    <div>
+guanggaojihua
+    </div>
+</template>
+
+<script>
+    export default {
+        
+    }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 24 - 21
src/views/modules/BatchCreate/radioCheck.vue

@@ -52,31 +52,32 @@ export default {
     methods: {
         //单选多选的事件
         radioCheckChange(e,item){
-            console.log(e.target,item);
+            console.log(e.target,item,!item.disabled);
+            
             this.currentSelect=e.target.value;
             if(!item.disabled){
 
-            if(e.target.value=='' || this.selectValue.length==0 ){
-                this.selectValue=[''];
-            }else{
-                if(this.selectValue.indexOf('')>-1){
-                    let i=this.selectValue.indexOf('');
-                    this.selectValue.splice(0,1)
-                }
-                
-                if(this.selectValue.indexOf(e.target.value)==-1){
-                    this.selectValue.push(e.target.value)
+                if(e.target.value=='' || this.selectValue.length==0 ){
+                    this.selectValue=[''];
                 }else{
-                    this.selectValue=this.selectValue.filter((item)=>{
-                        return item!=e.target.value
-                    })  
-                }
+                    if(this.selectValue.indexOf('')>-1){
+                        let i=this.selectValue.indexOf('');
+                        this.selectValue.splice(0,1)
+                    }
+                    
+                    if(this.selectValue.indexOf(e.target.value)==-1){
+                        this.selectValue.push(e.target.value)
+                    }else if(this.selectValue.indexOf(e.target.value)>-1){
+                        this.selectValue=this.selectValue.filter((item)=>{
+                            return item!=e.target.value
+                        })  
+                    }
 
-                if(this.selectValue.length==0){
-                    this.selectValue=[''];
+                    if(this.selectValue.length==0){
+                        this.selectValue=[''];
+                    }
+                    
                 }
-                
-            }
             // console.log(this.currentSelect,this.selectValue);
             }
             this.$emit('getSonValue',this.selectValue)
@@ -84,9 +85,11 @@ export default {
     },
     mounted() {
         // this.selectValue=[]
+        // console.log(this.checkArr)
         this.checkArr.forEach((item,index)=>{
-            if(!item.disabled){
-                this.selectValue[0]=item
+            
+            if(item.disabled&&item.disabled!=undefined){
+                this.selectValue[0]=item.value
             }else{
                 this.selectValue=['']
             }