xiuli.gao před 1 rokem
rodič
revize
103d2c8349

+ 14 - 5
src/components/businessMoudle/batchGdt/configArea/basicInfo/index.vue

@@ -210,7 +210,7 @@
210 210
   </el-dialog>
211 211
 </template>
212 212
 <script setup lang="ts">
213
-import { ref, reactive, watch, onBeforeMount, computed } from 'vue'
213
+import { ref, reactive, watch, onBeforeMount, computed, nextTick } from 'vue'
214 214
 import { basicInfoJson, scheduleBid, conversion_tracking_way, optimizationGoal_1, optimizationGoal_2 } from './ts/information'
215 215
 import { specificPositionAll } from './ts/other'
216 216
 import { scene, positionMapping } from './ts/scene'
@@ -225,7 +225,7 @@ import MySelect from './components/select.vue';
225 225
 import MyInput from './components/input.vue';
226 226
 import wildcard from './components/wildcard.vue'
227 227
 const props = defineProps({
228
-  visible: {
228
+  visible:{
229 229
     type: Boolean,
230 230
     default: false
231 231
   }
@@ -337,13 +337,17 @@ const submitEvent = () => {
337 337
   }
338 338
   if(flag) return
339 339
 
340
-  FillBackData({data: form, type: 'me', 'updateScene': basicInfoJsonInfo['场景'], cb: (data: {params: object,copywriting: []}) => {
340
+  FillBackData({data: form, type: 'me', 'updateScene': basicInfoJsonInfo['场景'], cb: (data: {params: any,copywriting: []}) => {
341 341
     if(adSet.value){
342 342
       loading.value = true;
343 343
       adPresetsSet(data.params).then((res)=>{
344 344
         loading.value = false;
345
-        emit('close','update')
345
+        localStorage.setItem('BasicInfo', data.params)
346
+        emit('close',{type:'update', copywriting: data.copywriting})
346 347
       })
348
+    } else { // 本地存储更新
349
+      localStorage.setItem('BasicInfo', data.params)
350
+      emit('close',{type:'update', copywriting: data.copywriting})
347 351
     }
348 352
   }})
349 353
 }
@@ -618,7 +622,12 @@ watch([
618 622
     basicInfoJsonInfo['目标详情'].attribution_type.data.list[1].disabled = false
619 623
   }
620 624
 }, { immediate: true, deep: true })
621
-
625
+/**弹框显隐监听 */
626
+watch(
627
+  () => props.visible,
628
+(newValue,oldValue) => {
629
+  dialogVisible.value = newValue
630
+}, { immediate: true, deep: true })
622 631
 </script>
623 632
 <style lang="scss" scoped>
624 633
 @import "@/assets/style/batchDialogGdt.scss";

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

@@ -96,7 +96,7 @@ const confirmEvent = async () => {
96 96
 }
97 97
 
98 98
 // 切换显隐
99
-const dialogShow = ref<boolean>(true)
99
+const dialogShow = ref<boolean>(false)
100 100
 const switchShow = (val:boolean)=>{
101 101
   dialogShow.value = val
102 102
   if(val){

+ 16 - 7
src/components/businessMoudle/batchGdt/configArea/index.vue

@@ -70,7 +70,7 @@
70 70
 <!-- 定向包 -->
71 71
   <DirectPacket ref="DirectPacketRef" @getShowValue="getDirectValue" :propInfo="pageInfo.directContent"></DirectPacket>
72 72
 <!-- 广告基本信息 -->
73
-<basicInfo :visible="basicInfoVisible" @close="basicInfoClose"></basicInfo>
73
+<BasicInfo :visible="basicInfoData.visible" @close="basicInfoClose"></BasicInfo>
74 74
 
75 75
 </template>
76 76
 <script setup lang="ts">
@@ -80,9 +80,8 @@ import Select from '@/components/capsulationMoudle/_select.vue'
80 80
 import DirectPacket from '@/components/businessMoudle/batchGdt/configArea/directPacket/index.vue'
81 81
 import RuleConfig from '@/components/businessMoudle/batchGdt/configArea/ruleConfig/index.vue'
82 82
 import {deepCopy} from "@/common/common";
83
-import basicInfo from "./basicInfo/index.vue";
83
+import BasicInfo from "./basicInfo/index.vue";
84 84
 
85
-const basicInfoVisible = ref(false)
86 85
 
87 86
 const { proxy } = getCurrentInstance() as any;
88 87
 // 全局方法定义
@@ -108,6 +107,12 @@ const pageInfo = reactive<reactiveTableAndAny>({
108 107
   directContent:{}
109 108
 })
110 109
 
110
+//打开广告基本信息
111
+const basicInfoData = reactive({
112
+  visible:false,
113
+  copywriting:[]
114
+})
115
+
111 116
 //打开规则配置
112 117
 const RuleConfigRef = ref<{switchShow:(val:boolean)=>void}>()
113 118
 const openRuleConfig = () => {
@@ -124,6 +129,9 @@ const openDialogEvent = (sub:any) => {
124 129
       DirectPacketRef.value!.switchShow(true)
125 130
     })
126 131
   }
132
+  if(sub.name == '广告基本信息'){
133
+    basicInfoData.visible = true;
134
+  }
127 135
 }
128 136
 
129 137
 //获取定向包的值
@@ -183,11 +191,12 @@ onMounted(()=>{
183 191
 })
184 192
 
185 193
 /**广告基础信息回调 */
186
-const basicInfoClose = (val) => {
187
-  if(val=='update'){
188
-
194
+const basicInfoClose = (obj) => {
195
+  if(obj?.type=='update'){
196
+    basicInfoData.copywriting = obj.copywriting
197
+    console.log(obj.copywriting)
189 198
   }
190
-  basicInfoVisible.value = false
199
+  basicInfoData.visible = false
191 200
 }
192 201
 </script>
193 202
 <style lang="scss" scoped>