@opendesign-plus/components 0.0.1-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-OElCookieNotice.cjs.js +1 -0
- package/dist/chunk-OElCookieNotice.es.js +833 -0
- package/dist/components/OBanner.vue.d.ts +11 -0
- package/dist/components/OCookieNotice.vue.d.ts +17 -0
- package/dist/components/OFooter.vue.d.ts +46 -0
- package/dist/components/OHeaderSearch.vue.d.ts +692 -0
- package/dist/components/OHeaderUser.vue.d.ts +38 -0
- package/dist/components/OPlusConfigProvider.vue.d.ts +23 -0
- package/dist/components/OSection.vue.d.ts +37 -0
- package/dist/components/OSourceCode.vue.d.ts +20 -0
- package/dist/components/OThemeSwitcher.vue.d.ts +28 -0
- package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
- package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
- package/dist/components/activity/config.d.ts +15 -0
- package/dist/components/activity/index.d.ts +623 -0
- package/dist/components/activity/types.d.ts +81 -0
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
- package/dist/components/element-plus/index.d.ts +2 -0
- package/dist/components/events/OEventsApply.vue.d.ts +16 -0
- package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
- package/dist/components/events/OEventsList.vue.d.ts +26 -0
- package/dist/components/events/config.d.ts +27 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +66 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components/header/OHeader.vue.d.ts +24 -0
- package/dist/components/header/OHeaderMoblie.vue.d.ts +33 -0
- package/dist/components/header/components/HeaderContent.vue.d.ts +6 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +7 -0
- package/dist/components/header/components/HeaderNavMoblie.vue.d.ts +17 -0
- package/dist/components/header/components/HeaderUbmcNav.vue.d.ts +2 -0
- package/dist/components/header/index.d.ts +22 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +298 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +145 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +586 -0
- package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
- package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
- package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +12 -0
- package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
- package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
- package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
- package/dist/components/meeting/config.d.ts +27 -0
- package/dist/components/meeting/types.d.ts +166 -0
- package/dist/components/meeting/utils.d.ts +22 -0
- package/dist/components.cjs.js +224 -0
- package/dist/components.css +1 -0
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +45054 -0
- package/dist/index.d.ts +19 -0
- package/docs/design.md +27 -0
- package/docs/design_banner.md +41 -0
- package/docs/design_section.md +27 -0
- package/package.json +56 -0
- package/scripts/generate-components-index.js +104 -0
- package/src/assets/events/svg-icons/icon-checked.svg +3 -0
- package/src/assets/events/svg-icons/icon-competition.svg +7 -0
- package/src/assets/events/svg-icons/icon-events.svg +4 -0
- package/src/assets/events/svg-icons/icon-release.svg +4 -0
- package/src/assets/events/svg-icons/icon-summit.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
- package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
- package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
- package/src/assets/meeting/transparent.png +0 -0
- package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
- package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
- package/src/assets/svg-icons/icon-caret-left.svg +3 -0
- package/src/assets/svg-icons/icon-caret-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -0
- package/src/assets/svg-icons/icon-delete.svg +3 -0
- package/src/assets/svg-icons/icon-filter.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -0
- package/src/assets/svg-icons/icon-header-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-menu.svg +3 -0
- package/src/assets/svg-icons/icon-header-person.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -0
- package/src/assets/svg-icons/icon-loading.svg +4 -0
- package/src/assets/svg-icons/icon-locale.svg +3 -0
- package/src/assets/svg-icons/icon-log-off.svg +3 -0
- package/src/assets/svg-icons/icon-message.svg +3 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -0
- package/src/assets/svg-icons/icon-outlink.svg +3 -0
- package/src/assets/svg-icons/icon-overview.svg +3 -0
- package/src/assets/svg-icons/icon-search.svg +3 -0
- package/src/assets/svg-icons/icon-setting.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -0
- package/src/assets/svg-icons/icon-tips.svg +3 -0
- package/src/components/OBanner.vue +398 -0
- package/src/components/OCookieNotice.vue +575 -0
- package/src/components/OFooter.vue +576 -0
- package/src/components/OHeaderSearch.vue +601 -0
- package/src/components/OHeaderUser.vue +237 -0
- package/src/components/OPlusConfigProvider.vue +32 -0
- package/src/components/OSection.vue +178 -0
- package/src/components/OSourceCode.vue +153 -0
- package/src/components/OThemeSwitcher.vue +108 -0
- package/src/components/activity/OActivityApproval.vue +871 -0
- package/src/components/activity/OActivityForm.vue +548 -0
- package/src/components/activity/OMyActivityCalendar.vue +1501 -0
- package/src/components/activity/config.ts +141 -0
- package/src/components/activity/index.ts +24 -0
- package/src/components/activity/types.ts +88 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -0
- package/src/components/common/ContentWrapper.vue +85 -0
- package/src/components/common/MoreText.vue +124 -0
- package/src/components/common/ThFilter.vue +330 -0
- package/src/components/element-plus/OElCookieNotice.vue +603 -0
- package/src/components/element-plus/index.ts +3 -0
- package/src/components/events/OEventsApply.vue +419 -0
- package/src/components/events/OEventsCalendar.vue +588 -0
- package/src/components/events/OEventsList.vue +354 -0
- package/src/components/events/config.ts +35 -0
- package/src/components/events/index.ts +24 -0
- package/src/components/events/types.ts +80 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/header/OHeader.vue +175 -0
- package/src/components/header/OHeaderMoblie.vue +152 -0
- package/src/components/header/components/HeaderContent.vue +942 -0
- package/src/components/header/components/HeaderNav.vue +280 -0
- package/src/components/header/components/HeaderNavMoblie.vue +346 -0
- package/src/components/header/components/HeaderUbmcNav.vue +540 -0
- package/src/components/header/index.ts +16 -0
- package/src/components/meeting/OMeetingCalendar.vue +900 -0
- package/src/components/meeting/OMeetingForm.vue +1041 -0
- package/src/components/meeting/OMeetingPlayback.vue +439 -0
- package/src/components/meeting/OMyMeetingCalendar.vue +1502 -0
- package/src/components/meeting/OSigMeetingCalendar.vue +411 -0
- package/src/components/meeting/components/OMeetingCalendarList.vue +505 -0
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
- package/src/components/meeting/components/OMeetingDetail.vue +227 -0
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
- package/src/components/meeting/components/OSigMeetingAside.vue +197 -0
- package/src/components/meeting/config.ts +121 -0
- package/src/components/meeting/index.ts +45 -0
- package/src/components/meeting/types.ts +193 -0
- package/src/components/meeting/utils.ts +123 -0
- package/src/draft/Banner.vue +265 -0
- package/src/draft/ButtonCards.vue +106 -0
- package/src/draft/Feature.vue +134 -0
- package/src/draft/Footer.vue +512 -0
- package/src/draft/HorizontalAnchor.vue +165 -0
- package/src/draft/ItemSwiper.vue +133 -0
- package/src/draft/Logo.vue +141 -0
- package/src/draft/LogoCard.vue +75 -0
- package/src/draft/LogoV2.vue +19 -0
- package/src/draft/MainCard.vue +38 -0
- package/src/draft/MultiCard.vue +95 -0
- package/src/draft/MultiIconCard.vue +74 -0
- package/src/draft/OInfoCard.vue +176 -0
- package/src/draft/Process.vue +81 -0
- package/src/draft/Section.vue +167 -0
- package/src/draft/SingleTabCard.vue +85 -0
- package/src/draft/SliderCard.vue +110 -0
- package/src/env.d.ts +16 -0
- package/src/i18n/en.ts +261 -0
- package/src/i18n/index.ts +56 -0
- package/src/i18n/zh.ts +250 -0
- package/src/index.ts +45 -0
- package/src/shared/provide.ts +6 -0
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +10 -0
- package/tsconfig.json +37 -0
- package/vite.config.ts +118 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { OIcon, OIconArrowLeft, OIconArrowRight } from '@opensig/opendesign';
|
|
3
|
+
import IconMeetinging from '~icons/meeting/icon-meet.svg';
|
|
4
|
+
import { getConfig } from '@/components/meeting/utils.ts';
|
|
5
|
+
import { CalendarDataType } from '@/components/meeting';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
data: any[];
|
|
9
|
+
current: number;
|
|
10
|
+
total: number;
|
|
11
|
+
active: string;
|
|
12
|
+
meetingDates: string[];// 会议日期列表
|
|
13
|
+
eventsDates: string[];// 活动日期列表
|
|
14
|
+
}>();
|
|
15
|
+
|
|
16
|
+
const STEP = 1;
|
|
17
|
+
|
|
18
|
+
const emits = defineEmits(['click-date', 'change-month']);
|
|
19
|
+
const clickDate = (date) => {
|
|
20
|
+
emits('click-date', date);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const changeMonth = (step) => {
|
|
24
|
+
if (props.current + step >= props.total || props.current + step < 0) return;
|
|
25
|
+
emits('change-month', step);
|
|
26
|
+
};
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<div class="o-sig-meeting-aside">
|
|
31
|
+
<template v-for="(d, dIdx) in data" :key="dIdx">
|
|
32
|
+
<div v-for="m in d" :key="m.month" class="month-item">
|
|
33
|
+
<div class="month">{{ m.month.replace(/-/g, '/') }}</div>
|
|
34
|
+
<div class="days">
|
|
35
|
+
<div
|
|
36
|
+
class="day-item"
|
|
37
|
+
v-for="d in m.days"
|
|
38
|
+
:key="d"
|
|
39
|
+
@click="clickDate(`${m.month}-${d}`)"
|
|
40
|
+
:class="active === `${m.month}-${d}` && 'active'"
|
|
41
|
+
>
|
|
42
|
+
<div class="day-d">{{ d }}</div>
|
|
43
|
+
<div class="day-c">
|
|
44
|
+
<OIcon
|
|
45
|
+
v-if="meetingDates.includes(`${m.month}-${d}`)"
|
|
46
|
+
:style="{
|
|
47
|
+
zIndex: getConfig(CalendarDataType.MEETING, 'zIndex'),
|
|
48
|
+
backgroundColor: getConfig(CalendarDataType.MEETING, 'color'),
|
|
49
|
+
}"
|
|
50
|
+
>
|
|
51
|
+
<component :is="getConfig(CalendarDataType.MEETING, 'icon')" />
|
|
52
|
+
</OIcon>
|
|
53
|
+
<OIcon
|
|
54
|
+
v-if="eventsDates.includes(`${m.month}-${d}`)"
|
|
55
|
+
:style="{
|
|
56
|
+
zIndex: getConfig(CalendarDataType.EVENTS, 'zIndex'),
|
|
57
|
+
backgroundColor: getConfig(CalendarDataType.EVENTS, 'color'),
|
|
58
|
+
}"
|
|
59
|
+
>
|
|
60
|
+
<component :is="getConfig(CalendarDataType.EVENTS, 'icon')" />
|
|
61
|
+
</OIcon>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
<div class="arrow-wrapper">
|
|
68
|
+
<OIcon @click="changeMonth(0 - STEP)" :class="current - STEP < 0 && 'disabled'">
|
|
69
|
+
<OIconArrowLeft />
|
|
70
|
+
</OIcon>
|
|
71
|
+
<OIcon @click="changeMonth(STEP)" :class="current + STEP >= total && 'disabled'">
|
|
72
|
+
<OIconArrowRight />
|
|
73
|
+
</OIcon>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<style lang="scss">
|
|
79
|
+
.o-sig-meeting-aside {
|
|
80
|
+
width: 35%;
|
|
81
|
+
flex-shrink: 0;
|
|
82
|
+
padding: var(--o-gap-4) var(--o-gap-6);
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
border-right: 1px solid var(--o-color-control4);
|
|
86
|
+
@include respond-to('<=pad') {
|
|
87
|
+
padding: var(--o-gap-4);
|
|
88
|
+
border-right: none;
|
|
89
|
+
}
|
|
90
|
+
@include respond-to('phone') {
|
|
91
|
+
padding: 16px;
|
|
92
|
+
.title {
|
|
93
|
+
margin-bottom: var(--o-gap-2);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@include respond-to('<=pad_v') {
|
|
97
|
+
width: 100%;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.month-item {
|
|
101
|
+
margin-bottom: var(--o-gap-3);
|
|
102
|
+
|
|
103
|
+
.month {
|
|
104
|
+
color: var(--o-color-info3);
|
|
105
|
+
margin-bottom: var(--o-gap-2);
|
|
106
|
+
@include tip1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.days {
|
|
110
|
+
gap: var(--o-gap-2);
|
|
111
|
+
display: grid;
|
|
112
|
+
grid-template-columns: repeat(2, 1fr);
|
|
113
|
+
|
|
114
|
+
@include respond-to('<=pad_v') {
|
|
115
|
+
display: flex;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.day-item {
|
|
119
|
+
height: 64px;
|
|
120
|
+
border-radius: 4px;
|
|
121
|
+
background-color: var(--o-color-control2-light);
|
|
122
|
+
padding: 8px 12px;
|
|
123
|
+
cursor: pointer;
|
|
124
|
+
border: 1px solid transparent;
|
|
125
|
+
|
|
126
|
+
&:hover,
|
|
127
|
+
&.active {
|
|
128
|
+
background-color: var(--o-color-control3-light);
|
|
129
|
+
border-color: var(--o-color-primary1);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.day-d {
|
|
133
|
+
font-weight: 500;
|
|
134
|
+
margin-bottom: var(--o-gap-1);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.day-c {
|
|
138
|
+
color: rgb(var(--o-white));
|
|
139
|
+
display: flex;
|
|
140
|
+
flex-wrap: nowrap;
|
|
141
|
+
|
|
142
|
+
.o-icon {
|
|
143
|
+
width: 20px;
|
|
144
|
+
height: 20px;
|
|
145
|
+
font-size: 20px;
|
|
146
|
+
line-height: 1em;
|
|
147
|
+
position: relative;
|
|
148
|
+
border-radius: 50%;
|
|
149
|
+
margin-left: -6px;
|
|
150
|
+
|
|
151
|
+
&:first-child {
|
|
152
|
+
margin-left: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
svg path {
|
|
156
|
+
fill: currentColor;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.arrow-wrapper {
|
|
165
|
+
margin-top: auto;
|
|
166
|
+
display: flex;
|
|
167
|
+
align-items: center;
|
|
168
|
+
justify-content: space-between;
|
|
169
|
+
color: var(--o-color-primary1);
|
|
170
|
+
|
|
171
|
+
.o-icon {
|
|
172
|
+
font-size: 24px;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
|
|
175
|
+
&.disabled {
|
|
176
|
+
cursor: not-allowed;
|
|
177
|
+
color: var(--o-color-primary4);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&:not(.disabled):hover {
|
|
181
|
+
color: var(--o-color-primary2);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@include respond-to('<=pad_v') {
|
|
187
|
+
.day-item {
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
@include respond-to('<=pad_v') {
|
|
191
|
+
.day-item {
|
|
192
|
+
width: min(128px, calc((100% - var(--o-gap-2)) / 2));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
</style>
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import IconAll from '~icons/meeting/icon-all.svg';
|
|
2
|
+
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
3
|
+
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
4
|
+
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
5
|
+
import { useI18n } from '@/i18n';
|
|
6
|
+
import { CalendarDataType, meetingTabT } from './types.ts';
|
|
7
|
+
|
|
8
|
+
const { t } = useI18n();
|
|
9
|
+
|
|
10
|
+
const getMeetingColor = () => {
|
|
11
|
+
if (typeof document !== 'undefined') {
|
|
12
|
+
const deepBlue = getComputedStyle(document.documentElement)
|
|
13
|
+
.getPropertyValue('--o-deep-blue-6')?.trim();
|
|
14
|
+
if (deepBlue) {
|
|
15
|
+
return 'rgba(var(--o-deep-blue-6))';
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return 'var(--o-color-primary1)';
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const TYPE_COLOR_MAP = {
|
|
22
|
+
summit: 'rgba(var(--o-orange-6))',
|
|
23
|
+
events: 'rgba(var(--o-cyan-6))',
|
|
24
|
+
meeting: getMeetingColor(),
|
|
25
|
+
};
|
|
26
|
+
export const MEETING_TABS: meetingTabT[] = [
|
|
27
|
+
{
|
|
28
|
+
label: t('meeting.meetingTypeAll'),
|
|
29
|
+
value: CalendarDataType.ALL,
|
|
30
|
+
icon: IconAll,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: t('meeting.meetingTypeMeet'),
|
|
34
|
+
value: CalendarDataType.MEETING,
|
|
35
|
+
icon: IconMeeting,
|
|
36
|
+
color: TYPE_COLOR_MAP.meeting,
|
|
37
|
+
zIndex: 3,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: t('meeting.meetingTypeEvents'),
|
|
41
|
+
value: CalendarDataType.EVENTS,
|
|
42
|
+
icon: IconEvent,
|
|
43
|
+
color: TYPE_COLOR_MAP.events,
|
|
44
|
+
zIndex: 2,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: t('meeting.meetingTypeSummit'),
|
|
48
|
+
value: CalendarDataType.SUMMIT,
|
|
49
|
+
icon: IconSummit,
|
|
50
|
+
color: TYPE_COLOR_MAP.summit,
|
|
51
|
+
zIndex: 1,
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
export const INTERVAL_DAY = 0;
|
|
57
|
+
export const INTERVAL_WEEK = 1;
|
|
58
|
+
export const INTERVAL_MONTH = 2;
|
|
59
|
+
|
|
60
|
+
export const CYCLE_TYPE_OPTIONS0 = [
|
|
61
|
+
{
|
|
62
|
+
label: t('meeting.day0'),
|
|
63
|
+
value: INTERVAL_DAY,
|
|
64
|
+
max: 7,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: t('meeting.week0'),
|
|
68
|
+
value: INTERVAL_WEEK,
|
|
69
|
+
max: 2,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: t('meeting.month0'),
|
|
73
|
+
value: INTERVAL_MONTH,
|
|
74
|
+
max: 1,
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
export const CYCLE_TYPE_OPTIONS = [
|
|
78
|
+
{
|
|
79
|
+
label: t('meeting.day'),
|
|
80
|
+
value: INTERVAL_DAY,
|
|
81
|
+
max: 7,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: t('meeting.week'),
|
|
85
|
+
value: INTERVAL_WEEK,
|
|
86
|
+
max: 2,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: t('meeting.month'),
|
|
90
|
+
value: INTERVAL_MONTH,
|
|
91
|
+
max: 1,
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
export const WEEKDAY = [
|
|
95
|
+
t('meeting.sunday'),
|
|
96
|
+
t('meeting.monday'),
|
|
97
|
+
t('meeting.tuesday'),
|
|
98
|
+
t('meeting.wednesday'),
|
|
99
|
+
t('meeting.thursday'),
|
|
100
|
+
t('meeting.friday'),
|
|
101
|
+
t('meeting.saturday'),
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
const getWeekOptions = () => {
|
|
105
|
+
const list = [];
|
|
106
|
+
for (let i = 1; i <= 7; i++) {
|
|
107
|
+
const idx = i % 7;
|
|
108
|
+
list.push({
|
|
109
|
+
value: idx,
|
|
110
|
+
label: WEEKDAY[idx],
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
return list;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export const INTERVAL_WEEK_OPTIONS = getWeekOptions();
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
export const EMAIL_REGEX = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
|
120
|
+
|
|
121
|
+
export const PROGRESS_COLORS = ['var(--o-color-primary1)', 'var(--o-color-warning1)', 'var(--o-color-success1)'];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { App } from 'vue';
|
|
2
|
+
import _OMeetingCalendar from './OMeetingCalendar.vue';
|
|
3
|
+
import _OMeetingForm from './OMeetingForm.vue';
|
|
4
|
+
import _OMeetingPlayback from './OMeetingPlayback.vue';
|
|
5
|
+
import _OSigMeetingCalendar from './OSigMeetingCalendar.vue';
|
|
6
|
+
import _OMyMeetingCalendar from './OMyMeetingCalendar.vue';
|
|
7
|
+
|
|
8
|
+
const OMeetingCalendar = Object.assign(_OMeetingCalendar, {
|
|
9
|
+
install(app: App) {
|
|
10
|
+
app.component('OMeetingCalendar', _OMeetingCalendar);
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const OMeetingForm = Object.assign(_OMeetingForm, {
|
|
14
|
+
install(app: App) {
|
|
15
|
+
app.component('OMeetingCalendar', _OMeetingForm);
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const OMeetingPlayback = Object.assign(_OMeetingPlayback, {
|
|
20
|
+
install(app: App) {
|
|
21
|
+
app.component('OMeetingPlayback', _OMeetingPlayback);
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const OSigMeetingCalendar = Object.assign(_OSigMeetingCalendar, {
|
|
26
|
+
install(app: App) {
|
|
27
|
+
app.component('OSigMeetingCalendar', _OSigMeetingCalendar);
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const OMyMeetingCalendar = Object.assign(_OMyMeetingCalendar, {
|
|
32
|
+
install(app: App) {
|
|
33
|
+
app.component('OMyMeetingCalendar', _OMyMeetingCalendar);
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export {
|
|
38
|
+
OMeetingCalendar,
|
|
39
|
+
OMeetingForm,
|
|
40
|
+
OMeetingPlayback,
|
|
41
|
+
OSigMeetingCalendar,
|
|
42
|
+
OMyMeetingCalendar,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export * from './types';
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// sig组列表
|
|
2
|
+
import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from '@/components/meeting/config.ts';
|
|
3
|
+
|
|
4
|
+
export interface GroupItemT {
|
|
5
|
+
id?: number;
|
|
6
|
+
group_name: string;
|
|
7
|
+
maillist?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// 会议日历上额外的数据,活动或者峰会
|
|
11
|
+
export enum CalendarDataType {
|
|
12
|
+
ALL = 'all',
|
|
13
|
+
MEETING = 'meeting',
|
|
14
|
+
EVENTS = 'events',
|
|
15
|
+
SUMMIT = 'summit',
|
|
16
|
+
ACTIVITY = 'activity',
|
|
17
|
+
APPROVAL = 'approval'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CalendarOtherDataT {
|
|
21
|
+
id: string;
|
|
22
|
+
name: string;
|
|
23
|
+
url: string;
|
|
24
|
+
dates: string[];
|
|
25
|
+
location?: string;
|
|
26
|
+
address?: string;
|
|
27
|
+
start_date: string;
|
|
28
|
+
end_date: string;
|
|
29
|
+
activity_type: string;
|
|
30
|
+
type: CalendarDataType.EVENTS | CalendarDataType.SUMMIT;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export interface OptionItemT {
|
|
34
|
+
label: string;
|
|
35
|
+
value: string | number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
export type PlatformT = 'welink' | 'tencent';
|
|
40
|
+
|
|
41
|
+
export enum MeetingGroupType {
|
|
42
|
+
SIG = 'sig',
|
|
43
|
+
GROUP = 'group',
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface MeetingCalendarPropsT {
|
|
47
|
+
getDateListRequest: any;
|
|
48
|
+
getMeetingListRequest: any;
|
|
49
|
+
getSummitListRequest: any;
|
|
50
|
+
getSummitDatesRequest: any;
|
|
51
|
+
getEventsListRequest: any;
|
|
52
|
+
getEventsDatesRequest: any;
|
|
53
|
+
hiddenEvents?: boolean;
|
|
54
|
+
hiddenSummit?: boolean;
|
|
55
|
+
groupType: MeetingGroupType;
|
|
56
|
+
}
|
|
57
|
+
// 会议新增、修改
|
|
58
|
+
export interface MeetingPostT {
|
|
59
|
+
id?: number; // 会议id
|
|
60
|
+
topic: string; // 会议主题 128
|
|
61
|
+
sponsor: string; // 会议发起人 20
|
|
62
|
+
group_name: string; // 所属SIG 64
|
|
63
|
+
platform: PlatformT; // 会议平台
|
|
64
|
+
date: string; // 会议日期
|
|
65
|
+
date_range?: string[]; // 日期返回
|
|
66
|
+
time: string; // 会议时间
|
|
67
|
+
start: string; // 会议开始时间
|
|
68
|
+
end: string; // 会议结束时间
|
|
69
|
+
etherpad: string; // etherpad链接
|
|
70
|
+
agenda: string; // 会议议程
|
|
71
|
+
email_list: string; // 通知邮件列表 1020
|
|
72
|
+
is_record: boolean; // 会议录制
|
|
73
|
+
is_cycle: boolean; // 是否重复
|
|
74
|
+
cycle_start_date: string;
|
|
75
|
+
cycle_end_date: string;
|
|
76
|
+
cycle_start: string;
|
|
77
|
+
cycle_end: string;
|
|
78
|
+
cycle_interval: number; // 重复周期, 当intervalType为month时固定为1
|
|
79
|
+
cycle_type: typeof INTERVAL_DAY | typeof INTERVAL_WEEK | typeof INTERVAL_MONTH; // 重复类型,默认为INTERVAL_DAY
|
|
80
|
+
cycle_point: number[]; // 重复节点,当intervalType为week|month时存在值
|
|
81
|
+
is_notify?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface MeetingFormPropsT {
|
|
85
|
+
data?: MeetingItemT;
|
|
86
|
+
isSub?: boolean;
|
|
87
|
+
isEdit?: boolean;
|
|
88
|
+
subId?: string;
|
|
89
|
+
createMeetingRequest: any,
|
|
90
|
+
editMeetingRequest: any;
|
|
91
|
+
editSubMeetingRequest: any;
|
|
92
|
+
getPlatformsRequest: any;
|
|
93
|
+
getGroupsRequest: any;
|
|
94
|
+
showBtns?: boolean;
|
|
95
|
+
groupType: MeetingGroupType;
|
|
96
|
+
bookText?: string
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// 会议详情
|
|
100
|
+
export interface MeetingItemT extends MeetingPostT {
|
|
101
|
+
id: number;
|
|
102
|
+
community: string;
|
|
103
|
+
mid: string;
|
|
104
|
+
m_mid: string;
|
|
105
|
+
join_url: string; // 会议链接
|
|
106
|
+
create_time: string; // 创建时间
|
|
107
|
+
isEnd: boolean; // 是否结束
|
|
108
|
+
is_delete: boolean; // 是否取消
|
|
109
|
+
update_time: string;
|
|
110
|
+
time: string; // 处理一下时间范围
|
|
111
|
+
cycle_sub: any[];
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface PageParamsT {
|
|
115
|
+
page: number;
|
|
116
|
+
size: number;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface OptionItemT {
|
|
120
|
+
label: string;
|
|
121
|
+
value: string | number;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export interface meetingTabT {
|
|
125
|
+
label: string;
|
|
126
|
+
value: string;
|
|
127
|
+
icon: any;
|
|
128
|
+
color?: string;
|
|
129
|
+
zIndex?: number;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
// -------------------- 会议回放 --------------------
|
|
134
|
+
interface MeetingPlaybackPropsDetailT {
|
|
135
|
+
topic: string; // 会议主题
|
|
136
|
+
date: string; // 会议日期
|
|
137
|
+
start: string; // 会议开始时间
|
|
138
|
+
end: string; // 会议结束时间
|
|
139
|
+
agenda: string; // 会议详情
|
|
140
|
+
sponsor: string; // 会议创建人
|
|
141
|
+
groupName: string; // 会议所属sig组
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface MeetingPlaybackPropsDataT {
|
|
145
|
+
mid: string; // 会议ID
|
|
146
|
+
subId?: string; //子会议ID
|
|
147
|
+
textJson: string; // 字幕json文件
|
|
148
|
+
poster: string; // 封面
|
|
149
|
+
video: string; // 录屏
|
|
150
|
+
textVtt: string; // 字幕文件
|
|
151
|
+
topicJson: string; // 议题分段
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface MeetingPlaybackPropsT {
|
|
155
|
+
dates: string[]; // 如果是周期会议,传入可选的日期
|
|
156
|
+
detail: MeetingPlaybackPropsDetailT; // 会议信息
|
|
157
|
+
data: MeetingPlaybackPropsDataT; // 回放信息
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export interface SubjectItemT {
|
|
161
|
+
title: string; // 议题
|
|
162
|
+
startTime: string | number; // 议题开始时间 时:分:秒格式
|
|
163
|
+
endTime: string | number; // 议题结束时间 时:分:秒格式
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
export interface CaptionItemT {
|
|
168
|
+
ID: number; // 字幕id
|
|
169
|
+
start_time: string; // 字幕开始时间
|
|
170
|
+
end_time: string; // 字幕结束时间
|
|
171
|
+
speaker: string; // 发言人
|
|
172
|
+
content: string; // 发言内容
|
|
173
|
+
contentHtml: string; // 发言内容转html
|
|
174
|
+
speakerIdx: number; // 当前发言人索引
|
|
175
|
+
speakerLabel: string; // 发言人文案
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
export interface MeetingPlaybackVideoPropsT {
|
|
180
|
+
src: string; // 视频资源
|
|
181
|
+
vtt?: string; // 字幕资源
|
|
182
|
+
captions?: CaptionItemT[]; // 语言转文字json
|
|
183
|
+
poster?: string | null; // 封面图片
|
|
184
|
+
posterTitle?: string | null; // 封面文案
|
|
185
|
+
instance?: any; // 播放器实例
|
|
186
|
+
trackIdx: number; // 当前字幕索引
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface MeetingPlaybackSubtitlesPropsT {
|
|
190
|
+
captions?: CaptionItemT[]; // 语言转文字json
|
|
191
|
+
instance?: any; // 播放器实例
|
|
192
|
+
trackIdx: number; // 当前字幕索引
|
|
193
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { useI18n } from '@/i18n';
|
|
3
|
+
import { INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_WEEK_OPTIONS, MEETING_TABS } from './config';
|
|
4
|
+
import { CalendarDataType, meetingTabT, OptionItemT } from '@/components/meeting/types.ts';
|
|
5
|
+
|
|
6
|
+
const { t } = useI18n();
|
|
7
|
+
/**
|
|
8
|
+
* 格式化时间
|
|
9
|
+
* @param {string} date 时间
|
|
10
|
+
* @param {string} format 时间格式
|
|
11
|
+
* @returns {string} 返回
|
|
12
|
+
*/
|
|
13
|
+
export const formatDate = (date: string | Date = new Date(), format: string = 'YYYY-MM-DD'): string => {
|
|
14
|
+
let dateStr = date;
|
|
15
|
+
if (!dateStr) {
|
|
16
|
+
dateStr = new Date();
|
|
17
|
+
}
|
|
18
|
+
if (!dayjs(new Date(dateStr)).isValid()) {
|
|
19
|
+
return dateStr as string;
|
|
20
|
+
}
|
|
21
|
+
return dayjs(new Date(dateStr)).format(format);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const findLabelFromOptions = (value: string | number, options: OptionItemT[], labelKey: keyof OptionItemT = 'label', valueKey: keyof OptionItemT = 'value') => {
|
|
25
|
+
const find = options.find((o) => o[valueKey] === value);
|
|
26
|
+
return find?.[labelKey] || value;
|
|
27
|
+
};
|
|
28
|
+
export const getPointStr = (cycleType: number, points: number[]) => {
|
|
29
|
+
if (cycleType === INTERVAL_WEEK) {
|
|
30
|
+
return points
|
|
31
|
+
.sort((a, b) => {
|
|
32
|
+
const aIdx = INTERVAL_WEEK_OPTIONS.findIndex((v) => v.value === a);
|
|
33
|
+
const bIdx = INTERVAL_WEEK_OPTIONS.findIndex((v) => v.value === b);
|
|
34
|
+
return aIdx - bIdx;
|
|
35
|
+
})
|
|
36
|
+
.map((point: number) => findLabelFromOptions(point, INTERVAL_WEEK_OPTIONS))
|
|
37
|
+
.join(t('meeting.cycleSplit'));
|
|
38
|
+
}
|
|
39
|
+
if (cycleType === INTERVAL_MONTH) {
|
|
40
|
+
return points.join(t('meeting.cycleSplit'));
|
|
41
|
+
}
|
|
42
|
+
return '';
|
|
43
|
+
};
|
|
44
|
+
// 处理发言人的序号
|
|
45
|
+
export const speakerNum = (val: string) => {
|
|
46
|
+
const regex = /\d+/g;
|
|
47
|
+
const match = val.match(regex) || '';
|
|
48
|
+
|
|
49
|
+
return parseInt(match[0]);
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* 将时间转换为秒数
|
|
53
|
+
* @param {string} date 时间 hh:mm:ss
|
|
54
|
+
* @returns {number}
|
|
55
|
+
*/
|
|
56
|
+
export const getDateNumber = (date: string) => {
|
|
57
|
+
const arr: string[] = date.split(':');
|
|
58
|
+
if (arr.length > 3 || !arr.length) {
|
|
59
|
+
return 0;
|
|
60
|
+
}
|
|
61
|
+
let res = 0;
|
|
62
|
+
let base = 1;
|
|
63
|
+
while (arr.length > 0) {
|
|
64
|
+
const current = arr.pop();
|
|
65
|
+
res += parseInt(current!) * base;
|
|
66
|
+
base *= 60;
|
|
67
|
+
}
|
|
68
|
+
return res;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const formatNumber = (num: number) => {
|
|
72
|
+
if (num < 0) return 'Invalid number';
|
|
73
|
+
if (num >= 10) return `${ num }`;
|
|
74
|
+
return `0${ num }`;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const formatDateNumber = (num: number) => {
|
|
78
|
+
if (num > 24 * 60 * 60) return 'Invalid date';
|
|
79
|
+
const h = Math.floor(num / 60 / 60);
|
|
80
|
+
const m = Math.floor((num - h * 60 * 60) / 60);
|
|
81
|
+
const s = num % 60;
|
|
82
|
+
return `${ formatNumber(h) }:${ formatNumber(m) }:${ formatNumber(s) }`;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// 时分秒 转换成 以秒为单位的格式 - xx秒
|
|
86
|
+
export const transformTime = (time: string) => {
|
|
87
|
+
const arr = time.split(':');
|
|
88
|
+
const hh = arr[arr.length - 3] ? parseInt(arr[arr.length - 3]) : 0;
|
|
89
|
+
const mm = parseInt(arr[arr.length - 2]);
|
|
90
|
+
const ss = parseFloat(arr[arr.length - 1]);
|
|
91
|
+
|
|
92
|
+
return hh * 60 * 60 + mm * 60 + ss;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// 以秒为单位的格式 转换成 时分秒 - hh:mm:ss
|
|
96
|
+
export const transformSeconds = (seconds: number) => {
|
|
97
|
+
const hh = Math.floor(seconds / 3600);
|
|
98
|
+
const mm = Math.floor((seconds - hh * 3600) / 60);
|
|
99
|
+
const ss = Math.floor(seconds - hh * 3600 - mm * 60);
|
|
100
|
+
return `${ hh ? `${ hh.toString().padStart(2, '0') }:` : '' }${ mm.toString().padStart(2, '0') }:${ ss.toString().padStart(2, '0') }`;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
export const getConfig = (val: CalendarDataType, key: keyof meetingTabT): string => {
|
|
104
|
+
let value = val;
|
|
105
|
+
if (val === CalendarDataType.ACTIVITY) {
|
|
106
|
+
value = CalendarDataType.EVENTS;
|
|
107
|
+
}
|
|
108
|
+
const find: meetingTabT = MEETING_TABS.find(v => v.value === value)!;
|
|
109
|
+
return find?.[key] || '';
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const getPlatformLabel = (platform: string) => {
|
|
113
|
+
switch (platform) {
|
|
114
|
+
case 'WELINK':
|
|
115
|
+
return 'WeLink';
|
|
116
|
+
case 'ZOOM':
|
|
117
|
+
return 'Zoom';
|
|
118
|
+
case 'TENCENT':
|
|
119
|
+
return '腾讯会议';
|
|
120
|
+
default:
|
|
121
|
+
return platform;
|
|
122
|
+
}
|
|
123
|
+
};
|