@opendesign-plus-test/components 0.0.1-rc.34 → 0.0.1-rc.36
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 +60 -54
- package/dist/components/OHeaderUser.vue.d.ts +2 -0
- package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
- package/dist/components/activity/config.d.ts +0 -14
- package/dist/components/header/OHeader.vue.d.ts +8 -2
- package/dist/components/header/OHeaderMobile.vue.d.ts +171 -0
- package/dist/components/header/components/HeaderContent.vue.d.ts +8 -1
- package/dist/components/header/components/HeaderNav.vue.d.ts +13 -1
- package/dist/components/header/components/HeaderNavMobile.vue.d.ts +33 -0
- package/dist/components/header/index.d.ts +128 -5
- package/dist/components/header/types.d.ts +80 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +1 -0
- package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
- package/dist/components/meeting/config.d.ts +1 -16
- package/dist/components/meeting/types.d.ts +2 -0
- package/dist/components/meeting/utils.d.ts +1 -15
- package/dist/components.cjs.js +39 -39
- package/dist/components.css +1 -1
- package/dist/components.es.js +10107 -10368
- package/package.json +2 -2
- package/src/components/OHeaderUser.vue +4 -4
- package/src/components/OSourceCode.vue +1 -1
- package/src/components/activity/OActivityApproval.vue +3 -4
- package/src/components/activity/OActivityForm.vue +7 -6
- package/src/components/activity/OMyActivityCalendar.vue +11 -12
- package/src/components/activity/composables/useActivityConfig.ts +143 -0
- package/src/components/activity/config.ts +1 -141
- package/src/components/header/OHeader.vue +6 -24
- package/src/components/header/OHeaderMobile.vue +177 -0
- package/src/components/header/components/HeaderContent.vue +190 -11
- package/src/components/header/components/HeaderNav.vue +3 -5
- package/src/components/header/components/HeaderNavMobile.vue +377 -0
- package/src/components/header/index.ts +5 -5
- package/src/components/header/types.ts +91 -0
- package/src/components/meeting/OMeetingCalendar.vue +41 -45
- package/src/components/meeting/OMeetingForm.vue +11 -18
- package/src/components/meeting/OMyMeetingCalendar.vue +9 -9
- package/src/components/meeting/OSigMeetingCalendar.vue +5 -6
- package/src/components/meeting/components/OMeetingCalendarList.vue +28 -37
- package/src/components/meeting/components/OMeetingDetail.vue +13 -12
- package/src/components/meeting/components/OSigMeetingAside.vue +4 -1
- package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
- package/src/components/meeting/config.ts +13 -75
- package/src/components/meeting/index.ts +1 -1
- package/src/components/meeting/types.ts +2 -0
- package/src/components/meeting/utils.ts +3 -56
- package/src/i18n/en.ts +20 -17
- package/src/i18n/zh.ts +5 -2
- package/dist/components/header/OHeaderMoblie.vue.d.ts +0 -33
- package/dist/components/header/components/HeaderNavMoblie.vue.d.ts +0 -17
- package/dist/components/header/components/HeaderUbmcNav.vue.d.ts +0 -2
- package/src/components/header/OHeaderMoblie.vue +0 -152
- package/src/components/header/components/HeaderNavMoblie.vue +0 -346
- package/src/components/header/components/HeaderUbmcNav.vue +0 -540
|
@@ -21,20 +21,13 @@ import IconHelp from '~icons/meeting/icon-help.svg';
|
|
|
21
21
|
import IconTip from '~icons/meeting/icon-tip.svg';
|
|
22
22
|
import { MeetingFormPropsT, MeetingGroupType, MeetingPostT, OptionItemT } from './types';
|
|
23
23
|
import dayjs from 'dayjs';
|
|
24
|
-
import { findLabelFromOptions, formatDateNumber, getDateNumber
|
|
25
|
-
import {
|
|
26
|
-
CYCLE_TYPE_OPTIONS0,
|
|
27
|
-
EMAIL_REGEX,
|
|
28
|
-
INTERVAL_DAY,
|
|
29
|
-
INTERVAL_MONTH,
|
|
30
|
-
INTERVAL_WEEK,
|
|
31
|
-
INTERVAL_WEEK_OPTIONS,
|
|
32
|
-
} from './config';
|
|
24
|
+
import { findLabelFromOptions, formatDateNumber, getDateNumber } from './utils';
|
|
25
|
+
import { EMAIL_REGEX, INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from './config';
|
|
33
26
|
import OMeetingCalendarSelector from './components/OMeetingCalendarSelector.vue';
|
|
34
27
|
import { useScreen } from '@opendesign-plus/composables';
|
|
35
|
-
import {
|
|
28
|
+
import { useMeetingConfig } from './composables/useMeetingConfig';
|
|
36
29
|
|
|
37
|
-
const { t, locale } =
|
|
30
|
+
const { t, locale, cycleTypeOptions0, intervalWeekOptions, getPlatformLabel } = useMeetingConfig();
|
|
38
31
|
|
|
39
32
|
const props = withDefaults(defineProps<MeetingFormPropsT>(), {
|
|
40
33
|
isSub: false,
|
|
@@ -44,9 +37,8 @@ const props = withDefaults(defineProps<MeetingFormPropsT>(), {
|
|
|
44
37
|
});
|
|
45
38
|
const message = useMessage(null);
|
|
46
39
|
|
|
47
|
-
const cycleTypeOptions =
|
|
48
|
-
|
|
49
|
-
const weekOptions = ref(INTERVAL_WEEK_OPTIONS);
|
|
40
|
+
const cycleTypeOptions = cycleTypeOptions0;
|
|
41
|
+
const weekOptions = intervalWeekOptions;
|
|
50
42
|
|
|
51
43
|
const intervalTypeMax = computed(() => {
|
|
52
44
|
return findLabelFromOptions(form.value.cycle_type, cycleTypeOptions.value, 'max');
|
|
@@ -616,9 +608,10 @@ defineExpose({
|
|
|
616
608
|
</OFormItem>
|
|
617
609
|
<OFormItem :label="t('meeting.meetingPlatform')" field="platform" :rules="rules.platform">
|
|
618
610
|
<ORadioGroup v-model="form.platform" v-if="!data" :disabled="form.is_cycle">
|
|
619
|
-
<ORadio v-for="item in typeOptions" :key="item.value" :value="item.value">{{ item.label }}
|
|
611
|
+
<ORadio v-for="item in typeOptions" :key="item.value" :value="item.value">{{ getPlatformLabel(item.label) }}
|
|
612
|
+
</ORadio>
|
|
620
613
|
</ORadioGroup>
|
|
621
|
-
<span v-else>{{ form.platform }}</span>
|
|
614
|
+
<span v-else>{{ getPlatformLabel(form.platform) }}</span>
|
|
622
615
|
</OFormItem>
|
|
623
616
|
<OFormItem field="agenda" :label="t('meeting.meetingAgenda')" :rules="rules.genda">
|
|
624
617
|
<OTextarea
|
|
@@ -639,7 +632,7 @@ defineExpose({
|
|
|
639
632
|
<OIcon>
|
|
640
633
|
<IconTip />
|
|
641
634
|
</OIcon>
|
|
642
|
-
<span>{{ t('meeting.meetingRecordDesc', [form.platform]) }}</span>
|
|
635
|
+
<span>{{ t('meeting.meetingRecordDesc', [getPlatformLabel(form.platform)]) }}</span>
|
|
643
636
|
</div>
|
|
644
637
|
</div>
|
|
645
638
|
</template>
|
|
@@ -651,7 +644,7 @@ defineExpose({
|
|
|
651
644
|
<OIcon>
|
|
652
645
|
<IconTip />
|
|
653
646
|
</OIcon>
|
|
654
|
-
<span>{{ t('meeting.meetingRecordDesc', [form.platform]) }}</span>
|
|
647
|
+
<span>{{ t('meeting.meetingRecordDesc', [getPlatformLabel(form.platform)]) }}</span>
|
|
655
648
|
</div>
|
|
656
649
|
</div>
|
|
657
650
|
</template>
|
|
@@ -23,12 +23,12 @@ import OMeetingDetail from './components/OMeetingDetail.vue';
|
|
|
23
23
|
import { MeetingGroupType, MeetingItemT, PageParamsT } from './types.ts';
|
|
24
24
|
import dayjs from 'dayjs';
|
|
25
25
|
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
26
|
-
import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK
|
|
26
|
+
import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from './config.ts';
|
|
27
27
|
import { formatDate, getDateNumber } from './utils.ts';
|
|
28
|
-
import {
|
|
28
|
+
import { useMeetingConfig } from './composables/useMeetingConfig';
|
|
29
29
|
import { useDebounceFn } from '@vueuse/core';
|
|
30
30
|
import { useScreen } from '@opendesign-plus/composables';
|
|
31
|
-
import { Locales
|
|
31
|
+
import { Locales } from '@/i18n';
|
|
32
32
|
import IconCopy from '~icons/meeting/icon-copy.svg';
|
|
33
33
|
|
|
34
34
|
const message = useMessage(null);
|
|
@@ -40,7 +40,7 @@ const list = ref<MeetingItemT[]>([]); // 列表数据
|
|
|
40
40
|
const originList = ref([]); // 原始数据
|
|
41
41
|
const canLoadMore = computed(() => total.value === null || originList.value.length < total.value);
|
|
42
42
|
const reloadAll = ref(false); // 是否需要清空数据
|
|
43
|
-
const { t, locale } =
|
|
43
|
+
const { t, locale, weekDay, getPointStr, getWeekFromDate } = useMeetingConfig();
|
|
44
44
|
const isEn = computed(() => locale.value === Locales.EN);
|
|
45
45
|
|
|
46
46
|
const props = withDefaults(defineProps<{
|
|
@@ -426,10 +426,6 @@ const groupList = computed(() => {
|
|
|
426
426
|
}, []);
|
|
427
427
|
});
|
|
428
428
|
|
|
429
|
-
const getWeekFromDate = (date) => {
|
|
430
|
-
return WEEKDAY[dayjs(date).day()];
|
|
431
|
-
};
|
|
432
|
-
|
|
433
429
|
// -------------------- 处理滚动事件 --------------------
|
|
434
430
|
const scrollerRef = ref();
|
|
435
431
|
watch(
|
|
@@ -875,10 +871,10 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
875
871
|
|
|
876
872
|
.el-calendar__header {
|
|
877
873
|
border-bottom: 1px solid var(--o-color-control4);
|
|
874
|
+
color: var(--o-color-info1);
|
|
878
875
|
|
|
879
876
|
& > span {
|
|
880
877
|
font-weight: 500;
|
|
881
|
-
color: var(--o-color-info1);
|
|
882
878
|
@include h1;
|
|
883
879
|
}
|
|
884
880
|
|
|
@@ -894,6 +890,10 @@ const cancelActions = computed<DialogActionT[]>(() => {
|
|
|
894
890
|
&:hover {
|
|
895
891
|
color: var(--o-color-primary1);
|
|
896
892
|
}
|
|
893
|
+
|
|
894
|
+
svg path {
|
|
895
|
+
fill: currentColor;
|
|
896
|
+
}
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
}
|
|
@@ -6,19 +6,17 @@ import IconTips from '~icons/components/icon-tips.svg';
|
|
|
6
6
|
import OSigMeetingAside from './components/OSigMeetingAside.vue';
|
|
7
7
|
import { CalendarDataType, MeetingItemT } from './types.ts';
|
|
8
8
|
import { useScreen } from '@opendesign-plus/composables';
|
|
9
|
-
import {
|
|
9
|
+
import { useMeetingConfig } from './composables/useMeetingConfig';
|
|
10
10
|
import OMeetingCalendarList from '@/components/meeting/components/OMeetingCalendarList.vue';
|
|
11
|
-
import { useI18n } from '@/i18n';
|
|
12
11
|
|
|
13
12
|
const props = defineProps<{
|
|
14
|
-
//sig name
|
|
15
13
|
sigName: String;
|
|
16
14
|
getMeetingListRequest: any;
|
|
17
15
|
getDateListRequest: any;
|
|
18
16
|
getEventsListRequest: any;
|
|
19
17
|
dates: String[];
|
|
20
18
|
}>();
|
|
21
|
-
const { t } =
|
|
19
|
+
const { t, meetingTabs } = useMeetingConfig();
|
|
22
20
|
const { lePadV } = useScreen();
|
|
23
21
|
const selectDate = ref<string>('');
|
|
24
22
|
|
|
@@ -257,7 +255,7 @@ onMounted(() => {
|
|
|
257
255
|
</OPopover>
|
|
258
256
|
</div>
|
|
259
257
|
<OTab v-model="tabType" @change="selectTab" :line="false">
|
|
260
|
-
<OTabPane v-for="item in
|
|
258
|
+
<OTabPane v-for="item in meetingTabs.slice(0, -1)" :key="item.value" :value="item.value">
|
|
261
259
|
<template #nav>
|
|
262
260
|
<OIcon>
|
|
263
261
|
<component :is="item.icon" />
|
|
@@ -312,7 +310,7 @@ onMounted(() => {
|
|
|
312
310
|
.o-sig-meeting-calendar {
|
|
313
311
|
width: 100%;
|
|
314
312
|
background-color: var(--o-color-fill2);
|
|
315
|
-
border-radius: var(--o-radius-
|
|
313
|
+
border-radius: var(--o-radius-xs);
|
|
316
314
|
margin-top: var(--o-gap-5);
|
|
317
315
|
@include respond-to('phone') {
|
|
318
316
|
.meeting-card-header {
|
|
@@ -353,6 +351,7 @@ onMounted(() => {
|
|
|
353
351
|
.header-left {
|
|
354
352
|
width: 35%;
|
|
355
353
|
padding-bottom: 12px;
|
|
354
|
+
color: var(--o-color-info1);
|
|
356
355
|
}
|
|
357
356
|
|
|
358
357
|
.o-tab {
|
|
@@ -2,22 +2,15 @@
|
|
|
2
2
|
import { OCollapse, OCollapseItem, ODivider, OIcon, OLink, OTag, useMessage } from '@opensig/opendesign';
|
|
3
3
|
import OMeetingDetail from './OMeetingDetail.vue';
|
|
4
4
|
import { computed, nextTick, ref, watch } from 'vue';
|
|
5
|
-
import IconMeetinging from '~icons/meeting/icon-meet.svg';
|
|
6
5
|
import IconCopy from '~icons/meeting/icon-copy.svg';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import IconAll from '~icons/meeting/icon-all.svg';
|
|
10
|
-
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
11
|
-
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
12
|
-
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
6
|
+
import { MeetingGroupType, MeetingItemT } from '../types.ts';
|
|
13
7
|
import IconChevronRight from '~icons/components/icon-chevron-right.svg';
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { getActicityTypeMap } from '@/components/activity/config.ts';
|
|
8
|
+
import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from '../config.ts';
|
|
9
|
+
import { formatDate } from '../utils.ts';
|
|
10
|
+
import { useMeetingConfig } from '../composables/useMeetingConfig';
|
|
11
|
+
import { useActivityConfig } from '@/components/activity/composables/useActivityConfig';
|
|
19
12
|
|
|
20
|
-
const
|
|
13
|
+
const { activityTypeMap } = useActivityConfig();
|
|
21
14
|
|
|
22
15
|
const props = withDefaults(defineProps<{
|
|
23
16
|
list: MeetingItemT[];
|
|
@@ -25,9 +18,9 @@ const props = withDefaults(defineProps<{
|
|
|
25
18
|
}>(), {
|
|
26
19
|
list: () => [],
|
|
27
20
|
});
|
|
28
|
-
const { t, locale } =
|
|
21
|
+
const { t, locale, getConfig, getPointStr } = useMeetingConfig();
|
|
29
22
|
const detailRefs = ref([]);
|
|
30
|
-
const message = useMessage();
|
|
23
|
+
const message = useMessage(null);
|
|
31
24
|
const copyInfo = async (idx) => {
|
|
32
25
|
const instance = detailRefs.value[idx];
|
|
33
26
|
await instance.copyInfo();
|
|
@@ -49,12 +42,6 @@ const i18n = computed(() => {
|
|
|
49
42
|
};
|
|
50
43
|
});
|
|
51
44
|
|
|
52
|
-
const getCurrentIcon = (item) => {
|
|
53
|
-
if (item.type === 'summit') return IconSummit;
|
|
54
|
-
if (item.type === 'events') return IconEvent;
|
|
55
|
-
return IconMeeting;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
45
|
// -------------------- 监听尺寸变化 --------------------
|
|
59
46
|
const meetInfoRef = ref();
|
|
60
47
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -87,25 +74,21 @@ const computedList = computed(() => {
|
|
|
87
74
|
return props.list.map((v) => {
|
|
88
75
|
const type = v.type;
|
|
89
76
|
let dateRange = '';
|
|
90
|
-
if (
|
|
91
|
-
let activity_type =
|
|
92
|
-
if (v.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
dateRange
|
|
97
|
-
}
|
|
77
|
+
if (type !== 'meeting') {
|
|
78
|
+
let activity_type = activityTypeMap.value.get(v.activity_type)?.label;
|
|
79
|
+
if (v.start && v.end) {
|
|
80
|
+
if (v.end_date === v.start_date) {
|
|
81
|
+
dateRange = `${ formatDate(v.start_date) } ${ v.start }-${ v.end }`;
|
|
82
|
+
} else {
|
|
83
|
+
dateRange = `${ formatDate(v.start_date) } ${ v.start }-${ formatDate(v.end_date) } ${ v.end }`;
|
|
84
|
+
}
|
|
85
|
+
} else {
|
|
86
|
+
dateRange = `${ formatDate(v.start_date, 'YYYY/MM/DD HH:mm') } ${ formatDate(v.end_date, 'YYYY/MM/DD HH:mm') }`;
|
|
98
87
|
}
|
|
88
|
+
|
|
99
89
|
return {
|
|
100
90
|
...v,
|
|
101
91
|
activity_type,
|
|
102
|
-
dateRange: `${ formatDate(v.start_date) } ${ v.start }-${ formatDate(v.end_date) } ${ v.end }`,
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
if (['events', 'summit'].includes(type)) {
|
|
106
|
-
dateRange = `${ formatDate(v.start_date, 'YYYY/MM/DD HH:mm') } ${ formatDate(v.end_date, 'YYYY/MM/DD HH:mm') }`;
|
|
107
|
-
return {
|
|
108
|
-
...v,
|
|
109
92
|
dateRange,
|
|
110
93
|
};
|
|
111
94
|
}
|
|
@@ -407,6 +390,10 @@ const computedList = computed(() => {
|
|
|
407
390
|
|
|
408
391
|
.o-icon {
|
|
409
392
|
font-size: 16px;
|
|
393
|
+
|
|
394
|
+
svg path {
|
|
395
|
+
fill: currentColor;
|
|
396
|
+
}
|
|
410
397
|
}
|
|
411
398
|
}
|
|
412
399
|
|
|
@@ -421,6 +408,10 @@ const computedList = computed(() => {
|
|
|
421
408
|
color: var(--o-color-info1);
|
|
422
409
|
@include text2;
|
|
423
410
|
|
|
411
|
+
@include respond-to('<=pad_v') {
|
|
412
|
+
@include h3;
|
|
413
|
+
}
|
|
414
|
+
|
|
424
415
|
.tag-wrapper {
|
|
425
416
|
margin-left: var(--o-gap-2);
|
|
426
417
|
|
|
@@ -438,7 +429,7 @@ const computedList = computed(() => {
|
|
|
438
429
|
margin-right: var(--icon-right);
|
|
439
430
|
width: var(--icon-size2);
|
|
440
431
|
height: var(--icon-size2);
|
|
441
|
-
font-size: var(--icon-size2);
|
|
432
|
+
font-size: calc(var(--icon-size2) - 4px);
|
|
442
433
|
|
|
443
434
|
svg path {
|
|
444
435
|
fill: currentColor;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { OLink } from '@opensig/opendesign';
|
|
3
3
|
import { computed, ref } from 'vue';
|
|
4
|
-
import { CalendarDataType, MeetingItemT } from '
|
|
4
|
+
import { CalendarDataType, MeetingItemT } from '../types.ts';
|
|
5
5
|
import MoreText from '@/components/common/MoreText.vue';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { formatDate } from '@/components/meeting/utils.ts';
|
|
7
|
+
import { useMeetingConfig } from '../composables/useMeetingConfig';
|
|
8
8
|
|
|
9
9
|
const props = defineProps<{
|
|
10
10
|
data: MeetingItemT;
|
|
11
11
|
from?: string;
|
|
12
12
|
show: boolean;
|
|
13
13
|
}>();
|
|
14
|
-
const { t,
|
|
15
|
-
|
|
14
|
+
const { t, getPlatformLabel } = useMeetingConfig();
|
|
15
|
+
|
|
16
16
|
// 会议详情配置
|
|
17
17
|
const infoList = computed(() =>
|
|
18
18
|
[
|
|
@@ -29,22 +29,23 @@ const infoList = computed(() =>
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
const activityInfoList = computed(() => {
|
|
32
|
-
const isLive = props.data.
|
|
32
|
+
const isLive = props.data.live_url?.length > 0;
|
|
33
33
|
return [
|
|
34
|
+
{ label: t('meeting.activityDetail2'), key: 'agenda', ellipsis: true },
|
|
34
35
|
{ label: t('meeting.startDate'), key: 'start_date_time' },
|
|
35
36
|
{ label: t('meeting.endDate'), key: 'end_date_time' },
|
|
36
37
|
{ label: t('meeting.registrationDeadline'), key: 'register_end_date' },
|
|
37
|
-
{ label: isLive ? t('meeting.livePlatform') : t('meeting.activityAddress'), key: 'address' },
|
|
38
|
+
{ label: isLive ? t('meeting.livePlatform') : t('meeting.activityAddress'), key: isLive ? 'live_url' : 'address' },
|
|
38
39
|
{ label: t('meeting.activityDetailUrl'), key: 'content_url', isLink: true },
|
|
39
40
|
{ label: t('meeting.activityApprover'), key: 'approver' },
|
|
40
41
|
{ label: t('meeting.reviewNotesLabel'), key: 'approve_record', isRecord: true },
|
|
41
|
-
].slice(0, props.from === 'home' ?
|
|
42
|
+
].slice(0, props.from === 'home' ? 5 : 8);
|
|
42
43
|
});
|
|
43
44
|
const activityInfoApprovalList = computed(() => {
|
|
44
|
-
const isLive = props.data.
|
|
45
|
+
const isLive = props.data.live_url?.length > 0;
|
|
45
46
|
return [
|
|
46
47
|
{ label: t('meeting.activityType'), key: 'activity_type', isType: true },
|
|
47
|
-
{ label: isLive ? t('meeting.livePlatform') : t('meeting.activityAddress'), key: 'address' },
|
|
48
|
+
{ label: isLive ? t('meeting.livePlatform') : t('meeting.activityAddress'), key: isLive ? 'live_url' : 'address' },
|
|
48
49
|
{ label: t('meeting.startDate'), key: 'start_date_time' },
|
|
49
50
|
{ label: t('meeting.endDate'), key: 'end_date_time' },
|
|
50
51
|
{ label: t('meeting.registrationDeadline'), key: 'register_end_date' },
|
|
@@ -56,7 +57,7 @@ const activityInfoApprovalList = computed(() => {
|
|
|
56
57
|
});
|
|
57
58
|
|
|
58
59
|
const columns = computed(() => {
|
|
59
|
-
if (props.data.type === CalendarDataType.
|
|
60
|
+
if (props.data.type === CalendarDataType.EVENTS) {
|
|
60
61
|
if (props.page === CalendarDataType.APPROVAL) {
|
|
61
62
|
return activityInfoApprovalList.value;
|
|
62
63
|
}
|
|
@@ -139,7 +140,7 @@ defineExpose({ copyInfo });
|
|
|
139
140
|
font-size: 14px;
|
|
140
141
|
gap: var(--o-gap-5);
|
|
141
142
|
|
|
142
|
-
@include respond-to('
|
|
143
|
+
@include respond-to('<=pad_v') {
|
|
143
144
|
font-size: 12px;
|
|
144
145
|
gap: var(--o-gap-2);
|
|
145
146
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { OIcon, OIconArrowLeft, OIconArrowRight } from '@opensig/opendesign';
|
|
3
3
|
import IconMeetinging from '~icons/meeting/icon-meet.svg';
|
|
4
|
-
import {
|
|
4
|
+
import { useMeetingConfig } from '@/components/meeting/composables/useMeetingConfig';
|
|
5
5
|
import { CalendarDataType } from '@/components/meeting';
|
|
6
6
|
|
|
7
|
+
const { getConfig } = useMeetingConfig();
|
|
8
|
+
|
|
7
9
|
const props = defineProps<{
|
|
8
10
|
data: any[];
|
|
9
11
|
current: number;
|
|
@@ -132,6 +134,7 @@ const changeMonth = (step) => {
|
|
|
132
134
|
.day-d {
|
|
133
135
|
font-weight: 500;
|
|
134
136
|
margin-bottom: var(--o-gap-1);
|
|
137
|
+
color: var(--o-color-info1);
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
.day-c {
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { computed } from 'vue';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import { useI18n } from '@/i18n';
|
|
4
|
+
import IconAll from '~icons/meeting/icon-all.svg';
|
|
5
|
+
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
6
|
+
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
7
|
+
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
8
|
+
import { CalendarDataType, meetingTabT, OptionItemT } from '../types';
|
|
9
|
+
import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK, TYPE_COLOR_MAP } from '../config';
|
|
10
|
+
|
|
11
|
+
export const useMeetingConfig = () => {
|
|
12
|
+
const { t, locale } = useI18n();
|
|
13
|
+
|
|
14
|
+
const meetingTabs = computed<meetingTabT[]>(() => [
|
|
15
|
+
{ label: t('meeting.meetingTypeAll'), value: CalendarDataType.ALL, icon: IconAll },
|
|
16
|
+
{ label: t('meeting.meetingTypeMeet'), value: CalendarDataType.MEETING, icon: IconMeeting, color: TYPE_COLOR_MAP.meeting, zIndex: 3 },
|
|
17
|
+
{ label: t('meeting.meetingTypeEvents'), value: CalendarDataType.EVENTS, icon: IconEvent, color: TYPE_COLOR_MAP.events, zIndex: 2 },
|
|
18
|
+
{ label: t('meeting.meetingTypeSummit'), value: CalendarDataType.SUMMIT, icon: IconSummit, color: TYPE_COLOR_MAP.summit, zIndex: 1 },
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
const cycleTypeOptions0 = computed<OptionItemT[]>(() => [
|
|
22
|
+
{ label: t('meeting.day0'), value: INTERVAL_DAY, max: 7 },
|
|
23
|
+
{ label: t('meeting.week0'), value: INTERVAL_WEEK, max: 2 },
|
|
24
|
+
{ label: t('meeting.month0'), value: INTERVAL_MONTH, max: 1 },
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
const cycleTypeOptions = computed<OptionItemT[]>(() => [
|
|
28
|
+
{ label: t('meeting.day'), value: INTERVAL_DAY, max: 7 },
|
|
29
|
+
{ label: t('meeting.week'), value: INTERVAL_WEEK, max: 2 },
|
|
30
|
+
{ label: t('meeting.month'), value: INTERVAL_MONTH, max: 1 },
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
const weekDay = computed(() => [
|
|
34
|
+
t('meeting.sunday'),
|
|
35
|
+
t('meeting.monday'),
|
|
36
|
+
t('meeting.tuesday'),
|
|
37
|
+
t('meeting.wednesday'),
|
|
38
|
+
t('meeting.thursday'),
|
|
39
|
+
t('meeting.friday'),
|
|
40
|
+
t('meeting.saturday'),
|
|
41
|
+
]);
|
|
42
|
+
|
|
43
|
+
const intervalWeekOptions = computed(() => {
|
|
44
|
+
const list: OptionItemT[] = [];
|
|
45
|
+
for (let i = 1; i <= 7; i++) {
|
|
46
|
+
const idx = i % 7;
|
|
47
|
+
list.push({ value: idx, label: weekDay.value[idx] });
|
|
48
|
+
}
|
|
49
|
+
return list;
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
const getPointStr = (cycleType: number, points: number[]) => {
|
|
53
|
+
if (cycleType === INTERVAL_WEEK) {
|
|
54
|
+
return points
|
|
55
|
+
.sort((a, b) => {
|
|
56
|
+
const aIdx = intervalWeekOptions.value.findIndex((v) => v.value === a);
|
|
57
|
+
const bIdx = intervalWeekOptions.value.findIndex((v) => v.value === b);
|
|
58
|
+
return aIdx - bIdx;
|
|
59
|
+
})
|
|
60
|
+
.map((point: number) => {
|
|
61
|
+
const opt = intervalWeekOptions.value.find((v) => v.value === point);
|
|
62
|
+
return opt?.label || String(point);
|
|
63
|
+
})
|
|
64
|
+
.join(t('meeting.cycleSplit'));
|
|
65
|
+
}
|
|
66
|
+
if (cycleType === INTERVAL_MONTH) {
|
|
67
|
+
return points.join(t('meeting.cycleSplit'));
|
|
68
|
+
}
|
|
69
|
+
return '';
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
const getConfig = (val: CalendarDataType, key: keyof meetingTabT): string => {
|
|
73
|
+
let value = val;
|
|
74
|
+
const find: meetingTabT | undefined = meetingTabs.value.find(v => v.value === value);
|
|
75
|
+
return find?.[key] || '';
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const getPlatformLabel = (platform: string) => {
|
|
79
|
+
switch (platform) {
|
|
80
|
+
case 'WELINK':
|
|
81
|
+
return 'WeLink';
|
|
82
|
+
case 'ZOOM':
|
|
83
|
+
return 'Zoom';
|
|
84
|
+
case 'TENCENT':
|
|
85
|
+
return locale.value === 'zh' ? '腾讯会议' : 'Tencent';
|
|
86
|
+
default:
|
|
87
|
+
return platform;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
const getWeekFromDate = (date: string | Date) => {
|
|
92
|
+
return weekDay.value[dayjs(date).day()];
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
t,
|
|
97
|
+
locale,
|
|
98
|
+
meetingTabs,
|
|
99
|
+
cycleTypeOptions0,
|
|
100
|
+
cycleTypeOptions,
|
|
101
|
+
weekDay,
|
|
102
|
+
intervalWeekOptions,
|
|
103
|
+
getPointStr,
|
|
104
|
+
getConfig,
|
|
105
|
+
getPlatformLabel,
|
|
106
|
+
getWeekFromDate,
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
+
import { CalendarDataType, meetingTabT } from './types.ts';
|
|
1
2
|
import IconAll from '~icons/meeting/icon-all.svg';
|
|
2
3
|
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
3
4
|
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
4
5
|
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
5
|
-
import { useI18n } from '@/i18n';
|
|
6
|
-
import { CalendarDataType, meetingTabT } from './types.ts';
|
|
7
|
-
|
|
8
|
-
const { t } = useI18n();
|
|
9
6
|
|
|
10
7
|
const getMeetingColor = () => {
|
|
11
8
|
if (typeof document !== 'undefined') {
|
|
@@ -22,8 +19,17 @@ export const TYPE_COLOR_MAP = {
|
|
|
22
19
|
summit: 'rgba(var(--o-orange-6))',
|
|
23
20
|
events: 'rgba(var(--o-cyan-6))',
|
|
24
21
|
meeting: getMeetingColor(),
|
|
25
|
-
};
|
|
26
|
-
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const INTERVAL_DAY = 0;
|
|
25
|
+
export const INTERVAL_WEEK = 1;
|
|
26
|
+
export const INTERVAL_MONTH = 2;
|
|
27
|
+
|
|
28
|
+
export const EMAIL_REGEX = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
|
29
|
+
|
|
30
|
+
export const PROGRESS_COLORS = ['var(--o-color-primary1)', 'var(--o-color-warning1)', 'var(--o-color-success1)'];
|
|
31
|
+
|
|
32
|
+
export const getMeetingTabs = (t: (key: string) => string): meetingTabT[] => [
|
|
27
33
|
{
|
|
28
34
|
label: t('meeting.meetingTypeAll'),
|
|
29
35
|
value: CalendarDataType.ALL,
|
|
@@ -50,72 +56,4 @@ export const MEETING_TABS: meetingTabT[] = [
|
|
|
50
56
|
color: TYPE_COLOR_MAP.summit,
|
|
51
57
|
zIndex: 1,
|
|
52
58
|
},
|
|
53
|
-
];
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
export const INTERVAL_DAY = 0;
|
|
57
|
-
export const INTERVAL_WEEK = 1;
|
|
58
|
-
export const INTERVAL_MONTH = 2;
|
|
59
|
-
|
|
60
|
-
export const CYCLE_TYPE_OPTIONS0 = [
|
|
61
|
-
{
|
|
62
|
-
label: t('meeting.day0'),
|
|
63
|
-
value: INTERVAL_DAY,
|
|
64
|
-
max: 7,
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: t('meeting.week0'),
|
|
68
|
-
value: INTERVAL_WEEK,
|
|
69
|
-
max: 2,
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: t('meeting.month0'),
|
|
73
|
-
value: INTERVAL_MONTH,
|
|
74
|
-
max: 1,
|
|
75
|
-
},
|
|
76
|
-
];
|
|
77
|
-
export const CYCLE_TYPE_OPTIONS = [
|
|
78
|
-
{
|
|
79
|
-
label: t('meeting.day'),
|
|
80
|
-
value: INTERVAL_DAY,
|
|
81
|
-
max: 7,
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
label: t('meeting.week'),
|
|
85
|
-
value: INTERVAL_WEEK,
|
|
86
|
-
max: 2,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
label: t('meeting.month'),
|
|
90
|
-
value: INTERVAL_MONTH,
|
|
91
|
-
max: 1,
|
|
92
|
-
},
|
|
93
|
-
];
|
|
94
|
-
export const WEEKDAY = [
|
|
95
|
-
t('meeting.sunday'),
|
|
96
|
-
t('meeting.monday'),
|
|
97
|
-
t('meeting.tuesday'),
|
|
98
|
-
t('meeting.wednesday'),
|
|
99
|
-
t('meeting.thursday'),
|
|
100
|
-
t('meeting.friday'),
|
|
101
|
-
t('meeting.saturday'),
|
|
102
|
-
];
|
|
103
|
-
|
|
104
|
-
const getWeekOptions = () => {
|
|
105
|
-
const list = [];
|
|
106
|
-
for (let i = 1; i <= 7; i++) {
|
|
107
|
-
const idx = i % 7;
|
|
108
|
-
list.push({
|
|
109
|
-
value: idx,
|
|
110
|
-
label: WEEKDAY[idx],
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
return list;
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
export const INTERVAL_WEEK_OPTIONS = getWeekOptions();
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
export const EMAIL_REGEX = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;
|
|
120
|
-
|
|
121
|
-
export const PROGRESS_COLORS = ['var(--o-color-primary1)', 'var(--o-color-warning1)', 'var(--o-color-success1)'];
|
|
59
|
+
];
|
|
@@ -12,7 +12,7 @@ const OMeetingCalendar = Object.assign(_OMeetingCalendar, {
|
|
|
12
12
|
});
|
|
13
13
|
const OMeetingForm = Object.assign(_OMeetingForm, {
|
|
14
14
|
install(app: App) {
|
|
15
|
-
app.component('
|
|
15
|
+
app.component('OMeetingForm', _OMeetingForm);
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
18
|
|
|
@@ -53,6 +53,7 @@ export interface MeetingCalendarPropsT {
|
|
|
53
53
|
hiddenEvents?: boolean;
|
|
54
54
|
hiddenSummit?: boolean;
|
|
55
55
|
groupType: MeetingGroupType;
|
|
56
|
+
groups: string[];
|
|
56
57
|
}
|
|
57
58
|
// 会议新增、修改
|
|
58
59
|
export interface MeetingPostT {
|
|
@@ -109,6 +110,7 @@ export interface MeetingItemT extends MeetingPostT {
|
|
|
109
110
|
update_time: string;
|
|
110
111
|
time: string; // 处理一下时间范围
|
|
111
112
|
cycle_sub: any[];
|
|
113
|
+
live_url?: string;
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
export interface PageParamsT {
|