@opendesign-plus/components 0.0.1-rc.2 → 0.0.1-rc.21
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 +839 -0
- package/dist/components/OBanner.vue.d.ts +10 -1
- package/dist/components/OCookieNotice.vue.d.ts +6 -5
- package/dist/components/OFooter.vue.d.ts +46 -0
- package/dist/components/OHeaderSearch.vue.d.ts +10 -14
- package/dist/components/OHeaderUser.vue.d.ts +40 -0
- package/dist/components/OSourceCode.vue.d.ts +18 -0
- package/dist/components/activity/OActivityApproval.vue.d.ts +273 -0
- package/dist/components/activity/OActivityForm.vue.d.ts +138 -0
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +570 -0
- package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
- package/dist/components/activity/config.d.ts +1 -0
- package/dist/components/activity/index.d.ts +615 -0
- package/dist/components/activity/types.d.ts +88 -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 +14 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +69 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components/header/OHeader.vue.d.ts +30 -0
- package/dist/components/header/OHeaderMobile.vue.d.ts +178 -0
- package/dist/components/header/components/HeaderContent.vue.d.ts +13 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +19 -0
- package/dist/components/header/components/HeaderNavMobile.vue.d.ts +36 -0
- package/dist/components/header/index.d.ts +152 -0
- package/dist/components/header/types.d.ts +84 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +295 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +143 -0
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +578 -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 +13 -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/composables/useMeetingConfig.d.ts +14 -0
- package/dist/components/meeting/config.d.ts +12 -0
- package/dist/components/meeting/index.d.ts +786 -0
- package/dist/components/meeting/types.d.ts +233 -0
- package/dist/components/meeting/utils.d.ts +8 -0
- package/dist/components.cjs.js +224 -1
- package/dist/components.css +1 -1
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +44417 -784
- package/dist/index.d.ts +9 -2
- package/docs/design.md +27 -27
- package/docs/design_banner.md +41 -41
- package/docs/design_section.md +27 -27
- package/package.json +13 -4
- package/scripts/generate-components-index.js +103 -80
- 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 -3
- package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -3
- package/src/assets/svg-icons/icon-delete.svg +3 -3
- package/src/assets/svg-icons/icon-filter.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -3
- package/src/assets/svg-icons/icon-header-delete.svg +3 -3
- 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 -4
- 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 -3
- 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 -3
- package/src/assets/svg-icons/icon-tips.svg +3 -0
- package/src/components/OBanner.vue +398 -390
- package/src/components/OCookieNotice.vue +575 -424
- package/src/components/OFooter.vue +576 -0
- package/src/components/OHeaderSearch.vue +601 -601
- package/src/components/OHeaderUser.vue +237 -0
- package/src/components/OPlusConfigProvider.vue +32 -32
- package/src/components/OSection.vue +178 -178
- package/src/components/OSourceCode.vue +151 -0
- package/src/components/OThemeSwitcher.vue +108 -108
- package/src/components/activity/OActivityApproval.vue +864 -0
- package/src/components/activity/OActivityForm.vue +542 -0
- package/src/components/activity/OMyActivityCalendar.vue +1502 -0
- package/src/components/activity/composables/useActivityConfig.ts +141 -0
- package/src/components/activity/config.ts +1 -0
- package/src/components/activity/index.ts +24 -0
- package/src/components/activity/types.ts +95 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -21
- package/src/components/common/ContentWrapper.vue +85 -85
- 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 +418 -0
- package/src/components/events/OEventsCalendar.vue +598 -0
- package/src/components/events/OEventsList.vue +389 -0
- package/src/components/events/config.ts +35 -0
- package/src/components/events/index.ts +24 -0
- package/src/components/events/types.ts +83 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/header/OHeader.vue +157 -0
- package/src/components/header/OHeaderMobile.vue +184 -0
- package/src/components/header/components/HeaderContent.vue +1125 -0
- package/src/components/header/components/HeaderNav.vue +278 -0
- package/src/components/header/components/HeaderNavMobile.vue +380 -0
- package/src/components/header/index.ts +16 -0
- package/src/components/header/types.ts +95 -0
- package/src/components/meeting/OMeetingCalendar.vue +890 -0
- package/src/components/meeting/OMeetingForm.vue +1072 -0
- package/src/components/meeting/OMeetingPlayback.vue +439 -0
- package/src/components/meeting/OMyMeetingCalendar.vue +1508 -0
- package/src/components/meeting/OSigMeetingCalendar.vue +413 -0
- package/src/components/meeting/components/OMeetingCalendarList.vue +515 -0
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +210 -0
- package/src/components/meeting/components/OMeetingDetail.vue +244 -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 +199 -0
- package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
- package/src/components/meeting/config.ts +48 -0
- package/src/components/meeting/index.ts +45 -0
- package/src/components/meeting/types.ts +266 -0
- package/src/components/meeting/utils.ts +70 -0
- package/src/draft/Banner.vue +265 -265
- package/src/draft/ButtonCards.vue +105 -105
- package/src/draft/Feature.vue +133 -133
- package/src/draft/Footer.vue +512 -512
- package/src/draft/HorizontalAnchor.vue +165 -165
- package/src/draft/ItemSwiper.vue +133 -133
- package/src/draft/Logo.vue +141 -141
- package/src/draft/LogoCard.vue +74 -74
- package/src/draft/LogoV2.vue +19 -19
- package/src/draft/MainCard.vue +38 -38
- package/src/draft/MultiCard.vue +94 -94
- package/src/draft/MultiIconCard.vue +73 -73
- package/src/draft/OInfoCard.vue +176 -176
- package/src/draft/Process.vue +81 -81
- package/src/draft/Section.vue +167 -167
- package/src/draft/SingleTabCard.vue +84 -84
- package/src/draft/SliderCard.vue +110 -110
- package/src/env.d.ts +16 -1
- package/src/i18n/en.ts +264 -20
- package/src/i18n/index.ts +56 -42
- package/src/i18n/zh.ts +253 -9
- package/src/index.ts +14 -3
- package/src/shared/provide.ts +6 -6
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +9 -9
- package/tsconfig.json +37 -33
- package/vite.config.ts +119 -94
- package/dist/components/OCookieNoticeEl.vue.d.ts +0 -29
- package/dist/components.umd.js +0 -1
- package/src/components/OCookieNoticeEl.vue +0 -404
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { OIcon, OIconArrowLeft, OIconArrowRight } from '@opensig/opendesign';
|
|
3
|
+
import { useMeetingConfig } from '@/components/meeting/composables/useMeetingConfig';
|
|
4
|
+
import { CalendarDataType } from '@/components/meeting';
|
|
5
|
+
|
|
6
|
+
const { getConfig } = useMeetingConfig();
|
|
7
|
+
|
|
8
|
+
const props = defineProps<{
|
|
9
|
+
data: any[];
|
|
10
|
+
current: number;
|
|
11
|
+
total: number;
|
|
12
|
+
active: string;
|
|
13
|
+
meetingDates: string[];// 会议日期列表
|
|
14
|
+
eventsDates: string[];// 活动日期列表
|
|
15
|
+
}>();
|
|
16
|
+
|
|
17
|
+
const STEP = 1;
|
|
18
|
+
|
|
19
|
+
const emits = defineEmits(['click-date', 'change-month']);
|
|
20
|
+
const clickDate = (date: string) => {
|
|
21
|
+
emits('click-date', date);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const changeMonth = (step: number) => {
|
|
25
|
+
if (props.current + step >= props.total || props.current + step < 0) return;
|
|
26
|
+
emits('change-month', step);
|
|
27
|
+
};
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<template>
|
|
31
|
+
<div class="o-sig-meeting-aside">
|
|
32
|
+
<template v-for="(d, dIdx) in data" :key="dIdx">
|
|
33
|
+
<div v-for="m in d" :key="m.month" class="month-item">
|
|
34
|
+
<div class="month">{{ m.month.replace(/-/g, '/') }}</div>
|
|
35
|
+
<div class="days">
|
|
36
|
+
<div
|
|
37
|
+
class="day-item"
|
|
38
|
+
v-for="d in m.days"
|
|
39
|
+
:key="d"
|
|
40
|
+
@click="clickDate(`${m.month}-${d}`)"
|
|
41
|
+
:class="active === `${m.month}-${d}` && 'active'"
|
|
42
|
+
>
|
|
43
|
+
<div class="day-d">{{ d }}</div>
|
|
44
|
+
<div class="day-c">
|
|
45
|
+
<OIcon
|
|
46
|
+
v-if="meetingDates.includes(`${m.month}-${d}`)"
|
|
47
|
+
:style="{
|
|
48
|
+
zIndex: getConfig(CalendarDataType.MEETING, 'zIndex'),
|
|
49
|
+
backgroundColor: getConfig(CalendarDataType.MEETING, 'color'),
|
|
50
|
+
}"
|
|
51
|
+
>
|
|
52
|
+
<component :is="getConfig(CalendarDataType.MEETING, 'icon')" />
|
|
53
|
+
</OIcon>
|
|
54
|
+
<OIcon
|
|
55
|
+
v-if="eventsDates.includes(`${m.month}-${d}`)"
|
|
56
|
+
:style="{
|
|
57
|
+
zIndex: getConfig(CalendarDataType.EVENTS, 'zIndex'),
|
|
58
|
+
backgroundColor: getConfig(CalendarDataType.EVENTS, 'color'),
|
|
59
|
+
}"
|
|
60
|
+
>
|
|
61
|
+
<component :is="getConfig(CalendarDataType.EVENTS, 'icon')" />
|
|
62
|
+
</OIcon>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
<div class="arrow-wrapper">
|
|
69
|
+
<OIcon @click="changeMonth(0 - STEP)" :class="current - STEP < 0 && 'disabled'">
|
|
70
|
+
<OIconArrowLeft />
|
|
71
|
+
</OIcon>
|
|
72
|
+
<OIcon @click="changeMonth(STEP)" :class="current + STEP >= total && 'disabled'">
|
|
73
|
+
<OIconArrowRight />
|
|
74
|
+
</OIcon>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<style lang="scss">
|
|
80
|
+
.o-sig-meeting-aside {
|
|
81
|
+
width: 35%;
|
|
82
|
+
flex-shrink: 0;
|
|
83
|
+
padding: var(--o-gap-4) var(--o-gap-6);
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
border-right: 1px solid var(--o-color-control4);
|
|
87
|
+
@include respond-to('<=pad') {
|
|
88
|
+
padding: var(--o-gap-4);
|
|
89
|
+
border-right: none;
|
|
90
|
+
}
|
|
91
|
+
@include respond-to('phone') {
|
|
92
|
+
padding: 16px;
|
|
93
|
+
.title {
|
|
94
|
+
margin-bottom: var(--o-gap-2);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
@include respond-to('<=pad_v') {
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.month-item {
|
|
102
|
+
margin-bottom: var(--o-gap-3);
|
|
103
|
+
|
|
104
|
+
.month {
|
|
105
|
+
color: var(--o-color-info3);
|
|
106
|
+
margin-bottom: var(--o-gap-2);
|
|
107
|
+
@include tip1;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.days {
|
|
111
|
+
gap: var(--o-gap-2);
|
|
112
|
+
display: grid;
|
|
113
|
+
grid-template-columns: repeat(2, 1fr);
|
|
114
|
+
|
|
115
|
+
@include respond-to('<=pad_v') {
|
|
116
|
+
display: flex;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.day-item {
|
|
120
|
+
height: 64px;
|
|
121
|
+
border-radius: 4px;
|
|
122
|
+
background-color: var(--o-color-control2-light);
|
|
123
|
+
padding: 8px 12px;
|
|
124
|
+
cursor: pointer;
|
|
125
|
+
border: 1px solid transparent;
|
|
126
|
+
|
|
127
|
+
&:hover,
|
|
128
|
+
&.active {
|
|
129
|
+
background-color: var(--o-color-control3-light);
|
|
130
|
+
border-color: var(--o-color-primary1);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.day-d {
|
|
134
|
+
font-weight: 500;
|
|
135
|
+
margin-bottom: var(--o-gap-1);
|
|
136
|
+
color: var(--o-color-info1);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.day-c {
|
|
140
|
+
color: rgb(var(--o-white));
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-wrap: nowrap;
|
|
143
|
+
|
|
144
|
+
.o-icon {
|
|
145
|
+
width: 20px;
|
|
146
|
+
height: 20px;
|
|
147
|
+
font-size: 20px;
|
|
148
|
+
line-height: 1em;
|
|
149
|
+
position: relative;
|
|
150
|
+
border-radius: 50%;
|
|
151
|
+
margin-left: -6px;
|
|
152
|
+
|
|
153
|
+
&:first-child {
|
|
154
|
+
margin-left: 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
svg path {
|
|
158
|
+
fill: currentColor;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.arrow-wrapper {
|
|
167
|
+
margin-top: auto;
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: space-between;
|
|
171
|
+
color: var(--o-color-primary1);
|
|
172
|
+
|
|
173
|
+
.o-icon {
|
|
174
|
+
font-size: 24px;
|
|
175
|
+
cursor: pointer;
|
|
176
|
+
|
|
177
|
+
&.disabled {
|
|
178
|
+
cursor: not-allowed;
|
|
179
|
+
color: var(--o-color-primary4);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
&:not(.disabled):hover {
|
|
183
|
+
color: var(--o-color-primary2);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@include respond-to('<=pad_v') {
|
|
189
|
+
.day-item {
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
@include respond-to('<=pad_v') {
|
|
193
|
+
.day-item {
|
|
194
|
+
width: min(128px, calc((100% - var(--o-gap-2)) / 2));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
</style>
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import { useI18n } from '@/i18n';
|
|
4
|
+
import IconAll from '~icons/meeting/icon-all.svg';
|
|
5
|
+
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
6
|
+
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
7
|
+
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
8
|
+
import { CalendarDataType, meetingTabT, OptionItemT } from '../types';
|
|
9
|
+
import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK, TYPE_COLOR_MAP } from '../config';
|
|
10
|
+
|
|
11
|
+
export const useMeetingConfig = () => {
|
|
12
|
+
const { t, locale } = useI18n();
|
|
13
|
+
|
|
14
|
+
const meetingTabs = computed<meetingTabT[]>(() => [
|
|
15
|
+
{ label: t('meeting.meetingTypeAll'), value: CalendarDataType.ALL, icon: IconAll },
|
|
16
|
+
{ label: t('meeting.meetingTypeMeet'), value: CalendarDataType.MEETING, icon: IconMeeting, color: TYPE_COLOR_MAP.meeting, zIndex: 3 },
|
|
17
|
+
{ label: t('meeting.meetingTypeEvents'), value: CalendarDataType.EVENTS, icon: IconEvent, color: TYPE_COLOR_MAP.events, zIndex: 2 },
|
|
18
|
+
{ label: t('meeting.meetingTypeSummit'), value: CalendarDataType.SUMMIT, icon: IconSummit, color: TYPE_COLOR_MAP.summit, zIndex: 1 },
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
const cycleTypeOptions0 = computed<OptionItemT[]>(() => [
|
|
22
|
+
{ label: t('meeting.day0'), value: INTERVAL_DAY, max: 7 },
|
|
23
|
+
{ label: t('meeting.week0'), value: INTERVAL_WEEK, max: 2 },
|
|
24
|
+
{ label: t('meeting.month0'), value: INTERVAL_MONTH, max: 1 },
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
const cycleTypeOptions = computed<OptionItemT[]>(() => [
|
|
28
|
+
{ label: t('meeting.day'), value: INTERVAL_DAY, max: 7 },
|
|
29
|
+
{ label: t('meeting.week'), value: INTERVAL_WEEK, max: 2 },
|
|
30
|
+
{ label: t('meeting.month'), value: INTERVAL_MONTH, max: 1 },
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
const weekDay = computed(() => [
|
|
34
|
+
t('meeting.sunday'),
|
|
35
|
+
t('meeting.monday'),
|
|
36
|
+
t('meeting.tuesday'),
|
|
37
|
+
t('meeting.wednesday'),
|
|
38
|
+
t('meeting.thursday'),
|
|
39
|
+
t('meeting.friday'),
|
|
40
|
+
t('meeting.saturday'),
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
const intervalWeekOptions = computed(() => {
|
|
44
|
+
const list: OptionItemT[] = [];
|
|
45
|
+
for (let i = 1; i <= 7; i++) {
|
|
46
|
+
const idx = i % 7;
|
|
47
|
+
list.push({ value: idx, label: weekDay.value[idx] });
|
|
48
|
+
}
|
|
49
|
+
return list;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const getPointStr = (cycleType: number, points: number[]) => {
|
|
53
|
+
if (cycleType === INTERVAL_WEEK) {
|
|
54
|
+
return points
|
|
55
|
+
.sort((a, b) => {
|
|
56
|
+
const aIdx = intervalWeekOptions.value.findIndex((v) => v.value === a);
|
|
57
|
+
const bIdx = intervalWeekOptions.value.findIndex((v) => v.value === b);
|
|
58
|
+
return aIdx - bIdx;
|
|
59
|
+
})
|
|
60
|
+
.map((point: number) => {
|
|
61
|
+
const opt = intervalWeekOptions.value.find((v) => v.value === point);
|
|
62
|
+
return opt?.label || String(point);
|
|
63
|
+
})
|
|
64
|
+
.join(t('meeting.cycleSplit'));
|
|
65
|
+
}
|
|
66
|
+
if (cycleType === INTERVAL_MONTH) {
|
|
67
|
+
return points.join(t('meeting.cycleSplit'));
|
|
68
|
+
}
|
|
69
|
+
return '';
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const getConfig = (val: CalendarDataType, key: keyof meetingTabT): string => {
|
|
73
|
+
let value = val;
|
|
74
|
+
const find: meetingTabT | undefined = meetingTabs.value.find(v => v.value === value);
|
|
75
|
+
return find?.[key] || '';
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const getPlatformLabel = (platform: string) => {
|
|
79
|
+
switch (platform) {
|
|
80
|
+
case 'WELINK':
|
|
81
|
+
return 'WeLink';
|
|
82
|
+
case 'ZOOM':
|
|
83
|
+
return 'Zoom';
|
|
84
|
+
case 'TENCENT':
|
|
85
|
+
return locale.value === 'zh' ? '腾讯会议' : 'Tencent';
|
|
86
|
+
default:
|
|
87
|
+
return platform;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const getWeekFromDate = (date: string | Date) => {
|
|
92
|
+
return weekDay.value[dayjs(date).day()];
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
t,
|
|
97
|
+
locale,
|
|
98
|
+
meetingTabs,
|
|
99
|
+
cycleTypeOptions0,
|
|
100
|
+
cycleTypeOptions,
|
|
101
|
+
weekDay,
|
|
102
|
+
intervalWeekOptions,
|
|
103
|
+
getPointStr,
|
|
104
|
+
getConfig,
|
|
105
|
+
getPlatformLabel,
|
|
106
|
+
getWeekFromDate,
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CalendarDataType, meetingTabT } from './types.ts';
|
|
2
|
+
import IconAll from '~icons/meeting/icon-all.svg';
|
|
3
|
+
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
4
|
+
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
5
|
+
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
6
|
+
|
|
7
|
+
export const TYPE_COLOR_MAP = {
|
|
8
|
+
summit: 'rgba(var(--o-orange-6))',
|
|
9
|
+
events: 'rgba(var(--o-cyan-6))',
|
|
10
|
+
meeting: 'rgba(var(--o-deep-blue-6))',
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const INTERVAL_DAY = 0;
|
|
14
|
+
export const INTERVAL_WEEK = 1;
|
|
15
|
+
export const INTERVAL_MONTH = 2;
|
|
16
|
+
|
|
17
|
+
export const EMAIL_REGEX = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
|
18
|
+
|
|
19
|
+
export const PROGRESS_COLORS = ['var(--o-color-primary1)', 'var(--o-color-warning1)', 'var(--o-color-success1)'];
|
|
20
|
+
|
|
21
|
+
export const getMeetingTabs = (t: (key: string) => string): meetingTabT[] => [
|
|
22
|
+
{
|
|
23
|
+
label: t('meeting.meetingTypeAll'),
|
|
24
|
+
value: CalendarDataType.ALL,
|
|
25
|
+
icon: IconAll,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: t('meeting.meetingTypeMeet'),
|
|
29
|
+
value: CalendarDataType.MEETING,
|
|
30
|
+
icon: IconMeeting,
|
|
31
|
+
color: TYPE_COLOR_MAP.meeting,
|
|
32
|
+
zIndex: 3,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: t('meeting.meetingTypeEvents'),
|
|
36
|
+
value: CalendarDataType.EVENTS,
|
|
37
|
+
icon: IconEvent,
|
|
38
|
+
color: TYPE_COLOR_MAP.events,
|
|
39
|
+
zIndex: 2,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: t('meeting.meetingTypeSummit'),
|
|
43
|
+
value: CalendarDataType.SUMMIT,
|
|
44
|
+
icon: IconSummit,
|
|
45
|
+
color: TYPE_COLOR_MAP.summit,
|
|
46
|
+
zIndex: 1,
|
|
47
|
+
},
|
|
48
|
+
];
|
|
@@ -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('OMeetingForm', _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,266 @@
|
|
|
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
|
+
APPROVAL = 'approval'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CalendarOtherDataT {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
url: string;
|
|
23
|
+
dates: string[];
|
|
24
|
+
location?: string;
|
|
25
|
+
address?: string;
|
|
26
|
+
start_date: string;
|
|
27
|
+
end_date: string;
|
|
28
|
+
activity_type: string;
|
|
29
|
+
type: CalendarDataType.EVENTS | CalendarDataType.SUMMIT;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface OptionItemT {
|
|
33
|
+
label: string;
|
|
34
|
+
value: string | number;
|
|
35
|
+
|
|
36
|
+
[key: string]: any;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
export type PlatformT = 'welink' | 'tencent' | 'zoom' | 'WELINK' | 'TENCENT' | 'ZOOM';
|
|
41
|
+
|
|
42
|
+
export enum MeetingGroupType {
|
|
43
|
+
SIG = 'sig',
|
|
44
|
+
GROUP = 'group',
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface MeetingCalendarPropsT {
|
|
48
|
+
getDateListRequest: any;
|
|
49
|
+
getMeetingListRequest: any;
|
|
50
|
+
getSummitListRequest: any;
|
|
51
|
+
getSummitDatesRequest: any;
|
|
52
|
+
getEventsListRequest: any;
|
|
53
|
+
getEventsDatesRequest: any;
|
|
54
|
+
hiddenEvents?: boolean;
|
|
55
|
+
hiddenSummit?: boolean;
|
|
56
|
+
groupType: MeetingGroupType;
|
|
57
|
+
groups: string[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// 会议新增、修改
|
|
61
|
+
export interface MeetingPostT {
|
|
62
|
+
id?: number; // 会议id
|
|
63
|
+
topic: string; // 会议主题 128
|
|
64
|
+
sponsor?: string; // 会议发起人 20
|
|
65
|
+
group_name: string; // 所属SIG 64
|
|
66
|
+
platform: PlatformT; // 会议平台
|
|
67
|
+
date: string; // 会议日期
|
|
68
|
+
date_range?: string[]; // 日期返回
|
|
69
|
+
time: string; // 会议时间
|
|
70
|
+
start: string; // 会议开始时间
|
|
71
|
+
end: string; // 会议结束时间
|
|
72
|
+
etherpad: string; // etherpad链接
|
|
73
|
+
agenda: string; // 会议议程
|
|
74
|
+
email_list: string; // 通知邮件列表 1020
|
|
75
|
+
is_record: boolean; // 会议录制
|
|
76
|
+
is_cycle: boolean; // 是否重复
|
|
77
|
+
cycle_start_date?: string;
|
|
78
|
+
cycle_end_date?: string;
|
|
79
|
+
cycle_start?: string;
|
|
80
|
+
cycle_end?: string;
|
|
81
|
+
cycle_interval: number; // 重复周期, 当intervalType为month时固定为1
|
|
82
|
+
cycle_type: typeof INTERVAL_DAY | typeof INTERVAL_WEEK | typeof INTERVAL_MONTH; // 重复类型,默认为INTERVAL_DAY
|
|
83
|
+
cycle_point: number[]; // 重复节点,当intervalType为week|month时存在值
|
|
84
|
+
is_notify?: boolean;
|
|
85
|
+
mid?: string;
|
|
86
|
+
sub_id?: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface MeetingFormPropsT {
|
|
90
|
+
data?: MeetingItemT;
|
|
91
|
+
isSub?: boolean;
|
|
92
|
+
isEdit?: boolean;
|
|
93
|
+
subId?: string;
|
|
94
|
+
createMeetingRequest: any,
|
|
95
|
+
editMeetingRequest: any;
|
|
96
|
+
editSubMeetingRequest: any;
|
|
97
|
+
getPlatformsRequest: any;
|
|
98
|
+
getGroupsRequest: any;
|
|
99
|
+
showBtns?: boolean;
|
|
100
|
+
groupType: MeetingGroupType;
|
|
101
|
+
bookText?: string
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface ObsDataItemT {
|
|
105
|
+
id: number;
|
|
106
|
+
mid: string;
|
|
107
|
+
sub_id: string;
|
|
108
|
+
status: number;
|
|
109
|
+
text_vtt_url: string;
|
|
110
|
+
text_json_url: string;
|
|
111
|
+
text_video_url: string;
|
|
112
|
+
text_picture_url: string;
|
|
113
|
+
topic_url: string;
|
|
114
|
+
meeting_id: number;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface CycleSubItemT {
|
|
118
|
+
id: number;
|
|
119
|
+
mid: string;
|
|
120
|
+
sub_id: string;
|
|
121
|
+
date: string;
|
|
122
|
+
start: string;
|
|
123
|
+
end: string;
|
|
124
|
+
meeting_id: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 会议详情
|
|
128
|
+
export interface MeetingItemT extends MeetingPostT {
|
|
129
|
+
id: number;
|
|
130
|
+
community: string;
|
|
131
|
+
mid: string;
|
|
132
|
+
m_mid: string;
|
|
133
|
+
join_url: string; // 会议链接
|
|
134
|
+
create_time: string; // 创建时间
|
|
135
|
+
isEnd: boolean; // 是否结束
|
|
136
|
+
is_delete: boolean; // 是否取消
|
|
137
|
+
update_time: string;
|
|
138
|
+
time: string; // 处理一下时间范围
|
|
139
|
+
cycle_sub: CycleSubItemT[];
|
|
140
|
+
live_url?: string;
|
|
141
|
+
type: CalendarDataType;
|
|
142
|
+
obs_data?: ObsDataItemT[]; // 回放数据
|
|
143
|
+
isExpired?: boolean; // 处理数据,是否过期
|
|
144
|
+
sub_id: string; // 处理数据,周期会议平铺之后的id
|
|
145
|
+
dateRange?: string; // 计算属性
|
|
146
|
+
hasObsData?: boolean; // 计算属性
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface MeetingEventsItemT {
|
|
150
|
+
id: number;
|
|
151
|
+
title: string;
|
|
152
|
+
start_date: string;
|
|
153
|
+
end_date: string;
|
|
154
|
+
activity_type: number;
|
|
155
|
+
synopsis: string;
|
|
156
|
+
create_time: string;
|
|
157
|
+
address: string;
|
|
158
|
+
status: number;
|
|
159
|
+
sponsor: string;
|
|
160
|
+
is_delete: number;
|
|
161
|
+
start: string;
|
|
162
|
+
end: string;
|
|
163
|
+
register_url: string;
|
|
164
|
+
content_url: string;
|
|
165
|
+
live_url: null;
|
|
166
|
+
register_end_date: string;
|
|
167
|
+
update_activity_id: null;
|
|
168
|
+
approver: string;
|
|
169
|
+
organizer: string;
|
|
170
|
+
email_list: string;
|
|
171
|
+
dates?: string[]; // 处理数据,如果时跨天活动,有多个元素
|
|
172
|
+
type: CalendarDataType;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface SummitItemT {
|
|
176
|
+
id: string;
|
|
177
|
+
name: string;
|
|
178
|
+
url: string;
|
|
179
|
+
dates: string[];
|
|
180
|
+
location: string;
|
|
181
|
+
address: string;
|
|
182
|
+
start_date: string;
|
|
183
|
+
end_date: string;
|
|
184
|
+
start: string;
|
|
185
|
+
end: string;
|
|
186
|
+
activity_type: number;
|
|
187
|
+
type: CalendarDataType;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface PageParamsT {
|
|
191
|
+
page: number;
|
|
192
|
+
size: number;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export interface meetingTabT {
|
|
196
|
+
label: string;
|
|
197
|
+
value: CalendarDataType;
|
|
198
|
+
icon: any;
|
|
199
|
+
color?: string;
|
|
200
|
+
zIndex?: number;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
// -------------------- 会议回放 --------------------
|
|
205
|
+
export interface MeetingPlaybackPropsDetailT {
|
|
206
|
+
topic: string; // 会议主题
|
|
207
|
+
date: string; // 会议日期
|
|
208
|
+
start: string; // 会议开始时间
|
|
209
|
+
end: string; // 会议结束时间
|
|
210
|
+
agenda: string; // 会议详情
|
|
211
|
+
sponsor: string; // 会议创建人
|
|
212
|
+
groupName: string; // 会议所属sig组
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface MeetingPlaybackPropsDataT {
|
|
216
|
+
mid: string; // 会议ID
|
|
217
|
+
subId?: string; //子会议ID
|
|
218
|
+
textJson: string; // 字幕json文件
|
|
219
|
+
poster: string; // 封面
|
|
220
|
+
video: string; // 录屏
|
|
221
|
+
textVtt: string; // 字幕文件
|
|
222
|
+
topicJson: string; // 议题分段
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export interface MeetingPlaybackPropsT {
|
|
226
|
+
dates: string[]; // 如果是周期会议,传入可选的日期
|
|
227
|
+
detail: MeetingPlaybackPropsDetailT; // 会议信息
|
|
228
|
+
data: MeetingPlaybackPropsDataT; // 回放信息
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export interface SubjectItemT {
|
|
232
|
+
title: string; // 议题
|
|
233
|
+
startTime: string; // 议题开始时间 【时:分:秒】格式
|
|
234
|
+
endTime: string; // 议题结束时间 【时:分:秒】格式
|
|
235
|
+
startTimeNumber: number;
|
|
236
|
+
endTimeNumber: number;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
export interface CaptionItemT {
|
|
241
|
+
ID: number; // 字幕id
|
|
242
|
+
start_time: string; // 字幕开始时间
|
|
243
|
+
end_time: string; // 字幕结束时间
|
|
244
|
+
speaker: string; // 发言人
|
|
245
|
+
content: string; // 发言内容
|
|
246
|
+
contentHtml: string; // 发言内容转html
|
|
247
|
+
speakerIdx: number; // 当前发言人索引
|
|
248
|
+
speakerLabel: string; // 发言人文案
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
export interface MeetingPlaybackVideoPropsT {
|
|
253
|
+
src: string; // 视频资源
|
|
254
|
+
vtt?: string; // 字幕资源
|
|
255
|
+
captions?: CaptionItemT[]; // 语言转文字json
|
|
256
|
+
poster?: string | null; // 封面图片
|
|
257
|
+
posterTitle?: string | null; // 封面文案
|
|
258
|
+
instance?: any; // 播放器实例
|
|
259
|
+
trackIdx: number; // 当前字幕索引
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export interface MeetingPlaybackSubtitlesPropsT {
|
|
263
|
+
captions?: CaptionItemT[]; // 语言转文字json
|
|
264
|
+
instance?: any; // 播放器实例
|
|
265
|
+
trackIdx: number; // 当前字幕索引
|
|
266
|
+
}
|