Browse Source

定向包回显

xiuli.gao 1 year ago
parent
commit
31bb6977c8

+ 3 - 1
src/components/businessMoudle/batchGdt/configArea/copywriter/writerDialog.vue

245
         TextLibraryRef.value.writ_toggle_selected(obj.data)
245
         TextLibraryRef.value.writ_toggle_selected(obj.data)
246
       }
246
       }
247
     }else{
247
     }else{
248
-      text_textarea.value = obj?.data[0] || ''
248
+      if(obj?.data && Array.isArray(obj?.data)){
249
+        text_textarea.value = obj?.data[0] || ''
250
+      }
249
     }
251
     }
250
   })
252
   })
251
 }
253
 }

+ 6 - 2
src/components/businessMoudle/batchGdt/configArea/creativeMaterial/index.vue

709
                 let arr: any = _.cloneDeep(inject_accountIds)
709
                 let arr: any = _.cloneDeep(inject_accountIds)
710
                 let new_ac_ids: any = []
710
                 let new_ac_ids: any = []
711
                 let all_ac_ids: any = []
711
                 let all_ac_ids: any = []
712
-                pageInfo.creativeTeamList[0].list[0].resResult.forEach(sub => {
712
+                pageInfo.creativeTeamList[0].list[0].resResult?.forEach(sub => {
713
                   let ids_nn: number = all_ac_ids.findIndex(nn => nn == sub.account_id)
713
                   let ids_nn: number = all_ac_ids.findIndex(nn => nn == sub.account_id)
714
                   if (ids_nn == -1) {
714
                   if (ids_nn == -1) {
715
                     all_ac_ids.push(sub.account_id)
715
                     all_ac_ids.push(sub.account_id)
739
 
739
 
740
 
740
 
741
 
741
 
742
-              const creatice_reuseEvent = async () => {
742
+              const creatice_reuseEvent = async (cMaterial) => {
743
                 requestObj.upload_flag = false
743
                 requestObj.upload_flag = false
744
                 clearTimeout(requestObj.timer_get_upload_res)
744
                 clearTimeout(requestObj.timer_get_upload_res)
745
+                if(cMaterial.list){
746
+                  pageInfo.creativeTeamList = _.cloneDeep(cMaterial.list)
747
+                }
745
                 let acArr: any = await get_new_ac_ids()
748
                 let acArr: any = await get_new_ac_ids()
746
                 let targetArr: any = await get_new_target_ids()
749
                 let targetArr: any = await get_new_target_ids()
750
+                console.log('targetArr',targetArr)
747
                 if (targetArr && targetArr.length == 0) {
751
                 if (targetArr && targetArr.length == 0) {
748
                   emit('closeLoading')
752
                   emit('closeLoading')
749
                   return
753
                   return

+ 27 - 12
src/components/businessMoudle/batchGdt/configArea/directPacket/echoIndex.vue

38
 const NumberHandle = proxy.$NumberHandle
38
 const NumberHandle = proxy.$NumberHandle
39
 
39
 
40
 const emit = defineEmits<{
40
 const emit = defineEmits<{
41
-  (event: "updateHaveContent", id:number,chooseNum?:number,minusFlag?:boolean,clearFlag?:boolean): void;
41
+  (event: "updateHaveContent", id:number,chooseNum?:number,minusFlag?:boolean,clearFlag?:boolean, type?:string): void;
42
 }>();
42
 }>();
43
 
43
 
44
 const props = withDefaults(defineProps<{
44
 const props = withDefaults(defineProps<{
56
 
56
 
57
 watch(()=>pageInfo.updateKey_DirectPacket,()=>{
57
 watch(()=>pageInfo.updateKey_DirectPacket,()=>{
58
   nextTick(async ()=>{
58
   nextTick(async ()=>{
59
-    pageInfo.directContent =  _.cloneDeep(pageInfo.directContent_interim)
60
-    //计算选的个数
61
-    let chooseNum:number = 0
62
-    pageInfo.directContent.chooseList.forEach(sub=>{
63
-      if(sub.chooseList&&sub.chooseList.length){
64
-        chooseNum+=sub.chooseList&&sub.chooseList.length
65
-      }
66
-    })
67
-    await emit('updateHaveContent',3,chooseNum)
59
+    directContentChange()
68
   })
60
   })
69
 })
61
 })
70
 
62
 
71
-
63
+const directContentChange = (type?) => {
64
+  pageInfo.directContent =  _.cloneDeep(pageInfo.directContent_interim)
65
+  //计算选的个数
66
+  let chooseNum:number = 0
67
+  pageInfo.directContent.chooseList.forEach(sub=>{
68
+    if(sub.chooseList&&sub.chooseList.length){
69
+      chooseNum+=sub.chooseList&&sub.chooseList.length
70
+    }
71
+  })
72
+  if(type == 'feedback'){//回显
73
+    emit('updateHaveContent',3,chooseNum, false, false, 'feedback')
74
+  }else{
75
+    emit('updateHaveContent',3,chooseNum)
76
+  }
77
+}
72
 
78
 
73
 
79
 
74
 //删除某一项定向包
80
 //删除某一项定向包
179
 const getObjValue = () => {
185
 const getObjValue = () => {
180
   return pageInfo.directContent
186
   return pageInfo.directContent
181
 }
187
 }
188
+//回显
189
+const feedbackEvent = (obj) => {
190
+  if(obj){
191
+    pageInfo.directContent_interim = _.cloneDeep(obj)
192
+    console.log('pageInfo.directContent_interim', pageInfo.directContent_interim)
193
+    directContentChange('feedback')
194
+  }
195
+}
182
 
196
 
183
 // 父组件共享值
197
 // 父组件共享值
184
 defineExpose({
198
 defineExpose({
188
   getObjValue,
202
   getObjValue,
189
   // addAcEvent,
203
   // addAcEvent,
190
   // deleAcEvent,
204
   // deleAcEvent,
191
-  AcChangeEvent
205
+  AcChangeEvent,
206
+  feedbackEvent
192
 });
207
 });
193
 
208
 
194
 
209
 

+ 2 - 2
src/components/businessMoudle/batchGdt/configArea/directPacket/index.vue

73
   nextTick(()=>{
73
   nextTick(()=>{
74
     pageInfo.exposeObj.type = val
74
     pageInfo.exposeObj.type = val
75
     if(pageInfo.exposeObj.type=='2'){
75
     if(pageInfo.exposeObj.type=='2'){
76
-      comRef2.value!.echoChooseList()
76
+      comRef2.value?.echoChooseList()
77
     }else if(pageInfo.exposeObj.type=='1'){
77
     }else if(pageInfo.exposeObj.type=='1'){
78
-      comRef.value!.echoChooseList()
78
+      comRef.value?.echoChooseList()
79
     }
79
     }
80
   })
80
   })
81
 }
81
 }

+ 2 - 2
src/components/businessMoudle/batchGdt/configArea/directPacket/ts/useDriect.ts

68
 
68
 
69
     //清空选项
69
     //清空选项
70
     const clearTableSelect = () => {
70
     const clearTableSelect = () => {
71
-        tableListRef.value!.clearSelected()
71
+        tableListRef.value?.clearSelected()
72
     }
72
     }
73
     const toggleTableSelect = (arr:any,flag:boolean) => {
73
     const toggleTableSelect = (arr:any,flag:boolean) => {
74
-        tableListRef.value!.toggleSelected(arr,flag)
74
+        tableListRef.value?.toggleSelected(arr,flag)
75
     }
75
     }
76
 
76
 
77
     //打开新建定向
77
     //打开新建定向

+ 0 - 1
src/components/businessMoudle/batchGdt/configArea/directPacket/useDirect.vue

13
         <span class="pointer c-theme rMar10" @click="get_direct_list()">刷新</span>
13
         <span class="pointer c-theme rMar10" @click="get_direct_list()">刷新</span>
14
         <el-button type="primary" class="lMarauto" @click="newAddEvent">新建定向包</el-button>
14
         <el-button type="primary" class="lMarauto" @click="newAddEvent">新建定向包</el-button>
15
       </div>
15
       </div>
16
-
17
       <div class="tMar20">
16
       <div class="tMar20">
18
         <TableList
17
         <TableList
19
             :updateKey="Number(pageInfo.accId)"
18
             :updateKey="Number(pageInfo.accId)"

+ 17 - 8
src/components/businessMoudle/batchGdt/configArea/index.vue

247
     data: [],
247
     data: [],
248
     allocation_type: '',//分配形式 1自动分配 2程序化相乘分配
248
     allocation_type: '',//分配形式 1自动分配 2程序化相乘分配
249
     loadPageRule: 0, //0 全部相同 //1 按账户分配 //2 分配到计划 // 3分配到广告
249
     loadPageRule: 0, //0 全部相同 //1 按账户分配 //2 分配到计划 // 3分配到广告
250
+    multiCopyTesting: 0,//分账户选择 0不开启 1开启
250
   },
251
   },
251
   acc_plan_ad_count: {}, //各账户对应的计划数、广告数;用于微信视频号的配置
252
   acc_plan_ad_count: {}, //各账户对应的计划数、广告数;用于微信视频号的配置
252
   groupsConfig: {},//已选择的策略组
253
   groupsConfig: {},//已选择的策略组
286
    if(val){
287
    if(val){
287
      // 创意素材 - 修改或者新增
288
      // 创意素材 - 修改或者新增
288
      await CreativeMaterialRef.value?.deleAcEvent(pageInfo.accIdsList,false)
289
      await CreativeMaterialRef.value?.deleAcEvent(pageInfo.accIdsList,false)
289
-     CreativeMaterialRef.value?.creatice_reuseEvent()
290
+     CreativeMaterialRef.value?.creatice_reuseEvent(_.cloneDeep(cMaterial))
290
    }
291
    }
291
 })
292
 })
292
 
293
 
332
 const DirectPacketExhibitionRef = ref<{get_echoAcId:()=>void,
333
 const DirectPacketExhibitionRef = ref<{get_echoAcId:()=>void,
333
   showDirectPacket:()=>void,
334
   showDirectPacket:()=>void,
334
   clearDirectContent:()=>void,
335
   clearDirectContent:()=>void,
335
-  AcChangeEvent:(arr:any)=>void
336
+  AcChangeEvent:(arr:any)=>void,
337
+  feedbackEvent:(obj)=>void
336
   // addAcEvent:(arr:any)=>void,deleAcEvent:(arr:any)=>void
338
   // addAcEvent:(arr:any)=>void,deleAcEvent:(arr:any)=>void
337
 }>()
339
 }>()
338
 
340
 
343
     nextTick(()=>{
345
     nextTick(()=>{
344
       if(DirectPacketExhibitionRef.value) { DirectPacketExhibitionRef.value[0]?.showDirectPacket() }
346
       if(DirectPacketExhibitionRef.value) { DirectPacketExhibitionRef.value[0]?.showDirectPacket() }
345
       if(sub.haveContent){
347
       if(sub.haveContent){
348
+        console.log('get_echoAcIdget_echoAcIdget_echoAcIdget_echoAcIdget_echoAcIdget_echoAcId')
346
         if(DirectPacketExhibitionRef.value) { DirectPacketExhibitionRef.value[0]?.get_echoAcId() }
349
         if(DirectPacketExhibitionRef.value) { DirectPacketExhibitionRef.value[0]?.get_echoAcId() }
347
       }
350
       }
348
     })
351
     })
372
     CopywriterRef.value[0]?.initFun(true, pageInfo?.copywriterInfoData)
375
     CopywriterRef.value[0]?.initFun(true, pageInfo?.copywriterInfoData)
373
   }
376
   }
374
   if(sub.name == '落地页' && LandPageRef.value){
377
   if(sub.name == '落地页' && LandPageRef.value){
375
-    LandPageRef.value[0]?.initFun(true, pageInfo.num_total, pageInfo.last_ad_show_list)
378
+    LandPageRef.value[0]?.initFun(true, pageInfo.num_total, pageInfo.last_ad_show_list, pageInfo?.copyLandPageInfoData)
376
   }
379
   }
377
 }
380
 }
378
 
381
 
379
 //更新数值,判断是否有内容
382
 //更新数值,判断是否有内容
380
-const updateHaveContent = (id:number,chooseNum?:number,minusFlag?:boolean,clearFlag?:boolean) => {
383
+const updateHaveContent = (id:number,chooseNum?:number,minusFlag?:boolean,clearFlag?:boolean, type?:string) => {
381
   nextTick(()=>{
384
   nextTick(()=>{
382
     // id : adTitleList的id  chooseNum: 选中的个数  minusFlag:是否需要减少
385
     // id : adTitleList的id  chooseNum: 选中的个数  minusFlag:是否需要减少
383
     if(clearFlag){ //清空
386
     if(clearFlag){ //清空
394
         if(DirectPacketExhibitionRef.value){
397
         if(DirectPacketExhibitionRef.value){
395
           pageInfo.directObj = DirectPacketExhibitionRef.value[0]?.getObjValue()
398
           pageInfo.directObj = DirectPacketExhibitionRef.value[0]?.getObjValue()
396
         }
399
         }
397
-        //清空落地页
398
-        if(LandPageRef.value){
399
-          LandPageRef.value[0]?.clearEvent()
400
+        if(type != 'feedback'){
401
+          //清空落地页
402
+          if(LandPageRef.value){
403
+            LandPageRef.value[0]?.clearEvent()
404
+          }
400
         }
405
         }
401
         updateHaveContent(8,0,false,true)
406
         updateHaveContent(8,0,false,true)
402
         computeCount()
407
         computeCount()
470
   pageInfo.copyLandPageInfoData.data = obj.landPage;
475
   pageInfo.copyLandPageInfoData.data = obj.landPage;
471
   pageInfo.copyLandPageInfoData.allocation_type = obj.allocation_type;
476
   pageInfo.copyLandPageInfoData.allocation_type = obj.allocation_type;
472
   pageInfo.copyLandPageInfoData.loadPageRule = obj.loadPageRule;
477
   pageInfo.copyLandPageInfoData.loadPageRule = obj.loadPageRule;
478
+  pageInfo.copyLandPageInfoData.multiCopyTesting = obj.multiCopyTesting;
479
+  
473
   if(obj.landPage && JSON.stringify(obj.landPage) != '{}') {
480
   if(obj.landPage && JSON.stringify(obj.landPage) != '{}') {
474
     updateHaveContent(8,length)
481
     updateHaveContent(8,length)
475
   }else{
482
   }else{
624
   closeSeletedGroup,
631
   closeSeletedGroup,
625
   strategyGroupsUse
632
   strategyGroupsUse
626
 } = strategyGroupsEvent({
633
 } = strategyGroupsEvent({
634
+  DirectPacketExhibitionRef,
627
   LandPageRef,
635
   LandPageRef,
628
   CopywriterRef,
636
   CopywriterRef,
629
   targetRef,
637
   targetRef,
637
   aNewConfigEvent,
645
   aNewConfigEvent,
638
   getAdPresetsInfo,
646
   getAdPresetsInfo,
639
   updateHaveContent,
647
   updateHaveContent,
640
-  clearOriginalityInfo
648
+  clearOriginalityInfo,
649
+  computeCount
641
 })
650
 })
642
 /**E 策略组 */
651
 /**E 策略组 */
643
 
652
 

+ 8 - 5
src/components/businessMoudle/batchGdt/configArea/landPage/index.vue

59
   emit('landPage',{
59
   emit('landPage',{
60
     landPage: obj.emitData,
60
     landPage: obj.emitData,
61
     allocation_type: selectValue.value,
61
     allocation_type: selectValue.value,
62
-    loadPageRule: obj.loadPageRule
62
+    loadPageRule: obj.loadPageRule,
63
+    multiCopyTesting: obj.multiCopyTesting
63
   })
64
   })
64
 }
65
 }
65
 /**分配切换选择 清空选中 */
66
 /**分配切换选择 清空选中 */
67
   closeLandPageDialog({})
68
   closeLandPageDialog({})
68
 }
69
 }
69
 /**初始化 */
70
 /**初始化 */
70
-const initFun = (flag, count_info_2, last_ad_show_list_2) => {
71
+const initFun = (flag, count_info_2, last_ad_show_list_2, feedbackObj) => {
71
   nextTick(()=>{
72
   nextTick(()=>{
72
     if(count_info_2){
73
     if(count_info_2){
73
       count_info.value = count_info_2;
74
       count_info.value = count_info_2;
76
       last_ad_show_list.value = last_ad_show_list_2
77
       last_ad_show_list.value = last_ad_show_list_2
77
     }
78
     }
78
     if(LandPageDialogRef.value){
79
     if(LandPageDialogRef.value){
79
-      LandPageDialogRef.value.initFun(flag, selectValue.value, last_ad_show_list_2)
80
+      LandPageDialogRef.value.initFun(flag, selectValue.value, last_ad_show_list_2, feedbackObj)
80
     }
81
     }
81
   })
82
   })
82
 }
83
 }
86
   selectValue.value = obj.allocation_type
87
   selectValue.value = obj.allocation_type
87
   closeLandPageDialog({
88
   closeLandPageDialog({
88
     emitData: obj.data,
89
     emitData: obj.data,
89
-    loadPageRule: obj.loadPageRule
90
+    loadPageRule: obj.loadPageRule,
91
+    multiCopyTesting: obj.multiCopyTesting
90
   })
92
   })
91
 }
93
 }
92
 /**清空 */
94
 /**清空 */
94
   selectValue.value = 1;
96
   selectValue.value = 1;
95
   closeLandPageDialog({
97
   closeLandPageDialog({
96
     emitData: {},
98
     emitData: {},
97
-    loadPageRule: 0
99
+    loadPageRule: 0,
100
+    multiCopyTesting: 0
98
   })
101
   })
99
 }
102
 }
100
 // 暴露自己的属性供父组件使用
103
 // 暴露自己的属性供父组件使用

+ 37 - 5
src/components/businessMoudle/batchGdt/configArea/landPage/landPageDialog.vue

42
             </el-icon></span>
42
             </el-icon></span>
43
         </el-tooltip>
43
         </el-tooltip>
44
       </div>
44
       </div>
45
-      <LandPageList :page_type="page_type" :select_count="allocation == 2 ? -1 : select_count" @callBack="handleSelectionChange"
45
+      <LandPageList ref="LandPageListRef" :page_type="page_type" :select_count="allocation == 2 ? -1 : select_count" @callBack="handleSelectionChange"
46
         v-if="multiCopyTesting == 0" style="margin-top:20px"></LandPageList>
46
         v-if="multiCopyTesting == 0" style="margin-top:20px"></LandPageList>
47
       <AccMinprogram ref="AccMinprogramRef" v-if="multiCopyTesting == 1" :count_info="count_info" :page_type="page_type" :loadPageRule="loadPageRule"
47
       <AccMinprogram ref="AccMinprogramRef" v-if="multiCopyTesting == 1" :count_info="count_info" :page_type="page_type" :loadPageRule="loadPageRule"
48
         :accIdsList="accIdsList" @callBack="AccMinprogramChange"></AccMinprogram>
48
         :accIdsList="accIdsList" @callBack="AccMinprogramChange"></AccMinprogram>
60
 import { ElMessage } from 'element-plus';
60
 import { ElMessage } from 'element-plus';
61
 import LandPageList from './landPageList.vue';
61
 import LandPageList from './landPageList.vue';
62
 import AccMinprogram from './accMinprogram.vue'
62
 import AccMinprogram from './accMinprogram.vue'
63
+import _ from 'lodash';
63
 const props = defineProps({
64
 const props = defineProps({
64
   page_type: {
65
   page_type: {
65
     type: String,
66
     type: String,
99
 const loading = ref(false)
100
 const loading = ref(false)
100
 const multiCopyTesting = ref(0)
101
 const multiCopyTesting = ref(0)
101
 const allocation = ref(1) // 创意文案分配方式 1自动分配 2程序化测试
102
 const allocation = ref(1) // 创意文案分配方式 1自动分配 2程序化测试
102
-let multipleSelection = []
103
+let multipleSelection:any = []
103
 const select_count = ref(-1) //限制选中的条数
104
 const select_count = ref(-1) //限制选中的条数
104
 const accMinprogramInfo = ref();
105
 const accMinprogramInfo = ref();
105
 const AccMinprogramRef = ref()
106
 const AccMinprogramRef = ref()
106
 const last_ad_show_list = ref([])
107
 const last_ad_show_list = ref([])
107
 const acc_select_count = ref()
108
 const acc_select_count = ref()
109
+const LandPageListRef = ref()
108
 
110
 
109
 onBeforeMount(() => {
111
 onBeforeMount(() => {
110
   multiCopyTestingChange(multiCopyTesting.value)
112
   multiCopyTestingChange(multiCopyTesting.value)
222
   emit('close', {
224
   emit('close', {
223
     emitData,
225
     emitData,
224
     loadPageRule: loadPageRule.value,
226
     loadPageRule: loadPageRule.value,
227
+    multiCopyTesting: multiCopyTesting.value
225
   })
228
   })
226
 }
229
 }
227
 const handleSelectionChange = (val) => {
230
 const handleSelectionChange = (val) => {
232
 }
235
 }
233
 
236
 
234
 /**初始化 */
237
 /**初始化 */
235
-const initFun = (flag, select, last_ad_list) => {
236
-  console.log(select, last_ad_list)
238
+const initFun = (flag, select, last_ad_list, feedback?) => {
237
   visible.value = flag
239
   visible.value = flag
238
   allocation.value = select;
240
   allocation.value = select;
239
-  last_ad_show_list.value = last_ad_list
241
+  last_ad_show_list.value = last_ad_list || []
242
+
243
+  if(feedback){//回显
244
+    let feedbackObj = _.cloneDeep(feedback)
245
+      loadPageRule.value = feedbackObj.loadPageRule || 0
246
+      multiCopyTesting.value = feedbackObj.multiCopyTesting || 0
247
+      if(feedbackObj.data){
248
+        if(multiCopyTesting.value == 0) {//分账户选择不开启
249
+          let arr:any = [] 
250
+          for(let key in feedbackObj.data){
251
+            if(feedbackObj.data[key] && Array.isArray(feedbackObj.data[key])){
252
+              feedbackObj.data[key].forEach((item) => {
253
+                if(arr.filter((v)=>v.id == item?.id).length == 0){
254
+                  arr.push(item)
255
+                }
256
+              });
257
+            }
258
+          }
259
+          nextTick(()=>{
260
+            if(LandPageListRef.value){
261
+              LandPageListRef.value.feedbackEvent(arr)
262
+            }
263
+          })
264
+         
265
+        }else{
266
+
267
+        }
268
+      }
269
+      
270
+    }
271
+
240
   nextTick(()=>{
272
   nextTick(()=>{
241
     let acc_select_count_2:any = {}
273
     let acc_select_count_2:any = {}
242
     props.accIdsList.forEach((item)=>{
274
     props.accIdsList.forEach((item)=>{

+ 21 - 2
src/components/businessMoudle/batchGdt/configArea/landPage/landPageList.vue

15
       </div>
15
       </div>
16
       <div class="selected-text ml-10">已选择<span class="highlight">{{ multipleSelection?.length || 0 }}</span>条</div>
16
       <div class="selected-text ml-10">已选择<span class="highlight">{{ multipleSelection?.length || 0 }}</span>条</div>
17
     </div>
17
     </div>
18
-    <el-table ref="multipleTableRef" :row-key="(row)=>row.appid" :data="listData" border height="42vh" :header-row-style="headerRowStyle"
18
+    <el-table ref="multipleTableRef" :row-key="(row)=>row.id" :data="listData" border height="42vh" :header-row-style="headerRowStyle"
19
       :header-cell-style="headerCellStyle" :cell-style="cellStyle" @selection-change="handleSelectionChange"
19
       :header-cell-style="headerCellStyle" :cell-style="cellStyle" @selection-change="handleSelectionChange"
20
       @select-all="handleSelectionAllChange">
20
       @select-all="handleSelectionAllChange">
21
       <el-table-column align="center" type="selection" reserve-selection width="55" fixed="left"
21
       <el-table-column align="center" type="selection" reserve-selection width="55" fixed="left"
49
 import to from 'await-to-js'
49
 import to from 'await-to-js'
50
 import { ElMessage } from 'element-plus'
50
 import { ElMessage } from 'element-plus'
51
 import { getAdcreativesLandingPageList } from './ts/api'
51
 import { getAdcreativesLandingPageList } from './ts/api'
52
+import _ from 'lodash';
52
 
53
 
53
 const props = withDefaults(defineProps<{
54
 const props = withDefaults(defineProps<{
54
   page_type: string,
55
   page_type: string,
128
   emit('callBack', selection)
129
   emit('callBack', selection)
129
 }
130
 }
130
 const selectableEvent = (row) => {
131
 const selectableEvent = (row) => {
131
-  if (multipleSelection.value.map((v) => { return v.appid }).includes(row.appid)) {
132
+  if (multipleSelection.value.map((v) => { return v.id }).includes(row.id)) {
132
     return true
133
     return true
133
   }
134
   }
134
   if (multipleSelection.value?.length == props.select_count && props.select_count != -1) {
135
   if (multipleSelection.value?.length == props.select_count && props.select_count != -1) {
171
   }
172
   }
172
 }, { immediate: true})
173
 }, { immediate: true})
173
 
174
 
175
+
176
+/** S 暴露自己的属性供父组件使用 */ 
177
+const feedbackEvent = (arr) => {
178
+  nextTick(async ()=>{
179
+    if(arr && Array.isArray(arr)){
180
+      await getList()
181
+      await multipleTableRef.value!.clearSelection()
182
+      arr.forEach((row) => {
183
+        multipleTableRef.value?.toggleRowSelection(row, true)
184
+      })
185
+    }
186
+  })
187
+}
188
+defineExpose({
189
+  feedbackEvent
190
+});
191
+/** E 暴露自己的属性供父组件使用 */ 
192
+
174
 </script>
193
 </script>
175
 <style scoped lang="scss">
194
 <style scoped lang="scss">
176
 .content-wrap {
195
 .content-wrap {

+ 5 - 5
src/components/businessMoudle/batchGdt/configArea/strategyGroups/saveDialog.vue

1
 <template>
1
 <template>
2
-  <el-dialog class="gdt-dialog" :close-on-click-modal="false" v-model="visible" title="保存策略组" width="1000px" top="40px"
2
+  <el-dialog class="gdt-dialog" :close-on-click-modal="false" :destroy-on-close="true" v-model="visible" title="保存策略组" width="1000px" top="40px"
3
     :before-close="handleClose">
3
     :before-close="handleClose">
4
     <div v-loading="loading" class="container">
4
     <div v-loading="loading" class="container">
5
-      <tempalte v-if="groupsInfo?.pageInfo?.groupsConfig?.id">
5
+      <div v-if="groupsInfo?.pageInfo?.groupsConfig?.id">
6
         <div class="block-title">保存方式</div>
6
         <div class="block-title">保存方式</div>
7
         <div class="lock-wrapper lock-bt-wrapper" style="border:none;padding-top:0">
7
         <div class="lock-wrapper lock-bt-wrapper" style="border:none;padding-top:0">
8
           <div :class="['lock-bt', 'lock-module', 1 == groupsInfo.saveMode && 'lock-module-active']"
8
           <div :class="['lock-bt', 'lock-module', 1 == groupsInfo.saveMode && 'lock-module-active']"
20
             <span class="rMar3">更新当前策略组</span>
20
             <span class="rMar3">更新当前策略组</span>
21
           </div>
21
           </div>
22
         </div>
22
         </div>
23
-      </tempalte>
24
-      <template v-if="groupsInfo.saveMode == 1">
23
+      </div>
24
+      <div v-if="groupsInfo.saveMode == 1">
25
         <div class="block-title">常用模版</div>
25
         <div class="block-title">常用模版</div>
26
         <div class="lock-wrapper lock-bt-wrapper" style="border:none;padding-top:0">
26
         <div class="lock-wrapper lock-bt-wrapper" style="border:none;padding-top:0">
27
           <div :class="['lock-bt', 'lock-module', key == groupsInfo.commonTemplates && 'lock-module-active']"
27
           <div :class="['lock-bt', 'lock-module', key == groupsInfo.commonTemplates && 'lock-module-active']"
29
             <span class="rMar3">{{ item.name }}</span>
29
             <span class="rMar3">{{ item.name }}</span>
30
           </div>
30
           </div>
31
         </div>
31
         </div>
32
-      </template>
32
+      </div>
33
       <div class="block-title">选择需要锁定的内容信息</div>
33
       <div class="block-title">选择需要锁定的内容信息</div>
34
       <div class="part-wrapper">
34
       <div class="part-wrapper">
35
         <div class="filter-selectors">
35
         <div class="filter-selectors">

+ 1 - 1
src/components/businessMoudle/batchGdt/configArea/ts/material.ts

6
 export function materialDeclare() {
6
 export function materialDeclare() {
7
   const CreativeMaterialRef = ref<{
7
   const CreativeMaterialRef = ref<{
8
     switchShow: (val: boolean, isEdit: boolean, arr: any, testNew_text:any) => void,
8
     switchShow: (val: boolean, isEdit: boolean, arr: any, testNew_text:any) => void,
9
-    clearAllEvent: () => void, creatice_reuseEvent: () => void, deleAcEvent: (arr: any, haveAssign: boolean) => void
9
+    clearAllEvent: () => void, creatice_reuseEvent: (obj) => void, deleAcEvent: (arr: any, haveAssign: boolean) => void
10
   }>()
10
   }>()
11
   const cMaterial = reactive<reactiveTableAndAny>({
11
   const cMaterial = reactive<reactiveTableAndAny>({
12
     list: [],
12
     list: [],

File diff suppressed because it is too large
+ 3653 - 605
src/components/businessMoudle/batchGdt/configArea/ts/mock.ts


+ 10 - 4
src/components/businessMoudle/batchGdt/configArea/ts/strategyGroups.ts

9
   getAdPresetsInfo: (...args: any[]) => void,
9
   getAdPresetsInfo: (...args: any[]) => void,
10
   updateHaveContent: (...args: any[]) => void,
10
   updateHaveContent: (...args: any[]) => void,
11
   clearOriginalityInfo: (...args: any[]) => void,
11
   clearOriginalityInfo: (...args: any[]) => void,
12
+  computeCount: (...args: any[]) => void,
12
   [propName: string]: any
13
   [propName: string]: any
13
 }
14
 }
14
 
15
 
15
 export const strategyGroupsEvent = ({
16
 export const strategyGroupsEvent = ({
17
+  DirectPacketExhibitionRef,
16
   LandPageRef,
18
   LandPageRef,
17
   CopywriterRef,
19
   CopywriterRef,
18
   originalityBasicInfoData,
20
   originalityBasicInfoData,
26
   aNewConfigEvent,
28
   aNewConfigEvent,
27
   getAdPresetsInfo,
29
   getAdPresetsInfo,
28
   updateHaveContent,
30
   updateHaveContent,
29
-  clearOriginalityInfo
31
+  clearOriginalityInfo,
32
+  computeCount
30
 }: IStrategyGroupsEvent) => {
33
 }: IStrategyGroupsEvent) => {
31
   const StrategyGroupsListRef = ref()
34
   const StrategyGroupsListRef = ref()
32
   const StrategyGroupsDialogRef = ref()
35
   const StrategyGroupsDialogRef = ref()
33
   /**打开策略组列表 */
36
   /**打开策略组列表 */
34
   const openStrategyGroups = () => {
37
   const openStrategyGroups = () => {
35
-    StrategyGroupsListRef.value?.initFun(true, pageInfo.groupsConfig)
38
+    StrategyGroupsListRef.value?.initFun(true, pageInfo.groupsConfig, pageInfo.last_ad_show_list)
36
   }
39
   }
37
 
40
 
38
   /**打开保存策略组弹框 */
41
   /**打开保存策略组弹框 */
69
     })
72
     })
70
     getStrategyDetail({
73
     getStrategyDetail({
71
       id: info.id
74
       id: info.id
72
-    }).then((res: any) => {
75
+    }).then(async (res: any) => {
73
       loading.close()
76
       loading.close()
74
-      console.log('111', res)
75
       if (res.rule_conf) {//规则配置
77
       if (res.rule_conf) {//规则配置
76
         pageInfo.RuleConfigObj = JSON.parse(res.rule_conf)
78
         pageInfo.RuleConfigObj = JSON.parse(res.rule_conf)
77
       }
79
       }
101
       }
103
       }
102
       if(res?.targetings_info){//定向包
104
       if(res?.targetings_info){//定向包
103
         pageInfo.directObj = JSON.parse(res?.targetings_info)
105
         pageInfo.directObj = JSON.parse(res?.targetings_info)
106
+        if(DirectPacketExhibitionRef.value && DirectPacketExhibitionRef.value[0]){
107
+          DirectPacketExhibitionRef.value[0].feedbackEvent(pageInfo.directObj)
108
+        }
104
       }
109
       }
105
       if(res?.creative_info){//创意素材
110
       if(res?.creative_info){//创意素材
106
         let creative_info = JSON.parse(res?.creative_info)
111
         let creative_info = JSON.parse(res?.creative_info)
114
           CopywriterRef.value[0].feedbackEvent(_.cloneDeep(pageInfo.copywriterInfoData))
119
           CopywriterRef.value[0].feedbackEvent(_.cloneDeep(pageInfo.copywriterInfoData))
115
         }
120
         }
116
       }
121
       }
122
+      await computeCount()
117
       if(res?.landing_page){//落地页
123
       if(res?.landing_page){//落地页
118
         pageInfo.copyLandPageInfoData = JSON.parse(res?.landing_page)
124
         pageInfo.copyLandPageInfoData = JSON.parse(res?.landing_page)
119
         if(LandPageRef.value && LandPageRef.value[0]){
125
         if(LandPageRef.value && LandPageRef.value[0]){

+ 3 - 3
src/components/capsulationMoudle/tableList.vue

158
 // 切换选择
158
 // 切换选择
159
 const toggleSelected = (rows?:any,flag?:boolean) => {
159
 const toggleSelected = (rows?:any,flag?:boolean) => {
160
   nextTick(()=>{
160
   nextTick(()=>{
161
-    if (rows&&rows.length>0) {
161
+    if (rows&&rows.length>0 && props.tableData && props.tableData.length > 0) {
162
       rows.forEach((row) => {
162
       rows.forEach((row) => {
163
-        tableRef.value!.toggleRowSelection(
163
+        tableRef.value?.toggleRowSelection(
164
             props.tableData.find(n=>{
164
             props.tableData.find(n=>{
165
               return n[props.rowKeyStr] == row[props.rowKeyStr]
165
               return n[props.rowKeyStr] == row[props.rowKeyStr]
166
             }), flag)
166
             }), flag)
167
       })
167
       })
168
     }else{
168
     }else{
169
-      tableRef.value!.clearSelection()
169
+      tableRef.value?.clearSelection()
170
     }
170
     }
171
   })
171
   })
172
 }
172
 }