Browse Source

深度优化目标问题

xiuli.gao 1 year ago
parent
commit
1dfd6606c0
37 changed files with 96 additions and 50 deletions
  1. 1 1
      dist/assets/index.651fabd9.css
  2. 1 1
      dist/assets/index.c8e2969d.js
  3. 1 1
      dist/assets/weekTime.c57bd510.css
  4. 1 1
      dist/index.html
  5. 1 1
      dist/js/_dialog/_dialog.31c66a11.js
  6. 1 1
      dist/js/_input/_input.f62769fa.js
  7. 1 1
      dist/js/_select/_select.691e04fc.js
  8. 1 1
      dist/js/adTask/index.ffdf1751.js
  9. 1 1
      dist/js/api/api.58efb8ac.js
  10. 1 1
      dist/js/basisMoudle/accountManage.b7d5f016.js
  11. 1 1
      dist/js/basisMoudle/error.67dbbba8.js
  12. 1 1
      dist/js/basisMoudle/home.c91626fe.js
  13. 1 1
      dist/js/basisMoudle/login.32bd2c75.js
  14. 1 1
      dist/js/businessMoudle/adqManage.96e97405.js
  15. 1 1
      dist/js/collectClip/index.37b23231.js
  16. 0 1
      dist/js/configArea/index.aa265406.js
  17. 1 0
      dist/js/configArea/index.d92a19c0.js
  18. 1 1
      dist/js/gdtList/index.39cacf85.js
  19. 1 1
      dist/js/index/index.53021bd7.js
  20. 1 1
      dist/js/index/index.402307b7.js
  21. 1 0
      dist/js/layout/index.2baa3376.js
  22. 0 1
      dist/js/layout/index.2d69af0c.js
  23. 1 1
      dist/js/layout/index_head.b726372a.js
  24. 1 1
      dist/js/materialBlock/materialBlock.1f5baea6.js
  25. 1 1
      dist/js/materialLibrary/index.60549b9f.js
  26. 1 1
      dist/js/menuPermission/menuList.683ecbaa.js
  27. 1 1
      dist/js/miniprogram/index.7be253b2.js
  28. 1 1
      dist/js/noData/noData.02437e54.js
  29. 1 1
      dist/js/tableInfo/tableInfo.09bd1f23.js
  30. 1 1
      dist/js/taskList/index.0936b292.js
  31. 1 1
      dist/js/timeScreen/timeScreen.f6ec13b8.js
  32. 0 1
      dist/js/weekTime/weekTime.8035a2c6.js
  33. 1 0
      dist/js/weekTime/weekTime.8c3a1ea3.js
  34. 18 9
      src/components/businessMoudle/batchGdt/configArea/basicInfo/components/weekTime.vue
  35. 30 10
      src/components/businessMoudle/batchGdt/configArea/basicInfo/index.vue
  36. 16 0
      src/components/businessMoudle/batchGdt/configArea/basicInfo/ts/basicApi.ts
  37. 2 1
      src/components/businessMoudle/batchGdt/configArea/basicInfo/ts/fillBack.ts

File diff suppressed because it is too large
+ 1 - 1
dist/assets/index.651fabd9.css


File diff suppressed because it is too large
+ 1 - 1
dist/assets/index.c8e2969d.js


File diff suppressed because it is too large
+ 1 - 1
dist/assets/weekTime.c57bd510.css


+ 1 - 1
dist/index.html

@@ -6,7 +6,7 @@
6 6
     <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
7 7
     <title>广告系统</title>
8 8
       <script src="//open.thunderurl.com/thunder-link.js"></script>
9
-    <script type="module" crossorigin src="./assets/index.c8e2969d.js"></script>
9
+    <script type="module" crossorigin src="./assets/index.eff151fb.js"></script>
10 10
     <link rel="modulepreload" href="./js/@vue/@vue.e7eafc10.js">
11 11
     <link rel="modulepreload" href="./js/vue-router/vue-router.647267ed.js">
12 12
     <link rel="modulepreload" href="./js/axios/axios.27022086.js">

File diff suppressed because it is too large
+ 1 - 1
dist/js/_dialog/_dialog.31c66a11.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/_input/_input.f62769fa.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/_select/_select.691e04fc.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/adTask/index.ffdf1751.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/api/api.58efb8ac.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/basisMoudle/accountManage.b7d5f016.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/basisMoudle/error.67dbbba8.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/basisMoudle/home.c91626fe.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/basisMoudle/login.32bd2c75.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/businessMoudle/adqManage.96e97405.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/collectClip/index.37b23231.js


File diff suppressed because it is too large
+ 0 - 1
dist/js/configArea/index.aa265406.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/configArea/index.d92a19c0.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/gdtList/index.39cacf85.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/index/index.53021bd7.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/index/index.402307b7.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/layout/index.2baa3376.js


File diff suppressed because it is too large
+ 0 - 1
dist/js/layout/index.2d69af0c.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/layout/index_head.b726372a.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/materialBlock/materialBlock.1f5baea6.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/materialLibrary/index.60549b9f.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/menuPermission/menuList.683ecbaa.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/miniprogram/index.7be253b2.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/noData/noData.02437e54.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/tableInfo/tableInfo.09bd1f23.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/taskList/index.0936b292.js


File diff suppressed because it is too large
+ 1 - 1
dist/js/timeScreen/timeScreen.f6ec13b8.js


File diff suppressed because it is too large
+ 0 - 1
dist/js/weekTime/weekTime.8035a2c6.js


File diff suppressed because it is too large
+ 1 - 0
dist/js/weekTime/weekTime.8c3a1ea3.js


+ 18 - 9
src/components/businessMoudle/batchGdt/configArea/basicInfo/components/weekTime.vue

@@ -42,6 +42,7 @@
42 42
 <script setup lang="ts">
43 43
 import { reactive, onBeforeMount, nextTick } from 'vue'
44 44
 import { formatTime, switchEvent } from '../ts/fillBack'
45
+import { ElMessage } from 'element-plus';
45 46
 const emit = defineEmits<{
46 47
   (event: "change",val:any): void;
47 48
 }>();
@@ -73,13 +74,18 @@ const tipTime:{ [key: string]: any[] } = reactive({})
73 74
 onBeforeMount(() => {
74 75
   /**S 回显 */
75 76
   let fillBackArr = props.fillBack?.split(',') || [];
76
-  selectedTime['星期一'].time = fillBackArr[0] ? fillBackArr[0].split('') : []
77
-  selectedTime['星期二'].time = fillBackArr[1] ? fillBackArr[1].split('') : []
78
-  selectedTime['星期三'].time = fillBackArr[2] ? fillBackArr[2].split('') : []
79
-  selectedTime['星期四'].time = fillBackArr[3] ? fillBackArr[3].split('') : []
80
-  selectedTime['星期五'].time = fillBackArr[4] ? fillBackArr[4].split('') : []
81
-  selectedTime['星期六'].time = fillBackArr[5] ? fillBackArr[5].split('') : []
82
-  selectedTime['星期日'].time = fillBackArr[6] ? fillBackArr[6].split('') : []
77
+  if(fillBackArr?.join('').length != 336){
78
+    ElMessage.error('投放时段回显失败!')
79
+    clearTime()
80
+  }else{
81
+    selectedTime['星期一'].time = fillBackArr[0] ? fillBackArr[0].split('') : []
82
+    selectedTime['星期二'].time = fillBackArr[1] ? fillBackArr[1].split('') : []
83
+    selectedTime['星期三'].time = fillBackArr[2] ? fillBackArr[2].split('') : []
84
+    selectedTime['星期四'].time = fillBackArr[3] ? fillBackArr[3].split('') : []
85
+    selectedTime['星期五'].time = fillBackArr[4] ? fillBackArr[4].split('') : []
86
+    selectedTime['星期六'].time = fillBackArr[5] ? fillBackArr[5].split('') : []
87
+    selectedTime['星期日'].time = fillBackArr[6] ? fillBackArr[6].split('') : []
88
+  }
83 89
   /**E 回显 */
84 90
   submitTime()
85 91
 })
@@ -90,8 +96,11 @@ const submitTime = () => {
90 96
     time_series.push(selectedTime[i].time.join(''))
91 97
     tipTime[i] = formatTime(selectedTime[i].time)
92 98
   }
93
-  console.log('time_series',time_series)
94
-  emit('change', time_series.join(','))
99
+  if(time_series.join('').length != 336){
100
+    return
101
+  }else{
102
+    emit('change', time_series.join(','))
103
+  }
95 104
 }
96 105
 /**清空选择 */
97 106
 const clearTime = () => {

+ 30 - 10
src/components/businessMoudle/batchGdt/configArea/basicInfo/index.vue

@@ -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})

+ 16 - 0
src/components/businessMoudle/batchGdt/configArea/basicInfo/ts/basicApi.ts

@@ -70,6 +70,22 @@ export function moreOptimizationGoal(params: IMoreOptimizationGoal) {
70 70
   })
71 71
 }
72 72
 
73
+/**所有目标 */
74
+export function getGoalInfos(params?) {
75
+  return new Promise( async (resolve, reject)=>{
76
+    const res: any = await http.post('/api/ad/getGoalInfos', params)
77
+    if (res.errNo == 0 && res.rst) {
78
+      let arr:Array<{label:string, value: string}> = [];
79
+      for(let key in res.rst){
80
+        arr.push({label: res.rst[key], value: key})
81
+      }
82
+      resolve(arr)
83
+    } else {
84
+      reject()
85
+    }
86
+  })
87
+}
88
+
73 89
 /**通配符 */
74 90
 export async function getWildcard() {
75 91
   const res: any = await http.get('/api/ad/getWildcard')

+ 2 - 1
src/components/businessMoudle/batchGdt/configArea/basicInfo/ts/fillBack.ts

@@ -119,6 +119,7 @@ export const FillBackData = ({ data, type, updateScene = {}, cb }: IFillBackData
119 119
       }) || []
120 120
     }
121 121
     time_series_writ = time_series_writ.filter((v) => { return v.length > 0 })
122
+    console.log('time_series_writ',time_series_writ)
122 123
     console.log(data)
123 124
     // return
124 125
     if (type == 'me') {
@@ -366,7 +367,7 @@ export const FillBackData = ({ data, type, updateScene = {}, cb }: IFillBackData
366 367
     }
367 368
 
368 369
     if (data.bid_mode == 'BID_MODE_OCPM' || data.bid_mode == 'BID_MODE_OCPC') {
369
-      copywriting.push(`优化目标:${data.optimization_goal_name}`)
370
+      data.optimization_goal_name ? copywriting.push(`优化目标:${data.optimization_goal_name}`) : ''
370 371
       if (data.forward_link_assist_enabled == 1) {
371 372
         copywriting.push(`助攻行为:${data.forward_link_assist_name}`)
372 373
       }