Explorar el Código

'改报表分析'

魏志佳 hace 4 años
padre
commit
8ef8fe9824

+ 160 - 13
src/views/modules/Statistics/newPlanStatic/newPlanStatic.vue

@@ -222,7 +222,19 @@
               </a-select-option>
             </a-select> 
             <a-button type='primary' style="position:absolute;right:20px" @click="search">查询</a-button>
-        </div>
+          </div>
+          <!-- <div style="margin-bottom:20px">
+              <span>数据维度:</span>
+                <a-radio-group v-model="value" @change="dataTypeChange">
+                    <a-radio :value="1">
+                        广告计划
+                    </a-radio>
+                    <a-radio :value="2">
+                        广告组
+                    </a-radio>
+                    
+                </a-radio-group>
+          </div> -->
           <div class="time"  @click="opendate" >
             <datePick  :dateValue.sync='dateValue'   :type.sync='type'   />
             
@@ -236,7 +248,9 @@
       <div class="showNumBox">
           <a-col :sm="24" :md="10" :xl="10" :xxl="10">
             <span class="title">
-              新上{{tabKey==1?'计划数':'推广组'}}
+              
+              <template v-if="tabKey==1 || tabKey==2&&value==1 ">新上计划数</template>
+               <template v-else-if="tabKey==2&&value==2">新上推广组</template>
             </span>
             <div>
               <countTo
@@ -254,7 +268,10 @@
           </a-col>
           
           <a-col :sm="24" :md="10" :xl="10" :xxl="10">
-            <span class="title">有效{{tabKey==1?'计划数':'推广组'}}</span>
+            <span class="title">
+               <template v-if="tabKey==1 || tabKey==2&&value==1 ">有效计划数</template>
+               <template v-else-if="tabKey==2&&value==2">有效推广组</template>
+            </span>
            <div>
               <countTo
                 :startVal="0"
@@ -283,9 +300,9 @@
       <a-col :span="24">
         <div class="tableBody">
           <a-tabs v-model="tableTab" @change="tableTabChange">
-            <a-tab-pane :key="1" :tab="tabKey==1?'新上计划数':'新上推广组'">        
+            <a-tab-pane :key="1" :tab="(tabKey==1||tabKey==2&&value==1)?'新上计划数':'新上推广组'">        
             </a-tab-pane>
-            <a-tab-pane :key="2" :tab="tabKey==1?'有效计划数':'有效推广组'">       
+            <a-tab-pane :key="2" :tab="(tabKey==1||tabKey==2&&value==1)?'有效计划数':'有效推广组'">       
             </a-tab-pane>
           </a-tabs>
           <a-table :columns="columns" :dataSource="dataTable" :pagination="false" :loading="loading" bordered>             
@@ -514,7 +531,106 @@ let KScolumnsVaild=[
   },
 ]
 
-
+let KScolumnsPlan=[
+  // {
+  //   title: '项目名称',
+  //   dataIndex: 'projectName',
+  //   scopedSlots: { customRender: 'projectName' },
+  //   align: 'center',
+  //   key:'projectName'
+    
+  // },
+  {
+    title: '账户名称',
+    dataIndex: 'authName',
+    scopedSlots: { customRender: 'authName' },
+    align: 'center',
+    key:'authName'
+    
+  },
+  {
+    title: '账户ID',
+    dataIndex: 'accountId',
+    scopedSlots: { customRender: 'accountId' },
+    align: 'center',
+    key:'accountId'
+    
+  },
+  {
+    title: '账户所属人',
+    dataIndex: 'userName',
+    scopedSlots: { customRender: 'userName' },
+    align: 'center',
+    key:'userName'
+    
+  },
+  {
+    title: '新上计划数',
+    dataIndex: 'new',
+    scopedSlots: { customRender: 'new' },
+    align: 'center',
+    key:'new'
+    
+  },
+  {
+    title: '最近上新',
+    dataIndex: 'maxCreateTime',
+    scopedSlots: { customRender: 'maxCreateTime' },
+    align: 'center',
+    key:'maxCreateTime'
+    
+  },
+]
+let KScolumnsPlanVaild=[
+  // {
+  //   title: '项目名称',
+  //   dataIndex: 'projectName',
+  //   scopedSlots: { customRender: 'projectName' },
+  //   align: 'center',
+  //   key:'projectName'
+    
+  // },
+  {
+    title: '账户名称',
+    dataIndex: 'authName',
+    scopedSlots: { customRender: 'authName' },
+    align: 'center',
+    key:'authName'
+    
+  },
+  {
+    title: '账户ID',
+    dataIndex: 'accountId',
+    scopedSlots: { customRender: 'accountId' },
+    align: 'center',
+    key:'accountId'
+    
+  },
+  {
+    title: '账户所属人',
+    dataIndex: 'userName',
+    scopedSlots: { customRender: 'userName' },
+    align: 'center',
+    key:'userName'
+    
+  },
+  {
+    title: '有效计划数',
+    dataIndex: 'valid',
+    scopedSlots: { customRender: 'valid' },
+    align: 'center',
+    key:'valid'
+    
+  },
+  {
+    title: '最近上新',
+    dataIndex: 'maxCreateTime',
+    scopedSlots: { customRender: 'maxCreateTime' },
+    align: 'center',
+    key:'maxCreateTime'
+    
+  },
+]
 
 
 let sectionOption={
@@ -633,6 +749,7 @@ export default {
 
   data: function() {
     return {
+      value:2,
       KSaccountList:[],
       TTaccountList:[],
 
@@ -677,6 +794,21 @@ export default {
     }
   },
   methods: {
+    dataTypeChange(e){
+      console.log(e.target.value)
+        if(this.value==2){
+          this.operateList=this.KSoperateList
+          this.treeData=this.KSaccountList;
+          this.columns=this.tableTab==1?[...KScolumns]:[...KScolumnsVaild];
+          this.sectionOption.legend.data=['新上推广组','有效推广组']
+        }else{
+          this.operateList=this.KSoperateList
+          this.treeData=this.KSaccountList;
+          this.columns=this.tableTab==1?[...KScolumnsPlan]:[...KScolumnsPlanVaild];
+          this.sectionOption.legend.data=['新上计划数','有效计划数']
+        }
+        this.getNewPlan()
+    },
       //项目改变后的事件
     treeChange(val) {
       // console.log(this.treeData)
@@ -803,10 +935,18 @@ export default {
         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=['新上推广组','有效推广组']
+        if(this.value==2){
+          this.operateList=this.KSoperateList
+          this.treeData=this.KSaccountList;
+          this.columns=this.tableTab==1?[...KScolumns]:[...KScolumnsVaild]
+          this.sectionOption.legend.data=['新上推广组','有效推广组']
+        }else{
+          this.operateList=this.KSoperateList
+          this.treeData=this.KSaccountList;
+          this.columns=this.tableTab==1?[...KScolumnsPlan]:[...KScolumnsPlanVaild]
+          this.sectionOption.legend.data=['新上计划数','有效计划数']
+        }
+        
       }
       this.getNewPlan()
     },
@@ -1053,9 +1193,16 @@ export default {
         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='有效推广组'
+        if(this.value==2){
+          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,{

+ 280 - 117
src/views/modules/autoLaunch/autoLaunchReport.vue

@@ -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
+            }
         },
 
         

+ 63 - 22
src/views/modules/autoLaunch/setDirectional.vue

@@ -389,8 +389,8 @@
                         </div>
                         <div class="input-item">
                             <a-form-item>
-                                <a-radio-group v-decorator="['bidType', { initialValue:2 }]" @change="bidTypeChange">
-                                    <a-radio-button :value="2">封面点击数</a-radio-button>
+                                <a-radio-group v-decorator="['bidType', { initialValue:10 }]" @change="bidTypeChange">
+                                    <!-- <a-radio-button :value="2">封面点击数</a-radio-button> -->
                                     <a-radio-button :value="10">转化数</a-radio-button>
                                 </a-radio-group>
                             
@@ -500,7 +500,7 @@
                         </div>    
                     </div>
                     
-                    <div class="row-item" v-if="getFormData('bidType')==10">
+                    <div class="row-item" v-if="getFormData('bidType')==10&&strategyInfo.scenes=='2'">
                         <div class="hint-item">
                         </div>
                         <div class="label-item">
@@ -516,7 +516,7 @@
                                     v-decorator="['cpaBid', {rules:validationRules.bid} ]"
                                 />
                                 <span style="margin-left:5px">元</span>
-                                <!-- <span    style="margin-left:20px">请填入必填字段,获取建议出价</span> -->
+                              
                             </a-form-item>
                                 <span
                                 class="tip"
@@ -524,36 +524,61 @@
                                 >请输入点击出价,不少于0.1元,不超过10000元</span>
                         </div>    
                     </div>
-                    <div class="row-item" v-if="(getFormData('ocpxActionType') == 180 || getFormData('ocpxActionType') == 53) &&groupTypeData.deepConversionTypes.length > 0 ">
+                    <div class="row-item" v-if="getFormData('bidType')==10&&strategyInfo.scenes=='1'">
                         <div class="hint-item">
                         </div>
                         <div class="label-item">
-                            <div class="text-item">深度转化目标出价</div>
+                            <div class="text-item">转化目标出价范围</div>
                             <div class="required-item"></div>
                         </div>
                         <div class="input-item">
                             <a-form-item>
                                 <a-input-number
-                                    style="width:200px"
+                                    style="width:150px"
                                     :max="10000"
                                     :step="0.1"
-                                    v-decorator="['deepConversionBid', {rules:validationRules.bid} ]"
+                                    v-decorator="['cpaBidMin', {rules:validationRules.bid} ]"
+                                />
+                                <span style="margin-left:5px">元</span>
+                                <span style="margin:0 15px;"> — </span>
+                                <a-input-number
+                                    style="width:150px"
+                                    :max="10000"
+                                    :step="0.1"
+                                    v-decorator="['cpaBidMax', {rules:validationRules.bid} ]"
                                 />
                                 <span style="margin-left:5px">元</span>
-                                <!-- <span    style="margin-left:20px">请填入必填字段,获取建议出价</span> -->
                             </a-form-item>
-                                <span
-                                class="tip"
-                                v-if="getFormData('deepConversionBid')<0.1"
-                                >请输入点击出价,不少于0.1元,不超过10000元</span>
+                               
                         </div>    
                     </div>
-                    
-                    <!-- <div class="row-item" >
+                    <div class="row-item" v-if="getFormData('bidType')==10&&strategyInfo.scenes=='1'">
                         <div class="hint-item">
                         </div>
                         <div class="label-item">
-                            <div class="text-item">出价范围</div>
+                            <div class="text-item">出价分解步长</div>
+                            <div class="required-item"></div>
+                        </div>
+                        <div class="input-item">
+                            <a-form-item>
+                                <a-input-number
+                                    style="width:150px"
+                                    :max="getFormData('cpaBidMax')"
+                                    :step="0.1"
+                                    :min='0.1'
+                                    v-decorator="['stepSize', {rules:validationRules.bid} ]"
+                                />
+                                <span style="margin-left:5px">元</span>
+                               
+                            </a-form-item>
+                               
+                        </div>    
+                    </div>
+                    <div class="row-item" v-if="(getFormData('ocpxActionType') == 180 || getFormData('ocpxActionType') == 53) &&groupTypeData.deepConversionTypes.length > 0 ">
+                        <div class="hint-item">
+                        </div>
+                        <div class="label-item">
+                            <div class="text-item">深度转化目标出价</div>
                             <div class="required-item"></div>
                         </div>
                         <div class="input-item">
@@ -562,17 +587,19 @@
                                     style="width:200px"
                                     :max="10000"
                                     :step="0.1"
-                                    v-decorator="['bid', {rules:validationRules.bid} ]"
+                                    v-decorator="['deepConversionBid', {rules:validationRules.bid} ]"
                                 />
                                 <span style="margin-left:5px">元</span>
-                                <span    style="margin-left:20px">请填入必填字段,获取建议出价</span>
+                                <!-- <span    style="margin-left:20px">请填入必填字段,获取建议出价</span> -->
                             </a-form-item>
-                                <span
+                                <!-- <span
                                 class="tip"
-                                v-if="getFormData('bid')<0.1"
-                                >请输入点击出价,不少于0.1元,不超过10000元</span>
+                                v-if="getFormData('deepConversionBid')<0.1"
+                                >请输入点击出价,不少于0.1元,不超过10000元</span> -->
                         </div>    
-                    </div> -->
+                    </div>
+                    
+                    
   
             </div>
         </div>
@@ -1437,6 +1464,15 @@ export default {
                     if(values.bid){
                         values.bid=parseInt(values.bid*1000)
                     }
+                    if(values.cpaBidMin){
+                        values.cpaBidMin=parseInt(values.cpaBidMin*1000)
+                    }
+                    if(values.cpaBidMax){
+                        values.cpaBidMax=parseInt(values.cpaBidMax*1000)
+                    }
+                    if(values.stepSize){
+                        values.stepSize=parseInt(values.stepSize*1000)
+                    }
                     if(values.creativeCategory&&values.creativeCategory.length>0){
                         values.creativeCategory=values.creativeCategory[values.creativeCategory.length-1]
                     }else{
@@ -1460,6 +1496,11 @@ export default {
                             this.$router.replace('/autoLaunch/autoLaunchList')
                             this.$bus.$emit('remove', '/autoLaunch/newStrategy')
                             
+                        }else{
+                            this.$messgae.error(res.message)
+                            this.$parent.strategyInfo={}
+                            this.$router.replace('/autoLaunch/autoLaunchList')
+                            this.$bus.$emit('remove', '/autoLaunch/newStrategy')
                         }
                     })
 

+ 2 - 2
vue.config.js

@@ -70,10 +70,10 @@ module.exports = {
       '/jeecg-boot': {
         //  target: 'http://192.168.1.8:8080', //请求本地 需要jeecg-boot后台项目  蒙蒙
         // target: 'http://192.168.0.59:8088', //请求本地 需要jeecg-boot后台项目  英豪
-        target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
+        // target: 'http://192.168.1.188:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.43:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
-        // target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        target: 'http://192.168.1.43:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.43:8888', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.0.252:8098', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.219:8080', //请求本地 需要jeecg-boot后台项目  赵西安