@opendesign-plus-test/components 0.0.1-rc.22 → 0.0.1-rc.23
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/components/activity/OMyActivityCalendar.vue.d.ts +577 -1
- package/dist/components/activity/index.d.ts +294 -3
- package/dist/components/activity/types.d.ts +7 -3
- package/dist/components.cjs.js +38 -38
- package/dist/components.css +1 -1
- package/dist/components.es.js +10602 -10091
- package/package.json +1 -1
- package/src/components/activity/OActivityForm.vue +16 -91
- package/src/components/activity/OMyActivityCalendar.vue +1331 -2
- package/src/components/activity/types.ts +8 -3
- package/src/components/meeting/OMyMeetingCalendar.vue +0 -33
- package/src/components/meeting/components/OMeetingDetail.vue +27 -14
- package/src/components/meeting/components/OMyCalendarWrapper.vue +160 -0
package/package.json
CHANGED
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
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';
|
|
3
|
+
import { OButton, OForm, OFormItem, OInput, OOption, OSelect, RulesT, useMessage } from '@opensig/opendesign';
|
|
14
4
|
import { computed, ref, watch } from 'vue';
|
|
15
5
|
import { ActivityFormPropsT, ParamsItemT } from './types';
|
|
16
6
|
import { useScreen } from '@opendesign-plus/composables';
|
|
17
7
|
import { dayjs, ElDatePicker } from 'element-plus';
|
|
18
8
|
import { acticityTypeMap, WEBSITE_REGEXP } from './config';
|
|
19
|
-
import { EMAIL_REGEX } from '@/components/meeting/config.ts';
|
|
20
|
-
import { useI18n } from '@/i18n';
|
|
21
9
|
|
|
22
10
|
const emits = defineEmits(['confirm', 'close']);
|
|
23
11
|
|
|
24
12
|
const message = useMessage(null);
|
|
25
13
|
const { lePadV } = useScreen();
|
|
26
|
-
|
|
27
|
-
const $t = t;
|
|
14
|
+
|
|
28
15
|
interface TypeOptionT {
|
|
29
16
|
label: string;
|
|
30
17
|
value: number;
|
|
@@ -34,7 +21,6 @@ const props = withDefaults(defineProps<ActivityFormPropsT>(), {});
|
|
|
34
21
|
const isEdit = computed(() => !!props.data);
|
|
35
22
|
const form = ref<ParamsItemT>({
|
|
36
23
|
title: '',
|
|
37
|
-
organizer: '',
|
|
38
24
|
start_date: '',
|
|
39
25
|
end_date: '',
|
|
40
26
|
register_end_date: '',
|
|
@@ -46,8 +32,6 @@ const form = ref<ParamsItemT>({
|
|
|
46
32
|
start: '',
|
|
47
33
|
end: '',
|
|
48
34
|
is_publish: 'true',
|
|
49
|
-
email_list: '',
|
|
50
|
-
content: '',
|
|
51
35
|
approver: '',
|
|
52
36
|
});
|
|
53
37
|
|
|
@@ -71,11 +55,10 @@ const rules = ref<Record<string, RulesT[]>>({
|
|
|
71
55
|
},
|
|
72
56
|
],
|
|
73
57
|
activity_type: [{ required: true, message: '请选择活动类型' }],
|
|
74
|
-
organizer: [{ required: true, message: '请选择活动类型' }],
|
|
75
58
|
start_date: [
|
|
76
59
|
{ required: true, message: '请选择活动时间' },
|
|
77
60
|
{
|
|
78
|
-
validator: () => {
|
|
61
|
+
validator: (value: string) => {
|
|
79
62
|
const { start_date, end_date } = form.value;
|
|
80
63
|
const startDate = start_date.split(' ');
|
|
81
64
|
const endDate = end_date.split(' ');
|
|
@@ -126,7 +109,7 @@ const rules = ref<Record<string, RulesT[]>>({
|
|
|
126
109
|
},
|
|
127
110
|
],
|
|
128
111
|
address: [
|
|
129
|
-
{ required: true, message: '
|
|
112
|
+
{ required: true, message: '请输入活动地址' },
|
|
130
113
|
{
|
|
131
114
|
validator: (value: string) => {
|
|
132
115
|
if (value.length > 255) {
|
|
@@ -139,7 +122,7 @@ const rules = ref<Record<string, RulesT[]>>({
|
|
|
139
122
|
},
|
|
140
123
|
],
|
|
141
124
|
register_url: [
|
|
142
|
-
{ required: true, message: '
|
|
125
|
+
{ required: true, message: '请输入报名网址' },
|
|
143
126
|
{
|
|
144
127
|
validator: (value: string) => {
|
|
145
128
|
const str = value.replaceAll(' ', '') || '';
|
|
@@ -157,7 +140,7 @@ const rules = ref<Record<string, RulesT[]>>({
|
|
|
157
140
|
},
|
|
158
141
|
],
|
|
159
142
|
content_url: [
|
|
160
|
-
{ required: true, message: '
|
|
143
|
+
{ required: true, message: '请输入活动详情网址' },
|
|
161
144
|
{
|
|
162
145
|
validator: (value: string) => {
|
|
163
146
|
const str = value.replaceAll(' ', '') || '';
|
|
@@ -174,69 +157,26 @@ const rules = ref<Record<string, RulesT[]>>({
|
|
|
174
157
|
triggers: ['blur', 'change'],
|
|
175
158
|
},
|
|
176
159
|
],
|
|
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
160
|
approver: [{ required: true, message: '请选择活动审批人' }],
|
|
221
161
|
});
|
|
222
162
|
|
|
223
163
|
|
|
224
164
|
// -------------------- 活动管理员 ---------------------
|
|
225
165
|
const approverList = computed(() => {
|
|
226
|
-
return props.
|
|
166
|
+
return props.admin || [];
|
|
227
167
|
});
|
|
228
168
|
|
|
229
|
-
const typeValue = ref
|
|
169
|
+
const typeValue = ref('');
|
|
230
170
|
const typeOptions = ref<TypeOptionT[]>([]); // 活动类型
|
|
231
171
|
acticityTypeMap.forEach((item) => {
|
|
232
172
|
typeOptions.value.push(item);
|
|
233
173
|
});
|
|
234
|
-
const changeType = (val:
|
|
174
|
+
const changeType = (val: string) => {
|
|
235
175
|
const item = typeOptions.value.find((v) => v.label === val);
|
|
236
176
|
form.value.activity_type = item?.value as number;
|
|
237
177
|
};
|
|
238
178
|
|
|
239
|
-
const disabledDate = (date
|
|
179
|
+
const disabledDate = (date) => {
|
|
240
180
|
return date.getTime() < Date.now() - 24 * 60 * 60 * 1000;
|
|
241
181
|
};
|
|
242
182
|
|
|
@@ -340,8 +280,8 @@ defineExpose({
|
|
|
340
280
|
<OFormItem :rules="rules.title" label="活动名称" field="title">
|
|
341
281
|
<OInput size="large" placeholder="请输入活动名称" v-model="form.title" />
|
|
342
282
|
</OFormItem>
|
|
343
|
-
<OFormItem :rules="rules.
|
|
344
|
-
<OInput size="large" placeholder="
|
|
283
|
+
<OFormItem :rules="rules.title" label="活动主办方" field="title">
|
|
284
|
+
<OInput size="large" placeholder="请输入活动名称" v-model="form.title" />
|
|
345
285
|
</OFormItem>
|
|
346
286
|
<OFormItem :rules="rules.activity_type" label="活动类型" field="activity_type">
|
|
347
287
|
<OSelect placeholder="请选择活动类型" size="large" v-model="typeValue" @change="changeType">
|
|
@@ -351,10 +291,10 @@ defineExpose({
|
|
|
351
291
|
<OFormItem
|
|
352
292
|
v-if="form.activity_type === 1 || form.activity_type === 3"
|
|
353
293
|
:rules="rules.address"
|
|
354
|
-
label="
|
|
294
|
+
label="活动地址"
|
|
355
295
|
field="address"
|
|
356
296
|
>
|
|
357
|
-
<OInput size="large" placeholder="
|
|
297
|
+
<OInput size="large" placeholder="请输入活动地址" v-model="form.address" />
|
|
358
298
|
</OFormItem>
|
|
359
299
|
<OFormItem :rules="rules.start_date" label="活动时间" field="start_date" required>
|
|
360
300
|
<div class="time-config">
|
|
@@ -399,21 +339,10 @@ defineExpose({
|
|
|
399
339
|
/>
|
|
400
340
|
</OFormItem>
|
|
401
341
|
<OFormItem :rules="rules.register_url" label="报名网址" field="register_url">
|
|
402
|
-
<OInput size="large" placeholder="
|
|
342
|
+
<OInput size="large" placeholder="请输入报名网址" v-model="form.register_url" />
|
|
403
343
|
</OFormItem>
|
|
404
344
|
<OFormItem :rules="rules.content_url" label="活动详情网址" field="content_url">
|
|
405
|
-
<OInput size="large" placeholder="
|
|
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" />
|
|
345
|
+
<OInput size="large" placeholder="请输入活动详情网址" v-model="form.content_url" />
|
|
417
346
|
</OFormItem>
|
|
418
347
|
<OFormItem :rules="rules.approver" label="活动审批人" field="approver">
|
|
419
348
|
<OSelect placeholder="请选择活动审批人" size="large" v-model="form.approver">
|
|
@@ -478,10 +407,6 @@ defineExpose({
|
|
|
478
407
|
width: 100%;
|
|
479
408
|
}
|
|
480
409
|
|
|
481
|
-
.o-textarea {
|
|
482
|
-
width: 100%;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
410
|
.el-input {
|
|
486
411
|
width: 100%;
|
|
487
412
|
}
|