Browse Source

middle 提交

jiayufei 4 năm trước cách đây
mục cha
commit
67c947cbfd

+ 1 - 1
src/views/modules/account-config/account-config-server.js

@@ -5,6 +5,6 @@
 
 // export const urlAcount = 'http://118.24.244.213:8080'; // 线上
 // export const urlAcount = 'http://apipre.tjyourong.com.cn'; // 预生产
-// export const urlAcount = 'http://192.168.1.43:8080'; // 子安
+// export const urlAcount = 'http://192.168.1.43:8808'; // 子安
 export const urlAcount = 'http://139.186.165.84:8808'; // 测试
 // export const urlAcount = 'http://192.168.1.8:8080'; // 学超

+ 4 - 0
src/views/modules/account-config/account-config.vue

@@ -296,6 +296,10 @@ export default {
                 {
                     id: 'CREATIVE_IMAGE_MODE_LARGE_VERTICAL',
                     value: '大图竖图'
+                },
+                {
+                    id: 'CREATIVE_IMAGE_MODE_UNION_SPLASH',
+                    value: '开屏'
                 }
             ],
             searchStatus: 0,

+ 100 - 7
src/views/modules/account-config/components/configuration-copy.vue

@@ -314,7 +314,7 @@
                                 </a-tooltip>
                             </a-radio-button>
                             <a-radio-button value="ORIGINAL_VIDEO">原生</a-radio-button>
-                            <a-radio-button value="SPLASH_VIDEO" disabled>开屏</a-radio-button>
+                            <a-radio-button value="SPLASH_VIDEO">开屏</a-radio-button>
                         </a-radio-group>
                     </a-form-model-item>
                 </div>
@@ -858,7 +858,7 @@
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-radio-button>
-                                <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL">小图</a-radio-button>
+                                <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL" disabled>小图</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
@@ -897,13 +897,66 @@
                             使用创意轮播,系统将平分各创意展现机会,便于广告主比较各创意投放效果
                         </div>
                     </div>
+                    <div v-else-if="configForm.adUnionVideoType === 'SPLASH_VIDEO'">
+                        <a-form-model-item label="创意内容">
+                            <a-radio-group v-model="configForm.creativeImageMode" button-style="solid">
+                                <a-radio-button value="CREATIVE_IMAGE_MODE_UNION_SPLASH">开屏图片</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                        <a-form-model-item label="行动号召" prop="creativeCallToAction">
+                            <a-select
+                                class="common-input-long"
+                                v-model="configForm.creativeCallToAction"
+                            >
+                                <a-select-option
+                                    v-for="(item, index) in configForm.creativeOptions"
+                                    :key="index + 1"
+                                    :value="item"
+                                >
+                                    {{ item }}
+                                </a-select-option>
+                            </a-select>
+                        </a-form-model-item>
+                        <a-form-model-item label="来源" prop="creativeSource">
+                            <a-input
+                                class="common-input-long"
+                                placeholder="请输入来源"
+                                v-model="configForm.creativeSource"
+                                allow-clear
+                            />
+                        </a-form-model-item>
+                        <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="自动生成视频素材">
+                            <a-radio-group v-model="configForm.creativeIsPresentedVideo" button-style="solid">
+                                <a-radio-button :value="0">不启用</a-radio-button>
+                                <a-radio-button :value="1">启用</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                        <a-form-model-item v-if="configForm.adDownloadType === 'DOWNLOAD_URL'" label="最优创意衍生计划">
+                            <a-radio-group v-model="configForm.creativeGenerateDerivedAd" button-style="solid">
+                                <a-radio-button :value="0">不启用</a-radio-button>
+                                <a-radio-button :value="1">启用</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                        <a-form-model-item v-if="isTomatoStatus" label="创意展现">
+                            <a-radio-group v-model="configForm.creativeDisplayMode" button-style="solid">
+                                <a-radio-button value="CREATIVE_DISPLAY_MODE_CTR">优选模式</a-radio-button>
+                                <a-radio-button value="CREATIVE_DISPLAY_MODE_RANDOM">轮播模式</a-radio-button>
+                            </a-radio-group>
+                        </a-form-model-item>
+                        <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_CTR'" class="adver-position-radio">
+                            选择优选模式,系统会自动对效果好的创意进行展示量倾斜,创意效果越好展示量越高
+                        </div>
+                        <div v-if="configForm.creativeDisplayMode === 'CREATIVE_DISPLAY_MODE_RANDOM'" class="adver-position-radio">
+                            使用创意轮播,系统将平分各创意展现机会,便于广告主比较各创意投放效果
+                        </div>
+                    </div>
                     <div v-else>
                         <a-form-model-item label="创意内容">
                             <a-radio-group v-model="configForm.creativeImageMode" button-style="solid">
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-radio-button>
-                                <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL">小图</a-radio-button>
+                                <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL" disabled>小图</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
@@ -1619,7 +1672,7 @@ export default {
                 adRetargetingTagsExclude: '',
                 adAutoExtendTargets: '',
                 adDeliveryRange: '',
-                creativeCallToAction: '', // 行动号召
+                creativeCallToAction: undefined, // 行动号召
                 creativeLabel: undefined // 倡议标签
             },
             isTomatoStatus: true,
@@ -1823,7 +1876,7 @@ export default {
                 this.handleGetCreativeClassification();
                 this.handleGetAdvertiserStrategy();
                 this.handleDirectionalList();
-                this.handleGetAdAudiencePackage();
+                // this.handleGetAdAudiencePackage();
             }
             else {
                 this.createOptions = [];
@@ -1844,11 +1897,13 @@ export default {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         moment,
         handleSelectValue(data) {
+            this.configForm.accountId = data.id;
             this.configForm.adConvertType = undefined;
             this.configForm.adConvertId = undefined;
             this.configForm.adAudiencePackageId = undefined;
             this.packageMessageDetail = [];
             this.handleClearlist();
+            this.handleGetAdAudiencePackage();
 
             if (this.configForm.customPerson === 'a' && this.configForm.adRetargetingTagsType === '1') {
                 this.$refs.direct.selectRightData = [];
@@ -1877,9 +1932,16 @@ export default {
         },
         handleAdUnionVideoType(e) {
             this.$refs['ruleForm'].clearValidate(['creativeSource']);
+            if (e.target.value === 'SPLASH_VIDEO') {
+                this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_UNION_SPLASH';
+            }
+            else {
+                this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
+            }
         },
         NewCheckboxChangeValue(newVal) {
             this.$refs['ruleForm'].clearValidate(['creativeSource']);
+            let selectiveListUpdate = [...this.selectiveList];
             if (newVal.length) {
                 if (newVal.includes('INVENTORY_AWEME_FEED')) {
                     this.isTAwemeStatus = true;
@@ -1892,15 +1954,27 @@ export default {
                     this.$nextTick(() => {
                         this.configForm.creativeEnablePersonalAction = true;
                     });
+                    this.configForm.adAudiencePackageId = undefined;
+                    this.packageMessageDetail = [];
+                    this.selectiveList = selectiveListUpdate.filter(item => item.delivery_range === 'UNION');
+                    // if (this.configForm.adDirectionalFlag === 'choice') {
+                    //    this.selectiveList = selectiveListUpdate.filter(item => item.delivery_range === 'UNION');
+                    // }
                 }
                 else {
                     this.configForm.adUnionVideoType = '';
                     this.configForm.creativeEnablePersonalAction = '';
+                    this.configForm.adAudiencePackageId = undefined;
+                    this.packageMessageDetail = [];
+                    this.handleGetAdAudiencePackage();
                 }
             }
             else {
                 this.isTAwemeStatus = true;
                 this.configForm.adUnionVideoType = '';
+                this.configForm.adAudiencePackageId = undefined;
+                this.packageMessageDetail = [];
+                this.handleGetAdAudiencePackage();
             }
         },
         handleGetChengZiSite() {
@@ -2130,7 +2204,12 @@ export default {
                                 }
                             });
                         });
-                        this.selectiveList = defaultList;
+                        if (this.configForm.checkboxChangeValue.length === 1 && this.configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
+                            this.selectiveList = defaultList.filter(item => item.delivery_range === 'UNION');
+                        }
+                        else {
+                            this.selectiveList = defaultList;
+                        }
                     }
                     else {
                         this.$message.error(result.message);
@@ -2323,6 +2402,9 @@ export default {
                 this.configForm.checkboxChangeValue = [];
                 this.isTAwemeStatus = true;
             }
+            this.configForm.adUnionVideoType = '';
+            this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
+            this.handleGetAdAudiencePackage();
         },
         handleAccountMode(e) {
             if (e.target.value === '1') {
@@ -2424,7 +2506,14 @@ export default {
                             getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', {accountId: detailData.accountId})
                                 .then(result => {
                                     if (result.code === 0) {
-                                        this.selectiveList = result.result || [];
+                                        let checkboxChangeValueList = detailData.creativeInventoryType.split(',');
+                                        if (checkboxChangeValueList.length === 1 && checkboxChangeValueList[0] === 'INVENTORY_UNION_SLOT') {
+                                            console.log(result.result, 'result.result--result.result');
+                                            this.selectiveList = result.result.filter(item => item.delivery_range === 'UNION');
+                                        }
+                                        else {
+                                            this.selectiveList = result.result || [];
+                                        }
                                         this.configForm.adAudiencePackageId = Number(detailData.adAudiencePackageId);
                                         this.handleSelectiveOrientation(Number(detailData.adAudiencePackageId));
                                     }
@@ -2988,6 +3077,10 @@ export default {
                 this.$message.error('请添加卖点');
                 return;
             }
+            // if (this.isTAwemeStatus && !paramsFormData.creativeCallToAction) {
+            //     this.$message.error('行动号召不能为空');
+            //     return;
+            // }
             if (!this.creativeTag.length) {
                 this.$message.error('请添加标签');
                 return;

+ 53 - 17
src/views/modules/account-config/components/configuration-modal.vue

@@ -19,6 +19,7 @@
                             :appId.sync="configForm.accountId"
                             :multiple="false"
                             request="1,3"
+                            @select-value="handleSelectValue"
                         >
                         </acount-search>
                     </a-form-model-item>
@@ -325,7 +326,7 @@
                                 </a-tooltip>
                             </a-radio-button>
                             <a-radio-button value="ORIGINAL_VIDEO">原生</a-radio-button>
-                            <a-radio-button value="SPLASH_VIDEO" disabled>开屏</a-radio-button>
+                            <a-radio-button value="SPLASH_VIDEO">开屏</a-radio-button>
                         </a-radio-group>
                     </a-form-model-item>
                 </div>
@@ -818,7 +819,7 @@
                                 v-model="configForm.creativeCallToAction"
                             >
                                 <a-select-option
-                                    v-for="(item, index) in configForm.creativeOptions"
+                                    v-for="(item, index) in creativeOptions"
                                     :key="index + 1"
                                     :value="item"
                                 >
@@ -871,7 +872,7 @@
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-radio-button>
-                                <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL">小图</a-radio-button>
+                                <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL" disabled>小图</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
@@ -881,7 +882,7 @@
                                 v-model="configForm.creativeCallToAction"
                             >
                                 <a-select-option
-                                    v-for="(item, index) in configForm.creativeOptions"
+                                    v-for="(item, index) in creativeOptions"
                                     :key="index + 1"
                                     :value="item"
                                 >
@@ -913,7 +914,7 @@
                     <div v-else-if="configForm.adUnionVideoType === 'SPLASH_VIDEO'">
                         <a-form-model-item label="创意内容">
                             <a-radio-group v-model="configForm.creativeImageMode" button-style="solid">
-                                <a-radio-button value="arr">开屏图片</a-radio-button>
+                                <a-radio-button value="CREATIVE_IMAGE_MODE_UNION_SPLASH">开屏图片</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
                         <a-form-model-item label="行动号召" prop="creativeCallToAction">
@@ -922,7 +923,7 @@
                                 v-model="configForm.creativeCallToAction"
                             >
                                 <a-select-option
-                                    v-for="(item, index) in configForm.creativeOptions"
+                                    v-for="(item, index) in creativeOptions"
                                     :key="index + 1"
                                     :value="item"
                                 >
@@ -969,7 +970,7 @@
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO_VERTICAL">竖版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_VIDEO">横版视频</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE">大图横图</a-radio-button>
-                                <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL">小图</a-radio-button>
+                                <a-radio-button value="CREATIVE_IMAGE_MODE_SMALL" disabled>小图</a-radio-button>
                                 <a-radio-button value="CREATIVE_IMAGE_MODE_LARGE_VERTICAL">大图竖图</a-radio-button>
                             </a-radio-group>
                         </a-form-model-item>
@@ -1040,7 +1041,7 @@
                                     v-model="configForm.creativeCallToAction"
                                 >
                                     <a-select-option
-                                        v-for="(item, index) in configForm.creativeOptions"
+                                        v-for="(item, index) in creativeOptions"
                                         :key="index + 1"
                                         :value="item"
                                     >
@@ -1518,6 +1519,7 @@ export default {
             },
             labelCol: {span: 4},
             wrapperCol: {span: 14},
+            creativeOptions: [],
             rules: {
                 creativeAppName: [
                     {required: true, message: '请输入', trigger: 'blur'},
@@ -1616,7 +1618,6 @@ export default {
                 adMinBid: '',
                 adMaxBid: '',
                 adBidCreateType: 'FIX',
-                creativeOptions: [],
                 advancedCreativeType: 'ATTACHED_CREATIVE_NONE',
                 adLocationType: '',
                 adCity: '',
@@ -1685,7 +1686,7 @@ export default {
                 adRetargetingTagsExclude: '',
                 adAutoExtendTargets: '',
                 adDeliveryRange: '',
-                creativeCallToAction: '', // 行动号召
+                creativeCallToAction: undefined, // 行动号召
                 creativeLabel: undefined // 倡议标签
             },
             isTomatoStatus: true,
@@ -1818,7 +1819,7 @@ export default {
                 this.configForm.creativeProductDescription = '';
                 this.configForm.defaultFormList = [];
                 this.configForm.creativeEnablePersonalAction = '';
-                this.configForm.creativeCallToAction = '';
+                this.configForm.creativeCallToAction = undefined;
             }
             else {
                 this.configForm.creativeEnablePersonalAction = true;
@@ -1889,7 +1890,7 @@ export default {
                 this.handleGetCreativeClassification();
                 this.handleGetAdvertiserStrategy();
                 this.handleDirectionalList();
-                this.handleGetAdAudiencePackage();
+                // this.handleGetAdAudiencePackage();
             }
             else {
                 this.createOptions = [];
@@ -1913,6 +1914,10 @@ export default {
     methods: {
         ...mapGetters(['nickname', 'avatar', 'userInfo']),
         moment,
+        handleSelectValue(data) {
+            this.configForm.accountId = data.id;
+            this.handleGetAdAudiencePackage();
+        },
         handleAdDistrict(e) {
             const defaultValue = e.target.value;
             if (defaultValue === 'NONE') {
@@ -1926,7 +1931,7 @@ export default {
         handleAdUnionVideoType(e) {
             this.$refs['ruleForm'].clearValidate(['creativeSource']);
             if (e.target.value === 'SPLASH_VIDEO') {
-                this.configForm.creativeImageMode = 'arr';
+                this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_UNION_SPLASH';
             }
             else {
                 this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
@@ -1934,6 +1939,7 @@ export default {
         },
         NewCheckboxChangeValue(newVal) {
             this.$refs['ruleForm'].clearValidate(['creativeSource']);
+            let selectiveListUpdate = [...this.selectiveList];
             if (newVal.length) {
                 if (newVal.includes('INVENTORY_AWEME_FEED')) {
                     this.isTAwemeStatus = true;
@@ -1946,15 +1952,27 @@ export default {
                     this.$nextTick(() => {
                         this.configForm.creativeEnablePersonalAction = true;
                     });
+                    this.configForm.adAudiencePackageId = undefined;
+                    this.packageMessageDetail = [];
+                    this.selectiveList = selectiveListUpdate.filter(item => item.delivery_range === 'UNION');
+                    // if (this.configForm.adDirectionalFlag === 'choice') {
+                    //    this.selectiveList = selectiveListUpdate.filter(item => item.delivery_range === 'UNION');
+                    // }
                 }
                 else {
                     this.configForm.adUnionVideoType = '';
                     this.configForm.creativeEnablePersonalAction = '';
+                    this.configForm.adAudiencePackageId = undefined;
+                    this.packageMessageDetail = [];
+                    this.handleGetAdAudiencePackage();
                 }
             }
             else {
                 this.isTAwemeStatus = true;
                 this.configForm.adUnionVideoType = '';
+                this.configForm.adAudiencePackageId = undefined;
+                this.packageMessageDetail = [];
+                this.handleGetAdAudiencePackage();
             }
         },
         handleGetChengZiSite() {
@@ -2184,7 +2202,12 @@ export default {
                                 }
                             });
                         });
-                        this.selectiveList = defaultList;
+                        if (this.configForm.checkboxChangeValue.length === 1 && this.configForm.checkboxChangeValue[0] === 'INVENTORY_UNION_SLOT') {
+                            this.selectiveList = defaultList.filter(item => item.delivery_range === 'UNION');
+                        }
+                        else {
+                            this.selectiveList = defaultList;
+                        }
                     }
                     else {
                         this.$message.error(result.message);
@@ -2244,7 +2267,7 @@ export default {
             getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdActionText', params)
                 .then(result => {
                     if (result.code === 0) {
-                        this.configForm.creativeOptions = result.result;
+                        this.creativeOptions = result.result;
                     }
                     else {
                         this.$message.error(result.message);
@@ -2377,6 +2400,9 @@ export default {
                 this.configForm.checkboxChangeValue = [];
                 this.isTAwemeStatus = true;
             }
+            this.configForm.adUnionVideoType = '';
+            this.configForm.creativeImageMode = 'CREATIVE_IMAGE_MODE_VIDEO_VERTICAL';
+            this.handleGetAdAudiencePackage();
         },
         handleAccountMode(e) {
             if (e.target.value === '1') {
@@ -2478,7 +2504,13 @@ export default {
                             getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdAudiencePackage', {accountId: detailData.accountId})
                                 .then(result => {
                                     if (result.code === 0) {
-                                        this.selectiveList = result.result || [];
+                                        let checkboxChangeValueList = detailData.creativeInventoryType.split(',');
+                                        if (checkboxChangeValueList.length === 1 && checkboxChangeValueList[0] === 'INVENTORY_UNION_SLOT') {
+                                            this.selectiveList = result.result.filter(item => item.delivery_range === 'UNION');
+                                        }
+                                        else {
+                                            this.selectiveList = result.result || [];
+                                        }
                                         this.configForm.adAudiencePackageId = Number(detailData.adAudiencePackageId);
                                         this.handleSelectiveOrientation(Number(detailData.adAudiencePackageId));
                                     }
@@ -2615,7 +2647,7 @@ export default {
                         getAction(urlAcount + '/bytedance-api/advertiser/aiBytedanceAdvertiserStrategy/getAdActionText', params)
                             .then(result => {
                                 if (result.code === 0) {
-                                    this.configForm.creativeOptions = result.result;
+                                    this.creativeOptions = result.result;
                                     this.configForm.creativeCallToAction = detailData.creativeCallToAction;
                                 }
                                 else {
@@ -3042,6 +3074,10 @@ export default {
                 this.$message.error('请添加卖点');
                 return;
             }
+            // if (this.isTAwemeStatus && !paramsFormData.creativeCallToAction) {
+            //     this.$message.error('行动号召不能为空');
+            //     return;
+            // }
             if (!this.creativeTag.length) {
                 this.$message.error('请添加标签');
                 return;

+ 0 - 3
src/views/modules/account-config/components/directional-logic/directional-logic.vue

@@ -256,7 +256,6 @@ export default {
         rowSelectionAllDirect() {
             return {
                 onChange: (selectedRowKeys, selectedRows) => {
-                    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
                     this.tableSelectDirectIds = selectedRows && selectedRows.map(item => item.key);
                     this.tableSelectDirectData = selectedRows;
                     this.$emit('selection-direct-event', this.tableSelectDirectIds);
@@ -274,7 +273,6 @@ export default {
         rowSelectionAllExclude() {
             return {
                 onChange: (selectedRowKeys, selectedRows) => {
-                    console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
                     this.tableSelectExcludeIds = selectedRows && selectedRows.map(item => item.key);
                     this.tableSelectExcludeData = selectedRows;
                     this.$emit('selection-exclude-event', this.tableSelectExcludeIds);
@@ -325,7 +323,6 @@ export default {
         }
     },
     mounted() {
-        console.log(this.clearstatus, 'clear---clear');
         this.tableDataAllDirect = this.defaultlist;
         this.updateTableAllDirect = this.defaultlist;
         this.tableDataAllExclude = this.defaultlist;