|
@@ -214,8 +214,7 @@
|
214
|
214
|
<MyRadio :info="scheduleBidInfo.deep_conversion_type" :fillBack="props.dataFillBack['deep_conversion_type']" @change="radioChange"></MyRadio>
|
215
|
215
|
<div class="marT15">
|
216
|
216
|
<MySelect :goalType="form.deep_conversion_type == 'DEEP_CONVERSION_BEHAVIOR' ? 2 : 3" :isMoreTarget="true" :list="optimizationGoal_2" title="深度优化目标" placeholder="请选择深度优化目标" :fillBack="deep_conversion_behavior_spec.target"
|
217
|
|
- @change="(val) => { deep_conversion_behavior_spec.target = val; form['deep_conversion_behavior_spec_target_name'] = optimizationGoal_2.filter((v: any) => { return v.value == val })[0]?.label }">
|
218
|
|
- </MySelect>
|
|
217
|
+ @change="(val) => { deep_conversion_behavior_spec.target = val; }"></MySelect>
|
219
|
218
|
</div>
|
220
|
219
|
<!-- 优化转化行为 -->
|
221
|
220
|
<MyInput title="深度转化率" v-if="form.deep_conversion_type == 'DEEP_CONVERSION_BEHAVIOR'"
|
|
@@ -311,7 +310,7 @@ import { basicInfoJson, scheduleBid, conversion_tracking_way } from './ts/inform
|
311
|
310
|
import { specificPositionAll, expand_targeting, unbreakable_targeting } from './ts/other'
|
312
|
311
|
import { scene, wechatScene, positionMapping, search_expand_targeting_switch } from './ts/scene'
|
313
|
312
|
import { FillBackData } from './ts/fillBack'
|
314
|
|
-import { adPresetsSet,getOptimizationGoal, moreOptimizationGoal } from './ts/basicApi'
|
|
313
|
+import { adPresetsSet,getOptimizationGoal, moreOptimizationGoal, getGoalInfos } from './ts/basicApi'
|
315
|
314
|
import { getDay, deepCopy } from "@/common/common";
|
316
|
315
|
import MyRadio from './components/radio.vue'
|
317
|
316
|
import AdPosition from './components/adPosition.vue'
|
|
@@ -354,6 +353,7 @@ const scheduleBidInfo = reactive(scheduleBid)
|
354
|
353
|
const specificPositionInfo2 = specificPositionAll()
|
355
|
354
|
const optimizationGoal_1 = ref<any[]>([])
|
356
|
355
|
const optimizationGoal_2 = ref<any[]>([])
|
|
356
|
+const allGoalInfos = ref<any[]>([])
|
357
|
357
|
const moreOptimizationGoalList = ref<any[]>([])
|
358
|
358
|
const defaultAdPositionList = ['SITE_SET_KANDIAN', 'SITE_SET_QQ_MUSIC_GAME', 'SITE_SET_TENCENT_NEWS', 'SITE_SET_TENCENT_VIDEO', 'SITE_SET_MOBILE_UNION']
|
359
|
359
|
let adPositionList: any = ref([]);// 广告版位默认列表
|
|
@@ -507,7 +507,6 @@ const handleClose = () => {
|
507
|
507
|
}
|
508
|
508
|
/**特定版位回调 */
|
509
|
509
|
const onChangeAdPosition = (val: string) => {
|
510
|
|
- console.log(val,'版位回调')
|
511
|
510
|
form['site_ids'] = val;
|
512
|
511
|
eventGetOPtimizationGoal(val)
|
513
|
512
|
watchSiteIds()// 版位变化
|
|
@@ -523,6 +522,8 @@ const eventGetOPtimizationGoal = (val?) => {
|
523
|
522
|
item.value = item.goal;
|
524
|
523
|
})
|
525
|
524
|
optimizationGoal_1.value = res.filter((v)=>{return v.name && v.name != '' && v.goal && v.goal != ''});
|
|
525
|
+ form['optimization_goal_name'] = optimizationGoal_1.value.filter((v: any) => { return v.value == form['optimization_goal'] })[0]?.label
|
|
526
|
+ changeOptimizationGoal()
|
526
|
527
|
}).catch((res)=>{
|
527
|
528
|
optimizationGoal_1.value = [];
|
528
|
529
|
optimizationGoal_2.value = [];
|
|
@@ -679,10 +680,7 @@ const onChangeKey = ({ val, key }) => {
|
679
|
680
|
form[key] = val;
|
680
|
681
|
computed_deep_conversion_behavior_spec_fillBack2()
|
681
|
682
|
}else if(key == 'optimization_goal'){// 优化目标
|
682
|
|
- console.log('优化目标',val)
|
683
|
683
|
form[key] = val;
|
684
|
|
- form['optimization_goal_name'] = optimizationGoal_1.value.filter((v: any) => { return v.value == val })[0]?.label
|
685
|
|
- console.log('优化目标2',form['optimization_goal_name'])
|
686
|
684
|
changeOptimizationGoal()
|
687
|
685
|
}else if(key == 'forward_link_assist'){// 助攻行为
|
688
|
686
|
form[key] = val;
|
|
@@ -708,10 +706,30 @@ const changeOptimizationGoal = () => {
|
708
|
706
|
v.label = v.name;
|
709
|
707
|
v.value = v.goal;
|
710
|
708
|
})
|
711
|
|
- optimizationGoal_2.value = deep_info
|
|
709
|
+ if(deep_info.filter((v)=>v.value == deep_conversion_behavior_spec.target).length == 0){
|
|
710
|
+ if(allGoalInfos.value.length == 0) {
|
|
711
|
+ getGoalInfos().then((res:any)=>{
|
|
712
|
+ allGoalInfos.value = res;
|
|
713
|
+ get_deep_info(deep_info)
|
|
714
|
+ })
|
|
715
|
+ }else{
|
|
716
|
+ get_deep_info(deep_info)
|
|
717
|
+ }
|
|
718
|
+ }else{
|
|
719
|
+ optimizationGoal_2.value = deep_info
|
|
720
|
+ form['deep_conversion_behavior_spec_target_name'] = optimizationGoal_2.value?.filter((v: any) => { return v.value == deep_conversion_behavior_spec.target })[0]?.label
|
|
721
|
+ }
|
712
|
722
|
}
|
713
|
723
|
})
|
714
|
724
|
}
|
|
725
|
+const get_deep_info = (deep_info:any[]) => {
|
|
726
|
+ let target_info = allGoalInfos.value.filter((v)=>v.label == deep_conversion_behavior_spec.target)
|
|
727
|
+ if(target_info.length > 0) {
|
|
728
|
+ deep_info.push(target_info[0])
|
|
729
|
+ optimizationGoal_2.value = deep_info
|
|
730
|
+ form['deep_conversion_behavior_spec_target_name'] = optimizationGoal_2.value?.filter((v: any) => { return v.value == deep_conversion_behavior_spec.target })[0]?.label
|
|
731
|
+ }
|
|
732
|
+}
|
715
|
733
|
const onChangeWechat = (flag) => {
|
716
|
734
|
if (flag) {
|
717
|
735
|
adPositionList.value = ['SITE_SET_MOMENTS', 'SITE_SET_WECHAT', 'SITE_SET_WECHAT_PLUGIN'].concat(defaultAdPositionList)
|
|
@@ -821,7 +839,7 @@ watch([
|
821
|
839
|
watch(
|
822
|
840
|
() => props.visible,
|
823
|
841
|
(newValue, oldValue) => {
|
824
|
|
- console.log('广告基本信息diaolg', newValue)
|
|
842
|
+ console.log('广告基本信息diaolg', props.dataFillBack)
|
825
|
843
|
dialogVisible.value = newValue;
|
826
|
844
|
if (!props.dataFillBack.id) return;
|
827
|
845
|
form.daily_budget_radio = props.dataFillBack?.daily_budget ? '2' : '1';
|
|
@@ -871,7 +889,9 @@ watch(
|
871
|
889
|
}
|
872
|
890
|
}
|
873
|
891
|
first_day_begin_time.flag = props.dataFillBack.first_day_begin_time && props.dataFillBack.first_day_begin_time != '' ? true : false;
|
874
|
|
- first_day_begin_time.value = props.dataFillBack.first_day_begin_time.slice(0,5)
|
|
892
|
+ if(first_day_begin_time.flag){
|
|
893
|
+ first_day_begin_time.value = props.dataFillBack.first_day_begin_time?.slice(0,5)
|
|
894
|
+ }
|
875
|
895
|
checkedWechat.value = props.dataFillBack.bid_site_wechat_enabled == '1' ? true : false; // 支持微信朋友圈&微信公众号与小程序版位
|
876
|
896
|
watch_deep_conversion()
|
877
|
897
|
}, { immediate: true})
|