xiuli.gao преди 1 година
родител
ревизия
31bb6977c8

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

@@ -245,7 +245,9 @@ const initFun = (flag, obj) => {
245 245
         TextLibraryRef.value.writ_toggle_selected(obj.data)
246 246
       }
247 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,7 +709,7 @@ const clearAllEvent = async () => {
709 709
                 let arr: any = _.cloneDeep(inject_accountIds)
710 710
                 let new_ac_ids: any = []
711 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 713
                   let ids_nn: number = all_ac_ids.findIndex(nn => nn == sub.account_id)
714 714
                   if (ids_nn == -1) {
715 715
                     all_ac_ids.push(sub.account_id)
@@ -739,11 +739,15 @@ const clearAllEvent = async () => {
739 739
 
740 740
 
741 741
 
742
-              const creatice_reuseEvent = async () => {
742
+              const creatice_reuseEvent = async (cMaterial) => {
743 743
                 requestObj.upload_flag = false
744 744
                 clearTimeout(requestObj.timer_get_upload_res)
745
+                if(cMaterial.list){
746
+                  pageInfo.creativeTeamList = _.cloneDeep(cMaterial.list)
747
+                }
745 748
                 let acArr: any = await get_new_ac_ids()
746 749
                 let targetArr: any = await get_new_target_ids()
750
+                console.log('targetArr',targetArr)
747 751
                 if (targetArr && targetArr.length == 0) {
748 752
                   emit('closeLoading')
749 753
                   return

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

@@ -38,7 +38,7 @@ const { proxy } = getCurrentInstance() as any;
38 38
 const NumberHandle = proxy.$NumberHandle
39 39
 
40 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 44
 const props = withDefaults(defineProps<{
@@ -56,19 +56,25 @@ const pageInfo = reactive<reactiveTableAndAny>({
56 56
 
57 57
 watch(()=>pageInfo.updateKey_DirectPacket,()=>{
58 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,6 +185,14 @@ const AcChangeEvent = (arr:any) => {
179 185
 const getObjValue = () => {
180 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 198
 defineExpose({
@@ -188,7 +202,8 @@ defineExpose({
188 202
   getObjValue,
189 203
   // addAcEvent,
190 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,9 +73,9 @@ const wayChange = (val:any) => {
73 73
   nextTick(()=>{
74 74
     pageInfo.exposeObj.type = val
75 75
     if(pageInfo.exposeObj.type=='2'){
76
-      comRef2.value!.echoChooseList()
76
+      comRef2.value?.echoChooseList()
77 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,10 +68,10 @@ export function useDriectTs(initAccListParams?:any,type?:string){
68 68
 
69 69
     //清空选项
70 70
     const clearTableSelect = () => {
71
-        tableListRef.value!.clearSelected()
71
+        tableListRef.value?.clearSelected()
72 72
     }
73 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,7 +13,6 @@
13 13
         <span class="pointer c-theme rMar10" @click="get_direct_list()">刷新</span>
14 14
         <el-button type="primary" class="lMarauto" @click="newAddEvent">新建定向包</el-button>
15 15
       </div>
16
-
17 16
       <div class="tMar20">
18 17
         <TableList
19 18
             :updateKey="Number(pageInfo.accId)"

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

@@ -247,6 +247,7 @@ const pageInfo = reactive<reactiveTableAndAny>({
247 247
     data: [],
248 248
     allocation_type: '',//分配形式 1自动分配 2程序化相乘分配
249 249
     loadPageRule: 0, //0 全部相同 //1 按账户分配 //2 分配到计划 // 3分配到广告
250
+    multiCopyTesting: 0,//分账户选择 0不开启 1开启
250 251
   },
251 252
   acc_plan_ad_count: {}, //各账户对应的计划数、广告数;用于微信视频号的配置
252 253
   groupsConfig: {},//已选择的策略组
@@ -286,7 +287,7 @@ watch(()=>resuse_complate_flag_creaBasicInfo.value,async (val)=>{
286 287
    if(val){
287 288
      // 创意素材 - 修改或者新增
288 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,7 +333,8 @@ watch(()=>cMaterial.key,()=>{
332 333
 const DirectPacketExhibitionRef = ref<{get_echoAcId:()=>void,
333 334
   showDirectPacket:()=>void,
334 335
   clearDirectContent:()=>void,
335
-  AcChangeEvent:(arr:any)=>void
336
+  AcChangeEvent:(arr:any)=>void,
337
+  feedbackEvent:(obj)=>void
336 338
   // addAcEvent:(arr:any)=>void,deleAcEvent:(arr:any)=>void
337 339
 }>()
338 340
 
@@ -343,6 +345,7 @@ const openDialogEvent = async (sub:any) => {
343 345
     nextTick(()=>{
344 346
       if(DirectPacketExhibitionRef.value) { DirectPacketExhibitionRef.value[0]?.showDirectPacket() }
345 347
       if(sub.haveContent){
348
+        console.log('get_echoAcIdget_echoAcIdget_echoAcIdget_echoAcIdget_echoAcIdget_echoAcId')
346 349
         if(DirectPacketExhibitionRef.value) { DirectPacketExhibitionRef.value[0]?.get_echoAcId() }
347 350
       }
348 351
     })
@@ -372,12 +375,12 @@ const openDialogEvent = async (sub:any) => {
372 375
     CopywriterRef.value[0]?.initFun(true, pageInfo?.copywriterInfoData)
373 376
   }
374 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 384
   nextTick(()=>{
382 385
     // id : adTitleList的id  chooseNum: 选中的个数  minusFlag:是否需要减少
383 386
     if(clearFlag){ //清空
@@ -394,9 +397,11 @@ const updateHaveContent = (id:number,chooseNum?:number,minusFlag?:boolean,clearF
394 397
         if(DirectPacketExhibitionRef.value){
395 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 406
         updateHaveContent(8,0,false,true)
402 407
         computeCount()
@@ -470,6 +475,8 @@ const landPageEvent = (obj) => {
470 475
   pageInfo.copyLandPageInfoData.data = obj.landPage;
471 476
   pageInfo.copyLandPageInfoData.allocation_type = obj.allocation_type;
472 477
   pageInfo.copyLandPageInfoData.loadPageRule = obj.loadPageRule;
478
+  pageInfo.copyLandPageInfoData.multiCopyTesting = obj.multiCopyTesting;
479
+  
473 480
   if(obj.landPage && JSON.stringify(obj.landPage) != '{}') {
474 481
     updateHaveContent(8,length)
475 482
   }else{
@@ -624,6 +631,7 @@ const {
624 631
   closeSeletedGroup,
625 632
   strategyGroupsUse
626 633
 } = strategyGroupsEvent({
634
+  DirectPacketExhibitionRef,
627 635
   LandPageRef,
628 636
   CopywriterRef,
629 637
   targetRef,
@@ -637,7 +645,8 @@ const {
637 645
   aNewConfigEvent,
638 646
   getAdPresetsInfo,
639 647
   updateHaveContent,
640
-  clearOriginalityInfo
648
+  clearOriginalityInfo,
649
+  computeCount
641 650
 })
642 651
 /**E 策略组 */
643 652
 

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

@@ -59,7 +59,8 @@ const closeLandPageDialog = (obj) => {
59 59
   emit('landPage',{
60 60
     landPage: obj.emitData,
61 61
     allocation_type: selectValue.value,
62
-    loadPageRule: obj.loadPageRule
62
+    loadPageRule: obj.loadPageRule,
63
+    multiCopyTesting: obj.multiCopyTesting
63 64
   })
64 65
 }
65 66
 /**分配切换选择 清空选中 */
@@ -67,7 +68,7 @@ const selectValueChange = () => {
67 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 72
   nextTick(()=>{
72 73
     if(count_info_2){
73 74
       count_info.value = count_info_2;
@@ -76,7 +77,7 @@ const initFun = (flag, count_info_2, last_ad_show_list_2) => {
76 77
       last_ad_show_list.value = last_ad_show_list_2
77 78
     }
78 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,7 +87,8 @@ const feedbackEvent = (obj) => {
86 87
   selectValue.value = obj.allocation_type
87 88
   closeLandPageDialog({
88 89
     emitData: obj.data,
89
-    loadPageRule: obj.loadPageRule
90
+    loadPageRule: obj.loadPageRule,
91
+    multiCopyTesting: obj.multiCopyTesting
90 92
   })
91 93
 }
92 94
 /**清空 */
@@ -94,7 +96,8 @@ const clearEvent = () => {
94 96
   selectValue.value = 1;
95 97
   closeLandPageDialog({
96 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,7 +42,7 @@
42 42
             </el-icon></span>
43 43
         </el-tooltip>
44 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 46
         v-if="multiCopyTesting == 0" style="margin-top:20px"></LandPageList>
47 47
       <AccMinprogram ref="AccMinprogramRef" v-if="multiCopyTesting == 1" :count_info="count_info" :page_type="page_type" :loadPageRule="loadPageRule"
48 48
         :accIdsList="accIdsList" @callBack="AccMinprogramChange"></AccMinprogram>
@@ -60,6 +60,7 @@ import { nextTick, onBeforeMount, reactive, ref, watch } from 'vue';
60 60
 import { ElMessage } from 'element-plus';
61 61
 import LandPageList from './landPageList.vue';
62 62
 import AccMinprogram from './accMinprogram.vue'
63
+import _ from 'lodash';
63 64
 const props = defineProps({
64 65
   page_type: {
65 66
     type: String,
@@ -99,12 +100,13 @@ const visible = ref(false)
99 100
 const loading = ref(false)
100 101
 const multiCopyTesting = ref(0)
101 102
 const allocation = ref(1) // 创意文案分配方式 1自动分配 2程序化测试
102
-let multipleSelection = []
103
+let multipleSelection:any = []
103 104
 const select_count = ref(-1) //限制选中的条数
104 105
 const accMinprogramInfo = ref();
105 106
 const AccMinprogramRef = ref()
106 107
 const last_ad_show_list = ref([])
107 108
 const acc_select_count = ref()
109
+const LandPageListRef = ref()
108 110
 
109 111
 onBeforeMount(() => {
110 112
   multiCopyTestingChange(multiCopyTesting.value)
@@ -222,6 +224,7 @@ const submitEvent = () => {
222 224
   emit('close', {
223 225
     emitData,
224 226
     loadPageRule: loadPageRule.value,
227
+    multiCopyTesting: multiCopyTesting.value
225 228
   })
226 229
 }
227 230
 const handleSelectionChange = (val) => {
@@ -232,11 +235,40 @@ const AccMinprogramChange = (obj) => {
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 239
   visible.value = flag
238 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 272
   nextTick(()=>{
241 273
     let acc_select_count_2:any = {}
242 274
     props.accIdsList.forEach((item)=>{

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

@@ -15,7 +15,7 @@
15 15
       </div>
16 16
       <div class="selected-text ml-10">已选择<span class="highlight">{{ multipleSelection?.length || 0 }}</span>条</div>
17 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 19
       :header-cell-style="headerCellStyle" :cell-style="cellStyle" @selection-change="handleSelectionChange"
20 20
       @select-all="handleSelectionAllChange">
21 21
       <el-table-column align="center" type="selection" reserve-selection width="55" fixed="left"
@@ -49,6 +49,7 @@ import clipboard3 from 'vue-clipboard3'
49 49
 import to from 'await-to-js'
50 50
 import { ElMessage } from 'element-plus'
51 51
 import { getAdcreativesLandingPageList } from './ts/api'
52
+import _ from 'lodash';
52 53
 
53 54
 const props = withDefaults(defineProps<{
54 55
   page_type: string,
@@ -128,7 +129,7 @@ const handleSelectionAllChange = (selection) => {
128 129
   emit('callBack', selection)
129 130
 }
130 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 133
     return true
133 134
   }
134 135
   if (multipleSelection.value?.length == props.select_count && props.select_count != -1) {
@@ -171,6 +172,24 @@ watch([
171 172
   }
172 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 193
 </script>
175 194
 <style scoped lang="scss">
176 195
 .content-wrap {

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

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

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

@@ -6,7 +6,7 @@ import _ from 'lodash'
6 6
 export function materialDeclare() {
7 7
   const CreativeMaterialRef = ref<{
8 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 11
   const cMaterial = reactive<reactiveTableAndAny>({
12 12
     list: [],

Файловите разлики са ограничени, защото са твърде много
+ 3653 - 605
src/components/businessMoudle/batchGdt/configArea/ts/mock.ts


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

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

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

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