@opendesign-plus-test/components 0.0.1-rc.57 → 0.0.1-rc.59
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/header/types.d.ts +1 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +0 -2
- package/dist/components/meeting/index.d.ts +0 -6
- package/dist/components/meeting/types.d.ts +2 -4
- package/dist/components.cjs.js +37 -37
- package/dist/components.es.js +5635 -5636
- package/package.json +1 -1
- package/src/components/activity/OActivityMyCalendar.vue +1 -1
- package/src/components/header/types.ts +1 -0
- package/src/components/meeting/OMeetingForm.vue +21 -13
- package/src/components/meeting/components/OMeetingCalendarList.vue +5 -1
- package/src/components/meeting/types.ts +2 -4
package/package.json
CHANGED
|
@@ -19,7 +19,15 @@ import {
|
|
|
19
19
|
} from '@opensig/opendesign';
|
|
20
20
|
import IconHelp from '~icons/meeting/icon-help.svg';
|
|
21
21
|
import IconTip from '~icons/meeting/icon-tip.svg';
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
CycleSubItemT,
|
|
24
|
+
MeetingFormPropsT,
|
|
25
|
+
MeetingGroupType,
|
|
26
|
+
MeetingItemT,
|
|
27
|
+
MeetingPostT,
|
|
28
|
+
OptionItemT,
|
|
29
|
+
PlatformT,
|
|
30
|
+
} from './types';
|
|
23
31
|
import dayjs from 'dayjs';
|
|
24
32
|
import { findLabelFromOptions, formatDateNumber, getDateNumber } from './utils';
|
|
25
33
|
import { EMAIL_REGEX, INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from './config';
|
|
@@ -31,8 +39,6 @@ import { ValidatorResultT } from '@opensig/opendesign/lib/form/types';
|
|
|
31
39
|
const { t, locale, cycleTypeOptions0, intervalWeekOptions, getPlatformLabel } = useMeetingConfig();
|
|
32
40
|
|
|
33
41
|
const props = withDefaults(defineProps<MeetingFormPropsT>(), {
|
|
34
|
-
isSub: false,
|
|
35
|
-
isEdit: false,
|
|
36
42
|
showBtns: true,
|
|
37
43
|
groupType: MeetingGroupType.SIG,
|
|
38
44
|
});
|
|
@@ -41,6 +47,8 @@ const message = useMessage(null);
|
|
|
41
47
|
const cycleTypeOptions = cycleTypeOptions0;
|
|
42
48
|
const weekOptions = intervalWeekOptions;
|
|
43
49
|
|
|
50
|
+
const isEdit = computed(() => Object.keys(props?.data || {}).length > 0);
|
|
51
|
+
const isSub = computed(() => !!props.subId);
|
|
44
52
|
const intervalTypeMax = computed(() => {
|
|
45
53
|
return findLabelFromOptions(form.value.cycle_type, cycleTypeOptions.value, 'max');
|
|
46
54
|
});
|
|
@@ -202,7 +210,7 @@ const rules = computed<Record<string, RulesT[]>>(() => {
|
|
|
202
210
|
email_list: [
|
|
203
211
|
{
|
|
204
212
|
validator: (value: any) => {
|
|
205
|
-
if (
|
|
213
|
+
if (isEdit.value) {
|
|
206
214
|
return {} as unknown as ValidatorResultT;
|
|
207
215
|
}
|
|
208
216
|
const str = value.replaceAll(' ', '').replaceAll(',', ';') || '';
|
|
@@ -287,7 +295,7 @@ const getPropData = () => {
|
|
|
287
295
|
...(is_cycle
|
|
288
296
|
? {
|
|
289
297
|
date_range: [cycle_start_date, cycle_end_date],
|
|
290
|
-
cycle_point: cycle_point?.map((v) => parseInt(v)) || [],
|
|
298
|
+
cycle_point: cycle_point?.map((v) => parseInt(v as unknown as string)) || [],
|
|
291
299
|
cycle_interval: cycle_interval || 1,
|
|
292
300
|
time: `${ cycle_start }-${ cycle_end }`,
|
|
293
301
|
start: cycle_start,
|
|
@@ -301,13 +309,13 @@ watch(
|
|
|
301
309
|
() => props.data,
|
|
302
310
|
(data) => {
|
|
303
311
|
if (data) {
|
|
304
|
-
const propData = getPropData() as unknown as
|
|
305
|
-
const sub = propData?.cycle_sub?.find((v) => v.sub_id === (props.subId
|
|
312
|
+
const propData = getPropData() as unknown as MeetingItemT;
|
|
313
|
+
const sub = propData?.cycle_sub?.find((v) => v.sub_id === (props.subId)) || {} as unknown as CycleSubItemT;
|
|
306
314
|
const { mid, date, start, end, sub_id } = sub;
|
|
307
315
|
Object.assign(
|
|
308
316
|
form.value,
|
|
309
317
|
propData,
|
|
310
|
-
|
|
318
|
+
isSub.value
|
|
311
319
|
? {
|
|
312
320
|
is_cycle: false,
|
|
313
321
|
mid,
|
|
@@ -368,12 +376,12 @@ const changeIntervalType = () => {
|
|
|
368
376
|
};
|
|
369
377
|
|
|
370
378
|
const changeIsCycle = () => {
|
|
371
|
-
form.value.platform = '
|
|
379
|
+
form.value.platform = typeOptions.value.find(v => (v.value as unknown as string).toLowerCase() === 'welink')?.value as unknown as string || 'WeLink';
|
|
372
380
|
};
|
|
373
381
|
|
|
374
382
|
const { lePadV } = useScreen();
|
|
375
383
|
const confirm = async () => {
|
|
376
|
-
let type =
|
|
384
|
+
let type = isEdit.value ? t('meeting.editSuccess') : t('meeting.booSuccess');
|
|
377
385
|
try {
|
|
378
386
|
loading.value = true;
|
|
379
387
|
const valid = await formRef.value.validate();
|
|
@@ -431,8 +439,8 @@ const confirm = async () => {
|
|
|
431
439
|
end,
|
|
432
440
|
};
|
|
433
441
|
}
|
|
434
|
-
if (
|
|
435
|
-
if (
|
|
442
|
+
if (isEdit.value) {
|
|
443
|
+
if (isSub.value) {
|
|
436
444
|
const { mid, sub_id } = form.value;
|
|
437
445
|
const { date, start, end } = params;
|
|
438
446
|
flag = await props?.editSubMeetingRequest(sub_id, {
|
|
@@ -482,7 +490,7 @@ onMounted(() => {
|
|
|
482
490
|
|
|
483
491
|
const changeSig = (sig: any) => {
|
|
484
492
|
const find = sigOptions.value.find((v) => v.value === sig);
|
|
485
|
-
if (!
|
|
493
|
+
if (!isEdit.value) {
|
|
486
494
|
form.value.etherpad = find?.etherpad || '';
|
|
487
495
|
form.value.email_list = find?.email_list || '';
|
|
488
496
|
}
|
|
@@ -90,7 +90,11 @@ const computedList = computed<any[]>(() => {
|
|
|
90
90
|
dateRange = `${ formatDate(v.start_date) } ${ v.start }-${ formatDate(v.end_date) } ${ v.end }`;
|
|
91
91
|
}
|
|
92
92
|
} else {
|
|
93
|
-
|
|
93
|
+
if (v.start_date === v.end_date) {
|
|
94
|
+
dateRange = formatDate(v.start_date, 'YYYY/MM/DD');
|
|
95
|
+
} else {
|
|
96
|
+
dateRange = `${ formatDate(v.start_date, 'YYYY/MM/DD') }-${ formatDate(v.end_date, 'YYYY/MM/DD') }`;
|
|
97
|
+
}
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
return {
|
|
@@ -37,7 +37,7 @@ export interface OptionItemT {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
export type PlatformT = 'welink' | 'tencent' | 'zoom' | 'WELINK' | 'TENCENT' | 'ZOOM';
|
|
40
|
+
export type PlatformT = 'welink' | 'tencent' | 'zoom' | 'WELINK' | 'TENCENT' | 'ZOOM' | 'WeLink' | 'Tencent';
|
|
41
41
|
|
|
42
42
|
export enum MeetingGroupType {
|
|
43
43
|
SIG = 'sig',
|
|
@@ -63,7 +63,7 @@ export interface MeetingPostT {
|
|
|
63
63
|
topic: string; // 会议主题 128
|
|
64
64
|
sponsor?: string; // 会议发起人 20
|
|
65
65
|
group_name: string; // 所属SIG 64
|
|
66
|
-
platform: PlatformT; // 会议平台
|
|
66
|
+
platform: PlatformT | string; // 会议平台
|
|
67
67
|
date: string; // 会议日期
|
|
68
68
|
date_range?: string[]; // 日期返回
|
|
69
69
|
time: string; // 会议时间
|
|
@@ -88,8 +88,6 @@ export interface MeetingPostT {
|
|
|
88
88
|
|
|
89
89
|
export interface MeetingFormPropsT {
|
|
90
90
|
data?: MeetingItemT;
|
|
91
|
-
isSub?: boolean;
|
|
92
|
-
isEdit?: boolean;
|
|
93
91
|
subId?: string;
|
|
94
92
|
createMeetingRequest: any,
|
|
95
93
|
editMeetingRequest: any;
|