CompanyCalendarDialog.vue
24.7 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
<template>
<el-dialog
:visible.sync="visibleProxy"
:show-close="false"
width="90%"
:close-on-click-modal="false"
custom-class="company-calendar-dialog"
append-to-body
>
<div class="dialog-inner">
<div class="dialog-header">
<div class="dialog-title">公司日历</div>
<div class="dialog-legend">
<span v-for="item in legendList" :key="item.type" class="legend-item">
<span class="legend-dot" :style="{ background: item.color }"></span>
{{ item.label }}
</span>
</div>
<span class="dialog-close" @click="visibleProxy = false"><i class="el-icon-close"></i></span>
</div>
<div class="dialog-content" v-loading="loading">
<FullCalendar
ref="fullCalendar"
class="company-calendar"
defaultView="dayGridMonth"
:header="calendarHeader"
:plugins="calendarPlugins"
:weekends="true"
:events="calendarEvents"
locale="zh-cn"
:buttonText="buttonText"
:height="calendarHeight"
:eventLimit="true"
allDayText="全天"
:editable="false"
@datesRender="datesRender"
@eventClick="handleEventClick"
/>
</div>
</div>
<el-dialog
:visible.sync="detailVisible"
:show-close="false"
width="520px"
custom-class="company-calendar-detail-dialog"
append-to-body
>
<div v-if="selectedEvent" class="detail-inner">
<div class="header">
<div class="title">日程详情</div>
<span class="close" @click="detailVisible = false"><i class="el-icon-close"></i></span>
</div>
<div class="body">
<div class="row"><span class="label">主题</span><span class="value">{{ selectedEvent.title || '无' }}</span></div>
<div class="row">
<span class="label">类型</span>
<span class="value">
<span class="type-dot" :style="{ background: typeColorMap[selectedEvent.type] || '#3b82f6' }"></span>
{{ selectedEventTypeLabel }}
</span>
</div>
<div class="row"><span class="label">日期</span><span class="value">{{ selectedEventDateStr }}</span></div>
<div class="row"><span class="label">时间</span><span class="value">{{ selectedEventTimeRange }}</span></div>
<div class="row" v-if="selectedEvent.desc">
<span class="label">内容</span>
<span class="value value--multiline">{{ selectedEvent.desc }}</span>
</div>
<div class="row" v-if="selectedEvent.store">
<span class="label">门店/地点</span>
<span class="value">{{ selectedEvent.store || '无' }}</span>
</div>
<div class="row row--remark">
<span class="label">备注</span>
<span class="value value--multiline">{{ selectedEvent.remark || '无' }}</span>
</div>
<div class="row row--attachments">
<span class="label">附件</span>
<span class="value value--block">
<template v-if="selectedEventAttachments.length">
<div
v-for="(att, idx) in selectedEventAttachments"
:key="idx"
class="attachment-item"
:class="'attachment-item--' + getAttachmentFileType(att)"
>
<span class="attachment-icon-wrap">
<i :class="'el-icon-' + getAttachmentIcon(att)"></i>
</span>
<span class="attachment-name" :title="att.name || att.fileName">{{ att.name || att.fileName || '附件' }}</span>
<a v-if="att.url" :href="att.url" target="_blank" rel="noopener" class="attachment-link">
<i class="el-icon-download"></i> 下载
</a>
<span v-else class="attachment-link attachment-link--disabled">下载</span>
</div>
</template>
<span v-else class="attachment-empty">无</span>
</span>
</div>
</div>
<div class="footer">
<el-button size="small" @click="detailVisible = false">关 闭</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</template>
<script>
import FullCalendar from '@fullcalendar/vue'
import dayGridPlugin from '@fullcalendar/daygrid'
import timeGridPlugin from '@fullcalendar/timegrid'
import interactionPlugin from '@fullcalendar/interaction'
export default {
name: 'CompanyCalendarDialog',
components: { FullCalendar },
props: {
visible: { type: Boolean, default: false }
},
data() {
const today = new Date()
const y = today.getFullYear()
const m = String(today.getMonth() + 1).padStart(2, '0')
const d = String(today.getDate()).padStart(2, '0')
const todayStr = `${y}-${m}-${d}`
return {
loading: false,
// 公司层面的会议/活动数据(后续可换成接口)
companyEvents: [
// 当天 7 条示例(操作会 + 大会 + 活动),方便预览密集情况
{ id: 'E001', date: todayStr, start: `${todayStr}T09:00:00`, end: `${todayStr}T10:00:00`, type: 'ops', title: '操作会 - 紫荆店' },
{ id: 'E002', date: todayStr, start: `${todayStr}T10:30:00`, end: `${todayStr}T11:30:00`, type: 'ops', title: '操作会 - 西沙店' },
{ id: 'E003', date: todayStr, start: `${todayStr}T13:00:00`, end: `${todayStr}T14:00:00`, type: 'training', title: '培训会 - 新员工入职营', remark: '请提前准备入职材料', attachments: [{ name: '入职手册.pdf' }, { name: '培训PPT.pptx' }] },
{ id: 'E004', date: todayStr, start: `${todayStr}T14:30:00`, end: `${todayStr}T15:30:00`, type: 'training', title: '培训会 - 科美新品讲解' },
{ id: 'E005', date: todayStr, start: `${todayStr}T16:00:00`, end: `${todayStr}T17:00:00`, type: 'activity', title: '门店活动 - 紫荆店会员沙龙', remark: '需准备茶点与签到礼' },
{ id: 'E006', date: todayStr, start: `${todayStr}T18:00:00`, end: `${todayStr}T19:00:00`, type: 'activity', title: '门店活动 - 西沙店体验日' },
{ id: 'E007', date: todayStr, start: `${todayStr}T19:30:00`, end: `${todayStr}T21:00:00`, type: 'meeting', title: '全体大会 - 本月复盘', remark: '各店长携带本月数据报表', attachments: [{ name: '本月经营数据.xlsx' }, { name: '会议议程.pdf' }] },
// 其它日期:尽量覆盖当月大部分天
{ id: 'E008', date: `${y}-${m}-01`, start: `${y}-${m}-01T10:00:00`, end: `${y}-${m}-01T12:00:00`, type: 'meeting', title: '月初经营例会' },
{ id: 'E009', date: `${y}-${m}-02`, start: `${y}-${m}-02T14:00:00`, end: `${y}-${m}-02T16:00:00`, type: 'ops', title: '操作会 - 静居寺店' },
{ id: 'E010', date: `${y}-${m}-03`, start: `${y}-${m}-03T09:30:00`, end: `${y}-${m}-03T11:00:00`, type: 'training', title: '培训会 - 会员沟通话术' },
{ id: 'E011', date: `${y}-${m}-04`, start: `${y}-${m}-04T15:00:00`, end: `${y}-${m}-04T17:00:00`, type: 'activity', title: '门店活动 - 双流店开放日' },
{ id: 'E012', date: `${y}-${m}-05`, start: `${y}-${m}-05T10:00:00`, end: `${y}-${m}-05T11:30:00`, type: 'ops', title: '操作会 - 保利店' },
{ id: 'E013', date: `${y}-${m}-06`, start: `${y}-${m}-06T14:00:00`, end: `${y}-${m}-06T15:30:00`, type: 'training', title: '培训会 - 逆龄项目进阶' },
{ id: 'E014', date: `${y}-${m}-07`, start: `${y}-${m}-07T19:00:00`, end: `${y}-${m}-07T20:30:00`, type: 'activity', title: '门店活动 - 线上直播专场' },
{ id: 'E015', date: `${y}-${m}-08`, start: `${y}-${m}-08T09:30:00`, end: `${y}-${m}-08T11:00:00`, type: 'meeting', title: '事业部经营会' },
{ id: 'E016', date: `${y}-${m}-09`, start: `${y}-${m}-09T13:30:00`, end: `${y}-${m}-09T15:00:00`, type: 'ops', title: '操作会 - 南湖店' },
{ id: 'E017', date: `${y}-${m}-10`, start: `${y}-${m}-10T10:00:00`, end: `${y}-${m}-10T11:30:00`, type: 'training', title: '培训会 - 顾问心法' },
{ id: 'E018', date: `${y}-${m}-11`, start: `${y}-${m}-11T15:00:00`, end: `${y}-${m}-11T17:00:00`, type: 'activity', title: '门店活动 - 西站店沙龙' },
{ id: 'E019', date: `${y}-${m}-12`, start: `${y}-${m}-12T09:30:00`, end: `${y}-${m}-12T11:00:00`, type: 'ops', title: '操作会 - 融创店' },
{ id: 'E020', date: `${y}-${m}-13`, start: `${y}-${m}-13T14:00:00`, end: `${y}-${m}-13T15:30:00`, type: 'training', title: '培训会 - 经典案例分享' },
{ id: 'E021', date: `${y}-${m}-14`, start: `${y}-${m}-14T19:00:00`, end: `${y}-${m}-14T20:30:00`, type: 'activity', title: '门店活动 - 会员观影会' },
{ id: 'E022', date: `${y}-${m}-15`, start: `${y}-${m}-15T10:00:00`, end: `${y}-${m}-15T12:00:00`, type: 'training', title: '产品培训 - 生命之波' },
{ id: 'E023', date: `${y}-${m}-16`, start: `${y}-${m}-16T09:30:00`, end: `${y}-${m}-16T11:00:00`, type: 'ops', title: '操作会 - 科技部' },
{ id: 'E024', date: `${y}-${m}-17`, start: `${y}-${m}-17T15:00:00`, end: `${y}-${m}-17T17:00:00`, type: 'activity', title: '门店活动 - 会员答谢宴' },
{ id: 'E025', date: `${y}-${m}-18`, start: `${y}-${m}-18T14:00:00`, end: `${y}-${m}-18T15:30:00`, type: 'training', title: '培训会 - 绩效与辅导' },
{ id: 'E026', date: `${y}-${m}-19`, start: `${y}-${m}-19T10:00:00`, end: `${y}-${m}-19T11:30:00`, type: 'ops', title: '操作会 - 门店联动' },
{ id: 'E027', date: `${y}-${m}-20`, start: `${y}-${m}-20T09:30:00`, end: `${y}-${m}-20T11:30:00`, type: 'meeting', title: '季度全体大会', remark: '全体参加,线上同步', attachments: [{ name: '季度总结报告.pdf' }, { name: '下季目标分解.xlsx' }] },
{ id: 'E028', date: `${y}-${m}-21`, start: `${y}-${m}-21T19:00:00`, end: `${y}-${m}-21T20:30:00`, type: 'activity', title: '门店活动 - 新品体验会' },
{ id: 'E029', date: `${y}-${m}-22`, start: `${y}-${m}-22T10:00:00`, end: `${y}-${m}-22T11:30:00`, type: 'training', title: '培训会 - 工具使用' },
{ id: 'E030', date: `${y}-${m}-23`, start: `${y}-${m}-23T14:00:00`, end: `${y}-${m}-23T15:30:00`, type: 'ops', title: '操作会 - 区域复盘' },
{ id: 'E031', date: `${y}-${m}-24`, start: `${y}-${m}-24T15:00:00`, end: `${y}-${m}-24T16:30:00`, type: 'activity', title: '门店活动 - 老客回访日' },
{ id: 'E032', date: `${y}-${m}-25`, start: `${y}-${m}-25T09:30:00`, end: `${y}-${m}-25T11:00:00`, type: 'meeting', title: '高管经营例会' }
],
calendarPlugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
calendarEvents: [],
calendarHeader: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
buttonText: { today: '今日', month: '月', week: '周', day: '日' },
startTime: null,
endTime: null,
calendarHeight: 720,
detailVisible: false,
selectedEvent: null,
typeColorMap: {
ops: '#6366f1',
training: '#22c55e',
meeting: '#f97316',
activity: '#ec4899'
}
}
},
computed: {
visibleProxy: {
get() {
return this.visible
},
set(v) {
this.$emit('update:visible', v)
}
},
legendList() {
return [
{ type: 'ops', label: '操作会', color: this.typeColorMap.ops },
{ type: 'training', label: '培训会', color: this.typeColorMap.training },
{ type: 'meeting', label: '全体大会', color: this.typeColorMap.meeting },
{ type: 'activity', label: '门店活动', color: this.typeColorMap.activity }
]
},
selectedEventTypeLabel() {
if (!this.selectedEvent || !this.selectedEvent.type) return '—'
const item = this.legendList.find(x => x.type === this.selectedEvent.type)
return item ? item.label : this.selectedEvent.type
},
selectedEventDateStr() {
if (!this.selectedEvent || !this.selectedEvent.start) return '—'
return this.formatDate(new Date(this.selectedEvent.start))
},
selectedEventTimeRange() {
if (!this.selectedEvent || !this.selectedEvent.start) return '—'
const start = new Date(this.selectedEvent.start)
const end = this.selectedEvent.end ? new Date(this.selectedEvent.end) : start
const fmt = d => `${String(d.getHours()).padStart(2, '0')}:${String(d.getMinutes()).padStart(2, '0')}`
return `${fmt(start)} - ${fmt(end)}`
},
selectedEventAttachments() {
if (!this.selectedEvent || !this.selectedEvent.attachments) return []
const list = Array.isArray(this.selectedEvent.attachments) ? this.selectedEvent.attachments : []
return list.filter(a => a && (a.name || a.fileName))
}
},
watch: {
visible(v) {
if (v) {
this.$nextTick(() => {
this.calcHeight()
this.initData()
})
}
}
},
mounted() {
window.addEventListener('resize', this.calcHeight)
},
beforeDestroy() {
window.removeEventListener('resize', this.calcHeight)
},
methods: {
calcHeight() {
this.$nextTick(() => {
const el = this.$el && this.$el.querySelector('.dialog-content')
if (el) {
// 提高最小高度,让每天能展示更多事件
this.calendarHeight = Math.max(el.clientHeight - 20, 650)
}
})
},
datesRender(info) {
const view = info.view
this.startTime = view.activeStart
this.endTime = view.activeEnd
this.initData()
},
initData() {
this.loading = true
setTimeout(() => {
let filtered = [...this.companyEvents]
if (this.startTime && this.endTime) {
filtered = filtered.filter(e => {
const t = new Date(e.start).getTime()
return t >= this.startTime.getTime() && t < this.endTime.getTime()
})
}
this.calendarEvents = filtered.map(evt => {
const color = this.typeColorMap[evt.type] || '#3b82f6'
return {
id: evt.id,
title: evt.title,
start: new Date(evt.start).toISOString(),
end: new Date(evt.end).toISOString(),
color,
editable: false,
allDay: false,
extendedProps: {
type: evt.type
}
}
})
this.loading = false
}, 200)
},
formatDate(d) {
const dt = d instanceof Date ? d : new Date(d)
const y = dt.getFullYear()
const m = String(dt.getMonth() + 1).padStart(2, '0')
const day = String(dt.getDate()).padStart(2, '0')
return `${y}-${m}-${day}`
},
getAttachmentFileType(att) {
const name = (att.name || att.fileName || '').toLowerCase()
if (name.endsWith('.pdf')) return 'pdf'
if (name.endsWith('.xlsx') || name.endsWith('.xls')) return 'xlsx'
if (name.endsWith('.pptx') || name.endsWith('.ppt')) return 'pptx'
if (name.endsWith('.docx') || name.endsWith('.doc')) return 'doc'
if (name.endsWith('.png') || name.endsWith('.jpg') || name.endsWith('.jpeg')) return 'img'
return 'default'
},
getAttachmentIcon(att) {
const type = this.getAttachmentFileType(att)
if (type === 'img') return 'picture-outline'
return 'document'
},
handleEventClick(info) {
const evt = info && info.event
if (!evt) return
const raw = this.companyEvents.find(e => e.id === evt.id) || {}
this.selectedEvent = {
id: raw.id,
title: raw.title || evt.title,
type: (evt.extendedProps && evt.extendedProps.type) || raw.type,
start: raw.start,
end: raw.end,
desc: raw.desc,
store: raw.store,
remark: raw.remark,
attachments: raw.attachments ? [...raw.attachments] : []
}
this.detailVisible = true
}
}
}
</script>
<style lang="scss">
@import '~@fullcalendar/core/main.css';
@import '~@fullcalendar/daygrid/main.css';
@import '~@fullcalendar/timegrid/main.css';
.company-calendar-dialog .company-calendar {
.fc-toolbar.fc-header-toolbar {
padding: 16px 20px;
margin-bottom: 0;
border-bottom: 2px solid #f1f5f9;
background: linear-gradient(135deg, rgba(59,130,246,0.02) 0%, rgba(96,165,250,0.02) 100%);
}
.fc-toolbar-title {
font-size: 18px;
font-weight: 700;
color: #1e293b;
}
.fc-button-primary {
background-color: #3b82f6;
border-color: #3b82f6;
border-radius: 10px;
font-size: 13px;
font-weight: 500;
height: 34px;
line-height: 34px;
padding: 0 14px;
transition: all 0.2s;
&:hover {
background: #2563eb;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
}
.fc-button-primary:not(:disabled):active,
.fc-button-primary:not(:disabled).fc-button-active {
background-color: #2563eb;
border-color: #2563eb;
box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}
.fc-day-today {
background: linear-gradient(135deg, rgba(59,130,246,0.05) 0%, rgba(96,165,250,0.05) 100%);
.fc-daygrid-day-number {
background: linear-gradient(135deg, #3b82f6, #2563eb);
color: #fff;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
}
.fc-event {
cursor: pointer;
border-radius: 6px;
padding: 3px 6px;
font-size: 12px;
font-weight: 500;
border: none;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
transition: all 0.2s;
&:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
}
.fc-day-header {
font-size: 14px !important;
color: #64748b !important;
font-weight: 700 !important;
background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
border-bottom: 2px solid #e2e8f0 !important;
padding: 12px 8px !important;
}
.fc-unthemed th,
.fc-unthemed td {
border-color: #f1f5f9;
}
}
</style>
<style lang="scss" scoped>
::v-deep .company-calendar-dialog {
max-width: 1600px;
margin-top: 3vh !important;
border-radius: 20px;
padding: 0;
background: radial-gradient(circle at 0 0, rgba(255,255,255,0.96) 0, rgba(248,250,252,0.98) 40%, rgba(241,245,249,0.98) 100%);
box-shadow: 0 24px 48px rgba(15,23,42,0.18), 0 0 0 1px rgba(255,255,255,0.9);
backdrop-filter: blur(22px);
-webkit-backdrop-filter: blur(22px);
}
::v-deep .el-dialog__header { display: none; }
::v-deep .el-dialog__body { padding: 0; }
.dialog-inner {
display: flex;
flex-direction: column;
max-height: 92vh;
height: 88vh;
}
.dialog-header {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
margin: 18px 22px 0;
padding: 10px 14px;
border-radius: 14px;
background: rgba(219,234,254,0.96);
}
.dialog-title {
font-size: 17px;
font-weight: 600;
color: #0f172a;
}
.dialog-legend {
display: flex;
align-items: center;
gap: 10px;
font-size: 12px;
color: #6b7280;
}
.legend-item {
display: inline-flex;
align-items: center;
gap: 4px;
}
.legend-dot {
width: 10px;
height: 10px;
border-radius: 999px;
}
.dialog-close {
cursor: pointer;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 999px;
color: #64748b;
transition: all 0.15s;
&:hover {
background: rgba(0,0,0,0.06);
color: #0f172a;
}
}
.dialog-content {
flex: 1;
min-height: 0;
overflow: hidden;
padding: 0 22px 14px;
}
</style>
<style lang="scss" scoped>
/* 日程详情弹窗:与 booking-consume-detail-dialog 统一的结构与样式 */
.detail-inner {
padding: 18px 22px 14px;
}
.detail-inner .header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
margin-bottom: 12px;
padding: 10px 14px;
border-radius: 14px;
background: rgba(219, 234, 254, 0.96);
}
.detail-inner .title {
font-size: 17px;
font-weight: 600;
color: #0f172a;
}
.detail-inner .close {
cursor: pointer;
width: 28px;
height: 28px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 999px;
color: #64748b;
transition: all 0.15s;
}
.detail-inner .close:hover {
background: rgba(0, 0, 0, 0.06);
color: #0f172a;
}
.detail-inner .body {
padding: 4px 0 16px;
}
.detail-inner .row {
display: flex;
padding: 10px 0;
border-bottom: 1px solid #f1f5f9;
font-size: 14px;
}
.detail-inner .label {
width: 96px;
color: #64748b;
flex-shrink: 0;
}
.detail-inner .value {
flex: 1;
min-width: 0;
color: #111827;
white-space: normal;
overflow: visible;
text-overflow: clip;
line-height: 1.5;
word-break: break-all;
}
.detail-inner .value--multiline {
white-space: pre-wrap;
word-break: break-word;
}
.detail-inner .row--remark .value {
white-space: pre-wrap;
word-break: break-word;
}
.detail-inner .row--attachments .value--block {
display: flex;
flex-direction: column;
gap: 10px;
}
.detail-inner .attachment-empty {
color: #94a3b8;
font-size: 13px;
}
.detail-inner .attachment-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
border-radius: 12px;
background: #f8fafc;
border: 1px solid #e2e8f0;
border-left: 3px solid #94a3b8;
font-size: 13px;
transition: all 0.2s ease;
&:hover {
background: #f1f5f9;
border-color: #cbd5e1;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
}
.detail-inner .attachment-item--pdf { border-left-color: #dc2626; }
.detail-inner .attachment-item--xlsx { border-left-color: #16a34a; }
.detail-inner .attachment-item--pptx { border-left-color: #ea580c; }
.detail-inner .attachment-item--doc { border-left-color: #2563eb; }
.detail-inner .attachment-item--img { border-left-color: #7c3aed; }
.detail-inner .attachment-icon-wrap {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
border-radius: 8px;
flex-shrink: 0;
.el-icon-document,
.el-icon-picture-outline { font-size: 16px; color: #fff; }
}
.detail-inner .attachment-item--pdf .attachment-icon-wrap { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.detail-inner .attachment-item--xlsx .attachment-icon-wrap { background: linear-gradient(135deg, #16a34a, #15803d); }
.detail-inner .attachment-item--pptx .attachment-icon-wrap { background: linear-gradient(135deg, #ea580c, #c2410c); }
.detail-inner .attachment-item--doc .attachment-icon-wrap { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.detail-inner .attachment-item--img .attachment-icon-wrap { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.detail-inner .attachment-item--default .attachment-icon-wrap { background: linear-gradient(135deg, #64748b, #475569); }
.detail-inner .attachment-name {
flex: 1;
min-width: 0;
color: #334155;
font-weight: 500;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.detail-inner .attachment-link {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border-radius: 8px;
background: rgba(37, 99, 235, 0.1);
color: #2563eb;
text-decoration: none;
font-size: 12px;
font-weight: 500;
flex-shrink: 0;
transition: background 0.2s;
.el-icon-download { font-size: 12px; }
&:hover {
background: rgba(37, 99, 235, 0.18);
color: #1d4ed8;
}
&.attachment-link--disabled {
cursor: default;
color: #94a3b8;
background: rgba(148, 163, 184, 0.15);
pointer-events: none;
&:hover { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
}
}
.detail-inner .type-dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 999px;
margin-right: 6px;
vertical-align: middle;
}
.detail-inner .footer {
display: flex;
justify-content: flex-end;
gap: 10px;
padding-top: 12px;
border-top: 1px solid #f1f5f9;
}
</style>
<style lang="scss" scoped>
::v-deep .company-calendar-detail-dialog {
max-width: 520px;
margin-top: 10vh !important;
border-radius: 20px;
padding: 0;
background: radial-gradient(circle at 0 0, rgba(255,255,255,0.96) 0, rgba(248,250,252,0.98) 40%, rgba(241,245,249,0.98) 100%);
box-shadow: 0 24px 48px rgba(15,23,42,0.18), 0 0 0 1px rgba(255,255,255,0.9);
backdrop-filter: blur(22px);
-webkit-backdrop-filter: blur(22px);
}
::v-deep .company-calendar-detail-dialog .el-dialog__header { display: none; }
::v-deep .company-calendar-detail-dialog .el-dialog__body { padding: 0; }
::v-deep .company-calendar-detail-dialog .el-button--primary,
::v-deep .company-calendar-detail-dialog .el-button--default {
border-radius: 999px;
padding: 0 18px;
height: 30px;
line-height: 30px;
font-size: 12px;
}
::v-deep .company-calendar-detail-dialog .el-button--default {
background: rgba(239, 246, 255, 0.9);
color: #2563eb;
border-color: rgba(37, 99, 235, 0.18);
}
::v-deep .company-calendar-detail-dialog .el-button--primary {
background: #2563eb;
border-color: #2563eb;
box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}
</style>