|
@@ -141,7 +141,7 @@
|
141
|
141
|
@change="radioChange" :fillBack="props.dataFillBack['conversion_tracking_scene']"></MyRadio>
|
142
|
142
|
</template>
|
143
|
143
|
<!-- 优化目标 -->
|
144
|
|
- <MySelect v-if="form.bid_mode == 'BID_MODE_OCPM' || form.bid_mode == 'BID_MODE_OCPC'" :list="optimizationGoal_1"
|
|
144
|
+ <MySelect v-if="form.bid_mode == 'BID_MODE_OCPM' || form.bid_mode == 'BID_MODE_OCPC'" :GoalType="1" :isMoreTarget="true" :list="optimizationGoal_1"
|
145
|
145
|
title="优化目标" placeholder="请选择优化目标" :fillBack="props.dataFillBack['optimization_goal']"
|
146
|
146
|
@change="(val) => { onChangeKey({ val, key: 'optimization_goal' }) }">
|
147
|
147
|
</MySelect>
|
|
@@ -150,7 +150,8 @@
|
150
|
150
|
:info="scheduleBidInfo.forward_link_assist_enabled"
|
151
|
151
|
:fillBack="props.dataFillBack['forward_link_assist_enabled']" @change="radioChange">
|
152
|
152
|
<template v-slot:content_item v-if="form.forward_link_assist_enabled == '1'">
|
153
|
|
- <MySelect class="block marT15" :list="optimizationGoal_1" title="" placeholder="请选择助攻行为"
|
|
153
|
+ <div style="height: 15px;width:1px;"></div>
|
|
154
|
+ <MySelect class="block marT15" :list="moreOptimizationGoalList" title="" placeholder="请选择助攻行为"
|
154
|
155
|
:fillBack="props.dataFillBack['forward_link_assist']"
|
155
|
156
|
@change="(val) => { onChangeKey({ val, key: 'forward_link_assist' }) }"></MySelect>
|
156
|
157
|
</template>
|
|
@@ -210,7 +211,7 @@
|
210
|
211
|
:info="scheduleBidInfo.deep_optimize_type" @change="radioChange">
|
211
|
212
|
<template v-slot:default v-if="form.deep_optimize_type != 0">
|
212
|
213
|
<MyRadio :info="scheduleBidInfo.deep_conversion_type" :fillBack="props.dataFillBack['deep_conversion_type']" @change="radioChange"></MyRadio>
|
213
|
|
- <MySelect class="marT15" :list="optimizationGoal_2" title="深度优化目标" placeholder="请选择深度优化目标" :fillBack="deep_conversion_behavior_spec.target"
|
|
214
|
+ <MySelect class="marT15" :GoalType="form.deep_conversion_type == 'DEEP_CONVERSION_BEHAVIOR' ? 2 : 3" :isMoreTarget="true" :list="optimizationGoal_2" title="深度优化目标" placeholder="请选择深度优化目标" :fillBack="deep_conversion_behavior_spec.target"
|
214
|
215
|
@change="(val) => { deep_conversion_behavior_spec.target = val; }">
|
215
|
216
|
</MySelect>
|
216
|
217
|
<!-- 优化转化行为 -->
|
|
@@ -303,11 +304,11 @@
|
303
|
304
|
</template>
|
304
|
305
|
<script setup lang="ts">
|
305
|
306
|
import { ref, reactive, watch, onBeforeMount, computed, nextTick } from 'vue'
|
306
|
|
-import { basicInfoJson, scheduleBid, conversion_tracking_way, optimizationGoal_1, optimizationGoal_2 } from './ts/information'
|
|
307
|
+import { basicInfoJson, scheduleBid, conversion_tracking_way } from './ts/information'
|
307
|
308
|
import { specificPositionAll, expand_targeting, unbreakable_targeting } from './ts/other'
|
308
|
309
|
import { scene, wechatScene, positionMapping, search_expand_targeting_switch } from './ts/scene'
|
309
|
310
|
import { FillBackData } from './ts/fillBack'
|
310
|
|
-import { adPresetsSet } from './ts/basicApi'
|
|
311
|
+import { adPresetsSet,getOptimizationGoal, moreOptimizationGoal } from './ts/basicApi'
|
311
|
312
|
import { getDay, deepCopy } from "@/common/common";
|
312
|
313
|
import MyRadio from './components/radio.vue'
|
313
|
314
|
import AdPosition from './components/adPosition.vue'
|
|
@@ -321,6 +322,7 @@ import wildcard from './components/wildcard.vue'
|
321
|
322
|
import WeekTime from './components/weekTime.vue'
|
322
|
323
|
import { ElMessage } from "element-plus";
|
323
|
324
|
import _ from 'lodash'
|
|
325
|
+
|
324
|
326
|
const props = defineProps({
|
325
|
327
|
visible: {
|
326
|
328
|
type: Boolean,
|
|
@@ -329,6 +331,10 @@ const props = defineProps({
|
329
|
331
|
dataFillBack: {
|
330
|
332
|
type: Object,
|
331
|
333
|
default: () => { }
|
|
334
|
+ },
|
|
335
|
+ promoted_object_type: {
|
|
336
|
+ type: String,
|
|
337
|
+ default: ''
|
332
|
338
|
}
|
333
|
339
|
})
|
334
|
340
|
const emit = defineEmits<{
|
|
@@ -343,6 +349,9 @@ const site_ids_arr_1: any = ref([])
|
343
|
349
|
const site_ids_arr_2: any = ref([])
|
344
|
350
|
const scheduleBidInfo = reactive(scheduleBid)
|
345
|
351
|
const specificPositionInfo2 = specificPositionAll()
|
|
352
|
+const optimizationGoal_1 = ref<any[]>([])
|
|
353
|
+const optimizationGoal_2 = ref<any[]>([])
|
|
354
|
+const moreOptimizationGoalList = ref<any[]>([])
|
346
|
355
|
const defaultAdPositionList = ['SITE_SET_KANDIAN', 'SITE_SET_QQ_MUSIC_GAME', 'SITE_SET_TENCENT_NEWS', 'SITE_SET_TENCENT_VIDEO', 'SITE_SET_MOBILE_UNION']
|
347
|
356
|
let adPositionList: any = ref([]);// 广告版位默认列表
|
348
|
357
|
const deep_conversion_behavior_spec: any = reactive({ // 深度目标优化 - 优化转化行为
|
|
@@ -408,7 +417,9 @@ const computed_deep_conversion_behavior_spec_fillBack2 = () => {
|
408
|
417
|
const form: any = reactive(props.dataFillBack || {})
|
409
|
418
|
const basicInfoJsonInfo: any = reactive(basicInfoJson)
|
410
|
419
|
onBeforeMount(() => {
|
411
|
|
-
|
|
420
|
+ moreOptimizationGoal({type: 1}).then((res:any)=>{//助攻行为
|
|
421
|
+ moreOptimizationGoalList.value = res
|
|
422
|
+ })
|
412
|
423
|
})
|
413
|
424
|
/**提交保存 */
|
414
|
425
|
const submitEvent = () => {
|
|
@@ -461,7 +472,10 @@ const submitEvent = () => {
|
461
|
472
|
if (flag) return
|
462
|
473
|
|
463
|
474
|
FillBackData({
|
464
|
|
- data: form, type: 'me', 'updateScene': basicInfoJsonInfo['场景'], cb: (data: { params: any, copywriting: [] }) => {
|
|
475
|
+ data: form,
|
|
476
|
+ type: 'me',
|
|
477
|
+ updateScene: basicInfoJsonInfo['场景'],
|
|
478
|
+ cb: (data: { params: any, copywriting: [] }) => {
|
465
|
479
|
if (adSet.value) {
|
466
|
480
|
loading.value = true;
|
467
|
481
|
// let setParams = _.cloneDeep(data.params)
|
|
@@ -487,6 +501,20 @@ const handleClose = () => {
|
487
|
501
|
/**特定版位回调 */
|
488
|
502
|
const onChangeAdPosition = (val: string) => {
|
489
|
503
|
form['site_ids'] = val;
|
|
504
|
+ getOptimizationGoal({
|
|
505
|
+ site_set: val.split(','),
|
|
506
|
+ promoted_object_type: props.promoted_object_type
|
|
507
|
+ }).then((res:any)=>{
|
|
508
|
+ res.forEach((item)=>{
|
|
509
|
+ item.label = item.name;
|
|
510
|
+ item.value = item.goal;
|
|
511
|
+ })
|
|
512
|
+ optimizationGoal_1.value = res.filter((v)=>{return v.name && v.name != '' && v.goal && v.goal != ''});
|
|
513
|
+ console.log('optimizationGoal_1',optimizationGoal_1.value)
|
|
514
|
+ }).catch((res)=>{
|
|
515
|
+ optimizationGoal_1.value = [];
|
|
516
|
+ optimizationGoal_2.value = [];
|
|
517
|
+ })
|
490
|
518
|
watchSiteIds()// 版位变化
|
491
|
519
|
}
|
492
|
520
|
const change_site_table = () => {
|
|
@@ -567,6 +595,9 @@ const radioChange = (obj: object) => {
|
567
|
595
|
if(keys_arr.includes('bid_way')){//优化目标出价方式变化
|
568
|
596
|
watch_deep_conversion()
|
569
|
597
|
}
|
|
598
|
+ if(keys_arr.includes('deep_conversion_type')){//深度转化类型
|
|
599
|
+ changeOptimizationGoal()
|
|
600
|
+ }
|
570
|
601
|
}
|
571
|
602
|
}
|
572
|
603
|
|
|
@@ -633,10 +664,35 @@ const onChangeKey = ({ val, key }) => {
|
633
|
664
|
}else if(key == 'bid_amount'){
|
634
|
665
|
form[key] = val;
|
635
|
666
|
computed_deep_conversion_behavior_spec_fillBack2()
|
|
667
|
+ }else if(key == 'optimization_goal'){// 优化目标
|
|
668
|
+ form[key] = val;
|
|
669
|
+ form['optimization_goal_name'] = optimizationGoal_1.value.filter((v: any) => { return v.value == val })[0]?.label
|
|
670
|
+ changeOptimizationGoal()
|
636
|
671
|
}else{
|
637
|
672
|
form[key] = val;
|
638
|
673
|
}
|
639
|
674
|
}
|
|
675
|
+/**优化目标 及 深度转化类型 变化 ==> 导致 深度优化目标 发生变化 */
|
|
676
|
+const changeOptimizationGoal = () => {
|
|
677
|
+ optimizationGoal_1.value.forEach((item)=>{
|
|
678
|
+ if(item.goal == form.optimization_goal){
|
|
679
|
+ let deep_info:any[] = []
|
|
680
|
+ if(form.deep_conversion_type == 'DEEP_CONVERSION_BEHAVIOR'){//优化转化行为
|
|
681
|
+ deep_info = _.cloneDeep(item.deep_behaviors) || []
|
|
682
|
+ }else if (form.deep_conversion_type == 'DEEP_CONVERSION_WORTH') {//优化ROI
|
|
683
|
+ deep_info = _.cloneDeep(item.deep_worths) || []
|
|
684
|
+ }
|
|
685
|
+ deep_info = deep_info.filter((v)=>{
|
|
686
|
+ return v.name && v.name != '' && v.goal && v.goal != ''
|
|
687
|
+ })
|
|
688
|
+ deep_info.forEach((v)=>{
|
|
689
|
+ v.label = v.name;
|
|
690
|
+ v.value = v.goal;
|
|
691
|
+ })
|
|
692
|
+ optimizationGoal_2.value = deep_info
|
|
693
|
+ }
|
|
694
|
+ })
|
|
695
|
+}
|
640
|
696
|
const onChangeWechat = (flag) => {
|
641
|
697
|
if (flag) {
|
642
|
698
|
adPositionList.value = ['SITE_SET_MOMENTS', 'SITE_SET_WECHAT', 'SITE_SET_WECHAT_PLUGIN'].concat(defaultAdPositionList)
|
|
@@ -701,29 +757,6 @@ const watch_deep_conversion = (type?) => {
|
701
|
757
|
});
|
702
|
758
|
}
|
703
|
759
|
}
|
704
|
|
-/**自动扩量监听 */
|
705
|
|
-// watch([
|
706
|
|
-// () => form.expand_enabled
|
707
|
|
-// ], (newValue, oldValue) => {
|
708
|
|
-// let obj = basicInfoJsonInfo['定向扩展']['smart_targeting_switch']
|
709
|
|
-// if (newValue[0] == '1') {
|
710
|
|
-// obj.data.list[1].disabled = true;
|
711
|
|
-// } else {
|
712
|
|
-// obj.data.list[1].disabled = false;
|
713
|
|
-// }
|
714
|
|
-// }, { immediate: true})
|
715
|
|
-
|
716
|
|
-/**智能定向监听 */
|
717
|
|
-// watch([
|
718
|
|
-// () => form.smart_targeting_switch
|
719
|
|
-// ], (newValue, oldValue) => {
|
720
|
|
-// let obj = basicInfoJsonInfo['定向扩展']['expand_enabled']
|
721
|
|
-// if (newValue[0] == '1') {
|
722
|
|
-// obj.data.list[1].disabled = true;
|
723
|
|
-// } else {
|
724
|
|
-// obj.data.list[1].disabled = false;
|
725
|
|
-// }
|
726
|
|
-// }, { immediate: true})
|
727
|
760
|
/**监听出价 - 更改 -》 分版位出价 */
|
728
|
761
|
watch([
|
729
|
762
|
() => form.bid_way,
|
|
@@ -822,65 +855,8 @@ watch(
|
822
|
855
|
checkedWechat.value = props.dataFillBack.bid_site_wechat_enabled == '1' ? true : false; // 支持微信朋友圈&微信公众号与小程序版位
|
823
|
856
|
watch_deep_conversion()
|
824
|
857
|
}, { immediate: true})
|
825
|
|
-/**监听数据回显 */
|
826
|
|
-// watch(
|
827
|
|
-// () => props.dataFillBack,
|
828
|
|
-// (newValue, oldValue) => {
|
829
|
|
-// if (!newValue.id) return;
|
830
|
|
-// form.daily_budget_radio = newValue?.daily_budget ? '2' : '1';
|
831
|
|
-// for(let i in newValue){
|
832
|
|
-// form[i] = newValue[i]
|
833
|
|
-// }
|
834
|
|
-// form.bid_scene_radio = newValue?.bid_scene == 'BID_SCENE_NORMAL_AVERAGE' || newValue?.bid_scene == 'BID_SCENE_NORMAL_TARGET' ? '' : newValue?.bid_scene;
|
835
|
|
-// if(form.bid_way == '2'){
|
836
|
|
-// let arr = form.bid_range?.split('-') || [];
|
837
|
|
-// form.bid_range_1 = {
|
838
|
|
-// con: form.bid_range,
|
839
|
|
-// min: arr.length > 0 ? arr[0] : '',
|
840
|
|
-// max: arr.length > 1 ? arr[1] : '',
|
841
|
|
-// }
|
842
|
|
-// }
|
843
|
|
-// watchSiteIds()
|
844
|
|
-// if (form.bid_site == '1') { // 分版位出价
|
845
|
|
-// if (newValue.bid_site_details){
|
846
|
|
-// let bid_site_details = JSON.parse(newValue.bid_site_details)
|
847
|
|
-// site_ids_arr_1.value.forEach((item) => {
|
848
|
|
-// item.coefficient = bid_site_details[item.value] || 1;
|
849
|
|
-// item.offer = getOffer(bid_site_details[item.value], 'site')
|
850
|
|
-// });
|
851
|
|
-// }
|
852
|
|
-// }
|
853
|
|
-// if (newValue.deep_conversion_behavior_spec || newValue.deep_conversion_worth_spec) {
|
854
|
|
-// let deep_spec = JSON.parse(newValue.deep_conversion_behavior_spec)
|
855
|
|
-// if(newValue.deep_conversion_type == 'DEEP_CONVERSION_WORTH') { // 优化ROI
|
856
|
|
-// deep_spec = JSON.parse(newValue.deep_conversion_worth_spec)
|
857
|
|
-// }
|
858
|
|
-// deep_conversion_behavior_spec.target = deep_spec.target;
|
859
|
|
-// deep_conversion_behavior_spec.rate = deep_spec.rate || '';
|
860
|
|
-// deep_conversion_behavior_spec.price = newValue.deep_conversion_type == 'DEEP_CONVERSION_WORTH' ? deep_spec.roi : deep_spec.price;
|
861
|
|
-// deep_conversion_behavior_spec.min = deep_spec.min;
|
862
|
|
-// deep_conversion_behavior_spec.max = deep_spec.max;
|
863
|
|
-// deep_conversion_behavior_spec_fillBack.min = deep_spec.min;
|
864
|
|
-// deep_conversion_behavior_spec_fillBack.max = deep_spec.max;
|
865
|
|
-// deep_conversion_behavior_spec_fillBack2.value = newValue.deep_conversion_type == 'DEEP_CONVERSION_WORTH' ? deep_spec.roi : deep_spec.price;
|
866
|
|
-// }
|
867
|
|
-// if (form.deep_bid_site == '1') { // 分版位深度出价
|
868
|
|
-// if (newValue.deep_bid_site_details){
|
869
|
|
-// let deep_bid_site_details = JSON.parse(newValue.deep_bid_site_details)
|
870
|
|
-// site_ids_arr_2.value.forEach((item) => {
|
871
|
|
-// item.coefficient = deep_bid_site_details[item.value] || 1;
|
872
|
|
-// item.offer = getOffer(deep_bid_site_details[item.value], 'deep_bit_site')
|
873
|
|
-// });
|
874
|
|
-// }
|
875
|
|
-// }
|
876
|
|
-// first_day_begin_time.flag = newValue.first_day_begin_time && newValue.first_day_begin_time != '' ? true : false;
|
877
|
|
-// first_day_begin_time.value = newValue.first_day_begin_time.slice(0,5)
|
878
|
|
-// checkedWechat.value = newValue.bid_site_wechat_enabled == '1' ? true : false; // 支持微信朋友圈&微信公众号与小程序版位
|
879
|
|
-// watch_deep_conversion()
|
880
|
|
-// }, { immediate: true})
|
881
|
858
|
</script>
|
882
|
859
|
<style lang="scss" scoped>@import "@/assets/style/batchDialogGdt.scss";
|
883
|
|
-
|
884
|
860
|
.flex-1 {
|
885
|
861
|
flex: 1;
|
886
|
862
|
}</style>
|