|
@@ -1,9 +1,10 @@
|
1
|
1
|
<template>
|
2
|
2
|
<el-dialog
|
|
3
|
+ class="library_Dialog"
|
3
|
4
|
:model-value="dialogShow"
|
4
|
5
|
top="8px"
|
5
|
6
|
append-to-body
|
6
|
|
- :width="width"
|
|
7
|
+ width="1200px"
|
7
|
8
|
@close="dialogShow = false"
|
8
|
9
|
:modal="true"
|
9
|
10
|
:show-close="false"
|
|
@@ -12,30 +13,111 @@
|
12
|
13
|
:destroy-on-close="false"
|
13
|
14
|
draggable>
|
14
|
15
|
<template #header="{ close }">
|
15
|
|
- <div class="flex_between">
|
16
|
|
- <div class="c-0F161E f18 f-wei-600">{{dialogTitle}}</div>
|
|
16
|
+ <div class="flex dialog-header">
|
|
17
|
+ <div class="typeBorlineBox">
|
|
18
|
+ <div class="item" v-for="item in typeList.list" :key="item.key" :class="item.key == typeAc ? 'itemAc' : ''" @click="switchTypeItem(item.key)">
|
|
19
|
+ <div>{{item.name}}</div>
|
|
20
|
+ <!-- <div class="borLine"></div>-->
|
|
21
|
+ </div>
|
|
22
|
+ </div>
|
|
23
|
+ <div class="c-theme lMarauto f13 pointer" @click="goMaterialLibrary">管理素材</div>
|
17
|
24
|
</div>
|
18
|
25
|
</template>
|
19
|
|
- <div class="container" :style="{ maxHeight: height , minHeight:minheight }" v-loading="loading">
|
20
|
|
- <slot name="content"></slot>
|
|
26
|
+ <div class="library_body" v-loading="loading">
|
|
27
|
+<!-- 搜索框-->
|
|
28
|
+ <div class="flexWrap searchBox">
|
|
29
|
+ <Input ref="InputRef_text" title="素材名称" placeholderTxt="素材名称" class="bMar10" @changeEvent="()=>init()" @clearEvent="()=>init()"/>
|
|
30
|
+ <materialCatalog selectWidth="160px" ref="CataRef" title="素材目录" class="bMar10" @changeEvent="()=>init()" :clearableFlag="true"></materialCatalog>
|
|
31
|
+ <Select ref="sizeTypeRef"
|
|
32
|
+ :clearFlag="true"
|
|
33
|
+ :filterFlag="true"
|
|
34
|
+ title="尺寸"
|
|
35
|
+ selectWidth="160px" class="bMar10"
|
|
36
|
+ @changeEvent="()=>init()" @clearEvent="()=>init()"
|
|
37
|
+ :options="pageInfo.sizeTypeList"/>
|
|
38
|
+ <Select ref="ideaManRef"
|
|
39
|
+ :clearFlag="true"
|
|
40
|
+ title="创意人"
|
|
41
|
+ selectWidth="160px" class="bMar10"
|
|
42
|
+ :optObj="{k:'id',la:'username',val:'id'}"
|
|
43
|
+ @changeEvent="()=>init()" @clearEvent="()=>init()"
|
|
44
|
+ :options="pageInfo.createrList"/>
|
|
45
|
+ <Select ref="designerRef"
|
|
46
|
+ :clearFlag="true"
|
|
47
|
+ title="设计师" class="bMar10"
|
|
48
|
+ selectWidth="160px"
|
|
49
|
+ :optObj="{k:'id',la:'username',val:'id'}"
|
|
50
|
+ @changeEvent="()=>init()" @clearEvent="()=>init()"
|
|
51
|
+ :options="pageInfo.editorList"/>
|
|
52
|
+
|
|
53
|
+ <tagBlock ref="tagRef" title="素材标签" selectWidth="240px" :haveNewTag="false" class="bMar10"
|
|
54
|
+ @handleChange="val=>{pageInfo.tagChooseVal = val}" @hideChange="()=>init()"></tagBlock>
|
|
55
|
+ <TimeScreen title="时间" selectWidth="260px" :haveQuick="false" :clearFlag="true" :valueIsKong="true"
|
|
56
|
+ ref="timeRef"
|
|
57
|
+ :shortcuts="pageInfo.shortList"
|
|
58
|
+ @init="()=>init()"
|
|
59
|
+ class="bMar10 lMar10"></TimeScreen>
|
|
60
|
+ <span class="pointer c-theme lMar10 bMar10" @click="init()">刷新</span>
|
|
61
|
+ <div class="flex bMar10 lMar10">
|
|
62
|
+ <Tooltip notes="因媒体接口限制只能使用符合尺寸要求的素材" colorCss="c-d3" :iconSlotFalg="true">
|
|
63
|
+ <template v-slot:iconSlot>
|
|
64
|
+ <div class="f13 flex">仅显示可投放素材<el-icon class="f13 pointer lMar5" color="#d3d3d3"><i-ep-QuestionFilled/></el-icon></div>
|
|
65
|
+ </template>
|
|
66
|
+ </Tooltip>
|
|
67
|
+ <el-switch v-model="canPutOn" class="lMar5"/>
|
|
68
|
+ </div>
|
|
69
|
+ </div>
|
|
70
|
+<!-- 素材区-->
|
|
71
|
+ <div class="materialBox flexWrap">
|
|
72
|
+ <materialBlock v-for="item in pageInfo.materialList"
|
|
73
|
+ :key="item.id"
|
|
74
|
+ folderId="folder_id"
|
|
75
|
+ :paramsObj="item"
|
|
76
|
+ :checkShow="true"
|
|
77
|
+ :showCreateTimeFlag="true"
|
|
78
|
+ :showDetialFlag="false"
|
|
79
|
+ @init="()=>init()"
|
|
80
|
+ @checkChange="checkChangeItem"></materialBlock>
|
|
81
|
+
|
|
82
|
+ <noData v-if="(pageInfo.materialList && pageInfo.materialList.length==0) || !pageInfo.materialList"></noData>
|
|
83
|
+ </div>
|
|
84
|
+<!-- 分页区-->
|
|
85
|
+ <div class="pageBox flex">
|
|
86
|
+ <el-checkbox v-model="allChecked" @change="allChangeEvent">全选</el-checkbox>
|
|
87
|
+ <div class="c-666 lMar20 f12">使用原生页外顶部视频换内功能时,请筛选640*360,640*480,750*1334等尺寸素材</div>
|
|
88
|
+ <el-pagination
|
|
89
|
+ class="lMarauto"
|
|
90
|
+ :small="true"
|
|
91
|
+ v-model:current-page="currentPage"
|
|
92
|
+ v-model:page-size="pageSize"
|
|
93
|
+ :page-sizes="[10, 20, 50, 100]"
|
|
94
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
95
|
+ :total="300"
|
|
96
|
+ @current-change="handleCurrentChange"
|
|
97
|
+ />
|
|
98
|
+ </div>
|
21
|
99
|
</div>
|
22
|
100
|
<template #footer>
|
23
|
101
|
<div class="dialog-footer">
|
24
|
|
- <div>
|
25
|
|
- <span>已选素材: {{}} / {{}}</span>
|
|
102
|
+ <div class="flex">
|
|
103
|
+ <span>已选素材: {{pageInfo.chooseList_Item&&pageInfo.chooseList_Item.length || 0}} / {{total || 0}}</span>
|
|
104
|
+ <Tooltip notes="素材已根据媒体的要求进行过滤(广点通:支持视频格式:mp4、mov、avi,大小不超过100M)" colorCss="c-d3"/>
|
26
|
105
|
</div>
|
27
|
106
|
|
28
|
|
- <div class="lMarauto">
|
29
|
|
- <Tooltip notes="复制创意组" colorCss="c-theme" :slotFalg="true">
|
|
107
|
+ <div class="lMarauto flex">
|
|
108
|
+ <Tooltip notes="复制创意组" colorCss="c-theme" :iconSlotFalg="true" :contentSlotFalg="true">
|
30
|
109
|
<template v-slot:content>
|
|
110
|
+ <div>1、<b>素材可投放尺寸</b>:1440x2560;1080x1920;720x1280;<a href="https://thoughts.teambition.com/sharespace/5fc77c211dc1b5004618990a/docs/617b899f0a1306004198c393" target="_blank">详细尺寸>></a></div>
|
|
111
|
+ <div>2、<b>创量审核状态</b>:只有素材库素材通过审核才可以使用;</div>
|
|
112
|
+ </template>
|
|
113
|
+ <template v-slot:iconSlot>
|
31
|
114
|
<div class="flex">
|
32
|
|
- 找不到素材?点这里
|
33
|
|
- <el-icon size="14" class="f14 pointer"><i-ep-QuestionFilled/></el-icon>
|
|
115
|
+ 找不到素材?点这里<el-icon class="f14 pointer lMar5" color="#d3d3d3"><i-ep-QuestionFilled/></el-icon>
|
34
|
116
|
</div>
|
35
|
117
|
</template>
|
36
|
118
|
</Tooltip>
|
37
|
|
- <el-button plain @click="cancelEVent" size="default">取消</el-button>
|
38
|
|
- <el-button type="primary" plain @click="submitEVent" size="default" class="lMar10">提交</el-button>
|
|
119
|
+ <el-button plain @click="cancelEVent" size="default" class="lMar10">取消</el-button>
|
|
120
|
+ <el-button type="primary" @click="submitEVent" size="default" class="lMar10">提交</el-button>
|
39
|
121
|
</div>
|
40
|
122
|
</div>
|
41
|
123
|
</template>
|
|
@@ -44,14 +126,70 @@
|
44
|
126
|
<script setup lang="ts">
|
45
|
127
|
import {getCurrentInstance, nextTick, onMounted, reactive, ref} from "vue";
|
46
|
128
|
import Tooltip from '@/components/capsulationMoudle/_tooltip.vue'
|
|
129
|
+import Select from '@/components/capsulationMoudle/_select.vue'
|
|
130
|
+import TimeScreen from '@/components/capsulationMoudle/timeScreen.vue'
|
|
131
|
+import Input from '@/components/capsulationMoudle/_input.vue'
|
|
132
|
+import materialCatalog from '@/components/businessMoudle/materialLibrary/materialCatalog.vue'
|
|
133
|
+import tagBlock from '@/components/businessMoudle/materialLibrary/block/tagBlock.vue'
|
|
134
|
+import noData from '@/components/capsulationMoudle/noData.vue'
|
|
135
|
+import materialBlock from '@/components/businessMoudle/materialLibrary/block/materialBlock.vue'
|
|
136
|
+import {searchBoxTs} from '@/components/businessMoudle/batchGdt/configArea/creativeMaterial/ts/searchBox'
|
|
137
|
+import {publicSwitchType} from "@/components/businessMoudle/switchType";
|
|
138
|
+import { useRouter } from "vue-router";
|
|
139
|
+
|
|
140
|
+const router = useRouter();
|
47
|
141
|
|
48
|
142
|
const { proxy } = getCurrentInstance() as any;
|
49
|
143
|
// 全局方法定义
|
50
|
144
|
const NumberHandle = proxy.$NumberHandle
|
51
|
145
|
|
|
146
|
+const canPutOn = ref<boolean>(false)
|
|
147
|
+const allChecked = ref<boolean>(false)
|
|
148
|
+//全选
|
|
149
|
+const allChangeEvent = (val: any) => {
|
|
150
|
+ if(val){
|
|
151
|
+ pageInfo.chooseList_Item = []
|
|
152
|
+ pageInfo.materialList.forEach(item=>{
|
|
153
|
+ item.checked = true
|
|
154
|
+ pageInfo.chooseList_Item.push(item)
|
|
155
|
+ })
|
|
156
|
+ }else{
|
|
157
|
+ pageInfo.chooseList_Item = []
|
|
158
|
+ pageInfo.materialList.forEach(item=>{
|
|
159
|
+ item.checked = false
|
|
160
|
+ })
|
|
161
|
+ }
|
|
162
|
+}
|
|
163
|
+
|
|
164
|
+// 类型切换公共ts
|
|
165
|
+const typeListParams = reactive([
|
|
166
|
+ {name:'素材库',key:'video'},
|
|
167
|
+ {name:'收藏夹',key:'cover'},
|
|
168
|
+])
|
|
169
|
+const {
|
|
170
|
+ typeAc,
|
|
171
|
+ typeList,
|
|
172
|
+ switchTypeItem
|
|
173
|
+} = publicSwitchType(typeListParams)
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+//去素材管理
|
|
177
|
+const goMaterialLibrary = () => {
|
|
178
|
+ let newPage:any = router.resolve({
|
|
179
|
+ path: '/materialLibrary',
|
|
180
|
+ query: { type: 'material'}
|
|
181
|
+ })
|
|
182
|
+ window.open(newPage.href, "_blank")
|
|
183
|
+}
|
52
|
184
|
|
53
|
185
|
// 切换显隐
|
54
|
186
|
const dialogShow = ref<boolean>(false)
|
|
187
|
+const switchShow = (val:boolean,mtype:number)=>{
|
|
188
|
+ dialogShow.value = val
|
|
189
|
+ if(val){
|
|
190
|
+ initAll(mtype)
|
|
191
|
+ }
|
|
192
|
+}
|
55
|
193
|
|
56
|
194
|
//提交
|
57
|
195
|
const submitEVent = () => {
|
|
@@ -61,32 +199,102 @@ const submitEVent = () => {
|
61
|
199
|
const cancelEVent = () => {
|
62
|
200
|
dialogShow.value = false
|
63
|
201
|
}
|
64
|
|
-//账号列表
|
65
|
|
-// const init = async (page?:any,pageSize?:any) => {
|
66
|
|
-// tableListRef.value!.loading = true
|
67
|
|
-// const paramsModel = reactive<expertParam>({})
|
68
|
|
-// let res:any = await proxy.$http.get(Api.expert_living,paramsModel)
|
69
|
|
-// tableListRef.value!.loading = false
|
70
|
|
-// if(res&&res.errNo=='0'){
|
71
|
|
-// let resNew:any = res.rst
|
72
|
|
-// tableInfo.tableList = resNew.data
|
73
|
|
-// total.value = resNew.pageInfo.totalNum
|
74
|
|
-// }else{
|
75
|
|
-// ElMessage.error(res.errMsg)
|
76
|
|
-// }
|
77
|
|
-// }
|
78
|
202
|
|
79
|
203
|
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+// 父组件共享值
|
|
208
|
+defineExpose({
|
|
209
|
+ switchShow
|
|
210
|
+});
|
|
211
|
+
|
|
212
|
+//公共ts 和 素材库共用
|
|
213
|
+const {
|
|
214
|
+ pageInfo,
|
|
215
|
+ InputRef_text,
|
|
216
|
+ mtypeRef,
|
|
217
|
+ ctypeRef,
|
|
218
|
+ sizeTypeRef,
|
|
219
|
+ ideaManRef,
|
|
220
|
+ designerRef,
|
|
221
|
+ CataRef,
|
|
222
|
+ tagRef,
|
|
223
|
+ timeRef,
|
|
224
|
+ loading,
|
|
225
|
+ currentPage,
|
|
226
|
+ pageSize,
|
|
227
|
+ total,
|
|
228
|
+ init,
|
|
229
|
+ init_createrList,
|
|
230
|
+ getSizeList,
|
|
231
|
+ handleCurrentChange,
|
|
232
|
+ initAll,
|
|
233
|
+ checkChangeItem
|
|
234
|
+} = searchBoxTs(1)
|
|
235
|
+
|
80
|
236
|
onMounted(()=>{
|
81
|
237
|
nextTick(()=>{
|
82
|
238
|
|
83
|
239
|
})
|
84
|
240
|
})
|
85
|
241
|
</script>
|
|
242
|
+<style lang="scss">
|
|
243
|
+.library_Dialog{
|
|
244
|
+ .el-dialog__header{
|
|
245
|
+ padding: 10px 30px;
|
|
246
|
+ margin: 0;
|
|
247
|
+ }
|
|
248
|
+ .el-dialog__body{
|
|
249
|
+ padding: 10px 0 0;
|
|
250
|
+ .pageBox{
|
|
251
|
+ .el-input.is-disabled .el-input__inner{
|
|
252
|
+ height: 24px!important;
|
|
253
|
+ }
|
|
254
|
+ .el-input--small .el-input__inner{
|
|
255
|
+ height:24px!important;
|
|
256
|
+ }
|
|
257
|
+ }
|
|
258
|
+ }
|
|
259
|
+ .el-dialog__footer{
|
|
260
|
+ border-top: 1px solid #F2F2F2;
|
|
261
|
+ padding: 10px 30px;
|
|
262
|
+
|
|
263
|
+ }
|
|
264
|
+ //--el-component-size-small: 24px;
|
|
265
|
+}
|
|
266
|
+</style>
|
86
|
267
|
<style lang="scss" scoped>
|
|
268
|
+.library_body {
|
|
269
|
+ :deep(.spanTitle) {
|
|
270
|
+ font-size: 13px;
|
|
271
|
+ }
|
|
272
|
+ .searchBox{
|
|
273
|
+ border-bottom: 1px solid #F2F2F2;
|
|
274
|
+ padding: 0 30px;
|
|
275
|
+
|
|
276
|
+ }
|
|
277
|
+ .materialBox{
|
|
278
|
+ padding: 10px 30px;
|
|
279
|
+ background-color: #f2f2f2;
|
|
280
|
+ height: calc(100vh - 275px);
|
|
281
|
+ overflow-y: auto;
|
|
282
|
+ //scrollbar-color: transparent transparent;
|
|
283
|
+ &::-webkit-scrollbar{
|
|
284
|
+ width: 2px;
|
|
285
|
+ }
|
|
286
|
+ }
|
|
287
|
+ .pageBox{
|
|
288
|
+ border-top: 1px solid #F2F2F2;
|
|
289
|
+ padding: 10px 30px;
|
|
290
|
+ }
|
|
291
|
+}
|
|
292
|
+
|
87
|
293
|
.dialog-footer{
|
88
|
294
|
display: flex;
|
89
|
295
|
align-items: center;
|
90
|
|
- padding: 16px 32px 16px 24px;
|
|
296
|
+ color: #666;
|
|
297
|
+ font-size: 13px;
|
91
|
298
|
}
|
|
299
|
+
|
92
|
300
|
</style>
|