@opendesign-plus-test/components 0.0.1-rc.21 → 0.0.1-rc.22

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 (148) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +428 -137
  3. package/dist/components/OBanner.vue.d.ts +10 -1
  4. package/dist/components/OFooter.vue.d.ts +1 -1
  5. package/dist/components/OHeaderSearch.vue.d.ts +4 -4
  6. package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
  7. package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
  8. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +2 -0
  9. package/dist/components/activity/config.d.ts +15 -0
  10. package/dist/components/activity/data.d.ts +51 -0
  11. package/dist/components/activity/index.d.ts +332 -0
  12. package/dist/components/activity/types.d.ts +72 -0
  13. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +309 -0
  14. package/dist/components/meeting/OMeetingForm.vue.d.ts +156 -0
  15. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +582 -0
  16. package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
  17. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +27 -0
  18. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
  19. package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +12 -0
  20. package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
  21. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
  22. package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
  23. package/dist/components/meeting/config.d.ts +27 -0
  24. package/dist/components/meeting/types.d.ts +140 -0
  25. package/dist/components/meeting/utils.d.ts +21 -0
  26. package/dist/components.cjs.js +224 -3
  27. package/dist/components.css +1 -1
  28. package/dist/components.es.js +43019 -2293
  29. package/dist/index.d.ts +2 -0
  30. package/package.json +6 -3
  31. package/scripts/generate-components-index.js +4 -0
  32. package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
  33. package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
  34. package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
  35. package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
  36. package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
  37. package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
  38. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
  39. package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
  40. package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
  41. package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
  42. package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
  43. package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
  44. package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
  45. package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
  46. package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
  47. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
  48. package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
  49. package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
  50. package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
  51. package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
  52. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
  53. package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
  54. package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
  55. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
  56. package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
  57. package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
  58. package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
  59. package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
  60. package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
  61. package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
  62. package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
  63. package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
  64. package/src/assets/meeting/transparent.png +0 -0
  65. package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
  66. package/src/assets/svg-icons/icon-filter.svg +3 -0
  67. package/src/assets/svg-icons/icon-loading.svg +4 -0
  68. package/src/assets/svg-icons/icon-search.svg +3 -0
  69. package/src/assets/svg-icons/icon-tips.svg +3 -0
  70. package/src/components/OBanner.vue +11 -3
  71. package/src/components/OFooter.vue +1 -1
  72. package/src/components/activity/OActivityApproval.vue +775 -0
  73. package/src/components/activity/OActivityForm.vue +540 -0
  74. package/src/components/activity/OMyActivityCalendar.vue +13 -0
  75. package/src/components/activity/config.ts +130 -0
  76. package/src/components/activity/data.ts +365 -0
  77. package/src/components/activity/index.ts +24 -0
  78. package/src/components/activity/types.ts +78 -0
  79. package/src/components/common/MoreText.vue +119 -0
  80. package/src/components/common/ThFilter.vue +326 -0
  81. package/src/components/events/OEventsApply.vue +2 -86
  82. package/src/components/events/OEventsCalendar.vue +0 -25
  83. package/src/components/events/OEventsList.vue +0 -51
  84. package/src/components/events/index.ts +1 -0
  85. package/src/components/meeting/OMeetingCalendar.vue +865 -0
  86. package/src/components/meeting/OMeetingForm.vue +1035 -0
  87. package/src/components/meeting/OMeetingPlayback.vue +439 -0
  88. package/src/components/meeting/OMyMeetingCalendar.vue +1534 -0
  89. package/src/components/meeting/OSigMeetingCalendar.vue +411 -0
  90. package/src/components/meeting/components/OMeetingCalendarList.vue +462 -0
  91. package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
  92. package/src/components/meeting/components/OMeetingDetail.vue +176 -0
  93. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
  94. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
  95. package/src/components/meeting/components/OSigMeetingAside.vue +197 -0
  96. package/src/components/meeting/config.ts +110 -0
  97. package/src/components/meeting/index.ts +45 -0
  98. package/src/components/meeting/types.ts +167 -0
  99. package/src/components/meeting/utils.ts +106 -0
  100. package/src/draft/Footer.vue +4 -4
  101. package/src/env.d.ts +15 -0
  102. package/src/i18n/en.ts +140 -0
  103. package/src/i18n/index.ts +18 -4
  104. package/src/i18n/zh.ts +140 -0
  105. package/src/index.ts +2 -0
  106. package/tsconfig.json +6 -2
  107. package/vite.config.ts +25 -9
  108. package/npmcachae/_cacache/content-v2/sha512/05/f7/dd881de8b21208ea65cfce17c65f29964c3897505819f81151b9798a3a6ab1a1114324192354ead15cd2c8d93f76cc9929af168066ec9cc7878d0fd87578 +0 -1
  109. package/npmcachae/_cacache/content-v2/sha512/08/b7/879230f8c2f3765920a6fd6113f4687141f1f645f96af7d95a0dee9113d1095d000fb78a5dd55c1860bbfb9b698ef6281b3874b03b2384222f61fe055fc4 +0 -1
  110. package/npmcachae/_cacache/content-v2/sha512/10/a0/a6626613c03ee052925a762e8675878efdf83dac64fafea43beb2a875f7d7c3907bb0ee30761253cd16021fd58911449594e1d3358675cbb7c48e62f220a +0 -1
  111. package/npmcachae/_cacache/content-v2/sha512/2e/a6/7cbcf55a98bbe2ca881d10e982ebf59211a0ec051eaf46eb1914df66cc35ae502ed6888850e51d8f45cd92695bac16961a642bc41508f8d5160a9ab617ab +0 -1
  112. package/npmcachae/_cacache/content-v2/sha512/92/8d/e5259c5d5cc2a625247f3c4d809192ca9482467e23683d74924a11e91a7997ad890b3d26adaf34df66d5329cc7a5fbde6713110cad05107a0b504e4fd4e8 +0 -1
  113. package/npmcachae/_cacache/content-v2/sha512/e9/45/9597d870127c35681155cec5fe52fde4e1aa0f778b996ee371e856aca850ee4c13aba74b0c3d3a89ff0ea4c9e1d33e64e53c31dc9cede0b31012695ee659 +0 -1
  114. package/npmcachae/_cacache/index-v5/16/4a/7195fcc6857299c4ab7e26014a8ae6e3c396507a2c8db3da1b74b005d574 +0 -3
  115. package/npmcachae/_cacache/index-v5/58/f0/4fe556f104b09be642895a82afa463fe560d9a0dc8f507efeef825a6905e +0 -3
  116. package/npmcachae/_cacache/index-v5/67/7d/0b50dc4c09555fc922ccf43c46994f1a0a5ff47dc0a5d5cf41437ac2d3e6 +0 -3
  117. package/npmcachae/_cacache/index-v5/8f/28/353f8839e030ab11aab3e7d9f1b8c053403e9f593cf6d4aa6ec8fdd7610d +0 -3
  118. package/npmcachae/_cacache/index-v5/97/10/0fcf20eb29d0726bd820822f6729718464b591b0e6901217c956740e943c +0 -3
  119. package/npmcachae/_cacache/index-v5/db/89/a0a4f35f593105624ab39339962d9e9b5cc65ed0c346b0732fb8dd73721d +0 -3
  120. package/npmcachae/_logs/2026-03-26T14_10_35_885Z-debug-0.log +0 -171
  121. package/npmcachae/_logs/2026-03-26T14_10_38_617Z-debug-0.log +0 -4227
  122. package/npmcachae/_logs/2026-03-26T14_10_45_316Z-debug-0.log +0 -4228
  123. package/npmcachae/_logs/2026-03-26T14_10_48_169Z-debug-0.log +0 -4228
  124. package/npmcachae/_logs/2026-03-26T14_10_51_306Z-debug-0.log +0 -464
  125. package/npmcachae/_logs/2026-03-26T14_10_53_911Z-debug-0.log +0 -464
  126. package/npmcachae/_logs/2026-03-26T14_10_56_398Z-debug-0.log +0 -464
  127. package/npmcachae/_logs/2026-03-26T14_10_58_861Z-debug-0.log +0 -464
  128. package/npmcachae/_logs/2026-03-26T14_11_01_337Z-debug-0.log +0 -464
  129. package/npmcachae/_logs/2026-03-26T14_11_03_851Z-debug-0.log +0 -464
  130. package/npmcachae/_logs/2026-03-26T14_11_08_024Z-debug-0.log +0 -464
  131. package/npmcachae/_update-notifier-last-checked +0 -0
  132. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/3e/17/1865217b9acb9f4921c53a09b5c76587cd2ab748beb2699ff6cfb1341d73b1aa56ed91ffc5ab2c9c9b3fbe626103b35d9a79ff29ff6b8cbb8d89755fe1a2 +0 -1
  133. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/a6/15/47bb7552ec9248079e839a5feecc1742d4de19524fdf041cf581701cf4760a5025106036145e279ba193b07c8fa5b07ae3d75f1b6032f0cb2219115b6167 +0 -1
  134. package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/d1/4c/133b32e09c97101a27a07cc4432f94e470cff02d120d21babcea77c3f5cd436793516dc1a8e282ee1a568f923c148b1a48f4a43233462a530d35e8b41c67 +0 -1
  135. package/src/components/meeting/npmcachae/_cacache/index-v5/54/0d/a4909047714a0a7198bb9bd37020992464e47c79a791889919b84d90aab0 +0 -3
  136. package/src/components/meeting/npmcachae/_cacache/index-v5/8e/2b/21a79778e2ac08cf5663baf83cb35f951995a496007eb2e2f7fba54021a4 +0 -3
  137. package/src/components/meeting/npmcachae/_cacache/index-v5/eb/a0/b70c8132e5b57a0f1e129b8cc941796420a9c147c0baa680710083740898 +0 -2
  138. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_54_955Z-debug-0.log +0 -277
  139. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_57_842Z-debug-0.log +0 -277
  140. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_00_016Z-debug-0.log +0 -277
  141. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_02_191Z-debug-0.log +0 -277
  142. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_04_425Z-debug-0.log +0 -277
  143. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_06_642Z-debug-0.log +0 -277
  144. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_08_826Z-debug-0.log +0 -277
  145. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_36_140Z-debug-0.log +0 -433
  146. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_39_573Z-debug-0.log +0 -433
  147. package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_42_134Z-debug-0.log +0 -212
  148. package/src/components/meeting/npmcachae/_update-notifier-last-checked +0 -0
@@ -0,0 +1,540 @@
1
+ <script setup lang="ts">
2
+
3
+ import {
4
+ OButton,
5
+ OForm,
6
+ OFormItem,
7
+ OInput,
8
+ OOption,
9
+ OSelect,
10
+ OTextarea,
11
+ RulesT, SelectValueT,
12
+ useMessage,
13
+ } from '@opensig/opendesign';
14
+ import { computed, ref, watch } from 'vue';
15
+ import { ActivityFormPropsT, ParamsItemT } from './types';
16
+ import { useScreen } from '@opendesign-plus/composables';
17
+ import { dayjs, ElDatePicker } from 'element-plus';
18
+ import { acticityTypeMap, WEBSITE_REGEXP } from './config';
19
+ import { EMAIL_REGEX } from '@/components/meeting/config.ts';
20
+ import { useI18n } from '@/i18n';
21
+
22
+ const emits = defineEmits(['confirm', 'close']);
23
+
24
+ const message = useMessage(null);
25
+ const { lePadV } = useScreen();
26
+ const { t } = useI18n();
27
+ const $t = t;
28
+ interface TypeOptionT {
29
+ label: string;
30
+ value: number;
31
+ }
32
+
33
+ const props = withDefaults(defineProps<ActivityFormPropsT>(), {});
34
+ const isEdit = computed(() => !!props.data);
35
+ const form = ref<ParamsItemT>({
36
+ title: '',
37
+ organizer: '',
38
+ start_date: '',
39
+ end_date: '',
40
+ register_end_date: '',
41
+ activity_type: '',
42
+ synopsis: '',
43
+ register_url: '',
44
+ content_url: '',
45
+ address: '',
46
+ start: '',
47
+ end: '',
48
+ is_publish: 'true',
49
+ email_list: '',
50
+ content: '',
51
+ approver: '',
52
+ });
53
+
54
+ const formRef = ref(); // 表单实例
55
+ const loading = ref(false); // 提交状态
56
+
57
+
58
+ // 表单校验规则
59
+ const rules = ref<Record<string, RulesT[]>>({
60
+ title: [
61
+ { required: true, message: '请输入活动名称' },
62
+ {
63
+ validator: (value: string) => {
64
+ if (value.length > 50) {
65
+ return {
66
+ type: 'danger',
67
+ message: '活动名称不能超过50个字符',
68
+ };
69
+ }
70
+ },
71
+ },
72
+ ],
73
+ activity_type: [{ required: true, message: '请选择活动类型' }],
74
+ organizer: [{ required: true, message: '请选择活动类型' }],
75
+ start_date: [
76
+ { required: true, message: '请选择活动时间' },
77
+ {
78
+ validator: () => {
79
+ const { start_date, end_date } = form.value;
80
+ const startDate = start_date.split(' ');
81
+ const endDate = end_date.split(' ');
82
+ if (!start_date || !end_date) {
83
+ return {
84
+ type: 'danger',
85
+ message: '请选择活动日期',
86
+ };
87
+ }
88
+
89
+ const startArr = startDate[1].split(':').map(Number);
90
+ const endArr = endDate[1].split(':').map(Number);
91
+ if (startArr[0] < 8 || startArr[0] > 21 || endArr[0] < 8 || endArr[0] > 21) {
92
+ return {
93
+ type: 'danger',
94
+ message: '开始和结束时间必须在8:00-22:00点之间',
95
+ };
96
+ }
97
+
98
+ if (dayjs(start_date).valueOf() > dayjs(end_date).valueOf()) {
99
+ return {
100
+ type: 'danger',
101
+ message: '结束日期必须大于起始日期',
102
+ };
103
+ }
104
+
105
+ form.value.start_date = startDate[0];
106
+ form.value.end_date = endDate[0];
107
+ form.value.start = startDate[1];
108
+ form.value.end = endDate[1];
109
+ },
110
+ triggers: ['blur', 'change'],
111
+ },
112
+ ],
113
+ register_end_date: [
114
+ { required: true, message: '请选择报名截止时间' },
115
+ {
116
+ validator: () => {
117
+ const { register_end_date, end_date, end } = form.value;
118
+ if (dayjs(`${ end_date } ${ end }`).valueOf() < dayjs(register_end_date).valueOf()) {
119
+ return {
120
+ type: 'danger',
121
+ message: '报名截止日期必须小于结束日期',
122
+ };
123
+ }
124
+ },
125
+ triggers: ['blur', 'change'],
126
+ },
127
+ ],
128
+ address: [
129
+ { required: true, message: '请输入活动地点' },
130
+ {
131
+ validator: (value: string) => {
132
+ if (value.length > 255) {
133
+ return {
134
+ type: 'danger',
135
+ message: '活动名称不能超过255个字符',
136
+ };
137
+ }
138
+ },
139
+ },
140
+ ],
141
+ register_url: [
142
+ { required: true, message: '请输入活动报名网址' },
143
+ {
144
+ validator: (value: string) => {
145
+ const str = value.replaceAll(' ', '') || '';
146
+ if (str.length) {
147
+ const list = str.split(';') || [];
148
+ if (list.some((v) => !WEBSITE_REGEXP.test(v))) {
149
+ return {
150
+ type: 'danger',
151
+ message: '请输入正确的报名网址',
152
+ };
153
+ }
154
+ }
155
+ },
156
+ triggers: ['blur', 'change'],
157
+ },
158
+ ],
159
+ content_url: [
160
+ { required: true, message: '请输入活动详情介绍网址' },
161
+ {
162
+ validator: (value: string) => {
163
+ const str = value.replaceAll(' ', '') || '';
164
+ if (str.length) {
165
+ const list = str.split(';') || [];
166
+ if (list.some((v) => !WEBSITE_REGEXP.test(v))) {
167
+ return {
168
+ type: 'danger',
169
+ message: '请输入正确的活动详情网址',
170
+ };
171
+ }
172
+ }
173
+ },
174
+ triggers: ['blur', 'change'],
175
+ },
176
+ ],
177
+ content: [{
178
+ validator: (value: string) => {
179
+ if (value.length > 1000) {
180
+ return {
181
+ type: 'danger',
182
+ message: '活动内容不能超过1000个字符',
183
+ };
184
+ }
185
+ },
186
+ }],
187
+ email_list: [{
188
+ validator: (value: string) => {
189
+ const str = value.replaceAll(' ', '') || '';
190
+ if (str.length) {
191
+ if (str.length > 1020) {
192
+ return {
193
+ type: 'danger',
194
+ message: t('meeting.emailTooLong'),
195
+ };
196
+ }
197
+ const list = str.split(';') || [];
198
+ if (list.some((v) => !EMAIL_REGEX.test(v))) {
199
+ return {
200
+ type: 'danger',
201
+ message: t('meeting.emailInvalid'),
202
+ };
203
+ }
204
+ if (list.some((v) => v.length > 50)) {
205
+ return {
206
+ type: 'danger',
207
+ message: t('meeting.singleEmailTooLong'),
208
+ };
209
+ }
210
+ if (list.length > 20) {
211
+ return {
212
+ type: 'danger',
213
+ message: t('meeting.emailCountTooLong'),
214
+ };
215
+ }
216
+ }
217
+ },
218
+ triggers: ['blur', 'change'],
219
+ }],
220
+ approver: [{ required: true, message: '请选择活动审批人' }],
221
+ });
222
+
223
+
224
+ // -------------------- 活动管理员 ---------------------
225
+ const approverList = computed(() => {
226
+ return props.admins || [];
227
+ });
228
+
229
+ const typeValue = ref<string>('');
230
+ const typeOptions = ref<TypeOptionT[]>([]); // 活动类型
231
+ acticityTypeMap.forEach((item) => {
232
+ typeOptions.value.push(item);
233
+ });
234
+ const changeType = (val: SelectValueT) => {
235
+ const item = typeOptions.value.find((v) => v.label === val);
236
+ form.value.activity_type = item?.value as number;
237
+ };
238
+
239
+ const disabledDate = (date: Date) => {
240
+ return date.getTime() < Date.now() - 24 * 60 * 60 * 1000;
241
+ };
242
+
243
+ watch(
244
+ () => props.data,
245
+ (val) => {
246
+ if (val) {
247
+ const {
248
+ title,
249
+ start_date,
250
+ end_date,
251
+ register_end_date,
252
+ activity_type,
253
+ register_url,
254
+ content_url,
255
+ address,
256
+ start,
257
+ end,
258
+ is_publish,
259
+ approver,
260
+ update_activity_id,
261
+ } = val;
262
+ let params = {
263
+ title,
264
+ start_date,
265
+ end_date,
266
+ register_end_date,
267
+ activity_type,
268
+ register_url,
269
+ content_url,
270
+ address,
271
+ start,
272
+ end,
273
+ is_publish,
274
+ approver,
275
+ update_activity_id,
276
+ } as ParamsItemT;
277
+ form.value = { ...params };
278
+ typeValue.value = acticityTypeMap.get(val.activity_type)?.label;
279
+ form.value.start_date = `${ form.value.start_date } ${ form.value.start }`;
280
+ form.value.end_date = `${ form.value.end_date } ${ form.value.end }`;
281
+ }
282
+ },
283
+ { immediate: true, deep: true },
284
+ );
285
+
286
+ const confirm = async (val: boolean) => {
287
+ let type = isEdit.value ? '修改' : val ? '创建' : '保存草稿';
288
+ try {
289
+ const valid = await formRef.value?.validate();
290
+ if (valid.some((v) => !!v)) {
291
+ return;
292
+ }
293
+ loading.value = true;
294
+ form.value.is_publish = `${ val }`;
295
+ if (isEdit.value && props.status === 3) {
296
+ form.value.update_activity_id = props.data?.id;
297
+ await props.creatActivity?.(form.value);
298
+ } else if (isEdit.value) {
299
+ await props.editActivity?.(props.data.id, form.value);
300
+ } else {
301
+ await props.creatActivity?.(form.value);
302
+ }
303
+ const msg = `“${ form.value.title }”活动${ type }成功`;
304
+ message.success({
305
+ content: msg,
306
+ });
307
+ close();
308
+ emits('confirm');
309
+ } catch {
310
+ loading.value = false;
311
+ form.value.start_date = `${ form.value.start_date } ${ form.value.start }`;
312
+ form.value.end_date = `${ form.value.end_date } ${ form.value.end }`;
313
+ const msg = `“${ form.value.title }”活动${ type }失败`;
314
+ message.danger({
315
+ content: msg,
316
+ });
317
+ }
318
+ };
319
+ const close = () => {
320
+ form.value = {} as ParamsItemT;
321
+ emits('close');
322
+ };
323
+
324
+
325
+ defineExpose({
326
+ confirm,
327
+ });
328
+ </script>
329
+
330
+ <template>
331
+ <div class="o-activity-form">
332
+ <OForm
333
+ :model="form"
334
+ ref="formRef"
335
+ has-required
336
+ label-width="108px"
337
+ :layout="lePadV ? 'v' : 'h'"
338
+ class="form-wrapper"
339
+ >
340
+ <OFormItem :rules="rules.title" label="活动名称" field="title">
341
+ <OInput size="large" placeholder="请输入活动名称" v-model="form.title" />
342
+ </OFormItem>
343
+ <OFormItem :rules="rules.organizer" label="活动主办方" field="organizer">
344
+ <OInput size="large" placeholder="请选择活动主办方" v-model="form.organizer" />
345
+ </OFormItem>
346
+ <OFormItem :rules="rules.activity_type" label="活动类型" field="activity_type">
347
+ <OSelect placeholder="请选择活动类型" size="large" v-model="typeValue" @change="changeType">
348
+ <OOption v-for="t in typeOptions" :key="t.value" :value="t.label">{{ t.label }}</OOption>
349
+ </OSelect>
350
+ </OFormItem>
351
+ <OFormItem
352
+ v-if="form.activity_type === 1 || form.activity_type === 3"
353
+ :rules="rules.address"
354
+ label="活动地点"
355
+ field="address"
356
+ >
357
+ <OInput size="large" placeholder="请输入活动地点" v-model="form.address" />
358
+ </OFormItem>
359
+ <OFormItem :rules="rules.start_date" label="活动时间" field="start_date" required>
360
+ <div class="time-config">
361
+ <OFormItem label="起始日期" field="start_date">
362
+ <ElDatePicker
363
+ size="large"
364
+ v-model="form.start_date"
365
+ type="datetime"
366
+ placeholder="请选择日期"
367
+ format="YYYY/MM/DD HH:mm"
368
+ value-format="YYYY-MM-DD HH:mm"
369
+ :disabled-date="disabledDate"
370
+ :clearable="false"
371
+ class="date-activity"
372
+ />
373
+ </OFormItem>
374
+ <OFormItem label="结束日期" field="end_date">
375
+ <ElDatePicker
376
+ size="large"
377
+ v-model="form.end_date"
378
+ type="datetime"
379
+ placeholder="请选择日期"
380
+ format="YYYY/MM/DD HH:mm"
381
+ value-format="YYYY-MM-DD HH:mm"
382
+ :disabled-date="disabledDate"
383
+ :clearable="false"
384
+ class="date-activity"
385
+ />
386
+ </OFormItem>
387
+ </div>
388
+ </OFormItem>
389
+ <OFormItem :rules="rules.register_end_date" label="报名截止时间" field="register_end_date">
390
+ <ElDatePicker
391
+ size="large"
392
+ v-model="form.register_end_date"
393
+ type="datetime"
394
+ placeholder="请选择报名截止时间"
395
+ format="YYYY/MM/DD HH:mm"
396
+ value-format="YYYY-MM-DD HH:mm"
397
+ :clearable="false"
398
+ class="date-activity"
399
+ />
400
+ </OFormItem>
401
+ <OFormItem :rules="rules.register_url" label="报名网址" field="register_url">
402
+ <OInput size="large" placeholder="请输入活动报名网址" v-model="form.register_url" />
403
+ </OFormItem>
404
+ <OFormItem :rules="rules.content_url" label="活动详情网址" field="content_url">
405
+ <OInput size="large" placeholder="请输入活动详情介绍网址" v-model="form.content_url" />
406
+ </OFormItem>
407
+ <OFormItem :rules="rules.content" label="活动内容" field="content">
408
+ <OTextarea size="large" placeholder="请输入活动内容" v-model="form.content" />
409
+ </OFormItem>
410
+ <OFormItem field="email_list" :rules="rules.email_list" label="邮件地址">
411
+ <OTextarea
412
+ :disabled="isEdit"
413
+ size="large"
414
+ :placeholder="$t('meeting.enterEmail')"
415
+ :rows="4"
416
+ v-model="form.email_list" />
417
+ </OFormItem>
418
+ <OFormItem :rules="rules.approver" label="活动审批人" field="approver">
419
+ <OSelect placeholder="请选择活动审批人" size="large" v-model="form.approver">
420
+ <OOption v-for="t in approverList" :key="t" :value="t">{{ t }}</OOption>
421
+ </OSelect>
422
+ </OFormItem>
423
+ </OForm>
424
+ <div class="form-btns">
425
+ <OButton color="primary" variant="solid" size="large" round="pill" @click="confirm(true)" :loading="loading">
426
+ {{ isEdit ? '保存' : '创建' }}
427
+ </OButton>
428
+ <OButton
429
+ v-if="!isEdit"
430
+ color="primary"
431
+ variant="outline"
432
+ round="pill"
433
+ size="large"
434
+ @click="confirm(false)"
435
+ :loading="loading"
436
+ >
437
+ 保存草稿
438
+ </OButton>
439
+ <OButton color="primary" variant="outline" size="large" round="pill" @click="close">取消</OButton>
440
+ </div>
441
+ </div>
442
+ </template>
443
+
444
+ <style lang="scss">
445
+ .o-activity-form {
446
+ .form-wrapper {
447
+ & > .o-form-item {
448
+ max-width: 620px;
449
+ }
450
+ }
451
+
452
+ .o-form {
453
+ --o-input-color: var(--o-color-info2);
454
+ --o-placeholder-color: var(--o-color-info4);
455
+
456
+ &.o-form-layout-h {
457
+ .o-form-item-label {
458
+ height: var(--o-control_size-l);
459
+ margin: 0;
460
+ }
461
+ }
462
+
463
+ &.o-form-layout-v {
464
+ .o-form-item-label {
465
+ margin-bottom: var(--o-gap-2);
466
+ }
467
+
468
+ .o-form-item-main {
469
+ margin-left: 0;
470
+ }
471
+ }
472
+
473
+ .o-select {
474
+ width: 100%;
475
+ }
476
+
477
+ .o-input {
478
+ width: 100%;
479
+ }
480
+
481
+ .o-textarea {
482
+ width: 100%;
483
+ }
484
+
485
+ .el-input {
486
+ width: 100%;
487
+ }
488
+
489
+ .el-input__wrapper {
490
+ border-radius: var(--o-radius-xs);
491
+ }
492
+
493
+ .time-config {
494
+ width: 100%;
495
+ background-color: var(--o-color-control2-light);
496
+ padding: var(--o-gap-5);
497
+ padding-right: calc(var(--o-gap-4) + var(--o-gap-5));
498
+ border-radius: var(--o-radius-xs);
499
+ @include respond-to('<=pad_v') {
500
+ padding: var(--o-gap-4);
501
+ }
502
+
503
+ .o-form-item {
504
+ align-items: center;
505
+ }
506
+
507
+ .o-form-item-label {
508
+ flex: 0 0 80px;
509
+ }
510
+ }
511
+ }
512
+ }
513
+
514
+ .form-btns {
515
+ margin-top: var(--o-gap-5);
516
+ display: flex;
517
+ align-items: center;
518
+
519
+ .o-btn + .o-btn {
520
+ margin-left: var(--o-gap-4);
521
+ }
522
+
523
+ @include respond-to('<=pad_v') {
524
+ .o-btn {
525
+ --btn-min-width: 74px;
526
+ }
527
+ }
528
+ }
529
+ </style>
530
+ <style lang="scss">
531
+ .date-activity {
532
+ .el-input__inner {
533
+ @include text1;
534
+ }
535
+
536
+ .el-input__inner::placeholder {
537
+ color: var(--o-color-info4);
538
+ }
539
+ }
540
+ </style>
@@ -0,0 +1,13 @@
1
+ <script setup lang="ts">
2
+
3
+ </script>
4
+
5
+ <template>
6
+ <div class="o-my-activity-calendar"></div>
7
+ </template>
8
+
9
+ <style lang="scss">
10
+ .o-my-activity-calendar {
11
+
12
+ }
13
+ </style>
@@ -0,0 +1,130 @@
1
+ export const acticityTypeMap = new Map([
2
+ [
3
+ 1,
4
+ {
5
+ label: '线下',
6
+ value: 1,
7
+ },
8
+ ],
9
+ [
10
+ 2,
11
+ {
12
+ label: '线上',
13
+ value: 2,
14
+ },
15
+ ],
16
+ [
17
+ 3,
18
+ {
19
+ label: '线上与线下',
20
+ value: 3,
21
+ },
22
+ ],
23
+ ]);
24
+
25
+ export const WEBSITE_REGEXP = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w ./?%&=-]*)?$/;
26
+
27
+
28
+ export const statusMap = new Map([
29
+ [
30
+ 1,
31
+ {
32
+ id: 'draft',
33
+ label: '草稿',
34
+ text: '草稿',
35
+ value: 1,
36
+ },
37
+ ],
38
+ [
39
+ 2,
40
+ {
41
+ id: 'under-review',
42
+ label: '审核中',
43
+ text: '未审核',
44
+ value: 2,
45
+ },
46
+ ],
47
+ [
48
+ 3,
49
+ {
50
+ id: 'registration',
51
+ label: '报名中',
52
+ text: '审核通过',
53
+ value: 3,
54
+ },
55
+ ],
56
+ [
57
+ 4,
58
+ {
59
+ id: 'in-progress',
60
+ label: '进行中',
61
+ text: '审核通过',
62
+ value: 4,
63
+ },
64
+ ],
65
+ [
66
+ 5,
67
+ {
68
+ id: 'ended',
69
+ label: '已结束',
70
+ text: '已结束',
71
+ value: 5,
72
+ },
73
+ ],
74
+ [
75
+ 6,
76
+ {
77
+ id: 'modified',
78
+ label: '已修改',
79
+ text: '已修改',
80
+ value: 6,
81
+ },
82
+ ],
83
+ [
84
+ 7,
85
+ {
86
+ id: 'reject',
87
+ label: '审核驳回',
88
+ text: '审核驳回',
89
+ value: 7,
90
+ },
91
+ ],
92
+ ]);
93
+
94
+ export const approvalStatusMap = new Map([
95
+ [
96
+ 'all',
97
+ {
98
+ label: '全部',
99
+ value: 'all',
100
+ },
101
+ ],
102
+ [
103
+ 'rejected',
104
+ {
105
+ label: '审核驳回',
106
+ value: 'rejected',
107
+ },
108
+ ],
109
+ [
110
+ 'approved',
111
+ {
112
+ label: '审核通过',
113
+ value: 'approved',
114
+ },
115
+ ],
116
+ [
117
+ 'publish',
118
+ {
119
+ label: '未审核',
120
+ value: 'publish',
121
+ },
122
+ ],
123
+ [
124
+ 'cancel',
125
+ {
126
+ label: '已取消',
127
+ value: 'cancel',
128
+ },
129
+ ],
130
+ ]);