@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.
Files changed (205) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -0
  2. package/dist/chunk-OElCookieNotice.es.js +839 -0
  3. package/dist/components/OBanner.vue.d.ts +10 -1
  4. package/dist/components/OCookieNotice.vue.d.ts +6 -5
  5. package/dist/components/OFooter.vue.d.ts +46 -0
  6. package/dist/components/OHeaderSearch.vue.d.ts +10 -14
  7. package/dist/components/OHeaderUser.vue.d.ts +40 -0
  8. package/dist/components/OSourceCode.vue.d.ts +18 -0
  9. package/dist/components/activity/OActivityApproval.vue.d.ts +273 -0
  10. package/dist/components/activity/OActivityForm.vue.d.ts +138 -0
  11. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +570 -0
  12. package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
  13. package/dist/components/activity/config.d.ts +1 -0
  14. package/dist/components/activity/index.d.ts +615 -0
  15. package/dist/components/activity/types.d.ts +88 -0
  16. package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
  17. package/dist/components/element-plus/index.d.ts +2 -0
  18. package/dist/components/events/OEventsApply.vue.d.ts +16 -0
  19. package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
  20. package/dist/components/events/OEventsList.vue.d.ts +26 -0
  21. package/dist/components/events/config.d.ts +14 -0
  22. package/dist/components/events/index.d.ts +78 -0
  23. package/dist/components/events/types.d.ts +69 -0
  24. package/dist/components/events/utils.d.ts +7 -0
  25. package/dist/components/header/OHeader.vue.d.ts +30 -0
  26. package/dist/components/header/OHeaderMobile.vue.d.ts +178 -0
  27. package/dist/components/header/components/HeaderContent.vue.d.ts +13 -0
  28. package/dist/components/header/components/HeaderNav.vue.d.ts +19 -0
  29. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +36 -0
  30. package/dist/components/header/index.d.ts +152 -0
  31. package/dist/components/header/types.d.ts +84 -0
  32. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +295 -0
  33. package/dist/components/meeting/OMeetingForm.vue.d.ts +143 -0
  34. package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
  35. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +578 -0
  36. package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
  37. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
  38. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
  39. package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +13 -0
  40. package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
  41. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
  42. package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
  43. package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
  44. package/dist/components/meeting/config.d.ts +12 -0
  45. package/dist/components/meeting/index.d.ts +786 -0
  46. package/dist/components/meeting/types.d.ts +233 -0
  47. package/dist/components/meeting/utils.d.ts +8 -0
  48. package/dist/components.cjs.js +224 -1
  49. package/dist/components.css +1 -1
  50. package/dist/components.element.cjs.js +1 -0
  51. package/dist/components.element.es.js +4 -0
  52. package/dist/components.es.js +44417 -784
  53. package/dist/index.d.ts +9 -2
  54. package/docs/design.md +27 -27
  55. package/docs/design_banner.md +41 -41
  56. package/docs/design_section.md +27 -27
  57. package/package.json +13 -4
  58. package/scripts/generate-components-index.js +103 -80
  59. package/src/assets/events/svg-icons/icon-checked.svg +3 -0
  60. package/src/assets/events/svg-icons/icon-competition.svg +7 -0
  61. package/src/assets/events/svg-icons/icon-events.svg +4 -0
  62. package/src/assets/events/svg-icons/icon-release.svg +4 -0
  63. package/src/assets/events/svg-icons/icon-summit.svg +4 -0
  64. package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
  65. package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
  66. package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
  67. package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
  68. package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
  69. package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
  70. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
  71. package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
  72. package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
  73. package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
  74. package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
  75. package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
  76. package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
  77. package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
  78. package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
  79. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
  80. package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
  81. package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
  82. package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
  83. package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
  84. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
  85. package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
  86. package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
  87. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
  88. package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
  89. package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
  90. package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
  91. package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
  92. package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
  93. package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
  94. package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
  95. package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
  96. package/src/assets/meeting/transparent.png +0 -0
  97. package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
  98. package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
  99. package/src/assets/svg-icons/icon-caret-left.svg +3 -0
  100. package/src/assets/svg-icons/icon-caret-right.svg +3 -0
  101. package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
  102. package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
  103. package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
  104. package/src/assets/svg-icons/icon-close.svg +3 -3
  105. package/src/assets/svg-icons/icon-delete.svg +3 -3
  106. package/src/assets/svg-icons/icon-filter.svg +3 -0
  107. package/src/assets/svg-icons/icon-header-back.svg +3 -3
  108. package/src/assets/svg-icons/icon-header-delete.svg +3 -3
  109. package/src/assets/svg-icons/icon-header-menu.svg +3 -0
  110. package/src/assets/svg-icons/icon-header-person.svg +3 -0
  111. package/src/assets/svg-icons/icon-header-search.svg +4 -4
  112. package/src/assets/svg-icons/icon-loading.svg +4 -0
  113. package/src/assets/svg-icons/icon-locale.svg +3 -0
  114. package/src/assets/svg-icons/icon-log-off.svg +3 -0
  115. package/src/assets/svg-icons/icon-message.svg +3 -0
  116. package/src/assets/svg-icons/icon-moon.svg +3 -3
  117. package/src/assets/svg-icons/icon-outlink.svg +3 -0
  118. package/src/assets/svg-icons/icon-overview.svg +3 -0
  119. package/src/assets/svg-icons/icon-search.svg +3 -0
  120. package/src/assets/svg-icons/icon-setting.svg +3 -0
  121. package/src/assets/svg-icons/icon-sun.svg +3 -3
  122. package/src/assets/svg-icons/icon-tips.svg +3 -0
  123. package/src/components/OBanner.vue +398 -390
  124. package/src/components/OCookieNotice.vue +575 -424
  125. package/src/components/OFooter.vue +576 -0
  126. package/src/components/OHeaderSearch.vue +601 -601
  127. package/src/components/OHeaderUser.vue +237 -0
  128. package/src/components/OPlusConfigProvider.vue +32 -32
  129. package/src/components/OSection.vue +178 -178
  130. package/src/components/OSourceCode.vue +151 -0
  131. package/src/components/OThemeSwitcher.vue +108 -108
  132. package/src/components/activity/OActivityApproval.vue +864 -0
  133. package/src/components/activity/OActivityForm.vue +542 -0
  134. package/src/components/activity/OMyActivityCalendar.vue +1502 -0
  135. package/src/components/activity/composables/useActivityConfig.ts +141 -0
  136. package/src/components/activity/config.ts +1 -0
  137. package/src/components/activity/index.ts +24 -0
  138. package/src/components/activity/types.ts +95 -0
  139. package/src/components/common/AppAvatar.vue +83 -0
  140. package/src/components/common/ClientOnlyWrapper.ts +21 -21
  141. package/src/components/common/ContentWrapper.vue +85 -85
  142. package/src/components/common/MoreText.vue +124 -0
  143. package/src/components/common/ThFilter.vue +330 -0
  144. package/src/components/element-plus/OElCookieNotice.vue +603 -0
  145. package/src/components/element-plus/index.ts +3 -0
  146. package/src/components/events/OEventsApply.vue +418 -0
  147. package/src/components/events/OEventsCalendar.vue +598 -0
  148. package/src/components/events/OEventsList.vue +389 -0
  149. package/src/components/events/config.ts +35 -0
  150. package/src/components/events/index.ts +24 -0
  151. package/src/components/events/types.ts +83 -0
  152. package/src/components/events/utils.ts +9 -0
  153. package/src/components/header/OHeader.vue +157 -0
  154. package/src/components/header/OHeaderMobile.vue +184 -0
  155. package/src/components/header/components/HeaderContent.vue +1125 -0
  156. package/src/components/header/components/HeaderNav.vue +278 -0
  157. package/src/components/header/components/HeaderNavMobile.vue +380 -0
  158. package/src/components/header/index.ts +16 -0
  159. package/src/components/header/types.ts +95 -0
  160. package/src/components/meeting/OMeetingCalendar.vue +890 -0
  161. package/src/components/meeting/OMeetingForm.vue +1072 -0
  162. package/src/components/meeting/OMeetingPlayback.vue +439 -0
  163. package/src/components/meeting/OMyMeetingCalendar.vue +1508 -0
  164. package/src/components/meeting/OSigMeetingCalendar.vue +413 -0
  165. package/src/components/meeting/components/OMeetingCalendarList.vue +515 -0
  166. package/src/components/meeting/components/OMeetingCalendarSelector.vue +210 -0
  167. package/src/components/meeting/components/OMeetingDetail.vue +244 -0
  168. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
  169. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
  170. package/src/components/meeting/components/OSigMeetingAside.vue +199 -0
  171. package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
  172. package/src/components/meeting/config.ts +48 -0
  173. package/src/components/meeting/index.ts +45 -0
  174. package/src/components/meeting/types.ts +266 -0
  175. package/src/components/meeting/utils.ts +70 -0
  176. package/src/draft/Banner.vue +265 -265
  177. package/src/draft/ButtonCards.vue +105 -105
  178. package/src/draft/Feature.vue +133 -133
  179. package/src/draft/Footer.vue +512 -512
  180. package/src/draft/HorizontalAnchor.vue +165 -165
  181. package/src/draft/ItemSwiper.vue +133 -133
  182. package/src/draft/Logo.vue +141 -141
  183. package/src/draft/LogoCard.vue +74 -74
  184. package/src/draft/LogoV2.vue +19 -19
  185. package/src/draft/MainCard.vue +38 -38
  186. package/src/draft/MultiCard.vue +94 -94
  187. package/src/draft/MultiIconCard.vue +73 -73
  188. package/src/draft/OInfoCard.vue +176 -176
  189. package/src/draft/Process.vue +81 -81
  190. package/src/draft/Section.vue +167 -167
  191. package/src/draft/SingleTabCard.vue +84 -84
  192. package/src/draft/SliderCard.vue +110 -110
  193. package/src/env.d.ts +16 -1
  194. package/src/i18n/en.ts +264 -20
  195. package/src/i18n/index.ts +56 -42
  196. package/src/i18n/zh.ts +253 -9
  197. package/src/index.ts +14 -3
  198. package/src/shared/provide.ts +6 -6
  199. package/src/shims-vue-dompurify-html.d.ts +17 -0
  200. package/src/vue.d.ts +9 -9
  201. package/tsconfig.json +37 -33
  202. package/vite.config.ts +119 -94
  203. package/dist/components/OCookieNoticeEl.vue.d.ts +0 -29
  204. package/dist/components.umd.js +0 -1
  205. package/src/components/OCookieNoticeEl.vue +0 -404
@@ -0,0 +1,890 @@
1
+ <script setup lang="ts">
2
+ import { computed, nextTick, onMounted, ref, watch } from 'vue';
3
+ import {
4
+ isClient,
5
+ OIcon,
6
+ OIconChevronLeft,
7
+ OIconChevronRight,
8
+ OOption,
9
+ OScroller,
10
+ OSelect,
11
+ OTab,
12
+ OTabPane,
13
+ } from '@opensig/opendesign';
14
+ import dayjs from 'dayjs';
15
+ import { ElCalendar } from 'element-plus';
16
+ import OMeetingCalendarList from './components/OMeetingCalendarList.vue';
17
+ import IconEvent from '~icons/meeting/icon-event.svg';
18
+ import IconSummit from '~icons/meeting/icon-summit.svg';
19
+ import IconMeeting from '~icons/meeting/icon-meet.svg';
20
+ import { Locales } from '@/i18n';
21
+ import { useMeetingConfig } from './composables/useMeetingConfig';
22
+ import {
23
+ CalendarDataType,
24
+ MeetingEventsItemT,
25
+ MeetingCalendarPropsT,
26
+ MeetingGroupType, MeetingItemT,
27
+ meetingTabT,
28
+ SummitItemT,
29
+ } from './types.ts';
30
+ import { formatDate } from './utils.ts';
31
+ import { useDebounceFn } from '@vueuse/core';
32
+
33
+ const props = withDefaults(defineProps<MeetingCalendarPropsT>(), {
34
+ getSummitListRequest: async () => [],
35
+ getEventsListRequest: async () => [],
36
+ hiddenEvents: false,
37
+ hiddenSummit: false,
38
+ groupType: MeetingGroupType.SIG,
39
+ groups: () => [],
40
+ });
41
+ const { t, locale, meetingTabs, getConfig } = useMeetingConfig();
42
+ const isEn = computed(() => locale.value === Locales.EN);
43
+
44
+ const latestDay = ref<string>('');
45
+ const dateList = ref<string[]>([]);
46
+ const summitData = ref<SummitItemT[]>([]);
47
+ const summitDates = ref<string[]>([]);
48
+ const eventsData = ref<MeetingEventsItemT[]>([]);
49
+ const eventsDates = ref<string[]>([]);
50
+ const allDates = ref<string[]>([]);
51
+ const meetingData = ref<MeetingItemT[]>([]);
52
+ const limitTime = '2021-01-01';
53
+ const tabType = ref<CalendarDataType>(CalendarDataType.ALL);
54
+ const tabs = computed<meetingTabT[]>(() => {
55
+ let list = meetingTabs.value;
56
+ if (props.hiddenEvents) {
57
+ list = list.filter((item) => item.value !== CalendarDataType.EVENTS);
58
+ }
59
+ if (props.hiddenSummit) {
60
+ list = list.filter((item) => item.value !== CalendarDataType.SUMMIT);
61
+ }
62
+ if (list.filter(v => v.value !== CalendarDataType.ALL).length === 1) {
63
+ return [];
64
+ }
65
+ return list;
66
+ });
67
+
68
+ watch(() => tabs.value, () => {
69
+ tabType.value = tabs.value[0]?.value ?? CalendarDataType.MEETING;
70
+ });
71
+ const calendar = ref();
72
+ const calendarHeight = ref<string>('407px');
73
+ const isLimit = ref(false);
74
+ const currentDay = ref('');
75
+ const isAutoClick = ref(false);
76
+ // sig组列表
77
+ const group = ref('');
78
+ const getSummitData = async (date: string) => {
79
+ if (props.getSummitListRequest) {
80
+ const list = await props.getSummitListRequest(date);
81
+ summitData.value = (list || []).map((v: SummitItemT) => {
82
+ return {
83
+ ...v,
84
+ type: CalendarDataType.SUMMIT,
85
+ start_date_time: `${ formatDate(v.start_date) } ${ v.start }`,
86
+ end_date_time: `${ formatDate(v.end_date) } ${ v.end }`,
87
+ };
88
+ });
89
+ } else {
90
+ summitData.value = [];
91
+ }
92
+ };
93
+ const getActivityData = async (date: string) => {
94
+ if (props.getEventsListRequest) {
95
+ const list = await props.getEventsListRequest(date);
96
+ eventsData.value = (list || []).map((v: MeetingEventsItemT) => {
97
+ return {
98
+ ...v,
99
+ type: CalendarDataType.EVENTS,
100
+ start_date_time: `${ formatDate(v.start_date) } ${ v.start }`,
101
+ end_date_time: `${ formatDate(v.end_date) } ${ v.end }`,
102
+ };
103
+ });
104
+ } else {
105
+ eventsData.value = [];
106
+ }
107
+ };
108
+
109
+ const getDateList = async (date: string) => {
110
+ if (props.getDateListRequest) {
111
+ props.getDateListRequest(date, group.value || '').then((res: string[]) => {
112
+ dateList.value = res;
113
+ });
114
+ }
115
+ if (props.getEventsDatesRequest) {
116
+ props.getEventsDatesRequest(date).then((res: string[]) => {
117
+ eventsDates.value = res;
118
+ });
119
+ }
120
+ if (props.getSummitDatesRequest) {
121
+ props.getSummitDatesRequest(date).then((res: string[]) => {
122
+ summitDates.value = res;
123
+ });
124
+ }
125
+ };
126
+
127
+ const paramGetDaysData = async (params: { date: string; type: string }) => {
128
+ if (!props.getMeetingListRequest) {
129
+ return;
130
+ }
131
+ if (!params.date) {
132
+ return;
133
+ }
134
+ try {
135
+ const res: MeetingItemT[] = await props.getMeetingListRequest(params.date, group.value, '');
136
+ meetingData.value = res.map((v) => {
137
+ return {
138
+ ...v,
139
+ time: `${ v.start }-${ v.end }`,
140
+ type: CalendarDataType.MEETING,
141
+ date: v.date || params.date,
142
+ };
143
+ }).sort((a: any, b: any) => {
144
+ return parseInt((a.start || a.cycle_start)?.replace(':', '')) - parseInt(b.end || b.cycle_end?.replace(':', ''));
145
+ });
146
+ } catch {
147
+ meetingData.value = [];
148
+ }
149
+ };
150
+
151
+ const renderData = computed(() => {
152
+ return [
153
+ ...meetingData.value,
154
+ ...eventsData.value.filter(v => (!dayjs(v.start_date).isAfter(dayjs(currentDay.value)) && !dayjs(currentDay.value).isAfter(dayjs(v.end_date))) || v.dates?.includes(currentDay.value)),
155
+ ...summitData.value.filter(v => v.dates?.includes(currentDay.value)),
156
+ ].filter((v) => {
157
+ if (tabType.value === CalendarDataType.ALL) {
158
+ return true;
159
+ }
160
+ return v.type === tabType.value;
161
+ });
162
+ });
163
+
164
+ const getDateData = async (day?: string) => {
165
+ const date = dayjs(day).format('YYYY-MM-DD');
166
+ currentDay.value = date;
167
+ getSummitData(date);
168
+ getActivityData(date);
169
+ getDateList(date);
170
+
171
+ allDates.value = [...new Set([...dateList.value, ...summitDates.value, ...eventsDates.value])]
172
+ .flat()
173
+ .sort((a: string, b: string) => dayjs(a).isAfter(dayjs(b)) ? 1 : -1);
174
+ if (!day) {
175
+ if (!allDates.value.length) {
176
+ latestDay.value = formatDate(new Date());
177
+ } else {
178
+ let find = [...allDates.value].reverse().find((v) => dayjs().isAfter(dayjs(v)));
179
+ if (!find) {
180
+ find = allDates.value.find((v) => dayjs(v).isAfter(dayjs()));
181
+ }
182
+ latestDay.value = formatDate(find);
183
+ }
184
+ }
185
+ paramGetDaysData({
186
+ date: date,
187
+ type: tabType.value,
188
+ });
189
+ };
190
+
191
+ const changeMeetingDay = useDebounceFn((day: string, event?: Event) => {
192
+ if (isAutoClick.value) {
193
+ isAutoClick.value = false;
194
+ return;
195
+ }
196
+ if (new Date(day).getTime() / 1000 < 1610380800) {
197
+ event?.stopPropagation();
198
+ return;
199
+ }
200
+ getDateData(day);
201
+ }, 300)
202
+
203
+
204
+ const selectDate = (val: string, date: string) => {
205
+ if (formatDate(date) === formatDate(limitTime) && val === 'prev-month') {
206
+ isLimit.value = true;
207
+ return;
208
+ }
209
+ isLimit.value = false;
210
+ calendar.value.selectDate(val);
211
+ changeMeetingDay(formatDate(calendar.value.selectedDay));
212
+ };
213
+ const changeGroup = () => {
214
+ nextTick(() => {
215
+ paramGetDaysData({
216
+ date: currentDay.value,
217
+ type: tabType.value,
218
+ });
219
+ getDateList(currentDay.value);
220
+ });
221
+ };
222
+
223
+ const removeLeadingZero = (str: string) => {
224
+ // 使用正则表达式匹配以 0 开头的字符串,然后去除开头的 0
225
+ return str.replace(/^0+(?=\d)/, '');
226
+ };
227
+
228
+ const watchChange = (element: HTMLElement) => {
229
+ const observe = new MutationObserver(function() {
230
+ calendarHeight.value = `${ element.offsetHeight - 2 }px`;
231
+ });
232
+ observe.observe(element, {
233
+ childList: true,
234
+ subtree: true,
235
+ characterData: true,
236
+ });
237
+ };
238
+
239
+ const getCalendarHeight = async () => {
240
+ // 设置右侧 日程列表高度
241
+ const tbody = document.querySelector('.calendar-body .el-calendar__body') as HTMLElement;
242
+ if (tbody) {
243
+ watchChange(tbody);
244
+ calendarHeight.value = `${ tbody.offsetHeight - 2 }px`;
245
+ }
246
+ };
247
+
248
+ onMounted(() => {
249
+ getCalendarHeight();
250
+ getDateData();
251
+ });
252
+
253
+ const stopWatchData = watch(
254
+ () => allDates.value.length,
255
+ () => {
256
+ if (isClient && !currentDay.value) {
257
+ nextTick(() => {
258
+ const activeBoxes = document.querySelector('.is-today .out-box') as HTMLElement;
259
+ if (activeBoxes) {
260
+ isAutoClick.value = true;
261
+ activeBoxes.click();
262
+ stopWatchData();
263
+ }
264
+ });
265
+ }
266
+ },
267
+ );
268
+
269
+ const formatYearMonth = (date: string) => {
270
+ if (isEn.value) {
271
+ return date.split(' ').reverse().join(' ');
272
+ } else {
273
+ return date;
274
+ }
275
+ };
276
+ // 根据类型校验日历日期是否可选
277
+ const checkSelectedDay = (type: CalendarDataType, date: string) => {
278
+ if (type === CalendarDataType.MEETING) {
279
+ return ([CalendarDataType.ALL, CalendarDataType.MEETING].includes(tabType.value) && dateList.value.includes(date));
280
+ }
281
+ if (type === CalendarDataType.SUMMIT) {
282
+ return ([CalendarDataType.ALL, CalendarDataType.SUMMIT].includes(tabType.value) && summitDates.value.includes(date));
283
+ }
284
+ if (type === CalendarDataType.EVENTS) {
285
+ return ([CalendarDataType.ALL, CalendarDataType.EVENTS].includes(tabType.value) && eventsDates.value.includes(date));
286
+ }
287
+ return false;
288
+ };
289
+ </script>
290
+ <template>
291
+ <div class="o-meeting-calendar">
292
+ <div class="calendar-body">
293
+ <ElCalendar ref="calendar" class="calender">
294
+ <template #header="{ date }">
295
+ <div class="calender-header-left">
296
+ <div class="left-title">
297
+ <OIcon @click="selectDate('prev-month', date)">
298
+ <OIconChevronLeft :class="{ disable: isLimit }" />
299
+ </OIcon>
300
+ <span class="month-date">{{ formatYearMonth(date) }}</span>
301
+ <OIcon @click="selectDate('next-month', date)">
302
+ <OIconChevronRight />
303
+ </OIcon>
304
+ </div>
305
+ <OSelect
306
+ v-model="group"
307
+ :placeholder="t(groupType === MeetingGroupType.GROUP ? 'meeting.allGroups' : 'meeting.allSigs')"
308
+ clearable
309
+ @change="changeGroup"
310
+ >
311
+ <OOption v-for="t in groups" :value="t" :key="t">{{ t }}</OOption>
312
+ </OSelect>
313
+ </div>
314
+
315
+ <div class="right-title">
316
+ {{ t('meeting.latestMeeting') }}&nbsp;
317
+ <span>{{ dayjs(latestDay).format('YYYY/MM/DD') }}</span>
318
+ </div>
319
+ </template>
320
+ <template #date-cell="{ data }">
321
+ <div class="out-box" :class="{ 'has-calender': allDates.includes(data.day) }"
322
+ @click="changeMeetingDay(data.day, $event)">
323
+ <div class="day-box">
324
+ <p :class="data.isSelected ? 'is-selected' : ''" class="date-calender">
325
+ {{ removeLeadingZero(data.day.split('-').at(-1) || '') }}
326
+ </p>
327
+ <div class="icon-box">
328
+ <OIcon
329
+ class="meeting"
330
+ :style="{
331
+ zIndex: getConfig(CalendarDataType.MEETING, 'zIndex'),
332
+ backgroundColor: getConfig(CalendarDataType.MEETING, 'color')
333
+ }"
334
+ v-if="checkSelectedDay(CalendarDataType.MEETING, data.day)">
335
+ <IconMeeting />
336
+ </OIcon>
337
+ <OIcon
338
+ class="events"
339
+ :style="{
340
+ zIndex: getConfig(CalendarDataType.EVENTS, 'zIndex'),
341
+ backgroundColor: getConfig(CalendarDataType.EVENTS, 'color')
342
+ }"
343
+ v-if="checkSelectedDay(CalendarDataType.EVENTS, data.day)">
344
+ <IconEvent />
345
+ </OIcon>
346
+ <OIcon
347
+ class="summit"
348
+ :style="{
349
+ zIndex: getConfig(CalendarDataType.SUMMIT, 'zIndex'),
350
+ backgroundColor: getConfig(CalendarDataType.SUMMIT, 'color')
351
+ }"
352
+ v-if="checkSelectedDay(CalendarDataType.SUMMIT, data.day)">
353
+ <IconSummit />
354
+ </OIcon>
355
+ </div>
356
+ </div>
357
+ </div>
358
+ </template>
359
+ </ElCalendar>
360
+ <div class="detail-list">
361
+ <div class="current-day">
362
+ {{ t('meeting.latestMeeting') }}&nbsp;
363
+ <span>{{ dayjs(currentDay).format('YYYY/MM/DD') }}</span>
364
+ </div>
365
+ <div class="right-title">
366
+ <div class="title-list">
367
+ <OSelect
368
+ v-model="group"
369
+ :placeholder="t(groupType === MeetingGroupType.GROUP ? 'meeting.allGroups' : 'meeting.allSigs')"
370
+ clearable
371
+ @change="changeGroup"
372
+ >
373
+ <OOption v-for="t in groups" :value="t" :key="t">{{ t }}</OOption>
374
+ </OSelect>
375
+ <OTab v-model="tabType" :line="false">
376
+ <OTabPane v-for="item in tabs" :key="item.value" :value="item.value">
377
+ <template #nav>
378
+ <OIcon>
379
+ <component :is="item.icon" />
380
+ </OIcon>
381
+ {{ item.label }}
382
+ </template>
383
+ </OTabPane>
384
+ </OTab>
385
+ </div>
386
+ </div>
387
+
388
+ <div>
389
+ <OScroller class="meeting-list" show-type="hover" size="small" :style="{
390
+ '--height': calendarHeight
391
+ }">
392
+ <OMeetingCalendarList :list="renderData as unknown as MeetingItemT[]" :groupType="groupType">
393
+ <template #empty>
394
+ <slot name="empty"></slot>
395
+ </template>
396
+ </OMeetingCalendarList>
397
+ </OScroller>
398
+ </div>
399
+ </div>
400
+ </div>
401
+ </div>
402
+ </template>
403
+ <style lang="scss">
404
+ .o-meeting-calendar {
405
+
406
+ .o-select {
407
+ flex-grow: 1;
408
+ max-width: 320px;
409
+ --select-radius: var(--o-radius-xs);
410
+ }
411
+
412
+ .el-calendar-table {
413
+ margin-bottom: 0;
414
+ display: table;
415
+ width: 100%;
416
+ }
417
+
418
+ .calendar-body {
419
+ display: flex;
420
+ border-radius: var(--o-radius-xs);
421
+ background-color: var(--o-color-fill2);
422
+ overflow: hidden;
423
+ @include respond-to('<=pad_v') {
424
+ background-color: transparent;
425
+ flex-direction: column;
426
+ }
427
+
428
+ .calender {
429
+ width: 56%;
430
+ --el-calendar-borde: none;
431
+ --el-calendar-selected-bg-color: none;
432
+ @include respond-to('<=pad_v') {
433
+ width: 100%;
434
+ flex-direction: column;
435
+ background-color: var(--o-color-fill2);
436
+ border-radius: var(--o-radius-xs);
437
+ }
438
+
439
+ .el-calendar__header {
440
+ display: flex;
441
+ align-items: center;
442
+ justify-content: space-between;
443
+ height: 60px;
444
+ padding: 0 var(--o-gap-6);
445
+ gap: var(--o-gap-6);
446
+ border-bottom: 1px solid var(--o-color-control4);
447
+ background: var(--o-color-fill2);
448
+ @include respond-to('<=pad_v') {
449
+ justify-content: center;
450
+ border-bottom: none;
451
+ height: 52px;
452
+ }
453
+
454
+ .calender-header-left {
455
+ display: flex;
456
+ align-items: center;
457
+ justify-content: center;
458
+ gap: var(--o-gap-6);
459
+
460
+ .o-select {
461
+ max-width: 240px;
462
+ @include respond-to('<=pad_v') {
463
+ display: none;
464
+ }
465
+ }
466
+ }
467
+
468
+ .left-title {
469
+ display: flex;
470
+ align-items: center;
471
+ flex-shrink: 0;
472
+ color: var(--o-color-info1);
473
+ @include text2;
474
+ @include respond-to('<=pad_v') {
475
+ @include h3;
476
+ }
477
+
478
+ .o-icon {
479
+ cursor: pointer;
480
+ font-size: 24px;
481
+ }
482
+
483
+ .month-date {
484
+ font-weight: 500;
485
+ margin: 0 var(--o-gap-1);
486
+ }
487
+ }
488
+
489
+ .right-title {
490
+ display: flex;
491
+ align-items: center;
492
+ color: var(--o-color-info2);
493
+ word-break: keep-all;
494
+ @include text2;
495
+ @include respond-to('<=pad_v') {
496
+ display: none;
497
+ }
498
+ }
499
+ }
500
+
501
+ .el-calendar__body {
502
+ padding: 0 var(--o-gap-6) var(--o-gap-6);
503
+ border-right: 1px solid var(--o-color-control4);
504
+ margin-bottom: 0;
505
+ background: var(--o-color-fill2);
506
+
507
+ thead {
508
+ th {
509
+ padding: var(--o-gap-4) var(--o-gap-3);
510
+ text-align: left;
511
+ color: var(--o-color-info3);
512
+ background: none;
513
+ border: none;
514
+ @include text1;
515
+ @include respond-to('<=pad_v') {
516
+ padding: 0;
517
+ text-align: center;
518
+ }
519
+ }
520
+ }
521
+
522
+ td {
523
+ border: none;
524
+ padding: 0;
525
+ }
526
+
527
+ td:first-child {
528
+ .el-calendar-day {
529
+ margin-left: 0 !important;
530
+ }
531
+ }
532
+
533
+ tr:last-child {
534
+ .el-calendar-day {
535
+ margin-bottom: 0 !important;
536
+ }
537
+ }
538
+
539
+ @include respond-to('<=pad_v') {
540
+ border: none;
541
+ padding: 0 16px 16px;
542
+ thead {
543
+ background-color: var(--o-color-control4-light);
544
+ overflow: hidden;
545
+
546
+ th {
547
+ padding: 9px 0;
548
+ }
549
+
550
+ th:first-child {
551
+ border-top-left-radius: var(--o-radius-xs);
552
+ border-bottom-left-radius: var(--o-radius-xs);
553
+ }
554
+
555
+ th:last-child {
556
+ border-top-right-radius: var(--o-radius-xs);
557
+ border-bottom-right-radius: var(--o-radius-xs);
558
+ }
559
+ }
560
+ tr:last-child {
561
+ .out-box {
562
+ margin-bottom: 0 !important;
563
+ }
564
+ }
565
+ }
566
+ }
567
+
568
+ td {
569
+ border: none;
570
+ }
571
+
572
+ .el-calendar-day {
573
+ padding: 0;
574
+ margin-left: var(--o-gap-2);
575
+ margin-bottom: var(--o-gap-2);
576
+ height: 64px;
577
+ color: var(--o-color-info1);
578
+ @include respond-to('<=pad_v') {
579
+ display: flex;
580
+ justify-content: center;
581
+ padding: 0;
582
+ height: fit-content;
583
+ }
584
+
585
+ .out-box {
586
+ position: relative;
587
+ border-radius: var(--o-radius-xs);
588
+ padding: 8px 12px;
589
+ width: 100%;
590
+ height: 100%;
591
+ background-color: var(--o-color-control2-light);
592
+ border: 1px solid transparent;
593
+ @include tip1;
594
+ @include hover {
595
+ background-color: var(--o-color-control3-light);
596
+ @include respond-to('<=pad_v') {
597
+ @include hover {
598
+ background-color: inherit;
599
+ border: 1px solid transparent;
600
+ }
601
+ }
602
+ }
603
+
604
+ .day-box {
605
+ display: flex;
606
+ flex-direction: column;
607
+ justify-content: space-between;
608
+ height: 100%;
609
+ }
610
+
611
+ .icon-box {
612
+ display: flex;
613
+ margin-top: 4px;
614
+ color: var(--o-color-white);
615
+ height: 20px;
616
+
617
+ .o-icon {
618
+ flex-shrink: 0;
619
+ position: relative;
620
+ border-radius: 50%;
621
+ padding: 2px;
622
+ width: 16px;
623
+ height: 16px;
624
+ font-size: 12px;
625
+ margin-left: -4px;
626
+ margin-top: 0;
627
+ @include respond-to('<=pad_v') {
628
+ height: 6px;
629
+ width: 6px;
630
+ margin-left: -2px;
631
+ }
632
+
633
+ &:first-child {
634
+ margin: 0;
635
+ }
636
+ }
637
+
638
+ .o-icon {
639
+ svg path {
640
+ fill: currentColor;
641
+ }
642
+ }
643
+ }
644
+
645
+ @include respond-to('<=pad_v') {
646
+ background-color: transparent;
647
+ padding: 0;
648
+ margin: 6px 8px;
649
+ text-align: center;
650
+ width: 24px;
651
+ height: 24px;
652
+ .day-box {
653
+ display: flex;
654
+ flex-direction: column;
655
+ justify-content: center;
656
+ align-items: center;
657
+ font-size: 14px;
658
+ line-height: 22px;
659
+ }
660
+ .icon-box {
661
+ display: flex;
662
+ justify-content: center;
663
+ margin-top: 0;
664
+ position: absolute;
665
+ left: 50%;
666
+ bottom: -2px;
667
+ height: 6px;
668
+ transform: translate(-50%, 100%);
669
+ }
670
+ .o-icon {
671
+ width: 6px;
672
+ height: 6px;
673
+
674
+ svg {
675
+ display: none;
676
+ }
677
+ }
678
+ }
679
+ }
680
+ }
681
+
682
+ .date-calender {
683
+ position: relative;
684
+ margin-bottom: 0;
685
+
686
+ &::after {
687
+ content: '';
688
+ position: absolute;
689
+ top: 50%;
690
+ left: 50%;
691
+ transform: translate(-50%, -50%);
692
+ z-index: -1;
693
+ }
694
+ }
695
+
696
+ .is-selected {
697
+ .out-box {
698
+ background-color: var(--o-color-control3-light);
699
+ border: 1px solid var(--o-color-primary1);
700
+ @include respond-to('<=pad_v') {
701
+ background-color: transparent;
702
+ border: 1px solid transparent;
703
+ .date-calender {
704
+ color: var(--o-color-primary1);
705
+ font-weight: 600;
706
+ z-index: 1;
707
+
708
+ &::after {
709
+ height: 24px;
710
+ width: 40px;
711
+ background-color: var(--o-color-control3-light);
712
+ border-radius: var(--o-radius-l);
713
+ border: 1px solid var(--o-color-primary1);
714
+ }
715
+ }
716
+ }
717
+ }
718
+ }
719
+
720
+ .is-today {
721
+ .date-calender {
722
+ --num-size: 22px;
723
+ width: fit-content;
724
+ height: var(--num-size);
725
+ line-height: var(--num-size);
726
+ z-index: 1;
727
+ font-weight: 600;
728
+ color: var(--o-color-primary1);
729
+
730
+ &::after {
731
+ width: var(--num-size);
732
+ height: var(--num-size);
733
+ background-color: var(--o-color-control3-light);
734
+ border-radius: 50%;
735
+ }
736
+
737
+ @include respond-to('<=pad_v') {
738
+ height: auto;
739
+ width: auto;
740
+ &::after {
741
+ content: '';
742
+ position: absolute;
743
+ top: 50%;
744
+ left: 50%;
745
+ transform: translate(-50%, -50%);
746
+ height: 24px;
747
+ width: 40px;
748
+ border-radius: var(--o-radius-l);
749
+ z-index: -1;
750
+ }
751
+ }
752
+ }
753
+ }
754
+ }
755
+
756
+ .detail-list {
757
+ width: 44%;
758
+
759
+
760
+ @include respond-to('<=pad_v') {
761
+ margin-top: 12px;
762
+ padding-top: 16px;
763
+ background-color: var(--o-color-fill2);
764
+ width: 100%;
765
+ border-radius: var(--o-radius-xs);
766
+ }
767
+ @include respond-to('phone') {
768
+
769
+ margin-top: 16px;
770
+ padding-top: 12px;
771
+ }
772
+
773
+ .current-day {
774
+ color: var(--o-color-info2);
775
+ @include respond-to('>pad_v') {
776
+ display: none;
777
+ }
778
+ @include respond-to('<=pad_v') {
779
+ display: flex;
780
+ margin: 16px 16px 12px;
781
+ padding: 7px 12px;
782
+ justify-content: center;
783
+ border-radius: var(--o-radius-xs);
784
+ background-color: var(--o-color-control4-light);
785
+ @include text2;
786
+ }
787
+ }
788
+
789
+ .title-list {
790
+ display: flex;
791
+ align-items: center;
792
+ justify-content: center;
793
+ padding: 14px 24px;
794
+ position: relative;
795
+ height: 60px;
796
+
797
+ @include respond-to('<=pad_v') {
798
+ justify-content: space-between;
799
+ padding: 0 16px;
800
+ gap: 24px;
801
+ height: auto;
802
+ align-items: flex-start;
803
+ }
804
+ @include respond-to('phone') {
805
+ flex-direction: column;
806
+ align-items: center;
807
+ gap: 8px;
808
+ }
809
+
810
+ &::after {
811
+ content: '';
812
+ position: absolute;
813
+ bottom: 0;
814
+ left: 0;
815
+ width: 100%;
816
+ height: 1px;
817
+ background-color: var(--o-color-control4);
818
+ }
819
+
820
+ .o-select {
821
+ display: none;
822
+ @include respond-to('<=pad_v') {
823
+ display: inline-flex;
824
+ }
825
+ @include respond-to('phone') {
826
+ display: flex;
827
+ width: 100%;
828
+ max-width: 100%;
829
+ }
830
+ }
831
+
832
+ }
833
+
834
+ .o-tab {
835
+ display: flex;
836
+ justify-content: center;
837
+ align-items: flex-end;
838
+ height: 60px;
839
+ }
840
+
841
+ .o-tab {
842
+ .o-icon {
843
+ svg path {
844
+ fill: currentColor;
845
+ }
846
+ }
847
+
848
+ @include respond-to('pad_v-laptop') {
849
+ --tab-nav-padding: 0 0 14px;
850
+ }
851
+ @include respond-to('<=pad_v') {
852
+ border-bottom: none;
853
+ height: auto;
854
+ .o-icon {
855
+ display: none;
856
+ }
857
+ .o-tab-navs-wrap {
858
+ height: 40px;
859
+
860
+ .o-tab-nav {
861
+ line-height: 2;
862
+ }
863
+ }
864
+ }
865
+ @include respond-to('phone') {
866
+ .o-tab-navs-wrap {
867
+ height: auto;
868
+ }
869
+ }
870
+
871
+ .o-tab-nav-anchor {
872
+ .o-tab-nav-anchor-line {
873
+ width: 100%;
874
+ @include respond-to('<=pad_v') {
875
+ width: 16px;
876
+ }
877
+ }
878
+ }
879
+ }
880
+ }
881
+
882
+ .meeting-list {
883
+ height: var(--height);
884
+ @include respond-to('<=pad_v') {
885
+ height: auto;
886
+ }
887
+ }
888
+ }
889
+ }
890
+ </style>