@opendesign-plus/components 0.0.1-rc.28 → 0.0.1-rc.29
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 -1
- package/dist/chunk-OElCookieNotice.es.js +152 -152
- package/dist/components/activity/OActivityApproval.vue.d.ts +8 -8
- package/dist/components/activity/OActivityForm.vue.d.ts +6 -6
- package/dist/components/activity/OActivityMyCalendar.vue.d.ts +8 -4
- package/dist/components/activity/index.d.ts +17 -15
- package/dist/components/config-provider/OPlusConfigProvider.vue.d.ts +24 -0
- package/dist/components/config-provider/index.d.ts +30 -0
- package/dist/components/cookie-notice/OCookieNotice.vue.d.ts +17 -0
- package/dist/components/cookie-notice/index.d.ts +53 -0
- package/dist/components/events/types.d.ts +4 -0
- package/dist/components/{OFooter.vue.d.ts → footer/OFooter.vue.d.ts} +2 -2
- package/dist/components/footer/index.d.ts +89 -0
- package/dist/components/header/index.d.ts +1 -0
- package/dist/components/header/types.d.ts +1 -0
- package/dist/components/{OLanguageSwitcher.vue.d.ts → header-language-switcher/OHeaderLanguageSwitcher.vue.d.ts} +5 -5
- package/dist/components/header-language-switcher/index.d.ts +90 -0
- package/dist/components/{OHeaderSearch.vue.d.ts → header-search/OHeaderSearch.vue.d.ts} +165 -145
- package/dist/components/header-search/index.d.ts +607 -0
- package/dist/components/header-source-code/OHeaderSourceCode.vue.d.ts +18 -0
- package/dist/components/header-source-code/index.d.ts +23 -0
- package/dist/components/header-theme/OHeaderTheme.vue.d.ts +25 -0
- package/dist/components/header-theme/index.d.ts +50 -0
- package/dist/components/{OHeaderUser.vue.d.ts → header-user/OHeaderUser.vue.d.ts} +7 -7
- package/dist/components/header-user/index.d.ts +53 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +2 -2
- package/dist/components/meeting/OMeetingForm.vue.d.ts +4 -6
- package/dist/components/meeting/OMeetingMyCalendar.vue.d.ts +8 -4
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +4 -4
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +1 -0
- package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +1 -1
- package/dist/components/meeting/index.d.ts +11 -15
- package/dist/components/meeting/types.d.ts +6 -4
- package/dist/components/meeting/utils.d.ts +2 -1
- package/dist/components/search/OSearchInput.vue.d.ts +54 -34
- package/dist/components/search/index.d.ts +32 -22
- package/dist/components/search/internal/SearchImageInput.vue.d.ts +41 -21
- package/dist/components/search/internal/SearchPanel.vue.d.ts +1 -1
- package/dist/components/{OSection.vue.d.ts → section/OSection.vue.d.ts} +4 -4
- package/dist/components/section/index.d.ts +47 -0
- package/dist/components.cjs.js +40 -40
- package/dist/components.css +1 -1
- package/dist/components.es.js +16758 -16562
- package/dist/index.d.ts +9 -14
- package/docs/design.md +2 -2
- package/package.json +8 -8
- package/scripts/generate-components-index.js +2 -44
- package/src/assets/meeting/svg-icons/icon-all.svg +2 -1
- package/src/assets/meeting/svg-icons/icon-event.svg +2 -1
- package/src/assets/meeting/svg-icons/icon-meet.svg +2 -1
- package/src/assets/meeting/svg-icons/icon-summit.svg +2 -1
- package/src/assets/styles/element-plus.scss +24 -0
- package/src/components/activity/OActivityMyCalendar.vue +19 -12
- package/src/components/common/ClientOnly.vue +13 -0
- package/src/components/{OPlusConfigProvider.vue → config-provider/OPlusConfigProvider.vue} +5 -5
- package/src/components/config-provider/index.ts +10 -0
- package/src/components/{OCookieNotice.vue → cookie-notice/OCookieNotice.vue} +1 -1
- package/src/components/cookie-notice/index.ts +10 -0
- package/src/components/element-plus/OElCookieNotice.vue +2 -2
- package/src/components/events/OEventsApply.vue +85 -1
- package/src/components/events/OEventsList.vue +112 -40
- package/src/components/events/types.ts +1 -0
- package/src/components/{OFooter.vue → footer/OFooter.vue} +4 -4
- package/src/components/footer/index.ts +10 -0
- package/src/components/header/index.ts +2 -0
- package/src/components/header/types.ts +1 -0
- package/src/components/header-language-switcher/index.ts +10 -0
- package/src/components/{OHeaderSearch.vue → header-search/OHeaderSearch.vue} +4 -4
- package/src/components/header-search/index.ts +10 -0
- package/src/components/{OSourceCode.vue → header-source-code/OHeaderSourceCode.vue} +2 -2
- package/src/components/header-source-code/index.ts +10 -0
- package/src/components/{OThemeSwitcher.vue → header-theme/OHeaderTheme.vue} +4 -4
- package/src/components/header-theme/index.ts +10 -0
- package/src/components/{OHeaderUser.vue → header-user/OHeaderUser.vue} +4 -4
- package/src/components/header-user/index.ts +10 -0
- package/src/components/meeting/OMeetingCalendar.vue +32 -21
- package/src/components/meeting/OMeetingForm.vue +44 -37
- package/src/components/meeting/OMeetingMyCalendar.vue +28 -38
- package/src/components/meeting/OMeetingSigCalendar.vue +43 -20
- package/src/components/meeting/components/OMeetingCalendarList.vue +80 -29
- package/src/components/meeting/components/OMeetingDetail.vue +29 -10
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +1 -1
- package/src/components/meeting/components/OMeetingSigAside.vue +11 -6
- package/src/components/meeting/types.ts +7 -5
- package/src/components/meeting/utils.ts +4 -4
- package/src/components/{OSection.vue → section/OSection.vue} +1 -1
- package/src/components/section/index.ts +10 -0
- package/src/i18n/en.ts +2 -2
- package/src/i18n/zh.ts +4 -2
- package/src/index.ts +9 -38
- package/dist/components/OCookieNotice.vue.d.ts +0 -17
- package/dist/components/OPlusConfigProvider.vue.d.ts +0 -23
- package/dist/components/OSourceCode.vue.d.ts +0 -18
- package/dist/components/OThemeSwitcher.vue.d.ts +0 -25
- package/src/components/common/ClientOnlyWrapper.ts +0 -21
- /package/src/components/{OLanguageSwitcher.vue → header-language-switcher/OHeaderLanguageSwitcher.vue} +0 -0
|
@@ -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
|
}
|
|
@@ -506,7 +514,7 @@ defineExpose({
|
|
|
506
514
|
<template>
|
|
507
515
|
<div class="o-meeting-form">
|
|
508
516
|
<OForm :model="form" ref="formRef" has-required :layout="lePadV ? 'v' : 'h'" class="form-wrapper">
|
|
509
|
-
<OFormItem :rules="rules.topic" :label="t('meeting.meetingName')" field="topic">
|
|
517
|
+
<OFormItem :rules="rules.topic" :label="labelMap?.topic ?? t('meeting.meetingName')" field="topic">
|
|
510
518
|
<OInput
|
|
511
519
|
:disabled="isSub"
|
|
512
520
|
size="large"
|
|
@@ -516,7 +524,7 @@ defineExpose({
|
|
|
516
524
|
</OFormItem>
|
|
517
525
|
<OFormItem
|
|
518
526
|
:rules="rules.group_name"
|
|
519
|
-
:label="groupType === MeetingGroupType.GROUP ? t('meeting.meetingGroup'):t('meeting.meetingSig')"
|
|
527
|
+
:label="labelMap?.group_name ?? (groupType === MeetingGroupType.GROUP ? t('meeting.meetingGroup') : t('meeting.meetingSig'))"
|
|
520
528
|
field="group_name">
|
|
521
529
|
<OSelect
|
|
522
530
|
:disabled="isEdit"
|
|
@@ -531,7 +539,8 @@ defineExpose({
|
|
|
531
539
|
</OFormItem>
|
|
532
540
|
<OFormItem :rules="rules.etherpad" label="Etherpad" field="etherpad" v-if="form.group_name">
|
|
533
541
|
<template #label>
|
|
534
|
-
<
|
|
542
|
+
<template v-if="labelMap?.etherpad">{{ labelMap.etherpad }}</template>
|
|
543
|
+
<div v-else class="label-wrapper">
|
|
535
544
|
<span>{{ t('meeting.etherpad') }} </span>
|
|
536
545
|
<OPopover>
|
|
537
546
|
<div class="o-meeting-form-popover-content etherpad">{{ t('meeting.etherpadDesc') }}</div>
|
|
@@ -552,9 +561,9 @@ defineExpose({
|
|
|
552
561
|
/>
|
|
553
562
|
</OFormItem>
|
|
554
563
|
|
|
555
|
-
<OFormItem :label="t('meeting.meetingTime')" field="time" :rules="rules.time" class="repeat-row" required>
|
|
564
|
+
<OFormItem :label="labelMap?.time ?? t('meeting.meetingTime')" field="time" :rules="rules.time" class="repeat-row" required>
|
|
556
565
|
<div class="repeat-config-wrapper">
|
|
557
|
-
<OFormItem field="repeat" class="repeat-item" v-if="!isSub">
|
|
566
|
+
<OFormItem field="repeat" class="repeat-radio-item" v-if="!isSub">
|
|
558
567
|
<ORadioGroup v-model="form.is_cycle" @change="changeIsCycle" :disabled="isEdit">
|
|
559
568
|
<ORadio :value="false">{{ t('meeting.nonRepeat') }}</ORadio>
|
|
560
569
|
<ORadio :value="true">{{ t('meeting.isRepeat') }}</ORadio>
|
|
@@ -581,7 +590,7 @@ defineExpose({
|
|
|
581
590
|
</div>
|
|
582
591
|
</OFormItem>
|
|
583
592
|
<OFormItem
|
|
584
|
-
:label="t('meeting.in')"
|
|
593
|
+
:label="labelMap?.cycle_point ?? t('meeting.in')"
|
|
585
594
|
field="cycle_point"
|
|
586
595
|
class="point-item"
|
|
587
596
|
v-if="form.cycle_type !== INTERVAL_DAY"
|
|
@@ -598,7 +607,7 @@ defineExpose({
|
|
|
598
607
|
</OSelect>
|
|
599
608
|
<OMeetingCalendarSelector v-if="form.cycle_type === INTERVAL_MONTH" v-model="form.cycle_point" />
|
|
600
609
|
</OFormItem>
|
|
601
|
-
<OFormItem :label="t('meeting.meetingDuration')" field="date_range">
|
|
610
|
+
<OFormItem :label="labelMap?.date_range ?? t('meeting.meetingDuration')" field="date_range">
|
|
602
611
|
<ElDatePicker
|
|
603
612
|
size="large"
|
|
604
613
|
v-model="form.date_range"
|
|
@@ -614,7 +623,7 @@ defineExpose({
|
|
|
614
623
|
</OFormItem>
|
|
615
624
|
</template>
|
|
616
625
|
<template v-else>
|
|
617
|
-
<OFormItem :label="t('meeting.meetingDate')" field="date">
|
|
626
|
+
<OFormItem :label="labelMap?.date ?? t('meeting.meetingDate')" field="date">
|
|
618
627
|
<ElDatePicker
|
|
619
628
|
popper-class="o-meeting-form-date-picker-popper"
|
|
620
629
|
size="large"
|
|
@@ -663,14 +672,14 @@ defineExpose({
|
|
|
663
672
|
</div>
|
|
664
673
|
</div>
|
|
665
674
|
</OFormItem>
|
|
666
|
-
<OFormItem :label="t('meeting.meetingPlatform')" field="platform" :rules="rules.platform" class="platform-item">
|
|
675
|
+
<OFormItem :label="labelMap?.platform ?? t('meeting.meetingPlatform')" field="platform" :rules="rules.platform" class="platform-item">
|
|
667
676
|
<ORadioGroup v-model="form.platform" v-if="!data" :disabled="form.is_cycle">
|
|
668
677
|
<ORadio v-for="item in typeOptions" :key="item.value" :value="item.value">{{ getPlatformLabel(item.label) }}
|
|
669
678
|
</ORadio>
|
|
670
679
|
</ORadioGroup>
|
|
671
680
|
<span v-else>{{ getPlatformLabel(form.platform) }}</span>
|
|
672
681
|
</OFormItem>
|
|
673
|
-
<OFormItem field="agenda" :label="t('meeting.meetingAgenda')" :rules="rules.genda">
|
|
682
|
+
<OFormItem field="agenda" :label="labelMap?.agenda ?? t('meeting.meetingAgenda')" :rules="rules.genda">
|
|
674
683
|
<OTextarea
|
|
675
684
|
:disabled="isSub"
|
|
676
685
|
size="large"
|
|
@@ -678,7 +687,7 @@ defineExpose({
|
|
|
678
687
|
style="width: 100%"
|
|
679
688
|
:rows="4" v-model="form.agenda" />
|
|
680
689
|
</OFormItem>
|
|
681
|
-
<OFormItem :label="t('meeting.meetingRecord')" field="is_record" class="record-item full-width-item">
|
|
690
|
+
<OFormItem :label="labelMap?.is_record ?? t('meeting.meetingRecord')" field="is_record" class="record-item full-width-item">
|
|
682
691
|
<template v-if="lePadV">
|
|
683
692
|
<OSwitch v-model="form.is_record" :disabled="isSub" />
|
|
684
693
|
</template>
|
|
@@ -715,7 +724,8 @@ defineExpose({
|
|
|
715
724
|
</template>
|
|
716
725
|
<OFormItem field="email_list" :rules="rules.email_list">
|
|
717
726
|
<template #label>
|
|
718
|
-
<
|
|
727
|
+
<template v-if="labelMap?.email_list">{{ labelMap.email_list }}</template>
|
|
728
|
+
<div v-else class="label-wrapper">
|
|
719
729
|
<span>{{ t('meeting.meetingEmail') }} </span>
|
|
720
730
|
<OPopover>
|
|
721
731
|
<div class="o-meeting-form-popover-content">
|
|
@@ -765,7 +775,7 @@ defineExpose({
|
|
|
765
775
|
}
|
|
766
776
|
|
|
767
777
|
.o-form {
|
|
768
|
-
--o-input-color: var(--o-color-
|
|
778
|
+
--o-input-color: var(--o-color-info1);
|
|
769
779
|
--o-placeholder-color: var(--o-color-info4);
|
|
770
780
|
|
|
771
781
|
|
|
@@ -925,7 +935,10 @@ defineExpose({
|
|
|
925
935
|
border-radius: var(--meeting-card-radius);
|
|
926
936
|
padding: 0 15px;
|
|
927
937
|
background-color: var(--o-color-fill2);
|
|
928
|
-
|
|
938
|
+
--el-component-size-large: 34px;
|
|
939
|
+
@include respond('<=pad_v') {
|
|
940
|
+
--el-component-size-large: calc(var(--o-control_size-l) - 2px);
|
|
941
|
+
}
|
|
929
942
|
& > span {
|
|
930
943
|
padding: 0 var(--o-gap-2);
|
|
931
944
|
}
|
|
@@ -949,8 +962,8 @@ defineExpose({
|
|
|
949
962
|
|
|
950
963
|
.el-select__wrapper {
|
|
951
964
|
box-shadow: none;
|
|
952
|
-
padding: calc((var(--
|
|
953
|
-
min-height: var(--
|
|
965
|
+
padding: calc((var(--el-component-size-large) - 24px) / 2) 0;
|
|
966
|
+
min-height: var(--el-component-size-large);
|
|
954
967
|
gap: 0;
|
|
955
968
|
}
|
|
956
969
|
|
|
@@ -987,7 +1000,8 @@ defineExpose({
|
|
|
987
1000
|
.repeat-config-wrapper {
|
|
988
1001
|
width: 100%;
|
|
989
1002
|
|
|
990
|
-
.repeat-item {
|
|
1003
|
+
.repeat-radio-item {
|
|
1004
|
+
margin-bottom: var(--o-gap-2);
|
|
991
1005
|
.o-form-item-label {
|
|
992
1006
|
display: none;
|
|
993
1007
|
}
|
|
@@ -995,13 +1009,6 @@ defineExpose({
|
|
|
995
1009
|
.o-form-item-main {
|
|
996
1010
|
margin-left: 0;
|
|
997
1011
|
}
|
|
998
|
-
|
|
999
|
-
@include respond('pad_v') {
|
|
1000
|
-
margin-bottom: var(--o-gap-4);
|
|
1001
|
-
}
|
|
1002
|
-
@include respond('phone') {
|
|
1003
|
-
margin-bottom: var(--o-gap-3);
|
|
1004
|
-
}
|
|
1005
1012
|
}
|
|
1006
1013
|
|
|
1007
1014
|
.repeat-config {
|
|
@@ -58,11 +58,6 @@ const emits = defineEmits(['edit']);
|
|
|
58
58
|
// -------------------- 自动加载下一页 --------------------
|
|
59
59
|
const nextLoading = ref(false);
|
|
60
60
|
const bottomReached = ref(false);
|
|
61
|
-
const headerRef = ref();
|
|
62
|
-
const headerHeight = ref(0);
|
|
63
|
-
const getHeaderHeight = () => {
|
|
64
|
-
headerHeight.value = headerRef.value?.clientHeight || 0;
|
|
65
|
-
};
|
|
66
61
|
|
|
67
62
|
const getList = async () => {
|
|
68
63
|
if (!props.getMeetingListRequest) {
|
|
@@ -471,14 +466,11 @@ onMounted(() => {
|
|
|
471
466
|
window.addEventListener('scroll', handleScroll);
|
|
472
467
|
// 添加resize监听器
|
|
473
468
|
window.addEventListener('resize', handleScroll);
|
|
474
|
-
getHeaderHeight();
|
|
475
|
-
window.addEventListener('resize', getHeaderHeight);
|
|
476
469
|
});
|
|
477
470
|
|
|
478
471
|
onUnmounted(() => {
|
|
479
472
|
window.removeEventListener('scroll', handleScroll);
|
|
480
473
|
window.removeEventListener('resize', handleScroll);
|
|
481
|
-
window.removeEventListener('resize', getHeaderHeight);
|
|
482
474
|
const scrollerContainerEl = scrollerRef.value?.getContainerEl();
|
|
483
475
|
scrollerContainerEl?.removeEventListener('scroll', scrollerScroll);
|
|
484
476
|
});
|
|
@@ -597,7 +589,6 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
597
589
|
ref="scrollerRef"
|
|
598
590
|
@scrollend="load"
|
|
599
591
|
v-if="list.length"
|
|
600
|
-
:style="{ '--header-height': headerHeight }"
|
|
601
592
|
class="scroller-container"
|
|
602
593
|
show-type="hover"
|
|
603
594
|
>
|
|
@@ -636,6 +627,8 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
636
627
|
:value="row.sub_id || row.id"
|
|
637
628
|
:class="{
|
|
638
629
|
'last-item': idx === groupList.length - 1 && rowIdx === group.list.length - 1,
|
|
630
|
+
'is-delete': row.is_delete,
|
|
631
|
+
'is-end': row.isExpired,
|
|
639
632
|
}"
|
|
640
633
|
>
|
|
641
634
|
<template #title>
|
|
@@ -643,7 +636,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
643
636
|
<div
|
|
644
637
|
class="meeting-icon"
|
|
645
638
|
:style="{
|
|
646
|
-
backgroundColor: `${getConfig(CalendarDataType.MEETING, 'color')}`
|
|
639
|
+
backgroundColor: `${row.is_delete ? 'var(--o-color-info4)' : getConfig(CalendarDataType.MEETING, 'color')}`
|
|
647
640
|
}"
|
|
648
641
|
>
|
|
649
642
|
<OIcon>
|
|
@@ -651,13 +644,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
651
644
|
</OIcon>
|
|
652
645
|
</div>
|
|
653
646
|
<div class="header-info">
|
|
654
|
-
<div
|
|
655
|
-
:class="{
|
|
656
|
-
'meeting-title': true,
|
|
657
|
-
'is-delete': row.is_delete,
|
|
658
|
-
'is-end': row.isExpired,
|
|
659
|
-
}"
|
|
660
|
-
>
|
|
647
|
+
<div class="meeting-title">
|
|
661
648
|
<div v-if="row.is_delete">{{ t('meeting.meetingCancelled') }}</div>
|
|
662
649
|
<div class="title-wrapper">
|
|
663
650
|
<div class="title-text">{{ row.topic }}</div>
|
|
@@ -817,7 +804,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
817
804
|
@include respond('phone') {
|
|
818
805
|
flex-direction: column;
|
|
819
806
|
gap: var(--o-gap-3);
|
|
820
|
-
--phone-padding-top:
|
|
807
|
+
--phone-padding-top: 56px;
|
|
821
808
|
}
|
|
822
809
|
|
|
823
810
|
.o-loading {
|
|
@@ -855,9 +842,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
855
842
|
}
|
|
856
843
|
|
|
857
844
|
@include respond('phone') {
|
|
858
|
-
padding-top: var(--o-gap-7);
|
|
859
845
|
background-color: var(--o-color-fill1);
|
|
860
|
-
padding-bottom: var(--o-gap-4);
|
|
861
846
|
display: flex;
|
|
862
847
|
position: fixed;
|
|
863
848
|
height: var(--phone-padding-top);
|
|
@@ -1012,7 +997,8 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1012
997
|
|
|
1013
998
|
&.is-today {
|
|
1014
999
|
.date-cell-text {
|
|
1015
|
-
color:
|
|
1000
|
+
color: var(--o-color-primary1);
|
|
1001
|
+
font-weight: bold;
|
|
1016
1002
|
background-color: var(--o-color-control3-light);
|
|
1017
1003
|
}
|
|
1018
1004
|
}
|
|
@@ -1039,9 +1025,6 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1039
1025
|
}
|
|
1040
1026
|
}
|
|
1041
1027
|
|
|
1042
|
-
.is-today {
|
|
1043
|
-
color: inherit;
|
|
1044
|
-
}
|
|
1045
1028
|
}
|
|
1046
1029
|
}
|
|
1047
1030
|
}
|
|
@@ -1072,7 +1055,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1072
1055
|
|
|
1073
1056
|
.scroller-container {
|
|
1074
1057
|
height: 100%;
|
|
1075
|
-
max-height: calc(var(--layout-left-height, 900px) - 4 * var(--o-gap-5) - var(--header-height) * 1px);
|
|
1058
|
+
max-height: calc(var(--layout-left-height, 900px) - 4 * var(--o-gap-5) - var(--header-height, 64) * 1px);
|
|
1076
1059
|
|
|
1077
1060
|
@include respond('phone') {
|
|
1078
1061
|
max-height: fit-content;
|
|
@@ -1082,14 +1065,14 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1082
1065
|
padding-left: 24px;
|
|
1083
1066
|
position: relative;
|
|
1084
1067
|
|
|
1085
|
-
&.last-item {
|
|
1086
|
-
flex-grow: 1;
|
|
1087
|
-
}
|
|
1088
|
-
|
|
1089
1068
|
@include respond('phone') {
|
|
1090
1069
|
padding-left: var(--o-gap-2);
|
|
1091
1070
|
}
|
|
1092
1071
|
|
|
1072
|
+
&.last-item {
|
|
1073
|
+
flex-grow: 1;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1093
1076
|
.group-bar {
|
|
1094
1077
|
position: absolute;
|
|
1095
1078
|
left: 0;
|
|
@@ -1271,6 +1254,19 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1271
1254
|
border-bottom: none;
|
|
1272
1255
|
}
|
|
1273
1256
|
}
|
|
1257
|
+
|
|
1258
|
+
&.is-delete,
|
|
1259
|
+
&.is-end {
|
|
1260
|
+
|
|
1261
|
+
.meeting-title {
|
|
1262
|
+
color: var(--o-color-info4);
|
|
1263
|
+
|
|
1264
|
+
.title-text {
|
|
1265
|
+
color: var(--o-color-info4);
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1274
1270
|
&.o-collapse-item-expanded {
|
|
1275
1271
|
border-bottom: none;
|
|
1276
1272
|
background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent) !important;
|
|
@@ -1339,8 +1335,10 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1339
1335
|
align-items: center;
|
|
1340
1336
|
justify-content: center;
|
|
1341
1337
|
flex-shrink: 0;
|
|
1338
|
+
--icon-size2: var(--icon-size);
|
|
1342
1339
|
|
|
1343
1340
|
.o-icon {
|
|
1341
|
+
font-size: calc(var(--icon-size2) - 2px);
|
|
1344
1342
|
svg path {
|
|
1345
1343
|
fill: currentColor;
|
|
1346
1344
|
}
|
|
@@ -1358,15 +1356,6 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1358
1356
|
margin-bottom: var(--o-gap-2);
|
|
1359
1357
|
@include text2;
|
|
1360
1358
|
|
|
1361
|
-
&.is-delete,
|
|
1362
|
-
&.is-end {
|
|
1363
|
-
color: var(--o-color-info4);
|
|
1364
|
-
|
|
1365
|
-
.title-text {
|
|
1366
|
-
color: var(--o-color-info4) !important;
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
1359
|
.tag-wrapper {
|
|
1371
1360
|
flex: 10;
|
|
1372
1361
|
margin-left: var(--o-gap-2);
|
|
@@ -1374,6 +1363,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
1374
1363
|
.o-tag {
|
|
1375
1364
|
background-color: var(--o-color-control2-light);
|
|
1376
1365
|
border: none;
|
|
1366
|
+
font-weight: 400;
|
|
1377
1367
|
}
|
|
1378
1368
|
}
|
|
1379
1369
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref, onMounted, computed, nextTick, watch } from 'vue';
|
|
3
3
|
import { ODivider, OPopover, OIcon, OTabPane, OTab, OScroller } from '@opensig/opendesign';
|
|
4
|
+
import { ElSelect, ElOption } from 'element-plus';
|
|
4
5
|
import dayjs from 'dayjs';
|
|
5
6
|
import IconTips from '~icons/components/icon-tips.svg';
|
|
6
7
|
import OMeetingSigAside from './components/OMeetingSigAside.vue';
|
|
@@ -8,6 +9,7 @@ import { CalendarDataType, MeetingEventsItemT, MeetingItemT } from './types.ts';
|
|
|
8
9
|
import { useScreen } from '@opendesign-plus/composables';
|
|
9
10
|
import { useMeetingConfig } from './composables/useMeetingConfig';
|
|
10
11
|
import OMeetingCalendarList from '@/components/meeting/components/OMeetingCalendarList.vue';
|
|
12
|
+
import { formatDate } from '@/components/meeting/utils.ts';
|
|
11
13
|
|
|
12
14
|
const props = defineProps<{
|
|
13
15
|
sigName: String;
|
|
@@ -21,7 +23,7 @@ const { lePadV } = useScreen();
|
|
|
21
23
|
const selectDate = ref<string>('');
|
|
22
24
|
|
|
23
25
|
const loading = ref(false); // 数据加载状态
|
|
24
|
-
const
|
|
26
|
+
const meetingData = ref<MeetingItemT[]>([]); // 某天的会议列表
|
|
25
27
|
const calendarRows = computed(() => (lePadV.value ? 100 : 5)); // 日历行数
|
|
26
28
|
|
|
27
29
|
const latestDate = ref<string>('');
|
|
@@ -44,7 +46,7 @@ const clickDateCell = async (date: string) => {
|
|
|
44
46
|
loading.value = true;
|
|
45
47
|
selectDate.value = dayjs(date).format('YYYY-MM-DD');
|
|
46
48
|
const res = await props.getMeetingListRequest(selectDate.value, props.sigName);
|
|
47
|
-
|
|
49
|
+
meetingData.value = res.map((v: MeetingItemT) => {
|
|
48
50
|
return {
|
|
49
51
|
...v,
|
|
50
52
|
time: `${ v.start }-${ v.end }`,
|
|
@@ -54,11 +56,6 @@ const clickDateCell = async (date: string) => {
|
|
|
54
56
|
});
|
|
55
57
|
} finally {
|
|
56
58
|
loading.value = false;
|
|
57
|
-
eventsData.value.forEach((v) => {
|
|
58
|
-
if (v.dates?.includes(selectDate.value)) {
|
|
59
|
-
list.value.push(v);
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
59
|
}
|
|
63
60
|
};
|
|
64
61
|
|
|
@@ -68,7 +65,12 @@ const getDates = async () => {
|
|
|
68
65
|
meetingDates.value = await props.getDateListRequest();
|
|
69
66
|
}
|
|
70
67
|
if (props.getEventsListRequest) {
|
|
71
|
-
eventsData.value = await props.getEventsListRequest()
|
|
68
|
+
eventsData.value = (await props.getEventsListRequest(selectDate.value, props.sigName)).map((v: any) => {
|
|
69
|
+
return {
|
|
70
|
+
...v,
|
|
71
|
+
type: CalendarDataType.EVENTS,
|
|
72
|
+
};
|
|
73
|
+
});
|
|
72
74
|
eventsDates.value = (eventsData.value || []).map(v => v.dates || []).flat();
|
|
73
75
|
}
|
|
74
76
|
};
|
|
@@ -94,13 +96,15 @@ const getMonthAndDay = (date: string) => {
|
|
|
94
96
|
};
|
|
95
97
|
|
|
96
98
|
const dateList = computed(() => {
|
|
97
|
-
let list
|
|
99
|
+
let list: any[];
|
|
98
100
|
if (tabType.value === CalendarDataType.ALL) {
|
|
99
101
|
list = [...(meetingDates.value || []), ...eventsDates.value];
|
|
100
102
|
} else if (tabType.value === CalendarDataType.MEETING) {
|
|
101
103
|
list = meetingDates.value || [];
|
|
104
|
+
} else if (tabType.value === CalendarDataType.EVENTS) {
|
|
105
|
+
list = eventsDates.value || [];
|
|
102
106
|
} else {
|
|
103
|
-
list =
|
|
107
|
+
list = [];
|
|
104
108
|
}
|
|
105
109
|
return [...new Set(list)].sort((a, b) => !dayjs(a).isAfter(dayjs(b)) ? -1 : 1).map(v => dayjs(v).format('YYYY-MM-DD'));
|
|
106
110
|
});
|
|
@@ -235,11 +239,25 @@ const changeMonthIdx = (step: number) => {
|
|
|
235
239
|
onMounted(() => {
|
|
236
240
|
getDates();
|
|
237
241
|
});
|
|
242
|
+
|
|
243
|
+
const list = computed(() => {
|
|
244
|
+
let list: any[];
|
|
245
|
+
if (tabType.value === CalendarDataType.ALL) {
|
|
246
|
+
list = [...(meetingData.value || []), ...eventsData.value];
|
|
247
|
+
} else if (tabType.value === CalendarDataType.MEETING) {
|
|
248
|
+
list = meetingData.value || [];
|
|
249
|
+
} else if (tabType.value === CalendarDataType.EVENTS) {
|
|
250
|
+
list = eventsData.value || [];
|
|
251
|
+
} else {
|
|
252
|
+
list = [];
|
|
253
|
+
}
|
|
254
|
+
return list;
|
|
255
|
+
});
|
|
238
256
|
</script>
|
|
239
257
|
|
|
240
258
|
<template>
|
|
241
259
|
<div class="o-sig-meeting-calendar">
|
|
242
|
-
<div class="meeting-card-header"
|
|
260
|
+
<div class="meeting-card-header">
|
|
243
261
|
<div class="header-left" v-if="latestDate">
|
|
244
262
|
<span>{{ t('meeting.latestMeeting') }} </span>
|
|
245
263
|
<span>{{ dayjs(latestDate).format('YYYY/MM/DD') }}</span>
|
|
@@ -268,12 +286,12 @@ onMounted(() => {
|
|
|
268
286
|
<template v-if="lePadV && dateList.length">
|
|
269
287
|
<div class="date-select">
|
|
270
288
|
<ElSelect v-model="selectDate" @change="changeSelect">
|
|
271
|
-
<template #label>{{ t('meeting.latestMeeting') }} {{ selectDate }}</template>
|
|
289
|
+
<template #label>{{ t('meeting.latestMeeting') }} {{ formatDate(selectDate) }}</template>
|
|
272
290
|
<ElOption
|
|
273
291
|
v-for="date in dateList"
|
|
274
292
|
:key="date"
|
|
275
293
|
:value="date"
|
|
276
|
-
:label="
|
|
294
|
+
:label="formatDate(date)"
|
|
277
295
|
/>
|
|
278
296
|
</ElSelect>
|
|
279
297
|
</div>
|
|
@@ -317,7 +335,7 @@ onMounted(() => {
|
|
|
317
335
|
margin-top: var(--o-gap-5);
|
|
318
336
|
@include respond('phone') {
|
|
319
337
|
.meeting-card-header {
|
|
320
|
-
padding:
|
|
338
|
+
padding: var(--o-gap-3) var(--o-gap-4) 0;
|
|
321
339
|
|
|
322
340
|
.el-input {
|
|
323
341
|
flex-grow: 1;
|
|
@@ -329,7 +347,7 @@ onMounted(() => {
|
|
|
329
347
|
}
|
|
330
348
|
|
|
331
349
|
.date-select {
|
|
332
|
-
padding:
|
|
350
|
+
padding: var(--o-gap-4);
|
|
333
351
|
|
|
334
352
|
.o-select {
|
|
335
353
|
width: 100%;
|
|
@@ -340,10 +358,13 @@ onMounted(() => {
|
|
|
340
358
|
font-weight: 500;
|
|
341
359
|
display: flex;
|
|
342
360
|
align-items: center;
|
|
343
|
-
padding:
|
|
361
|
+
padding: var(--o-gap-3) var(--o-gap-6) 0;
|
|
344
362
|
@include text1;
|
|
345
363
|
@include respond('<=pad') {
|
|
346
|
-
padding:
|
|
364
|
+
padding: var(--o-gap-3) var(--o-gap-4) 0;
|
|
365
|
+
}
|
|
366
|
+
@include respond('<=pad_v') {
|
|
367
|
+
display: none;
|
|
347
368
|
}
|
|
348
369
|
|
|
349
370
|
.date-meeting {
|
|
@@ -353,8 +374,9 @@ onMounted(() => {
|
|
|
353
374
|
|
|
354
375
|
.header-left {
|
|
355
376
|
width: 35%;
|
|
356
|
-
padding-bottom:
|
|
377
|
+
padding-bottom: var(--o-gap-3);
|
|
357
378
|
color: var(--o-color-info1);
|
|
379
|
+
@include text1;
|
|
358
380
|
}
|
|
359
381
|
|
|
360
382
|
.o-tab {
|
|
@@ -365,7 +387,7 @@ onMounted(() => {
|
|
|
365
387
|
position: relative;
|
|
366
388
|
|
|
367
389
|
.o-tab-nav {
|
|
368
|
-
padding-bottom:
|
|
390
|
+
padding-bottom: var(--o-gap-3);
|
|
369
391
|
|
|
370
392
|
svg path {
|
|
371
393
|
fill: currentColor;
|
|
@@ -406,8 +428,9 @@ onMounted(() => {
|
|
|
406
428
|
}
|
|
407
429
|
|
|
408
430
|
.list-content {
|
|
431
|
+
min-width: 0;
|
|
409
432
|
flex-grow: 1;
|
|
410
|
-
height:
|
|
433
|
+
height: 360px;
|
|
411
434
|
@include respond('<=pad_v') {
|
|
412
435
|
height: auto;
|
|
413
436
|
}
|