Browse Source

'改组件'

魏志佳 4 năm trước cách đây
mục cha
commit
a1487abea4

+ 39 - 29
src/views/modules/BatchCreate/TouTiaoBatch.vue

@@ -128,7 +128,7 @@
                 <a-table
                 :columns="columns"
                 :data-source="data"               
-                :rowSelection="rowSelection"
+                :rowSelection="{selectedRowKeys: selectedRowKeys,...rowSelection}"
                 bordered
                 :pagination="ipagination"
                 :loading="loading"
@@ -146,9 +146,9 @@
                     <span slot="campaignStatus" slot-scope="text,record">
                         <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
                     </span>
-                    <!-- <span slot="toutiaoStatus" slot-scope="text,record">
+                    <span slot="status" slot-scope="text,record">
                         <a-switch size="default" :checked=text  @change="switchChange(text,record)"/>
-                    </span> -->
+                    </span>
                     <!-- <span slot="options" slot-scope="record">
                         <a href="javascript:;" style="margin-right:10px">编辑</a>
                         <a href="javascript:;" v-if="tabkey=='plan'" @click="copyPlan(record)">复制</a>
@@ -366,8 +366,8 @@ const planColumns = [
   },
   {
     title: '账户',
-    dataIndex: 'accountId',
-    key: 'accountId',
+    dataIndex: 'accountId_dictText',
+    key: 'accountId_dictText',
     align: 'center',
   },
   {
@@ -403,10 +403,10 @@ const planColumns = [
   },
   {
     title: '所属广告组',
-    dataIndex: 'campaignId',
-    key: 'campaignId',
+    dataIndex: 'campaignId_dictText',
+    key: 'campaignId_dictText',
     align: 'center',
-    scopedSlots: { customRender: 'campaignId' }
+    scopedSlots: { customRender: 'campaignId_dictText' }
   },
 ];
 const ideaColumns = [
@@ -512,23 +512,7 @@ export default {
             columns,
             selectedRowKeys:[],
             selectedRows:[],
-            rowSelection:{
-                onChange: (selectedRowKeys, selectedRows) => {
-                    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
-                    this.selectedRowKeys=selectedRowKeys;
-                    this.selectedRows=selectedRows;
-                },
-                onSelect: (record, selected, selectedRows) => {
-                    console.log(record, selected, selectedRows);
-                    this.modifyTableData=selectedRows;
-                    this.selectedRows=selectedRows;
-                },
-                onSelectAll: (selected, selectedRows, changeRows) => {
-                    console.log(selected, selectedRows, changeRows);
-                    this.modifyTableData=selectedRows
-                    this.selectedRows=selectedRows;
-                },
-            },
+           
             editID:0,
             //批量修改里的表格
             typeValue,
@@ -556,7 +540,29 @@ export default {
             xiugaiData:[],//存分别修改时候的数组
         }
     },
+    computed: {
+        rowSelection(){
+            return {
+                onChange: (selectedRowKeys, selectedRows) => {
+                    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
+                    this.selectedRowKeys=selectedRowKeys;
+                    this.selectedRows=selectedRows;
+                },
+                onSelect: (record, selected, selectedRows) => {
+                    console.log(record, selected, selectedRows);
+                    this.modifyTableData=selectedRows;
+                    
+                    this.selectedRows=selectedRows;
+                },
+                onSelectAll: (selected, selectedRows, changeRows) => {
+                    console.log(selected, selectedRows, changeRows);
+                    this.modifyTableData=selectedRows
+                    this.selectedRows=selectedRows;
+                },
+            }
 
+        },
+    },
     methods: {
         // table里的函数
         
@@ -642,7 +648,7 @@ export default {
                     this.getplanList({
                         accountId:this.accountID,
                         name:this.optionId,
-                        status:this.statusValue,
+                        toutiaoStatus:this.statusValue,
                         startDate:this.dateString[0],
                         endDate:this.dateString[1],
                         pageNo:this.ipagination.current
@@ -705,15 +711,17 @@ export default {
                    }
                })
            }else if(this.tabkey=='plan'){
+               
                 if(text){
-                    recordData.toutiaoStatus='AD_STATUS_DISABLE'
+                    recordData.toutiaoStatus='AD_STATUS_DISABLE';                  
                 }else{
                     recordData.toutiaoStatus='AD_STATUS_DELIVERY_OK'
                 }
+                // console.log(recordData)
                 postAction('/ctop/byteDanceAdvertisePlan/edit',recordData).then((res)=>{
                     console.log(res);
                     if(res.success){
-                        record.status=!text;
+                        record.status=!text;                   
                     }
                 })
            }
@@ -799,6 +807,7 @@ export default {
                                 item.toutiaoStatus='AD_STATUS_DELIVERY_OK'
                             })
                         }
+                        this.batchEditHttp(this.selectedRows)
                     }else if(this.tabkey=='idea'){
 
                     }    
@@ -807,7 +816,7 @@ export default {
               
                 
             }
-            // this.selectedRows=[];
+            this.selectedRows=[];
         },
         //确定删除
         confirm(e) {
@@ -1095,6 +1104,7 @@ export default {
                     
                     this.data = res.result.records;
                     console.log(this.data)
+                    this.selectedRowKeys=[];
                 }
             })
         },

+ 20 - 14
src/views/modules/BatchCreate/components/material.vue

@@ -2,32 +2,32 @@
   <div class="input-item material-creat">
     <a-form-item>
       <a-radio-group v-model="materialType" @change="materialTypeChange" style="margin-bottom: 32px;">
-        <a-badge :count="HorizontalLargeImageListBig.length" :numberStyle="{backgroundColor: '#52c41a'} ">
+        <!-- <a-badge :count="HorizontalLargeImageListBig.length" :numberStyle="{backgroundColor: '#52c41a'} ">
           <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-radio-button>
-        </a-badge>
+        </a-badge> -->
         <a-badge :count="HorizontalLargeImageListShu.length" :numberStyle="{backgroundColor: '#52c41a'} ">
           <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
         </a-badge>
         <a-badge :count="HorizontalLargeImageListHeng.length" :numberStyle="{backgroundColor: '#52c41a'} ">
           <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
         </a-badge>
-        <a-badge :count="HorizontalLargeImageListZu.length" :numberStyle="{backgroundColor: '#52c41a'} "
+        <!-- <a-badge :count="HorizontalLargeImageListZu.length" :numberStyle="{backgroundColor: '#52c41a'} "
           v-if="creativeType=='customCreativity'">
           <a-radio-button value="CREATIVE_IMAGE_MODE_GROUP">组图</a-radio-button>
-        </a-badge>
-        <a-badge :count="HorizontalLargeImageListSmall.length" :numberStyle="{backgroundColor: '#52c41a'} ">
+        </a-badge> -->
+        <!-- <a-badge :count="HorizontalLargeImageListSmall.length" :numberStyle="{backgroundColor: '#52c41a'} ">
           <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL">小图</a-radio-button>
-        </a-badge>
-        <a-badge :count="HorizontalLargeImageListBigShu.length" :numberStyle="{backgroundColor: '#52c41a'} ">
+        </a-badge> -->
+        <!-- <a-badge :count="HorizontalLargeImageListBigShu.length" :numberStyle="{backgroundColor: '#52c41a'} ">
           <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-radio-button>
-        </a-badge>
+        </a-badge> -->
       </a-radio-group>
       <div class="bui-tabs-scroll">
         <a-layout
           :style="{ height: '600px',width:'700px',border:'1px solid #ccc',overflow:'auto',padding:'0 15px 10px'}">
           <a-layout-content style="padding:10px;">
             <div :style="{ marginBottom: '16px' }">
-              <a-button @click="addCreative()" :disabled="count">添加创意</a-button>
+              <a-button @click="addCreative()" :disabled="count&&materialType!=undefined">添加创意</a-button>
               <span style="color:black;margin-left:10px"
                 v-if="creativeType == 'customCreativity'">{{countMany}}/10</span>
               <span style="color:black;margin-left:10px" v-else-if="creativeType == 'program'">视频数量:{{vadioMany}}/12
@@ -50,15 +50,20 @@
                          -->
                       <a
                         @click="getVideoList(item)">{{materialType=='CREATIVE_IMAGE_MODE_VIDEO'||materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'?'选择视频':'选择图片'}}</a>
+                      <div>
+                        <!-- {{materialType}} -->
+                        <video :src="item.videoUrl" style="width:300px" v-show="materialType=='CREATIVE_IMAGE_MODE_VIDEO'&&item.videoUrl"></video>
+                        <video :src="item.videoUrl" style="width:120px"  v-show="materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'&&item.videoUrl"></video>
+                      </div>
                     </a-form-item>
 
-                    <a-form-item label="封面上传" :labelCol="labelCol" :wrapperCol="wrapperCol"
+                    <!-- <a-form-item label="封面上传" :labelCol="labelCol" :wrapperCol="wrapperCol"
                       v-if="(materialType=='CREATIVE_IMAGE_MODE_VIDEO_VERTICAL'||materialType=='CREATIVE_IMAGE_MODE_VIDEO')">
-                      <!-- <upload-to-ali v-model="item.imageUrl" :customDomain="customDomain" preview :region="region"
+                      <upload-to-ali v-model="item.imageUrl" :customDomain="customDomain" preview :region="region"
                         :bucket="bucket" :accept="acceptImage" :size="102400" :accessKeyId="accessKeyId"
-                        :accessKeySecret="accessKeySecret"></upload-to-ali> -->
+                        :accessKeySecret="accessKeySecret"></upload-to-ali>
                       <a @click="getImageList(item)">选择图片</a>
-                    </a-form-item>
+                    </a-form-item> -->
 
                     <a-form-item label="创意标题" :labelCol="labelCol" :wrapperCol="wrapperCol"
                       v-if="creativeType == 'customCreativity'">
@@ -251,6 +256,7 @@
             span: 16
           }
         },
+        visibleMatemalImage:false,
         accessKeyId: 'LTAIbNbqWzSOklQV',
         accessKeySecret: '1rkPz7JNoXk8sJevPaeYHWqfkQXBGh',
         bucket: 'ctop-media',
@@ -270,7 +276,7 @@
           deliverytargetTemplateGetUrl: '/template/deliveryTarget/get',
           convertList: 'template/convert/list'
         },
-        materialType: 'CREATIVE_IMAGE_MODE_LARGE',
+        materialType: 'CREATIVE_IMAGE_MODE_VIDEO',
         // 创建大图横图创意
         createLargeImageCreativeCon: true,
         HorizontalLargeImageList: [],

+ 41 - 27
src/views/modules/BatchCreate/newCreate.vue

@@ -3,9 +3,11 @@
     <a-form :form="form">
       <div class="moduler">
         <div class="moduler-title">计划名称</div>
-        <div>
-          广告计划名称:oCPM_07_31_11:02(1673699774773292)
-          <!-- <strong>{{groupInfo.campaignName||groupInfo.name}}</strong> -->
+        <div class="adName">
+          <span>广告计划名称:</span> 
+          <div class="nameList">
+            <strong v-for="item in planInfo" :key="item.id" class="item">{{item.name+'('+item.id+')'}}</strong>
+          </div>
         </div>
       </div>
 
@@ -282,7 +284,7 @@
             </div>
             <div class="input-item">
               <a-form-item>
-                <a-input v-decorator="['trackUrl', {rules:validationRules.url}]" />
+                <a-input v-decorator="['trackUrl']" />
               </a-form-item>
             </div>
           </div>
@@ -294,7 +296,7 @@
             </div>
             <div class="input-item">
               <a-form-item>
-                <a-input v-decorator="['actionTrackUrl', {rules:validationRules.url}]" />
+                <a-input v-decorator="['actionTrackUrl']" />
               </a-form-item>
             </div>
           </div>
@@ -306,7 +308,7 @@
             </div>
             <div class="input-item">
               <a-form-item>
-                <a-input v-decorator="['videoPlayTrackUrl', {rules:validationRules.url}]" />
+                <a-input v-decorator="['videoPlayTrackUrl']" />
               </a-form-item>
             </div>
           </div>
@@ -318,7 +320,7 @@
             </div>
             <div class="input-item">
               <a-form-item>
-                <a-input v-decorator="['videoPlayDoneTrackUrl', {rules:validationRules.url}]" />
+                <a-input v-decorator="['videoPlayDoneTrackUrl']" />
               </a-form-item>
             </div>
           </div>
@@ -330,7 +332,7 @@
             </div>
             <div class="input-item">
               <a-form-item>
-                <a-input v-decorator="['videoPlayEffectiveTrackUrl', {rules:validationRules.url}]" />
+                <a-input v-decorator="['videoPlayEffectiveTrackUrl']" />
               </a-form-item>
             </div>
           </div>
@@ -583,22 +585,22 @@
                 //   params.titles = this.titleData
                 params.titles = this.$refs.material.titleData
               }
-              //   postAction('/bytedance/batch/create/creative', {
-              //     accountId: '1649600126891015',
-              //     adIds: ["1673732908509245"],
-              //     ...values,
-              //     creatives: dataCreatives
-              //   }).then((res) => {
-              //     console.log(res)
-              //     if (res.success) {
-              //       if (res.code == 0) {} else {
-              //         this.$message.error(res.message)
-              //       }
-
-              //     } else {
-              //       this.$message.error('网络开小差了,等会再试试')
-              //     }
-              //   })
+                postAction('/bytedance/batch/create/creative', {
+                  accountId: '1649600126891015',
+                  adIds: ["1673732908509245"],
+                  ...values,
+                  creatives: dataCreatives
+                }).then((res) => {
+                  console.log(res)
+                  if (res.success) {
+                    if (res.code == 0) {} else {
+                      this.$message.error(res.message)
+                    }
+
+                  } else {
+                    this.$message.error('网络开小差了,等会再试试')
+                  }
+                })
             } else {
               console.log(err)
             }
@@ -617,18 +619,18 @@
 
       this.$bus.$emit('remove', '/modules/BatchCreate/newPlan')
       let planInfo = localStorage.getItem('planInfo')
-      // console.log(planInfo)
+     
       if (planInfo) {
         this.planInfo = JSON.parse(planInfo)
       }
       console.log(this.planInfo)
       let groupInfo = localStorage.getItem('groupInfo')
-      // console.log(groupInfo)
+   
       if (groupInfo) {
         this.groupInfo = JSON.parse(groupInfo)
       }
       let accountInfo = localStorage.getItem('accountInfo')
-      // console.log(groupInfo)
+ 
       if (accountInfo) {
         this.accountInfo = JSON.parse(accountInfo)
       }
@@ -822,5 +824,17 @@
     .opt {
       text-align: right;
     }
+    .adName{
+      display: flex;
+      .nameList{
+        width: 90%;
+      }
+      .item{
+        display: inline-block;
+        width: 30%;
+        margin-left: 15px;
+        margin-bottom: 10px;
+      }
+    }
   }
 </style>

+ 213 - 12
src/views/modules/BatchCreate/newDirectedPackage.vue

@@ -121,6 +121,9 @@
                 }
 
             }
+            .zidingyirenqun{
+                width: 60%;
+            }
         }
         .rightBox{
             position: fixed;
@@ -495,7 +498,7 @@
                         </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" v-if="accountInfo.value!=undefined">
                         <a-radio-group  v-model="customCrowd" button-style="solid">
                             <a-radio-button value="NONE">不限</a-radio-button>
                             <a-radio-button value="CUSTOMt_CROWED">自定义人群</a-radio-button>                           
@@ -508,17 +511,78 @@
                             <a-radio-button value="ALL">同时定向排除</a-radio-button>                           
                         </a-radio-group>
                         <div class="zidingyirenqun" v-if="customCrowd=='CUSTOMt_CROWED'">                                                  
-                                <a-input placeholder="请输入人群包名称或者ID" v-model="dxInputValue" v-if="directLogic!='ALL'" style="width:50%">
+                                <!-- <a-input placeholder="请输入人群包名称或者ID" v-model="dxInputValue" v-if="directLogic!='ALL'" style="width:50%;margin:15px 0">
                                     <a-icon type="search" slot="addonAfter"/>
-                                </a-input>
+                                </a-input> -->
                                 <div class="dingxiang" v-if="directLogic=='RETARGETING_INCLUDE'">
-
+                                    <a-table
+                                        :columns="retargetColumns"
+                                        :row-key="record => record.key"
+                                        :data-source="retargetData"                                       
+                                        :loading="loading"
+                                        style="width:60%;margin:15px 0"
+                                        :pagination='false'
+                                        @change="retargetTableChange"
+                                        bordered
+                                        :scroll="{ y: 250 }"
+                                        :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+                                    >
+                                        <template slot="name" slot-scope="name,records"> {{ name }}({{records.key}}) </template>
+                                    </a-table>
                                 </div>
                                 <div class="paichu" v-if="directLogic=='RETARGETING_EXCLUDE'">
-
+                                    <a-table
+                                        :columns="retargetColumns"
+                                        :row-key="record => record.key"
+                                        :data-source="retargetData"                                        
+                                        :loading="loading"
+                                        style="width:60%;margin:15px 0"
+                                       :pagination='false'
+                                        @change="retargetTableChange"
+                                        :scroll="{ y: 250 }"
+                                        :row-selection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
+                                        bordered
+                                    >
+                                        <template slot="name" slot-scope="name,records"> {{ name }}({{records.key}}) </template>
+                                    </a-table>
                                 </div>
-                                <div class="dingxiang_paichu" v-if="directLogic=='ALL'">
-
+                                <div class="dingxiang_paichu" v-if="directLogic=='ALL'" style="width:60%">
+                                    <a-tabs default-active-key="1" @change="retargetTabChange" >
+                                        <a-tab-pane key="1" tab="定向池">
+                                            <a-table
+                                                :columns="retargetColumns"
+                                                :row-key="record => record.key"
+                                                :data-source="retargetDataAll"                                        
+                                                :loading="loading"
+                                                style="width:100%;margin:15px 0"
+                                                :pagination='false'
+                                                @change="retargetTableChange"
+                                                :scroll="{ y: 250 }"
+                                                :row-selection="rowSelection"
+                                                bordered
+                                            >
+                                                <template slot="name" slot-scope="name,records"> {{ name }}({{records.key}}) </template>
+                                            </a-table>
+                                        </a-tab-pane>
+                                        <a-tab-pane key="2" tab="排除池" >
+                                            <a-table
+                                                :columns="retargetColumns"
+                                                :row-key="record => record.key"
+                                                :data-source="retargetDataAll"                                        
+                                                :loading="loading"
+                                                style="width:100%;margin:15px 0"
+                                                :pagination='false'
+                                                @change="retargetTableChange"
+                                                :scroll="{ y: 250 }"
+                                                :row-selection="rowSelection2"
+                                                bordered
+                                            >
+                                                <template slot="name" slot-scope="name,records"> {{ name }}({{records.key}}) </template>
+                                            </a-table>
+                                        </a-tab-pane>
+                                       
+                                    </a-tabs>
+                                    
                                 </div>                                                        
                         </div>
                     </a-form-item>
@@ -1009,6 +1073,26 @@ let autoExtendOptions=[
     },
 ]
 
+let retargetColumns=[
+    {
+        title: '人群包',
+        dataIndex: 'name',
+        sorter: true,
+        width: '80%',
+        scopedSlots: { customRender: 'name' },
+    },
+    {
+        title: '属性',
+        dataIndex: 'tag',
+        filters: [
+            { text: '自定义', value: 'male' },
+            { text: '系统推荐', value: 'female' },
+            { text: '第三方', value: 'femal' },
+        ],
+        width: '20%',
+    },
+    
+]
 export default {
     props:{
         isNewPlan:{
@@ -1153,6 +1237,17 @@ export default {
     },
     data() {
         return {
+            selectedRowKeys:[],
+            incluedSelectedRowKeys:[],
+            excludeSelectedRowKeys:[],
+
+            accountInfo:{},//账户信息
+            // 自定义人群参数
+            retargetColumns,
+            retargetData:[],
+            retargetDataAll:[],
+            loading:false,
+
             showDirectedPackage:true,
             title:'新建定向包',
             labelCol: { span: 6 },
@@ -1256,11 +1351,91 @@ export default {
 
         }
     },
+    computed: {
+        hasSelected() {
+            return this.selectedRowKeys.length > 0;
+        },
+        rowSelection() {
+            return {
+                // selectedRowKeys: this.incluedSelectedRowKeys,
+                onChange: (selectedRowKeys, selectedRows) => {
+                    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
+                    this.incluedSelectedRowKeys = selectedRowKeys;
+                    
+                },
+                getCheckboxProps: record => ({
+                    props: {
+                        disabled: this.excludeSelectedRowKeys.indexOf(record.key)>-1,  // Column configuration not to be checked
+                        name: record.name,
+                    },
+                }),
+            };
+        },
+        rowSelection2() {
+            return {
+                // selectedRowKeys: this.excludeSelectedRowKeys,
+                onChange: (selectedRowKeys, selectedRows) => {
+                    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
+                    // this.selectedRowKeys = selectedRowKeys;
+                    this.excludeSelectedRowKeys = selectedRowKeys;
+                },
+                getCheckboxProps: record => ({
+                    props: {
+                        disabled: this.incluedSelectedRowKeys.indexOf(record.key)>-1, // Column configuration not to be checked
+                        name: record.name,
+                    },
+                }),
+            };
+        },
+    },
     methods: {
         //获取表单的某一个属性值
         getFormData(className) {
             return this.form.getFieldValue(className)
         },
+        // 自定义人群的--同时定向排除tab切换事件
+        retargetTabChange(tabkey){
+            console.log(tabkey)
+            this.retargetDataAll=[];
+            this.loading=true;
+            if(this.accountInfo.value){
+                getAction('/ctop/audience/list',{
+                    accountId:this.accountInfo.value
+                }).then((res)=>{
+                    console.log(res)
+                    this.loading=false;
+                    if(res.success){
+                        res.data.forEach((item)=>{
+                            item.key=item.custom_audience_id                           
+                        })
+                        // this.retargetData=res.data;
+                        this.retargetDataAll=res.data;
+                        
+                    }
+                })
+            }
+            // if(tabkey==1){
+               
+            // }
+            // }else{
+                
+            // }
+        },
+        onSelectChange(selectedRowKeys) {
+            console.log('selectedRowKeys changed: ', selectedRowKeys);
+            this.selectedRowKeys = selectedRowKeys;
+        },
+        // 自定义人群的改变
+        retargetTableChange(pagination, filters, sorter){
+            console.log(pagination);
+        },
+          // 自定义人群下的 定向排除
+        directLogicChange(val){
+            this.dxInputValue=undefined;
+            this.selectedRowKeys = [];
+        },
+        
+        // 只能放量改变
         zhinengChange(e){
             console.log(e.target.value,this.getFormData('autoExtendEnabled'));
             // this.form.setFieldsValue({
@@ -1462,10 +1637,7 @@ export default {
             // console.log(this.platform)
         },
 
-        // 自定义人群下的 定向排除
-        directLogicChange(val){
-            this.dxInputValue=undefined
-        },
+      
         tijiaozhi(){
             this.getValuehandle();
             this.showDirectedPackage=!this.showDirectedPackage;
@@ -1477,8 +1649,16 @@ export default {
             if(this.launchPrice=='custom'){
                 formData['launchPrice']=this.launchPriceArr
             }
+            if(this.directLogic=='RETARGETING_INCLUDE'){
+                formData['retargetingTags']=this.selectedRowKeys;
+            }else if(this.directLogic=='RETARGETING_EXCLUDE'){
+                formData['retargetingTagsExclude']=this.selectedRowKeys;
+            }else if(this.directLogic=='ALL'){
+                formData['retargetingTags']=this.incluedSelectedRowKeys;
+                formData['retargetingTagsExclude']=this.excludeSelectedRowKeys;
+            }
             if(!this.regionValue!='NONE'){
-                console.log('需要处理地域的值');
+                // console.log('需要处理地域的值');
                 formData['city']=this.city
             }
             let userinfo=localStorage.getItem('pro__Login_Userinfo')
@@ -1612,6 +1792,27 @@ export default {
                 })
             }
         })
+        let accountInfo = localStorage.getItem('accountInfo')
+        console.log(accountInfo)
+        if (accountInfo!=null) {
+            this.accountInfo = JSON.parse(accountInfo)
+            if(this.accountInfo.value){
+                getAction('/ctop/audience/list',{
+                    accountId:this.accountInfo.value
+                }).then((res)=>{
+                console.log(res)
+                if(res.success){
+                        res.data.forEach((item)=>{
+                            item.key=item.custom_audience_id                           
+                        })
+                        this.retargetData=res.data;
+                        this.retargetDataAll=res.data;
+                        
+                    }
+                })
+            }
+        }
+        console.log(this.accountInfo)
 
         this.platformArr=JSON.parse(JSON.stringify(platformArr))
         // this.platformArr = [...platformArr]

+ 2 - 1
src/views/modules/BatchCreate/newGroup.vue

@@ -148,7 +148,8 @@ export default {
             this.treeData.forEach((item)=>{
                 item.children.forEach(ele=>{
                     if(ele.value==val){
-                        localStorage.setItem('accountInfo',ele)
+                        let accountInfo=JSON.stringify(ele)
+                        localStorage.setItem('accountInfo',accountInfo)
                     }
                 })
             })

+ 8 - 1
src/views/modules/BatchCreate/newPlan.vue

@@ -765,6 +765,7 @@ export default {
   data() {
     return {
       groupInfo: {},
+      accountInfo:{},
       form: this.$form.createForm(this),
       dateRange: [moment(), moment()],
       scheduleTime: '',
@@ -1120,7 +1121,7 @@ export default {
                     let planInfo=JSON.stringify(res.result)
                     localStorage.setItem('planInfo',planInfo);
                     setTimeout(()=>{
-                      // this.$router.replace(`/modules/BatchCreate/newCreate`)
+                      this.$router.replace(`/modules/BatchCreate/newCreate`)
                     },2000)
                   }else{
                     this.$message.error(res.message)
@@ -1212,6 +1213,12 @@ export default {
     if (groupInfo) {
       this.groupInfo = JSON.parse(groupInfo)
     }
+    let accountInfo = localStorage.getItem('accountInfo')
+      // console.log(groupInfo)
+    if (accountInfo) {
+      this.accountInfo = JSON.parse(accountInfo)
+    }
+    console.log(this.accountInfo)
     console.log(this.form.getFieldsValue())
 
     if (this.groupInfo.landingType == 'LINK') {

+ 45 - 23
src/views/modules/Statistics/effectReport.vue

@@ -2,16 +2,20 @@
   <div class="effectPage">
     <div class="moduler">
       <a-select mode="multiple"
-      style="width: 35%;margin-right:30px"
+      style="width: 460px;margin-right:30px"
+      v-model="projectValue"
       placeholder="请选择具体项目"
+      :filter-option="filterOption"
+      option-filter-prop="children"
+      :maxTagCount=4
       @change="projectChange">
-        <a-select-option v-for="i in 25" :key="(i + 9).toString(36) + i">
-          {{ (i + 9).toString(36) + i }}
+        <a-select-option v-for="item in projectData" :key="item.projectId">
+          {{ item.projectName }}
         </a-select-option>
       </a-select>     
       <a-range-picker v-model="dateRange" @change="dateChange" style="width:200px" />      
       <div class="opt">
-        <a-button type='primary'>查询</a-button>
+        <a-button type='primary' @click="search">查询</a-button>
       </div>
     </div>
     <div class="moduler">
@@ -413,6 +417,7 @@ const ideaColumns = [
     mixins:[JeecgListMixin],
     data() {
       return {
+        projectValue:[],
         dateRange:[moment().subtract(1,'days'),moment()],
         projectData:[],
         tableData:[],
@@ -423,7 +428,13 @@ const ideaColumns = [
       }
     },
     methods: {
-       //table的改变(页码改变请求数据,也可以写排序)
+      // 过滤事件
+      filterOption(input, option) {
+        return (
+          option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+        );
+      },
+        //table的改变(页码改变请求数据,也可以写排序)
       tableChange(pagination, filters, sorter, { currentDataSource }){
           // this.searchHandle();
       },
@@ -443,26 +454,20 @@ const ideaColumns = [
         }
       },
       // x项目的table值
-      getTableProjectList(){   
+      getTableProjectList(paramse){   
         this.loading=true;     
         this.tabKey=1;
         this.loading=true; 
         this.columns= [...projectColumns,...publicColumns]  
-        postAction('/kuaishou/getKuaishouProjectInfo',{
-          startDate:this.dateRange[0].format('YYYY-MM-DD'),
-          endDate:this.dateRange[1].format('YYYY-MM-DD'),
-          projectList:[],
-          pageNum:'0',
-          pageSize:'10'
-        }).then(res=>{
+        postAction('/kuaishou/getKuaishouProjectInfo',paramse).then(res=>{
           console.log(res);
           if(res.success){
               this.loading=false;
-              res.result.forEach((item,index)=>{
+              res.result.list.forEach((item,index)=>{
                 item.key=index
               })
-              this.tableData=res.result;
-              // this.ipagination.total=res.result.total
+              this.tableData=res.result.list;
+              this.ipagination.total=res.result.total
           }
          
         })
@@ -471,7 +476,7 @@ const ideaColumns = [
       goAccount(records){
         console.log(records);
         this.currentid=records.projectId
-       this.getTableProjectList()
+        this.getTableAccountList()
 
       },
       getTableAccountList(){
@@ -482,15 +487,25 @@ const ideaColumns = [
             startDate:this.dateRange[0].format('YYYY-MM-DD'),
             endDate:this.dateRange[1].format('YYYY-MM-DD'),
             projectId:this.currentid,
-            pageNum:'0',
+            pageNum:this.ipagination.current,
             pageSize:'10'
           }).then(res=>{
               console.log(res)
               if(res.success){
-                this.loading=false;     
+                this.loading=false;    
+                // this.tableData= 
               }
           })
-      }
+      },
+      search(){
+          this.getTableProjectList({
+            startDate:this.dateRange[0].format('YYYY-MM-DD'),
+            endDate:this.dateRange[1].format('YYYY-MM-DD'),
+            projectList:this.projectValue,
+            pageNum:this.ipagination.current,
+            pageSize:'10'
+          })
+      },
     },
     mounted() {
       // /ctop/projectMember/participateList
@@ -504,13 +519,20 @@ const ideaColumns = [
       //             return item.mediaId == arr[1]
       //           })
       //         }
-        getAction('/ctop/projectMember/getOwnProjects',{
+        postAction('/ctop/projectMember/getOwnProjects',{
           mediaIds:[2,4],         
         }).then(res=>{
-          console.log(res)
+          console.log(res);
+          this.projectData=res.result
         });
         console.log(this.dateRange)
-        this.getTableProjectList();
+        this.getTableProjectList({
+          startDate:this.dateRange[0].format('YYYY-MM-DD'),
+          endDate:this.dateRange[1].format('YYYY-MM-DD'),
+          projectList:[],
+          pageNum:'0',
+          pageSize:'10'
+        });
     },
     filters: {
       toPercentage(val) {

+ 1 - 2
src/views/modules/Statistics/mediaReport.vue

@@ -381,8 +381,7 @@ export default {
         },
         //table的改变(页码改变请求数据,也可以写排序)
         tableChange(pagination, filters, sorter, { currentDataSource }){
-         
-            
+   
             this.searchHandle();
         },
         //table的网络请求

+ 2 - 1
vue.config.js

@@ -60,7 +60,8 @@ module.exports = {
         target: 'http://192.168.1.72:8088', //请求本地 需要jeecg-boot后台项目  英豪
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.1.94:8804', //请求本地 需要jeecg-boot后台项目  孙震
-        target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
+        // target: 'http://192.168.0.230:8088', //请求本地 需要jeecg-boot后台项目  孙震
+        // target: 'http://192.168.1.51:8088', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://192.168.1.165:8848', //请求本地 需要jeecg-boot后台项目  毕洁泉
         // target: 'http://api.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目 
         // target: 'https://trac.tjyourong.com.cn', //请求本地 需要jeecg-boot后台项目