liuxiaona 1 rok temu
rodzic
commit
be3c11f1c7
34 zmienionych plików z 33 dodań i 912 usunięć
  1. 1 1
      dist/assets/index.68d0a59d.css
  2. 1 1
      dist/assets/index.6f9f7248.js
  3. 1 1
      dist/index.html
  4. 1 1
      dist/js/_dialog/_dialog.22e3a793.js
  5. 1 1
      dist/js/_input/_input.da48b6ef.js
  6. 1 1
      dist/js/_select/_select.abef676f.js
  7. 1 1
      dist/js/adTask/index.fc3f3b23.js
  8. 1 1
      dist/js/api/api.2629c5d1.js
  9. 1 1
      dist/js/basisMoudle/accountManage.d96ef14e.js
  10. 1 1
      dist/js/basisMoudle/error.e6d1b842.js
  11. 1 1
      dist/js/basisMoudle/home.7d381729.js
  12. 1 1
      dist/js/basisMoudle/login.b76c352d.js
  13. 1 1
      dist/js/businessMoudle/adqManage.a2a05d83.js
  14. 1 1
      dist/js/collectClip/index.a3317a2a.js
  15. 0 1
      dist/js/configArea/index.6134a5a6.js
  16. 1 0
      dist/js/configArea/index.ceab07c4.js
  17. 1 1
      dist/js/gdtList/index.59808779.js
  18. 1 1
      dist/js/index/index.3b76f6fa.js
  19. 1 1
      dist/js/index/index.b415822b.js
  20. 1 1
      dist/js/layout/index.559aab50.js
  21. 1 1
      dist/js/layout/index_head.5aedc55d.js
  22. 1 1
      dist/js/materialBlock/materialBlock.f234b92c.js
  23. 1 1
      dist/js/materialLibrary/index.a58a7bec.js
  24. 1 1
      dist/js/menuPermission/menuList.7956221b.js
  25. 1 1
      dist/js/miniprogram/index.4483f072.js
  26. 1 1
      dist/js/noData/noData.6fed405e.js
  27. 1 1
      dist/js/tableInfo/tableInfo.f465cae1.js
  28. 1 1
      dist/js/taskList/index.c93b7105.js
  29. 1 1
      dist/js/timeScreen/timeScreen.3f5a75af.js
  30. 1 1
      dist/js/weekTime/weekTime.dd28e900.js
  31. 0 224
      src/components/businessMoudle/batchGdt/configArea/creativeMaterial/creativeTeambf.vue
  32. 2 1
      src/components/businessMoudle/batchGdt/configArea/creativeMaterial/index.vue
  33. 0 658
      src/components/businessMoudle/batchGdt/configArea/creativeMaterial/indexbf.vue
  34. 2 0
      src/components/businessMoudle/batchGdt/configArea/index.vue

Plik diff jest za duży
+ 1 - 1
dist/assets/index.68d0a59d.css


Plik diff jest za duży
+ 1 - 1
dist/assets/index.6f9f7248.js


+ 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.6f9f7248.js"></script>
9
+    <script type="module" crossorigin src="./assets/index.b5630d42.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">

Plik diff jest za duży
+ 1 - 1
dist/js/_dialog/_dialog.22e3a793.js


Plik diff jest za duży
+ 1 - 1
dist/js/_input/_input.da48b6ef.js


Plik diff jest za duży
+ 1 - 1
dist/js/_select/_select.abef676f.js


Plik diff jest za duży
+ 1 - 1
dist/js/adTask/index.fc3f3b23.js


Plik diff jest za duży
+ 1 - 1
dist/js/api/api.2629c5d1.js


Plik diff jest za duży
+ 1 - 1
dist/js/basisMoudle/accountManage.d96ef14e.js


Plik diff jest za duży
+ 1 - 1
dist/js/basisMoudle/error.e6d1b842.js


Plik diff jest za duży
+ 1 - 1
dist/js/basisMoudle/home.7d381729.js


Plik diff jest za duży
+ 1 - 1
dist/js/basisMoudle/login.b76c352d.js


Plik diff jest za duży
+ 1 - 1
dist/js/businessMoudle/adqManage.a2a05d83.js


Plik diff jest za duży
+ 1 - 1
dist/js/collectClip/index.a3317a2a.js


Plik diff jest za duży
+ 0 - 1
dist/js/configArea/index.6134a5a6.js


Plik diff jest za duży
+ 1 - 0
dist/js/configArea/index.ceab07c4.js


Plik diff jest za duży
+ 1 - 1
dist/js/gdtList/index.59808779.js


Plik diff jest za duży
+ 1 - 1
dist/js/index/index.3b76f6fa.js


Plik diff jest za duży
+ 1 - 1
dist/js/index/index.b415822b.js


Plik diff jest za duży
+ 1 - 1
dist/js/layout/index.559aab50.js


Plik diff jest za duży
+ 1 - 1
dist/js/layout/index_head.5aedc55d.js


Plik diff jest za duży
+ 1 - 1
dist/js/materialBlock/materialBlock.f234b92c.js


Plik diff jest za duży
+ 1 - 1
dist/js/materialLibrary/index.a58a7bec.js


Plik diff jest za duży
+ 1 - 1
dist/js/menuPermission/menuList.7956221b.js


Plik diff jest za duży
+ 1 - 1
dist/js/miniprogram/index.4483f072.js


Plik diff jest za duży
+ 1 - 1
dist/js/noData/noData.6fed405e.js


Plik diff jest za duży
+ 1 - 1
dist/js/tableInfo/tableInfo.f465cae1.js


Plik diff jest za duży
+ 1 - 1
dist/js/taskList/index.c93b7105.js


Plik diff jest za duży
+ 1 - 1
dist/js/timeScreen/timeScreen.3f5a75af.js


Plik diff jest za duży
+ 1 - 1
dist/js/weekTime/weekTime.dd28e900.js


+ 0 - 224
src/components/businessMoudle/batchGdt/configArea/creativeMaterial/creativeTeambf.vue

@@ -1,224 +0,0 @@
1
-<template>
2
-  <div class="TeamContent_box">
3
-    <div class="con_header">
4
-      <div class="typeBorlineBox">
5
-        <div class="item" v-for="item in typeList.list" :key="item.key" :class="item.key == typeAc ? 'itemAc' : ''" @click="switchTypeItem(item.key)">
6
-          <div>{{item.name}}
7
-          <span v-if="item.key=='video'">({{ITEM.videoUrl ? 1 : 0}}/1) </span>
8
-          <span v-if="item.key=='cover'">({{ITEM.picUrl ? 1 : 0}}/1) </span>
9
-          </div>
10
-<!--          <div class="borLine"></div>-->
11
-        </div>
12
-      </div>
13
-      <el-button type="primary" class="lMarauto" @click="open_Event(typeAc=='video' ? 1 : (typeAc=='cover' ? 2 : -1),maxNum_imageList)">添加素材</el-button>
14
-    </div>
15
-
16
-    <div class="con_body">
17
-      <div class="videoBox" v-if="typeAc=='video'">
18
-        <div class="flex">
19
-          <div v-for="maxNum in maxNum_imageList" :key="maxNum" class="uploadBox" @click.stop="!ITEM.videoUrl&&open_Event(1,1)">
20
-            <template v-if="!ITEM.videoUrl" >
21
-              <div class="iconBox">
22
-                <el-icon size="24" color="#999"><i-ep-Plus/></el-icon>
23
-              </div>
24
-            </template>
25
-            <div class="vid">
26
-              <video :src="ITEM.videoUrl" width="176" height="96"></video>
27
-              <div v-if="ITEM.videoName" style="padding: 0 5px;width: 176px" class="clampOne c-666 f12" :title="ITEM.videoName">{{ITEM.videoName}}</div>
28
-            </div>
29
-            <div class="replaceBtn" v-if="ITEM.videoUrl">
30
-              <div class="btn" @click.stop="open_Event(1,1)">替换素材</div>
31
-              <div class="btn tMar6" @click.stop="dele_Event('videoUrl')">删除</div>
32
-            </div>
33
-          </div>
34
-        </div>
35
-        <div class="tipsBox">
36
-          尺寸:{{video_tips.min_width}}px * {{video_tips.min_height}}px (推荐) ,
37
-          格式: <span v-for="(i,idx) in video_tips.file_format"><span v-if="idx!==0"> / </span>{{i.split('_')[2]}} </span> ,
38
-          小于{{video_tips.file_size}}KB ,
39
-          播放时长 {{video_tips.min_duration}} - {{video_tips.max_duration}} s
40
-        </div>
41
-      </div>
42
-
43
-      <div class="imageBox" v-if="typeAc=='cover'">
44
-        <div class="flex">
45
-          <div v-for="maxNum in maxNum_imageList" :key="maxNum" class="uploadBox" @click.stop="!ITEM.picUrl&&open_Event(2,1)">
46
-            <div class="iconBox" v-if="!ITEM.picUrl" @click="open_Event(2,1)">
47
-              <el-icon size="24" color="#999"><i-ep-Plus/></el-icon>
48
-            </div>
49
-            <div class="vid">
50
-              <img :src="ITEM.picUrl" alt="" style="height: 96px;margin: 0 auto;">
51
-              <div v-if="ITEM.picName" style="padding: 0 5px;width: 176px" class="clampOne c-666 f12" :title="ITEM.picName">{{ITEM.picName}}</div>
52
-            </div>
53
-            <div class="replaceBtn" v-if="ITEM.picUrl">
54
-              <div class="btn" @click.stop="open_Event(2,1)">替换素材</div>
55
-              <div class="btn tMar6" @click.stop="dele_Event('picUrl')">删除</div>
56
-              <div class="btn tMar6" v-if="ITEM.videoUrl" @click.stop="autoCoverEvent()">智能封面</div>
57
-            </div>
58
-          </div>
59
-        </div>
60
-        <div class="tipsBox">
61
-          尺寸:{{image_tips.width}}px * {{image_tips.height}}px (推荐) ,
62
-          格式: <span v-for="(i,idx) in image_tips.file_format"><span v-if="idx!==0"> / </span>{{i.split('_')[2]}}</span> ,
63
-          小于{{image_tips.file_size}}KB
64
-        </div>
65
-      </div>
66
-    </div>
67
-  </div>
68
-</template>
69
-<script setup lang="ts">
70
-import {getCurrentInstance, markRaw, nextTick, onMounted, reactive, ref} from "vue";
71
-import {fillZero, getCookie} from '@/common/common'
72
-import {publicSwitchType} from "@/components/businessMoudle/switchType";
73
-import {ElMessage} from "element-plus";
74
-
75
-const { proxy } = getCurrentInstance() as any;
76
-// 全局方法定义
77
-const NumberHandle = proxy.$NumberHandle
78
-
79
-const emit = defineEmits<{
80
-  (event: "deleEvent", type:string): void;
81
-  (event: "autoCoverEvent"): void;
82
-  (event: "openEvent", type:number,maxNum:number): void;
83
-}>();
84
-
85
-const props = withDefaults(defineProps<{
86
-  ITEM:any,
87
-  video_tips:any,
88
-  image_tips:any,
89
-  typeList:any,
90
-  minNum_imageList?:number,
91
-  maxNum_imageList?:number,
92
-}>(), {
93
-  ITEM:{},
94
-  video_tips:{},
95
-  image_tips:{},
96
-  typeList:[],
97
-  minNum_imageList:1,
98
-  maxNum_imageList:1,
99
-})
100
-
101
-// 类型切换公共ts
102
-const typeListParams = reactive(props.typeList)
103
-const {
104
-  typeAc,
105
-  typeList,
106
-  switchTypeItem
107
-} = publicSwitchType(typeListParams)
108
-
109
-
110
-//删除
111
-const dele_Event = (type:string) => {
112
-  emit('deleEvent',type)
113
-}
114
-//打开素材库
115
-const open_Event = (type:number,maxNum:number) => {
116
-  if(type < 0){
117
-    ElMessage.error('type错误!')
118
-    return
119
-  }
120
-  emit('openEvent',type,maxNum)
121
-}
122
-//智能封面
123
-const autoCoverEvent = () => {
124
-  emit('autoCoverEvent')
125
-}
126
-
127
-onMounted(()=>{
128
-  nextTick(()=>{
129
-
130
-  })
131
-})
132
-</script>
133
-<style lang="scss" scoped>
134
-.TeamContent_box{
135
-  .item{
136
-    font-size: 14px;
137
-  }
138
-  .con_header{
139
-    display: flex;
140
-    align-items: center;
141
-    padding: 8px 24px;
142
-    border-top: 1px solid #ebeef5;
143
-    border-bottom: 1px solid #ebeef5;
144
-  }
145
-  .con_body{
146
-    padding: 24px;
147
-    .uploadBox{
148
-      position: relative;
149
-      border: 1px solid #ebeef5;
150
-      width: 176px;
151
-      height: 124px;
152
-      margin-bottom: 10px;
153
-      margin-right: 10px;
154
-      .vid{
155
-        position: absolute;
156
-        top:5px;
157
-        width: 100%;
158
-      }
159
-      .iconBox{
160
-        position: absolute;
161
-        top: 50%;
162
-        left: 50%;
163
-        margin-top: -12px;
164
-        margin-left: -12px;
165
-        z-index: 2;
166
-      }
167
-      .img{
168
-        width: 176px;
169
-        height: 124px;
170
-        position: absolute;
171
-        top: 0;
172
-        left: 0;
173
-        z-index: 1;
174
-      }
175
-      .replaceBtn{
176
-        width: 176px;
177
-        height: 124px;
178
-        position: absolute;
179
-        top: 0;
180
-        left: 0;
181
-        background-color: rgba(0,0,0,.2);
182
-        opacity: 0;
183
-        z-index: 2;
184
-        display: flex;
185
-        flex-direction: column;
186
-        align-items: center;
187
-        justify-content: center;
188
-        .btn{
189
-          width: 80px;
190
-          height: 26px;
191
-          line-height: 26px;
192
-          text-align: center;
193
-          border-radius: 4px;
194
-          background-color: var(--el-color-primary);
195
-          color: #fff;
196
-          &:hover{
197
-            background-color: var(--el-color-primary-light-3);
198
-          }
199
-        }
200
-      }
201
-      .uploadIpt{
202
-        width: 176px;
203
-        height: 124px;
204
-        &:hover{
205
-          cursor: pointer;
206
-        }
207
-      }
208
-      &:hover{
209
-        //border: 1px solid #3173FF;
210
-        color: #3173FF;
211
-        cursor: pointer;
212
-        .replaceBtn{
213
-          opacity: 1;
214
-        }
215
-      }
216
-    }
217
-    .tipsBox{
218
-      color: #808695;
219
-      font-size: 12px;
220
-      margin-top: 10px;
221
-    }
222
-  }
223
-}
224
-</style>

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

@@ -37,7 +37,7 @@
37 37
         </div>
38 38
 
39 39
         <div class="content" v-loading="loading">
40
-<!--          {{pageInfo.creativeTeamList}}-->
40
+          {{pageInfo.creativeTeamList}}
41 41
           <template v-for="(item,idx) in pageInfo.creativeTeamList">
42 42
             <div class="flex tMar10" style="align-items: flex-start">
43 43
               <div class="TeamBox">
@@ -605,6 +605,7 @@ const dialogShow = ref<boolean>(false)
605 605
 const switchShow = (val:boolean,isEdit:boolean,arr:any,testNew_text:any)=>{
606 606
   dialogShow.value = val
607 607
   if(val){
608
+    console.log('pageInfo.creativeTeamList - switchShow',arr);
608 609
     pageInfo.testNew_text = testNew_text
609 610
     if(isEdit){ // 编辑
610 611
       videoRadioList.radioVal = props.haveShowVideoObj?.val?.toString()

+ 0 - 658
src/components/businessMoudle/batchGdt/configArea/creativeMaterial/indexbf.vue

@@ -1,658 +0,0 @@
1
-<template>
2
-  <div>
3
-    <Dialog
4
-        dialog_key="creaMaterial"
5
-        :dialogVisible="dialogShow"
6
-        @confirm="confirmEvent"
7
-        @close="dialogShow = false"
8
-        :closeOnModal="false"
9
-        width="1000px"
10
-        height="calc(100vh - 190px)"
11
-        top="8px"
12
-        dialog-title="创意素材">
13
-      <template v-slot:content>
14
-        <template v-if="haveCoverOrVideo == 1">
15
-          <RadioGroup :id="pageInfo.radioId"
16
-                      :radioList="coverRadioList.list"
17
-                      :echoVal="coverRadioList.radioVal"
18
-                      :title="coverRadioList.name"
19
-                      @returnEvent="val=>{coverRadioList.radioVal = val}"></RadioGroup>
20
-        </template>
21
-        <template v-if="haveShowVideoObj.show">
22
-          <RadioGroup :id="pageInfo.radioId"
23
-                      :radioList="videoRadioList.list"
24
-                      :echoVal="videoRadioList.radioVal"
25
-                      :title="videoRadioList.name"
26
-                      :haveNotes="videoRadioList.haveNotes"
27
-                      @returnEvent="val=>{videoRadioList.radioVal = val}"></RadioGroup>
28
-        </template>
29
-        <div class="titleBox flex borCon">
30
-          <div class="title">创意内容</div>
31
-          <div class="smallTitle lMar20">创意组数量: {{pageInfo.creativeTeamList&&pageInfo.creativeTeamList.length}}组</div>
32
-          <div class="lMarauto">
33
-            <el-button type="primary" v-if="haveCoverOrVideo == 1 || haveCoverOrVideo == 2" @click="openLibraryDialog(1)">批量添加视频</el-button>
34
-            <el-button type="primary" v-if="haveCoverOrVideo == 1 || haveCoverOrVideo == 3" @click="openLibraryDialog(2)">批量添加封面</el-button>
35
-            <el-button type="primary" @click="openTestNew">一键测新</el-button>
36
-          </div>
37
-        </div>
38
-
39
-        <div class="content" v-loading="loading">
40
-          {{pageInfo.creativeTeamList}}
41
-          <template v-for="(item,idx) in pageInfo.creativeTeamList">
42
-            <div class="flex tMar10" style="align-items: flex-start">
43
-              <div class="TeamBox">
44
-                <div class="TeamTitle flex">
45
-                  <div>创意组{{fillZero(idx+1)}}</div>
46
-                  <div class="lMarauto">
47
-                    <el-icon :size="14" color="#999" class="pointer" @click="item.show = !item.show"><i-ep-CaretBottom /></el-icon>
48
-                    <el-icon :size="14" color="red" class="lMar10 pointer" @click="deleItemEvent(item)"><i-ep-CircleClose /></el-icon>
49
-                  </div>
50
-                </div>
51
-                <div class="TeamContent">
52
-                  <el-collapse-transition>
53
-                    <CreativeTeam v-show="!item.show" :ITEM="item" :key="item.id"
54
-                                  :minNum_imageList="minNum_imageList"
55
-                                  :maxNum_imageList="maxNum_imageList"
56
-                                  :typeList="haveCoverOrVideo == 3 ? [{name:'封面',key:'cover'}] :
57
-                                  (haveCoverOrVideo == 2 ? [{name:'视频',key:'video'}] : [{name:'视频',key:'video'},{name:'封面',key:'cover'}])"
58
-                                  @deleEvent="(type)=>{deleItemUrlEvent(item,type)}"
59
-                                  @openEvent="(type,maxNum)=>{openLibraryDialog(type,maxNum,item.id)}"
60
-                                  @autoCoverEvent="openAutoCover(item.itemId)"
61
-                                  :video_tips="video_tips"
62
-                                  :image_tips="image_tips"></CreativeTeam>
63
-                  </el-collapse-transition>
64
-                </div>
65
-              </div>
66
-
67
-              <Tooltip notes="复制创意组" colorCss="c-theme" :iconSlotFalg="true">
68
-                <template v-slot:iconSlot>
69
-                  <div class="iconBox" @click="copyItemEvent(item)">
70
-                    <el-icon :size="14" color="#3173FF"><i-ep-DocumentCopy /></el-icon>
71
-                  </div>
72
-                </template>
73
-              </Tooltip>
74
-            </div>
75
-          </template>
76
-          <div class="addItem" @click="addItemEvent">添加创意组</div>
77
-        </div>
78
-      </template>
79
-      <template v-slot:footerBtn>
80
-        <el-button @click="clearEvent" size="default">清空</el-button>
81
-      </template>
82
-    </Dialog>
83
-
84
-    <!--素材弹框-->
85
-    <LibraryDialog ref="LibraryDialogRef"
86
-                   @assignEvent="assignEvent_LibraryDialog"
87
-                   :is_generate_cover="coverRadioList.radioVal"
88
-                   :video_tips="video_tips"
89
-                   :image_tips="image_tips"></LibraryDialog>
90
-    <!--      智能封面-->
91
-    <AutoCoverDialog ref="AutoCoverDialogRef" @assignEvent="assignEvent_AutoCoverDialog"></AutoCoverDialog>
92
-    <!--      一件测新-->
93
-    <TestNewDialog ref="TestNewDialogRef"
94
-                   @assignEvent="assignEvent_LibraryDialog"
95
-                   :propInfo="{testNewType,
96
-                              is_generate_cover:coverRadioList.radioVal,
97
-                              video_tips,
98
-                              image_tips
99
-                            }"></TestNewDialog>
100
-  </div>
101
-</template>
102
-<script setup lang="ts">
103
-import RadioGroup from '@/components/businessMoudle/batchGdt/configArea/directPacket/common/radioGroup.vue'
104
-import CreativeTeam from '@/components/businessMoudle/batchGdt/configArea/creativeMaterial/creativeTeam.vue'
105
-import LibraryDialog from '@/components/businessMoudle/batchGdt/configArea/creativeMaterial/libraryDialog.vue'
106
-import AutoCoverDialog from '@/components/businessMoudle/batchGdt/configArea/creativeMaterial/autoCover.vue'
107
-import TestNewDialog from '@/components/businessMoudle/batchGdt/configArea/creativeMaterial/testNew.vue'
108
-import Tooltip from '@/components/capsulationMoudle/_tooltip.vue'
109
-import {getCurrentInstance, inject, nextTick, onMounted, reactive, ref, watch} from "vue";
110
-import {reactiveTableAndAny} from "@/api/ApiModel";
111
-import Dialog from '@/components/capsulationMoudle/_dialog.vue'
112
-import {fillZero} from '@/common/common'
113
-import {ElMessage} from "element-plus";
114
-import _ from "lodash";
115
-import {uploadAddGetResTs} from "@/components/businessMoudle/batchGdt/configArea/creativeMaterial/ts/uploadAddGetRes";
116
-
117
-
118
-const { proxy } = getCurrentInstance() as any;
119
-// 全局方法定义
120
-const NumberHandle = proxy.$NumberHandle
121
-
122
-const emit = defineEmits<{
123
-  (event: "assignEvent", val: any, videoOnPuse?:any): void; //赋值给父组件
124
-  (event: "closeLoading"): void; //赋值给父组件
125
-}>();
126
-
127
-const props = withDefaults(defineProps<{
128
-  haveCoverOrVideo:number|string,
129
-  video_tips:any,
130
-  image_tips:any,
131
-  testNewType?:string,
132
-  haveShowVideoObj?:any,
133
-  minNum_imageList?:number,
134
-  maxNum_imageList?:number,
135
-}>(), {
136
-  haveCoverOrVideo:1,
137
-  testNewType:'video',
138
-  video_tips:{},
139
-  image_tips:{},
140
-  haveShowVideoObj:{},
141
-  minNum_imageList:1,
142
-  maxNum_imageList:3,
143
-})
144
-
145
-interface radioFace{
146
-  value:number | string,
147
-  name:string,
148
-  EgName:string,
149
-  radioVal:string,
150
-  haveNotes:boolean,
151
-  list:any
152
-}
153
-const coverRadioList = reactive<radioFace>({
154
-  value:1,
155
-  name:'自动生成封面',
156
-  EgName:'cover',
157
-  radioVal:'On',
158
-  haveNotes:true,
159
-  list:[
160
-    {name:'不开启',value:'Pause'},
161
-    {name:'开启',value:'On'},
162
-  ]
163
-})
164
-const videoRadioList = reactive<radioFace>({
165
-  value:'false',
166
-  name:'保存至视频号',
167
-  EgName:'video',
168
-  radioVal:'false',
169
-  haveNotes:true,
170
-  list:[
171
-    {name:'不开启',value:'false'},
172
-    {name:'开启',value:'true',notes:'开启后将同步上传至视频号动态、且广告投放期间浮层卡片可见'},
173
-  ]
174
-})
175
-
176
-
177
-const inject_accountIds = inject('accountIds')
178
-
179
-//页面数据
180
-const pageInfo = reactive<reactiveTableAndAny>({
181
-  radioId:0,
182
-  creativeTeamList:[{
183
-    id:0,
184
-    itemId:0,
185
-    videoUrl:'',
186
-    picUrl:'',
187
-    videoName:'',
188
-    picName:'',
189
-  }],
190
-  updateKey:1,
191
-  creativeTeamList_interim: [],//复制份
192
-  keyUrl:'videoUrl',
193
-  maxNum:0,//素材库最大可选个数
194
-  CreativeTeamId:-1,//创意组ID
195
-  resResult:[],//video_id和image_id在里边
196
-  haveCoverOrVideoFlag:false
197
-})
198
-
199
-//删除创意组的视频或图片
200
-const deleItemUrlEvent = (item: any,type:string) => {
201
-  let arr:any = pageInfo.creativeTeamList
202
-  let idx:number = arr.findIndex(n=>n.id== item.id)
203
-  let nameStr:string = type == 'videoUrl' ? 'videoName' : 'picName'
204
-  arr[idx][type] = ''
205
-  arr[idx][nameStr] = ''
206
-  arr[idx].resResult = []
207
-}
208
-
209
-//添加创意组
210
-const addItemEvent = () => {
211
-  let arr:any = pageInfo.creativeTeamList
212
-  let _id:number = arr[arr.length-1].id
213
-  arr.push({
214
-    id:_id+1,
215
-    itemId:0,
216
-    videoUrl:'',
217
-    picUrl:'',
218
-    videoName:'',
219
-    picName:'',
220
-  })
221
-}
222
-//删除创意组
223
-const deleItemEvent = (item:any) => {
224
-  let arr:any = pageInfo.creativeTeamList
225
-  if(arr&&arr.length==1){
226
-    ElMessage.error('至少保留1个创意组!')
227
-    return
228
-  }
229
-  let idx:number = arr.findIndex(n=>n.id== item.id)
230
-  arr.splice(idx,1)
231
-  ElMessage.success('删除成功')
232
-}
233
-
234
-//复制创意组
235
-const copyItemEvent = async (item:any) => {
236
-  let arr:any = pageInfo.creativeTeamList
237
-  let idx:number = arr.findIndex(n=>n.id== item.id)
238
-  let _id:number = arr[arr.length-1].id
239
-  let obj:any = _.cloneDeep(arr[idx])
240
-  if(await update_haveCoverOrVideoFlag(obj)){
241
-    ElMessage.error('请完善素材')
242
-    return
243
-  }
244
-  obj.id = _id+1
245
-  arr.push(obj)
246
-  ElMessage.success('复制成功')
247
-}
248
-
249
-//清空创意组
250
-const clearEvent = () => {
251
-  pageInfo.creativeTeamList = [{
252
-    id:0,
253
-    itemId:0,
254
-    videoUrl:'',
255
-    picUrl:'',
256
-    videoName:'',
257
-    picName:'',
258
-  }]
259
-  pageInfo.creativeTeamList_interim = []
260
-  pageInfo.resResult = []
261
-}
262
-
263
-//一件测新
264
-const TestNewDialogRef = ref<{switchShow:(val:boolean)=>void}>()
265
-const openTestNew = () => {
266
-  nextTick(()=>{
267
-    TestNewDialogRef.value!.switchShow(true)
268
-  })
269
-}
270
-
271
-// 智能封面
272
-const AutoCoverDialogRef = ref<{switchShow:(val:boolean,fileId:number)=>void}>()
273
-const openAutoCover = (fileId:number) => {
274
-  nextTick(()=>{
275
-    AutoCoverDialogRef.value!.switchShow(true,fileId)
276
-  })
277
-}
278
-const assignEvent_AutoCoverDialog = (val:string,fileId:number) => {
279
-  if(fileId == 0){
280
-    return
281
-  }
282
-  let arr:any = pageInfo.creativeTeamList
283
-  let idx:number = arr.findIndex(n=>n.itemId == fileId)
284
-  arr[idx].picUrl = val
285
-}
286
-
287
-//打开素材库弹框
288
-const LibraryDialogRef = ref<{switchShow:(val:boolean,mtype:number,maxNum:number)=>void}>()
289
-const openLibraryDialog = (type:number,maxNum?:any,id?:any) => {
290
-  nextTick(()=>{
291
-    pageInfo.maxNum = maxNum||0
292
-    pageInfo.CreativeTeamId = (id || id==0) ? id : -1
293
-    LibraryDialogRef.value!.switchShow(true,type,maxNum||0)
294
-  })
295
-}
296
-//素材确认返回来的值
297
-const assignEvent_LibraryDialog = (val:any,mType:number,resResult:any) => {
298
-  pageInfo.keyUrl = mType==1?'videoUrl':'picUrl'
299
-  pageInfo.creativeTeamList_interim = _.cloneDeep(val)
300
-  pageInfo.resResult = _.cloneDeep(resResult)
301
-  pageInfo.updateKey++
302
-}
303
-
304
-//更新
305
-const update_haveCoverOrVideoFlag = (item:any) => {
306
-  let flag:any = props.haveCoverOrVideo == 1 ? (!item.videoUrl || !item.picUrl) :
307
-      (props.haveCoverOrVideo == 2 ? !item.videoUrl : !item.picUrl)
308
-  return flag
309
-}
310
-
311
-//清空没用的
312
-const clearNoUse = (arr:any)=>{
313
-  arr.forEach( async (item,idx)=>{
314
-    if(await update_haveCoverOrVideoFlag(item)){
315
-      arr.splice(idx,1)
316
-    }
317
-  })
318
-}
319
-
320
-watch(()=>pageInfo.updateKey,()=>{
321
-  nextTick( ()=>{
322
-    let arr:any = pageInfo.creativeTeamList
323
-    let arr_interim:any = pageInfo.creativeTeamList_interim
324
-    let CreativeTeamId:number = pageInfo.CreativeTeamId
325
-    let flagCoverAuto:boolean = coverRadioList.radioVal == 'On' ? true :false//自动生成封面
326
-    if(CreativeTeamId<0){ // 批量新增的时候
327
-      //先清空没用的
328
-      if(arr&&arr.length>=2){
329
-        clearNoUse(arr)
330
-        // arr.forEach( async (item,idx)=>{
331
-        //   if(await update_haveCoverOrVideoFlag(item)){
332
-        //     arr.splice(idx,1)
333
-        //   }
334
-        // })
335
-      }
336
-      //将选中的全部push进去
337
-      let _id:number = arr[arr.length-1].id
338
-      if(props.haveCoverOrVideo == 2){ // 视频
339
-        arr_interim.forEach((item,idx)=>{
340
-          arr.push({
341
-            id:_id+1+idx,
342
-            itemId:item.id,
343
-            videoUrl :item.oss_url,
344
-            videoName:item.name,
345
-            picUrl:flagCoverAuto ? item.pre_oss_url : '',
346
-            picName:flagCoverAuto ? item.name : '',
347
-            resResult:  resResult_to_creativeTeamList(item.id)
348
-          })
349
-        })
350
-      }else if(props.haveCoverOrVideo == 3){ //图片
351
-        arr_interim.forEach((item,idx)=>{
352
-          arr.push({
353
-            id:_id+1+idx,
354
-            itemId:item.id,
355
-            picUrl :item.oss_url,
356
-            picName:item.name,
357
-            resResult:  resResult_to_creativeTeamList(item.id)
358
-          })
359
-        })
360
-      }else{ // 视频和封面
361
-        if(pageInfo.keyUrl == 'videoUrl'){
362
-          arr_interim.forEach((item,idx)=>{
363
-            arr.push({
364
-              id:_id+1+idx,
365
-              itemId:item.id,
366
-              videoUrl :item.oss_url,
367
-              videoName:item.name,
368
-              picUrl:flagCoverAuto ? item.pre_oss_url : '',
369
-              picName:flagCoverAuto ? item.name : '',
370
-              resResult:  resResult_to_creativeTeamList(item.id)
371
-            })
372
-          })
373
-        }else{ //封面
374
-          arr_interim.forEach((item,idx)=>{
375
-            arr.push({
376
-              id:_id+1+idx,
377
-              picUrl :item.oss_url,
378
-              picName:item.name,
379
-            })
380
-          })
381
-        }
382
-      }
383
-
384
-      //再清空没用的
385
-      clearNoUse(arr)
386
-      // arr.forEach(async (item,idx)=>{
387
-      //   if(await update_haveCoverOrVideoFlag(item)){
388
-      //     arr.splice(idx,1)
389
-      //   }
390
-      // })
391
-    }else{// 单个新增或更换
392
-      let _idx:number = arr.findIndex(n=>n.id == CreativeTeamId)
393
-      if(props.haveCoverOrVideo == 2) { // 视频
394
-        arr_interim.forEach((item,idx)=>{
395
-          arr[_idx].videoUrl = item.oss_url
396
-          arr[_idx].videoName = item.name
397
-          arr[_idx].itemId = item.id
398
-          arr[_idx].resResult = resResult_to_creativeTeamList(item.id)
399
-          if(arr[_idx].picUrl == '' && flagCoverAuto){
400
-            arr[_idx].picUrl = item.pre_oss_url || ''
401
-          }
402
-        })
403
-      }else if(props.haveCoverOrVideo == 3){ //图片
404
-        arr_interim.forEach((item,idx)=>{
405
-          arr[_idx].picUrl = item.oss_url
406
-          arr[_idx].picName = item.name
407
-          arr[_idx].itemId = item.id
408
-          arr[_idx].resResult = resResult_to_creativeTeamList(item.id)
409
-        })
410
-      }else{
411
-        if(pageInfo.keyUrl == 'videoUrl'){ //视频
412
-          arr_interim.forEach((item,idx)=>{
413
-            arr[_idx].videoUrl = item.oss_url
414
-            arr[_idx].videoName = item.name
415
-            arr[_idx].itemId = item.id
416
-            arr[_idx].resResult = resResult_to_creativeTeamList(item.id)
417
-            if(arr[_idx].picUrl == '' && flagCoverAuto){
418
-              arr[_idx].picUrl = item.pre_oss_url || ''
419
-            }
420
-          })
421
-        }else{ //封面
422
-          arr_interim.forEach((item,idx)=>{
423
-            arr[_idx].picUrl = item.oss_url
424
-            arr[_idx].picName = item.name
425
-          })
426
-        }
427
-      }
428
-
429
-    }
430
-  })
431
-})
432
-
433
-//将上传文件返回来的值 添加到 列表creativeTeamList中去
434
-const resResult_to_creativeTeamList = (id:any) => {
435
-  //将上传后的每一个素材返回值分开给 itemId 下的resResult
436
-  let resResult_arr:any = []
437
-  pageInfo.resResult.forEach(resR=>{
438
-    for(let r in resR){
439
-      if(id == r){
440
-        let obj:any = {}
441
-        obj.account_id = resR.account_id
442
-        obj[r] = resR[r]
443
-        resResult_arr.push(obj)
444
-      }
445
-    }
446
-  })
447
-
448
-  return resResult_arr
449
-}
450
-
451
-
452
-// 切换显隐
453
-const dialogShow = ref<boolean>(false)
454
-const switchShow = (val:boolean,isEdit:boolean,arr:any)=>{
455
-  dialogShow.value = val
456
-  if(val){
457
-    if(isEdit){ // 编辑
458
-      videoRadioList.radioVal = props.haveShowVideoObj?.val?.toString()
459
-      if(arr&&arr.length>0){
460
-        pageInfo.creativeTeamList = _.cloneDeep(arr)
461
-      }else{
462
-        clearEvent()
463
-      }
464
-    }else{//新增
465
-      clearEvent()
466
-    }
467
-  }
468
-}
469
-const loading = ref<boolean>(false)
470
-//确定按钮
471
-const confirmEvent = () => {
472
-  let arr:any = pageInfo.creativeTeamList
473
-  let flagBig:boolean = false // 大开关,判断是否还有未选的
474
-  arr.forEach(async (item,idx)=>{
475
-    if(await update_haveCoverOrVideoFlag(item)){
476
-      flagBig = true
477
-    }
478
-  })
479
-  if(flagBig){
480
-    ElMessage.error('请完善素材')
481
-    return
482
-  }
483
-  console.log(videoRadioList.radioVal,'videoRadioList.radioVal');
484
-
485
-  if(props.haveShowVideoObj.show){
486
-    emit('assignEvent',arr,videoRadioList.radioVal)
487
-  }else{
488
-    emit('assignEvent',arr)
489
-  }
490
-  dialogShow.value = false
491
-}
492
-
493
-//提供给主页面使用
494
-const clearAllEvent = async () => {
495
-  pageInfo.creativeTeamList = []
496
-  pageInfo.creativeTeamList_interim = []
497
-  emit('assignEvent',pageInfo.creativeTeamList)
498
-}
499
-
500
-//删除一些账号的数据
501
-const deleAcEvent = (arr:any,haveAssign:boolean) => {
502
-  //arr空 就清空数据
503
-  console.log(arr,pageInfo.creativeTeamList)
504
-  if(arr&&arr.length>0){
505
-    arr.forEach(obj=>{
506
-      if(pageInfo.creativeTeamList&&pageInfo.creativeTeamList.length>0){
507
-        pageInfo.creativeTeamList.forEach((dir,dirIdx)=>{
508
-          if(dir.resResult && Array.isArray(dir.resResult)) {
509
-            dir.resResult.forEach((sub,subIdx)=>{
510
-              if(sub.account_id == obj.id){}else{
511
-                dir.resResult.splice(subIdx,1)
512
-              }
513
-            })
514
-          }
515
-        })
516
-      }
517
-    })
518
-    if(haveAssign){
519
-      emit('assignEvent',pageInfo.creativeTeamList)
520
-    }
521
-  }else{
522
-    clearAllEvent()
523
-  }
524
-}
525
-
526
-//复用 - 将选中的素材重新上传一遍到新账号 - 得到返回值 - 抛给主页面
527
-const get_new_ac_ids = () => {
528
-  let arr:any = _.cloneDeep(inject_accountIds)
529
-  let new_ac_ids:any = []
530
-  let all_ac_ids:any = []
531
-  pageInfo.creativeTeamList.forEach(pcItem=>{
532
-    pcItem.resResult.forEach(sub=>{
533
-      let ids_nn:number = all_ac_ids.findIndex(nn=>nn==sub.account_id)
534
-      if(ids_nn==-1){
535
-        all_ac_ids.push(sub.account_id)
536
-      }
537
-    })
538
-  })
539
-  arr._object[arr._key].forEach(a=>{
540
-    let idx:number = all_ac_ids.findIndex(n=>n == a.id)
541
-    if(idx==-1){
542
-      new_ac_ids.push(a)
543
-    }
544
-  })
545
-  console.log(new_ac_ids,'new_ac_ids');
546
-  console.log(arr,'arr');
547
-  return new_ac_ids
548
-}
549
-const get_new_target_ids = () => {
550
-  let new_target_ids:any = []
551
-  pageInfo.creativeTeamList.forEach(item=>{
552
-    let ids_nn:number = new_target_ids.findIndex(nn=>nn==item.itemId)
553
-    if(ids_nn==-1){
554
-      new_target_ids.push(item.itemId)
555
-    }
556
-  })
557
-  console.log(new_target_ids,'new_target_ids');
558
-  return new_target_ids
559
-}
560
-
561
-
562
-const creatice_reuseEvent = async () => {
563
-  requestObj.upload_flag = false
564
-  clearTimeout(requestObj.timer_get_upload_res)
565
-  let acArr:any = await get_new_ac_ids()
566
-  let targetArr:any = await get_new_target_ids()
567
-  if(targetArr&&targetArr.length==0){
568
-    emit('closeLoading')
569
-    return
570
-  }
571
-  if(acArr&&acArr.length==0){
572
-    emit('closeLoading')
573
-    return
574
-  }
575
-  await get_up_record_id(targetArr,acArr)
576
-  await get_upload_res()
577
-}
578
-//上传素材成功后 走的代码
579
-const successEvent = (resResult:any) => {
580
-  pageInfo.resResult = _.cloneDeep(resResult)
581
-  pageInfo.creativeTeamList.forEach(item=>{
582
-    item.resResult = item.resResult.concat(resResult_to_creativeTeamList(item.itemId))
583
-  })
584
-  emit('assignEvent',pageInfo.creativeTeamList)
585
-}
586
-
587
-const {get_up_record_id,get_upload_res,requestObj} =
588
-    uploadAddGetResTs(coverRadioList.radioVal == 'On' ? 1 : 0,successEvent)
589
-
590
-
591
-// 父组件共享值
592
-defineExpose({
593
-  switchShow,
594
-  clearAllEvent,
595
-  creatice_reuseEvent,
596
-  deleAcEvent
597
-});
598
-
599
-</script>
600
-<style lang="scss" scoped>
601
-@import "src/assets/style/batchGdt.scss";
602
-.marPad{
603
-  margin: 8px 24px;
604
-}
605
-.borCon{
606
-  border: 1px solid #ebeef5;
607
-  border-radius: 4px;
608
-  color: #161E46;
609
-  padding: 8px 24px;
610
-}
611
-.titleBox{
612
-  .title{
613
-    font-weight: 600;
614
-  }
615
-  .smallTitle{
616
-    font-size: 12px;
617
-  }
618
-}
619
-.content{
620
-  .TeamBox{
621
-    flex: 1;
622
-    flex-shrink: 0;
623
-    border: 1px solid #ebeef5;
624
-    border-radius: 4px;
625
-    color: #161E46;
626
-    .TeamTitle{
627
-      padding: 8px 24px;
628
-      background-color: #fafafa;
629
-      line-height: 32px;
630
-    }
631
-    .TeamContent{
632
-      background-color: #fff;
633
-      width: 100%;
634
-    }
635
-
636
-  }
637
-  .iconBox{
638
-    padding: 6px 8px;
639
-    margin-left: 8px;
640
-    width: 32px;
641
-    cursor: pointer;
642
-    border: 1px solid #ebeef5;
643
-    border-radius: 4px;
644
-  }
645
-  .addItem{
646
-    padding: 8px 24px;
647
-    line-height: 24px;
648
-    background-color: #fafafa;
649
-    text-align: center;
650
-    width: calc(100% - 32px - 8px);
651
-    margin-top: 20px;
652
-    cursor: pointer;
653
-    &:hover{
654
-      font-weight: 600;
655
-    }
656
-  }
657
-}
658
-</style>

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

@@ -4,6 +4,7 @@
4 4
   </div>
5 5
   <div class="areaBox">
6 6
     <div class="areaTitle">配置区
7
+      {{cMaterial.list}}
7 8
       <span class="smallTitle lMarauto">预览广告数 : <span class="c-theme">{{NumberHandle(pageInfo.num_total.adNum)||0}}</span></span>
8 9
     </div>
9 10
     <div class="areaCon">
@@ -463,6 +464,7 @@ const openDialogEvent = async (sub:any) => {
463 464
 
464 465
   if(sub.name == '创意素材'){
465 466
     await get_cover_info()
467
+    console.log('打开之前CreativeMaterialRef',cMaterial.list);
466 468
     CreativeMaterialRef.value?.switchShow(true,sub.haveContent,cMaterial.list,cMaterial.testNew_text)
467 469
     console.log(cMaterial.array_property);
468 470
   }