浏览代码

Merge branch 'test' of https://gitee.com/hcst/adsp-vue into test

zhuxinbo 5 年之前
父节点
当前提交
45076eacd6
共有 1 个文件被更改,包括 44 次插入1 次删除
  1. 44 1
      src/views/modules/bytedance/model/InternalModel.vue

+ 44 - 1
src/views/modules/bytedance/model/InternalModel.vue

@@ -11,6 +11,7 @@
             placeholder="选择头条账户"
             optionFilterProp="children"
             style="width: 200px"
+            @change="onChangeAccount"
           >
             <a-select-option v-for="user in userList" :key="user.accountId" :value="user.accountId">{{user.accountName}}</a-select-option>
           </a-select>
@@ -56,6 +57,33 @@
           <a-select-option v-for="userOrientation in userOrientationList" :key="userOrientation.id" :value="userOrientation.id">{{userOrientation.name}}</a-select-option>
         </a-select>
       </a-form-item>
+      <a-form-item
+        label="定向人群包"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol">
+      <a-select
+        mode="tags"
+        placeholder="请选择定向人群包"
+        style="width: 600px"
+        v-model="retargetingTagsInclude"
+      >
+          <a-select-option v-for="audience in audienceList" :key="audience.custom_audience_id.toString()" :value="audience.custom_audience_id.toString()">{{audience.name}}</a-select-option>
+      </a-select>
+      </a-form-item>
+      <a-form-item
+        label="排除人群包"
+        :labelCol="labelCol"
+        :wrapperCol="wrapperCol">
+        <a-select
+          mode="tags"
+          placeholder="选择需要排除的人群包"
+          style="width: 600px"
+          v-model="retargetingTagsExclude"
+        >
+          <a-select-option v-for="audience in audienceList" :key="audience.custom_audience_id.toString()" :value="audience.custom_audience_id.toString()">{{audience.name}}</a-select-option>
+        </a-select>
+      </a-form-item>
+
 
       <a-form-item
         label="投放目标"
@@ -316,6 +344,9 @@
     data() {
       return {
         webUrl:'',
+        retargetingTagsExclude:[],
+        retargetingTagsInclude:[],
+        audienceList:null,
         appName:'',
         creativeType:'customize',
         materialAddType:'customize',
@@ -334,6 +365,7 @@
           xs: {span: 24},
           sm: {span: 16},
         },
+        size: 'default',
         itratorNum:1,
         accountId:'',
         userList:[],
@@ -396,7 +428,8 @@
           insertUrl: 'test/create',
           convertList:'template/convert/list/url',
           userOrentationList:'ctop/byteDanceUserOrientationTemplate/list',
-          creativeTemplateList:'/ctop/bytedanceCreativeLaunchTemplate/list'
+          creativeTemplateList:'/ctop/bytedanceCreativeLaunchTemplate/list',
+          userAudienceList:'toutiao/advertiser/custom/audience/select'
         }
       }
     },
@@ -523,6 +556,14 @@
           this.refreshUrl('page');
         }
       },
+      onChangeAccount(){
+        let params = {};
+        getAction(this.url.userAudienceList+'?accountId='+this.accountId, params).then((res) => {
+          if (res.success) {
+            this.audienceList = res.data;
+          }
+        });
+      },
       onChangeDeliveryTarget(value) {
         console.log(value);
         if (this.deliveryTarget == '11') {
@@ -596,6 +637,8 @@
         params.convertId = this.convertId;
         params.simpleDeliverytarget = this.simpleDeliverytarget;
         params.convertType = this.convertType;
+        params.retargetingTagsExclude = this.retargetingTagsExclude;
+        params.retargetingTagsInclude = this.retargetingTagsInclude;
         if (this.time != [] && this.time.length == 2) {
           params.startDate = moment(this.time[0]).format('YYYY-MM-DD HH:mm')
           params.endDate = moment(this.time[1]).format('YYYY-MM-DD HH:mm')