addProd.vue
27.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
<!-- 专区管理 -->
<template>
<div>
<div class="ctnr">
<glsx-combi-form class="glsx-combi-form" ref="baseInfoRef" labelWidth="154px" defaultWidth="432px" :isInline="false" :formObj.sync="formObj" :formData="formData" :formRules="myRule">
<!-- 模块分割线 -->
<div class="big-title" slot="coverBigTitleSlot">产品封面设置</div>
<div class="detail-title" slot="detailBigTitleSlot">
<div class="big-title">产品详情内容配置</div>
</div>
<div slot="moduleSlot" class="radio-slot">
<el-radio-group @change="menuRadioChange('firstMenu')" v-model="routeInfo.menuId">
<el-radio v-for="item in menuList" :key="item.id" :label="item.id">{{item.name}}</el-radio>
</el-radio-group>
</div>
<div slot="attrSlot" class="radio-slot">
<el-radio-group @change="menuRadioChange()" v-model="routeInfo.secondaryMenuId">
<el-radio v-for="item in secondaryMenuList" :key="item.id" :label="item.id">{{item.name}}</el-radio>
</el-radio-group>
</div>
<div slot="sceneSlot" class="radio-slot">
<el-radio-group v-model="routeInfo.thirdMenuId">
<el-radio v-for="item in thirdMenuList" :key="item.id" :label="item.id">{{item.name}}</el-radio>
</el-radio-group>
</div>
<div slot="contentSlot" class="radio-slot">
<el-radio-group v-model="formObj.type">
<el-radio :label="formObj.type">{{contentType[formObj.type]}}</el-radio>
</el-radio-group>
</div>
<div slot="businessSlot" class="business-slot">
<span class="module">{{routeInfo.menuName}}</span>
<i class="el-icon-arrow-right arrow-right"></i>
<span class="module">{{routeInfo.secondaryMenuName}}</span>
<i class="el-icon-arrow-right arrow-right"></i>
<template v-if="routeInfo.thirdMenuId">
<span class="module">{{routeInfo.thirdMenuName}}</span>
<i class="el-icon-arrow-right arrow-right"></i>
</template>
<span class="module active">特色方案</span>
</div>
<div slot="coverDetailSlot" class="cover-Slot">
<Upload v-if="!formObj.prodImg" :empty="true" @clickEvent="openCoverDialog" :default-style="{width: '84px', height: '84px'}" :formObj="formObj" btnName="创建封面" attr="coverDetail"></Upload>
<div v-else class="cover-wrap">
<div class="title">{{formObj.proName}}</div>
<Upload @delImage="delCoverDetail" @editImage="editCoverDetail" :default-style="{width: '88px', height: '60px'}" :isEdit="true" :formObj="formObj" btnName="创建封面" attr="prodImg"></Upload>
</div>
</div>
<div slot="mainImageSlot" class="main-image-Slot">
<Upload placement="right" tip="图片&视频只能上传一个" fileType="all" :formObj="formObj" attr="imageUrl"></Upload>
</div>
<div slot="viewSlot" class="view-slot">
<el-input placeholder="请输入观看人数" v-model="formObj.view" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" type="text"></el-input>
</div>
<div slot="detailModuleSlot" class="expansion-detail-slot">
<div>
<div :class="['tab-item',{'active-tab': item.selected, 'editing': contentTypeObj.id && contentTypeObj.id==item.id}]" @click.stop="selectContentType(item)" v-for="item in contentTypeList" :key="item.id">
<img v-if="item.selected" class="active-label" :src="require('@/assets/active-label.png')" />
<el-input v-if="contentTypeObj.id && contentTypeObj.id==item.id" maxlength="8" v-focus v-model="contentTypeObj.name" @blur="blurContentType" type="text" class="add-input"></el-input>
<template v-else>
<span >{{ item.name }}</span>
<i class="el-icon-edit edit" @click.stop="editContentType(item)"></i>
</template>
</div>
<div v-if="!isEditType" class="tab-item add-btn" @click="addContentType"><i class="el-icon-plus"></i>新建</div>
<el-input v-else maxlength="8" v-focus v-model="contentTypeObj.name" @blur="blurContentType" type="text" class="add-input"></el-input>
</div>
</div>
<div slot="expansionDetailSlot" class="expansion-detail-slot">
<div class="global-title-wrap">
<span v-for="(item,index) in selectedtypeList" :key="index" :class="['title', {'curTitleCla': curTypeIdx==index}]" @click="changeTable(item, index)">{{item.name}}</span>
<div class="expansion-content" v-if="selectedtypeList && selectedtypeList.length">
<glsx-combi-form ref="expansionRef" labelWidth="154px" defaultWidth="432px" :isInline="false" :formObj.sync="selectedtypeList[curTypeIdx]" :formData="expansionFormData" :formRules="expansionRule">
<div slot="detailImageSlot">
<Upload tip="建议尺寸:最大5M,宽度750px" btnName="上传详情图" :formObj="selectedtypeList[curTypeIdx]" attr="posterUrl" @delImage="delImage"></Upload>
</div>
<div slot="detailVideoSlot">
<Upload :disabled="!!selectedtypeList[curTypeIdx].buttonEventType || !!selectedtypeList[curTypeIdx].posterEventType" btnName="上传详情视频" fileType="video" :formObj="selectedtypeList[curTypeIdx]" @delImage="delImage" attr="videoUrl"></Upload>
</div>
<div slot="mouseEventSlot" class="link-slot">
<el-checkbox @change="showBox($event, 'mouseShow')" :disabled="!!selectedtypeList[curTypeIdx].videoUrl" @click.stop="showBox(1, 'mouseShow')" v-model="selectedtypeList[curTypeIdx].posterEventType">长按跳链接</el-checkbox>
<span class="link-btn" ref="mouseNameRef" @click="mouseShow = true">链接</span>
<!-- 鼠标链接弹窗 -->
<div class="link-dialog" ref="mouseRef" v-show="mouseShow && selectedtypeList[curTypeIdx].posterEventType">
<label for="">链接地址:</label>
<el-input show-word-limit maxlength="250" v-model="selectedtypeList[curTypeIdx].posterEventUrl" placeholder="请输入链接地址"></el-input>
</div>
</div>
<div slot="buttonEventSlot" class="link-slot">
<el-checkbox @change="showBox($event, 'btnShow')" :disabled="!!selectedtypeList[curTypeIdx].videoUrl" v-model="selectedtypeList[curTypeIdx].buttonEventType">按钮跳链接</el-checkbox>
<span ref="btnNameRef" v-if="!selectedtypeList[curTypeIdx].buttonEventName" @click.stop="showBox(1, 'btnShow')" class="link-btn">链接</span>
<span ref="btnNameRef" v-else class="link-btn" @click.stop="showBox(1, 'btnShow')">{{selectedtypeList[curTypeIdx].buttonEventName}}</span>
<!-- 按钮链接弹窗 -->
<div class="link-dialog button-link-dialog" ref="btnRef" v-show="btnShow && selectedtypeList[curTypeIdx].buttonEventType">
<div>
<label for="">按钮名称:</label>
<el-input show-word-limit maxlength="20" v-model="selectedtypeList[curTypeIdx].buttonEventName" placeholder="请输入按钮名称"></el-input>
</div>
<div style="margin-top: 20px;">
<label for="">链接地址:</label>
<el-input show-word-limit maxlength="250" v-model="selectedtypeList[curTypeIdx].buttonEventUrl" placeholder="请输入链接地址"></el-input>
</div>
</div>
</div>
</glsx-combi-form>
</div>
</div>
</div>
</glsx-combi-form>
<ProdCoverDialog @closeDialog="closeDialog" @confirmDialog="confirmDialog" :formObj="coverDeatilFormObj" v-if="coverVisible" :visible="coverVisible"></ProdCoverDialog>
</div>
<GLFooter class="gl-footer">
<el-button class="btn-cancle" @click="goListPage">取消</el-button>
<el-button @click="commitForm" type="primary">确定</el-button>
</GLFooter>
</div>
</template>
<script>
import Upload from '@/components/Upload'
import util from '@/utils/util'
import ProdCoverDialog from './components/ProdCoverDialog'
import glsxCombiForm from '@/components/glsx-combi-form'
export default {
name: 'addProd',
components: {
glsxCombiForm,
Upload,
ProdCoverDialog
},
directives: {
focus: {
inserted(el) {
el.querySelector('input').focus()
},
},
},
data() {
return {
size: 'small',
isEditType: false,
coverVisible: false,
routeInfo: {},
coverDeatilFormObj: {},
contentType: {
1: '特色方案',
2: '案例视频',
3: '营销海报',
4: '操作指引'
},
contentTypeObj: {
id: '',
name: ''
},
myRule: {
business: [
{
required: true,
validator: (rule, value, callback) => {
callback()
},
trigger: 'change'
}
],
module: [{required: true, validator: (rule, value, callback) => {return callback() }, trigger: 'change'}],
zone: [{
required: true,
validator: (rule, value, callback) => {
if (!this.routeInfo.secondaryMenuId) {
return callback(new Error('请选择业务属性'))
}else {
return callback()
}
},
trigger: 'change'
}
],
contZone: [{required: true, validator: (rule, value, callback) => {return callback() }, trigger: 'change'}],
scene: [
{
required: true,
validator: (rule, value, callback) => {
if (this.thirdMenuList.length && !this.routeInfo.thirdMenuId) {
return callback(new Error('请选择场景细分'))
}else {
return callback()
}
},
trigger: 'change'
}
],
title: [
{
required: true,
validator: (rule, value, callback) => {
if (!value) {
return callback(new Error('请输入图片/视频标题'))
} else if(value.length>30) {
return callback(new Error('图片/视频标题不能大于30个字'))
}else {
return callback()
}
},
trigger: 'change'
}],
phone: [{ required: true, message: '请输入联系电话', trigger: 'change' }],
view: [{ required: true, message: '请输入观看人数', trigger: 'change' }],
coverDetail: [
{
required: true,
validator: (rule, value, callback) => {
if(!this.formObj.prodImg){
callback(new Error('产品封面不能为空'))
}else if (!this.formObj.proName) {
callback(new Error('产品名称不能为空'))
} else{
callback()
}
},
trigger: 'change'
}
],
mainImage: [
{
required: true,
validator: (rule, value, callback) => {
if (!this.formObj.imageUrl && !this.formObj.vedioUrl) {
callback(new Error('请上传产品主图片/视频'))
} else{
callback()
}
},
trigger: 'change'
}
],
detailModule: [
{
required: true,
validator: (rule, value, callback) => {
let len = this.selectedtypeList?.length || 0
if(len){
callback()
}else{
callback(new Error(`请选择详情模块`))
}
},
trigger: 'change'
}
],
expansionDetail: [
{
required: true,
validator: (rule, value, callback) => {
let noProblemNum = 0, len = this.selectedtypeList?.length || 0
for(let i=0;i<len;i++){
const item = this.selectedtypeList[i]
if(!item.posterUrl) {
callback(new Error(`请上传${item.name}的详情图片`))
}else if(item.posterEventType && !item.posterEventUrl){
callback(new Error(`请输入${item.name}图片鼠标事件的链接地址`))
}else if(item.buttonEventType && !item.buttonEventUrl){
callback(new Error(`请输入${item.name}详情按钮事件的链接地址`))
}else if(item.buttonEventType && !item.buttonEventName){
callback(new Error(`请输入${item.name}详情按钮事件的按钮名称`))
}else{
noProblemNum ++
}
}
if(noProblemNum==len){
callback()
}
},
trigger: 'change'
}
],
},
formObj:{
menuId: '',
subMenuId: '',
type: '',
proName: '',
prodImg: '',
title: '',
vedioUrl: '',
imageUrl: '',
phone: '',
view: '',
},
formData:[
{
slotName: 'coverBigTitleSlot', //分割线
isHide: true,
},
{
label: '业务模块',
name: 'module',
isHide: true,
addHtml: 'moduleSlot'
},
{
label: '业务属性',
name: 'zone',
isHide: true,
addHtml: 'attrSlot'
},
{
label: '场景细分',
name: 'scene',
isHide: true,
addHtml: 'sceneSlot'
},
{
label: '内容专区',
name: 'contZone',
isHide: true,
addHtml: 'contentSlot'
},
{
label: '业务模块',
name: 'business',
addHtml: 'businessSlot'
},
{
label: '封面详情',
name: 'coverDetail',
addHtml: 'coverDetailSlot'
},
{
slotName: 'detailBigTitleSlot', //分割线
isHide: true,
},
{
label: '产品主图片/视频',
name: 'mainImage',
addHtml: 'mainImageSlot'
},
{
label: '图片/视频标题',
name: 'title',
type: 'input',
isDisabled: false,
maxlength: 30,
showLimit: true
},
{
label: '联系电话',
name: 'phone',
type: 'input',
isDisabled: false,
maxlength: 20
},
{
label: '观看人数',
name: 'view',
addHtml: 'viewSlot'
},
{
label: '详情模块',
name: 'detailModule',
addHtml: 'detailModuleSlot'
},
{
label: '模块内容',
name: 'expansionDetail',
addHtml: 'expansionDetailSlot'
},
],
expansionFormObj: {
mouseEventLink: ''
},
expansionFormData: [
{
label: '详情图片',
name: 'detailImage',
addHtml: 'detailImageSlot'
},
{
label: '详情视频',
name: 'detailVideo',
addHtml: 'detailVideoSlot'
},
{
label: '图片鼠标事件',
name: 'mouseEvent',
addHtml: 'mouseEventSlot'
},
{
label: '详情按钮事件',
name: 'buttonEvent',
addHtml: 'buttonEventSlot'
}
],
expansionRule: {
detailImage: [
{
required: true,
validator: (rule, value, callback) => {
callback()
},
trigger: 'change'
}
],
},
curTypeIdx: 0,
contentTypeList: [],
selectedtypeList: [],
menuList: [],
btnShow: false,
mouseShow: false
}
},
computed: {
secondaryMenuList(){
const target = this.menuList.find(item => item.id == this.routeInfo.menuId)
return target?.subList || []
},
thirdMenuList(){
const target = this.secondaryMenuList.find(item => item.id == this.routeInfo.secondaryMenuId)
return target?.subList || []
}
},
created(){
const urlParam = this.$route.params
this.routeInfo = JSON.parse(decodeURIComponent(urlParam.id))
const { menuId, subMenuId, id } = this.routeInfo
this.formObj.menuId = menuId
this.formObj.subMenuId = subMenuId
this.formObj.type = 1
if(id) {
this.formData.forEach(item => {
const hideItemList = ['module', 'zone', 'contZone', 'scene']
if(hideItemList.includes(item.name)){
item.isHide = false
}
if(item.name=='business') item.isHide = true
});
this.getContentDetail()
this.getMenuList()
}else{
this.getContentTypeList()
}
},
mounted() {
document.addEventListener("click", this.eventListener);
},
beforeDestroy(){
document.removeEventListener("click", this.eventListener);
},
methods: {
getMenuList() {
this.$apis.discover.getMenuListApi({}).then(res => {
this.getContentDetail()
if(res?.length){
this.menuList = res
}
})
},
menuRadioChange(level){
this.routeInfo.thirdMenuId = ''
if(level=='firstMenu') this.routeInfo.secondaryMenuId = ''
},
eventListener(e){
if (!this.$refs?.btnRef?.contains(e.target) && !this.$refs?.btnNameRef?.contains(e.target)) this.btnShow = false;
if (!this.$refs?.mouseRef?.contains(e.target) && !this.$refs?.mouseNameRef?.contains(e.target)) this.mouseShow = false;
},
openCoverDialog(){
this.coverVisible = true
},
closeDialog() {
this.coverVisible = false
},
showBox(e, key){
if(e){ this[key] = true }
},
editCoverDetail(){
this.coverDeatilFormObj = {
title: this.formObj.proName,
url: this.formObj.prodImg
}
this.coverVisible = true
},
delCoverDetail(){
this.formObj.proName = ''
this.formObj.prodImg = ''
this.coverDeatilFormObj = {}
},
confirmDialog(e){
const { title, url } = e
this.formObj.proName = title
this.formObj.prodImg = url
this.closeDialog()
},
clearContentTypeInfo(){
this.contentTypeObj = {
name: '',
id: ''
}
this.isEditType = false
},
blurContentType(){
const {id , name} = this.contentTypeObj
if(!name) {
this.clearContentTypeInfo()
this.$message.error('请输入详情分类')
return;
}
const params = {
name
}
if(id) params.id = id
this.$apis.discover.updateContentTypeApi(params).then(res => {
if(res) {
this.clearContentTypeInfo()
this.$message.success(`${id ? '修改成功' : '新增成功' }`)
this.getContentTypeList(1)
}
})
},
changeTable(item, index) {
this.curTypeIdx = index
},
getContentTypeList(isEdit){
this.$apis.discover.getContentTypeListApi({}).then(res => {
if(res?.length){
this.contentTypeList = res.map(item => {
let selected = false
if(isEdit) {
let target = this.selectedtypeList.find(ele => ele.typeId == item.id)
target && (selected = true)
}
return {...item, selected}
})
}
})
},
async getContentDetail(){
await this.getContentTypeList()
this.$apis.discover.getContentDetailApi({id : this.routeInfo.id}).then(res => {
if(res?.id){
for(let key in this.formObj){
this.formObj[key] = res[key]
}
if(res.mediaType == 2){
this.formObj.imageUrl = res.vedioUrl
}
res.detailList?.forEach(item => {
const target = this.contentTypeList.find(ele => ele.id ==item.typeId)
if(target){
target.selected = true
item.name = target.name
item.selected = true
}
item.buttonEventType = item.buttonEventType == 2
item.posterEventType = item.posterEventType == 2
})
this.selectedtypeList = res.detailList
}
})
},
commitForm(){
this.$refs.baseInfoRef.$refs.formRef.validate(valid => {
if(valid) {
let selectedtypeList = JSON.parse(JSON.stringify(this.selectedtypeList))
let formObj = JSON.parse(JSON.stringify(this.formObj))
selectedtypeList.forEach(element => {
const {posterEventType, posterEventUrl, buttonEventType, buttonEventName, buttonEventUrl} = element
element.posterEventType = posterEventType ? 2: 1
element.posterEventUrl = posterEventType ? posterEventUrl : ''
element.buttonEventType = buttonEventType ? 2: 1
element.buttonEventName = buttonEventType ? buttonEventName : ''
element.buttonEventUrl = buttonEventType ? buttonEventUrl : ''
if(this.routeInfo.id) element.contentId = this.routeInfo.id
})
const isImage = util.isImage(this.formObj.imageUrl)
const params = {
...formObj,
imageUrl: isImage ? this.formObj.imageUrl : '',
vedioUrl: isImage ? '' : this.formObj.imageUrl,
mediaType: isImage ? 1 : 2,
detailList: selectedtypeList,
subMenuId: this.routeInfo.thirdMenuId || this.routeInfo.secondaryMenuId
}
if(this.routeInfo.id) params.id = this.routeInfo.id
this.$apis.discover.addContentApi(params).then(res => {
if(res) {
this.$message.success('操作成功')
this.goListPage()
}
})
}else{
this.$message.error('请补充完整数据')
}
})
},
selectContentType(row){
const targetIdx = this.selectedtypeList.findIndex(item => item.typeId == row.id)
if(targetIdx>-1) {
row.selected = false
this.selectedtypeList.splice(targetIdx, 1)
this.curTypeIdx = 0
}else{
row.selected = true
let obj = {
name: row.name,
typeId: row.id,
selected: true,
posterEventType: false,
posterEventUrl: '',
buttonEventType: false,
buttonEventUrl: '',
buttonEventName: '',
videoUrl: '',
posterUrl: ''
}
this.selectedtypeList.push(obj)
this.curTypeIdx = this.selectedtypeList.length - 1
}
},
editContentType(item){
this.contentTypeObj = {
id: item.id,
name: item.name
}
},
addContentType(){
this.isEditType = true
},
goListPage(){
const { menuId , thirdMenuId, secondaryMenuId} = this.routeInfo
window.localStorage.setItem('menuInfo', JSON.stringify({menuId , thirdMenuId, secondaryMenuId}))
this.$router.push({path: '/discoverManager/index'})
}
}
}
</script>
<style scoped lang="scss">
.ctnr{
padding: 20px 20px 34px;
background-color: #fff;
.glsx-combi-form{
.big-title{
margin-left: 74px;
font-weight: 600;
font-size: 16px;
color: #333333;
margin-bottom: 20px;
}
.detail-title{
border-top: 1px dashed #EDEDED;
padding-top: 20px;
}
.business-slot{
.module{
color: #666666;
}
.arrow-right{
font-weight: 600;
margin:0 3px;
vertical-align: middle;
}
.active{
color: #5850FF;
}
}
.view-slot{
/deep/ .el-input{
width: 136px;
}
}
.cover-wrap{
box-shadow: 0 6px 20px 0 #7a7a7a33;
position: relative;
width: 88px;
height: 86px;
border-radius: 0 0 4px 4px;
/deep/ .img-item, /deep/ .operate{
border-radius: 4px 4px 0 0;
}
.title{
padding: 0 8px;
box-sizing: border-box;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 12px;
color: #323436;
position: absolute;
z-index: 5;
width: 100%;
text-align: center;
height: 26px;
background-color: #fff;
bottom: 0;
line-height: 26px;
border-radius: 0 0 4px 4px;
}
}
.expansion-detail-slot{
.tab-item {
display: inline-block;
margin-right: 4px;
height: 26px;
line-height: 26px;
padding: 0 20px;
background: #FAFBFE;
border: 1px solid #E8E8EA;
border-radius: 4px;
font-weight: 400;
font-size: 14px;
color: #666666;
cursor: default;
box-sizing: border-box;
position: relative;
&:hover{
.edit{
display: inline-block;
}
}
.active-label{
position: absolute;
right: -1px;
top: -1px;
width: 16px;
height: 16px;
}
.edit{
display: none;
top: 50%;
transform: translateY(-50%);
position: absolute;
cursor: pointer;
margin-left: 2px;
}
}
.active-tab{
border: 1px solid #5850FF;
color: #5850FF;
background-color: #fff;
}
.editing{
border: none;
padding: 0;
}
.add-btn{
background-color: transparent;
border: 1px dashed #00000026;
padding: 0 8px;
color: #333333;
cursor: pointer;
i {
margin-right: 4px;
font-size: 12px;
vertical-align: middle;
}
}
.add-input{
height: 26px;
width: 92px;
/deep/ .el-input__inner{
height: 26px;
margin-top: -5px;
}
}
.global-title-wrap{
.expansion-content{
border: 1px solid #E5E5E5;
width: 100%;
padding: 20px;
.link-slot{
position: relative;
/deep/ .el-checkbox__input.is-checked+.el-checkbox__label{
color: #333;
}
/deep/ .el-checkbox__label{
padding-left: 6px;
}
.link-btn{
color: #5850FF;
cursor: pointer;
margin-left: 18px;
}
.link-dialog{
border-radius: 4px;
background-color: #FAFAFA;
position: absolute;
z-index: 2;
transform: translate(0, -100%);
left: 0;
top: 0;
padding: 20px 20px 20px 0;
box-shadow: 0 4px 12px 0 #00000014;
label{
display: inline-block;
width: 154px;
text-align: right;
&::before{
content: "*";
color: #f56c6c;
margin-right: 4px;
}
}
.el-input{
width: 310px;
}
}
.button-link-dialog{
top: 100%;
transform: translate(0, 0);
}
}
}
}
}
}
}
.gl-footer{
margin-top: 16px;
}
</style>