@opendesign-plus/components 0.0.1-rc.18 → 0.0.1-rc.19
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 +2 -2
- package/dist/components/OHeaderUser.vue.d.ts +2 -0
- 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/types.d.ts +1 -0
- package/dist/components.cjs.js +36 -36
- package/dist/components.css +1 -1
- package/dist/components.es.js +8683 -8955
- package/package.json +3 -3
- package/src/components/OHeaderUser.vue +4 -4
- package/src/components/OSourceCode.vue +1 -1
- package/src/components/activity/OActivityApproval.vue +3 -10
- package/src/components/activity/OActivityForm.vue +1 -8
- package/src/components/activity/OMyActivityCalendar.vue +0 -15
- package/src/components/activity/composables/useActivityConfig.ts +140 -140
- package/src/components/events/OEventsApply.vue +1 -2
- package/src/components/events/OEventsCalendar.vue +10 -0
- 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 +35 -37
- package/src/components/meeting/OMyMeetingCalendar.vue +5 -1
- package/src/components/meeting/OSigMeetingCalendar.vue +2 -1
- package/src/components/meeting/components/OMeetingCalendarList.vue +21 -29
- package/src/components/meeting/components/OMeetingDetail.vue +2 -2
- package/src/components/meeting/components/OSigMeetingAside.vue +1 -0
- package/src/components/meeting/composables/useMeetingConfig.ts +0 -3
- package/src/components/meeting/config.ts +58 -58
- package/src/components/meeting/index.ts +1 -1
- package/src/components/meeting/types.ts +1 -0
- package/src/components/meeting/utils.ts +69 -69
- package/src/i18n/en.ts +2 -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
|
@@ -310,7 +310,7 @@ onMounted(() => {
|
|
|
310
310
|
.o-sig-meeting-calendar {
|
|
311
311
|
width: 100%;
|
|
312
312
|
background-color: var(--o-color-fill2);
|
|
313
|
-
border-radius: var(--o-radius-
|
|
313
|
+
border-radius: var(--o-radius-xs);
|
|
314
314
|
margin-top: var(--o-gap-5);
|
|
315
315
|
@include respond-to('phone') {
|
|
316
316
|
.meeting-card-header {
|
|
@@ -351,6 +351,7 @@ onMounted(() => {
|
|
|
351
351
|
.header-left {
|
|
352
352
|
width: 35%;
|
|
353
353
|
padding-bottom: 12px;
|
|
354
|
+
color: var(--o-color-info1);
|
|
354
355
|
}
|
|
355
356
|
|
|
356
357
|
.o-tab {
|
|
@@ -2,14 +2,8 @@
|
|
|
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
8
|
import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from '../config.ts';
|
|
15
9
|
import { formatDate } from '../utils.ts';
|
|
@@ -26,7 +20,7 @@ const props = withDefaults(defineProps<{
|
|
|
26
20
|
});
|
|
27
21
|
const { t, locale, getConfig, getPointStr } = useMeetingConfig();
|
|
28
22
|
const detailRefs = ref([]);
|
|
29
|
-
const message = useMessage();
|
|
23
|
+
const message = useMessage(null);
|
|
30
24
|
const copyInfo = async (idx) => {
|
|
31
25
|
const instance = detailRefs.value[idx];
|
|
32
26
|
await instance.copyInfo();
|
|
@@ -48,12 +42,6 @@ const i18n = computed(() => {
|
|
|
48
42
|
};
|
|
49
43
|
});
|
|
50
44
|
|
|
51
|
-
const getCurrentIcon = (item) => {
|
|
52
|
-
if (item.type === 'summit') return IconSummit;
|
|
53
|
-
if (item.type === 'events') return IconEvent;
|
|
54
|
-
return IconMeeting;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
45
|
// -------------------- 监听尺寸变化 --------------------
|
|
58
46
|
const meetInfoRef = ref();
|
|
59
47
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -86,25 +74,21 @@ const computedList = computed(() => {
|
|
|
86
74
|
return props.list.map((v) => {
|
|
87
75
|
const type = v.type;
|
|
88
76
|
let dateRange = '';
|
|
89
|
-
if (
|
|
77
|
+
if (type !== 'meeting') {
|
|
90
78
|
let activity_type = activityTypeMap.value.get(v.activity_type)?.label;
|
|
91
|
-
if (v.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
dateRange
|
|
96
|
-
}
|
|
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') }`;
|
|
97
87
|
}
|
|
88
|
+
|
|
98
89
|
return {
|
|
99
90
|
...v,
|
|
100
91
|
activity_type,
|
|
101
|
-
dateRange: `${ formatDate(v.start_date) } ${ v.start }-${ formatDate(v.end_date) } ${ v.end }`,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
if (['events', 'summit'].includes(type)) {
|
|
105
|
-
dateRange = `${ formatDate(v.start_date, 'YYYY/MM/DD HH:mm') } ${ formatDate(v.end_date, 'YYYY/MM/DD HH:mm') }`;
|
|
106
|
-
return {
|
|
107
|
-
...v,
|
|
108
92
|
dateRange,
|
|
109
93
|
};
|
|
110
94
|
}
|
|
@@ -406,6 +390,10 @@ const computedList = computed(() => {
|
|
|
406
390
|
|
|
407
391
|
.o-icon {
|
|
408
392
|
font-size: 16px;
|
|
393
|
+
|
|
394
|
+
svg path {
|
|
395
|
+
fill: currentColor;
|
|
396
|
+
}
|
|
409
397
|
}
|
|
410
398
|
}
|
|
411
399
|
|
|
@@ -420,6 +408,10 @@ const computedList = computed(() => {
|
|
|
420
408
|
color: var(--o-color-info1);
|
|
421
409
|
@include text2;
|
|
422
410
|
|
|
411
|
+
@include respond-to('<=pad_v') {
|
|
412
|
+
@include h3;
|
|
413
|
+
}
|
|
414
|
+
|
|
423
415
|
.tag-wrapper {
|
|
424
416
|
margin-left: var(--o-gap-2);
|
|
425
417
|
|
|
@@ -437,7 +429,7 @@ const computedList = computed(() => {
|
|
|
437
429
|
margin-right: var(--icon-right);
|
|
438
430
|
width: var(--icon-size2);
|
|
439
431
|
height: var(--icon-size2);
|
|
440
|
-
font-size: var(--icon-size2);
|
|
432
|
+
font-size: calc(var(--icon-size2) - 4px);
|
|
441
433
|
|
|
442
434
|
svg path {
|
|
443
435
|
fill: currentColor;
|
|
@@ -57,7 +57,7 @@ const activityInfoApprovalList = computed(() => {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
const columns = computed(() => {
|
|
60
|
-
if (props.data.type === CalendarDataType.
|
|
60
|
+
if (props.data.type === CalendarDataType.EVENTS) {
|
|
61
61
|
if (props.page === CalendarDataType.APPROVAL) {
|
|
62
62
|
return activityInfoApprovalList.value;
|
|
63
63
|
}
|
|
@@ -140,7 +140,7 @@ defineExpose({ copyInfo });
|
|
|
140
140
|
font-size: 14px;
|
|
141
141
|
gap: var(--o-gap-5);
|
|
142
142
|
|
|
143
|
-
@include respond-to('
|
|
143
|
+
@include respond-to('<=pad_v') {
|
|
144
144
|
font-size: 12px;
|
|
145
145
|
gap: var(--o-gap-2);
|
|
146
146
|
}
|
|
@@ -71,9 +71,6 @@ export const useMeetingConfig = () => {
|
|
|
71
71
|
|
|
72
72
|
const getConfig = (val: CalendarDataType, key: keyof meetingTabT): string => {
|
|
73
73
|
let value = val;
|
|
74
|
-
if (val === CalendarDataType.ACTIVITY) {
|
|
75
|
-
value = CalendarDataType.EVENTS;
|
|
76
|
-
}
|
|
77
74
|
const find: meetingTabT | undefined = meetingTabs.value.find(v => v.value === value);
|
|
78
75
|
return find?.[key] || '';
|
|
79
76
|
};
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { CalendarDataType, meetingTabT } from './types.ts';
|
|
2
|
-
import IconAll from '~icons/meeting/icon-all.svg';
|
|
3
|
-
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
4
|
-
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
5
|
-
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
6
|
-
|
|
7
|
-
const getMeetingColor = () => {
|
|
8
|
-
if (typeof document !== 'undefined') {
|
|
9
|
-
const deepBlue = getComputedStyle(document.documentElement)
|
|
10
|
-
.getPropertyValue('--o-deep-blue-6')?.trim();
|
|
11
|
-
if (deepBlue) {
|
|
12
|
-
return 'rgba(var(--o-deep-blue-6))';
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
return 'var(--o-color-primary1)';
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export const TYPE_COLOR_MAP = {
|
|
19
|
-
summit: 'rgba(var(--o-orange-6))',
|
|
20
|
-
events: 'rgba(var(--o-cyan-6))',
|
|
21
|
-
meeting: getMeetingColor(),
|
|
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[] => [
|
|
33
|
-
{
|
|
34
|
-
label: t('meeting.meetingTypeAll'),
|
|
35
|
-
value: CalendarDataType.ALL,
|
|
36
|
-
icon: IconAll,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
label: t('meeting.meetingTypeMeet'),
|
|
40
|
-
value: CalendarDataType.MEETING,
|
|
41
|
-
icon: IconMeeting,
|
|
42
|
-
color: TYPE_COLOR_MAP.meeting,
|
|
43
|
-
zIndex: 3,
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
label: t('meeting.meetingTypeEvents'),
|
|
47
|
-
value: CalendarDataType.EVENTS,
|
|
48
|
-
icon: IconEvent,
|
|
49
|
-
color: TYPE_COLOR_MAP.events,
|
|
50
|
-
zIndex: 2,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
label: t('meeting.meetingTypeSummit'),
|
|
54
|
-
value: CalendarDataType.SUMMIT,
|
|
55
|
-
icon: IconSummit,
|
|
56
|
-
color: TYPE_COLOR_MAP.summit,
|
|
57
|
-
zIndex: 1,
|
|
58
|
-
},
|
|
1
|
+
import { CalendarDataType, meetingTabT } from './types.ts';
|
|
2
|
+
import IconAll from '~icons/meeting/icon-all.svg';
|
|
3
|
+
import IconEvent from '~icons/meeting/icon-event.svg';
|
|
4
|
+
import IconMeeting from '~icons/meeting/icon-meet.svg';
|
|
5
|
+
import IconSummit from '~icons/meeting/icon-summit.svg';
|
|
6
|
+
|
|
7
|
+
const getMeetingColor = () => {
|
|
8
|
+
if (typeof document !== 'undefined') {
|
|
9
|
+
const deepBlue = getComputedStyle(document.documentElement)
|
|
10
|
+
.getPropertyValue('--o-deep-blue-6')?.trim();
|
|
11
|
+
if (deepBlue) {
|
|
12
|
+
return 'rgba(var(--o-deep-blue-6))';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return 'var(--o-color-primary1)';
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const TYPE_COLOR_MAP = {
|
|
19
|
+
summit: 'rgba(var(--o-orange-6))',
|
|
20
|
+
events: 'rgba(var(--o-cyan-6))',
|
|
21
|
+
meeting: getMeetingColor(),
|
|
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[] => [
|
|
33
|
+
{
|
|
34
|
+
label: t('meeting.meetingTypeAll'),
|
|
35
|
+
value: CalendarDataType.ALL,
|
|
36
|
+
icon: IconAll,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: t('meeting.meetingTypeMeet'),
|
|
40
|
+
value: CalendarDataType.MEETING,
|
|
41
|
+
icon: IconMeeting,
|
|
42
|
+
color: TYPE_COLOR_MAP.meeting,
|
|
43
|
+
zIndex: 3,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
label: t('meeting.meetingTypeEvents'),
|
|
47
|
+
value: CalendarDataType.EVENTS,
|
|
48
|
+
icon: IconEvent,
|
|
49
|
+
color: TYPE_COLOR_MAP.events,
|
|
50
|
+
zIndex: 2,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: t('meeting.meetingTypeSummit'),
|
|
54
|
+
value: CalendarDataType.SUMMIT,
|
|
55
|
+
icon: IconSummit,
|
|
56
|
+
color: TYPE_COLOR_MAP.summit,
|
|
57
|
+
zIndex: 1,
|
|
58
|
+
},
|
|
59
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
|
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
import { OptionItemT } from './types';
|
|
3
|
-
|
|
4
|
-
export const formatDate = (date: string | Date = new Date(), format: string = 'YYYY-MM-DD'): string => {
|
|
5
|
-
let dateStr = date;
|
|
6
|
-
if (!dateStr) {
|
|
7
|
-
dateStr = new Date();
|
|
8
|
-
}
|
|
9
|
-
if (!dayjs(new Date(dateStr)).isValid()) {
|
|
10
|
-
return dateStr as string;
|
|
11
|
-
}
|
|
12
|
-
return dayjs(new Date(dateStr)).format(format);
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const findLabelFromOptions = (value: string | number, options: OptionItemT[], labelKey: keyof OptionItemT = 'label', valueKey: keyof OptionItemT = 'value') => {
|
|
16
|
-
const find = options.find((o) => o[valueKey] === value);
|
|
17
|
-
return find?.[labelKey] || value;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const speakerNum = (val: string) => {
|
|
21
|
-
const regex = /\d+/g;
|
|
22
|
-
const match = val.match(regex) || '';
|
|
23
|
-
|
|
24
|
-
return parseInt(match[0]);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
export const getDateNumber = (date: string) => {
|
|
28
|
-
const arr: string[] = date.split(':');
|
|
29
|
-
if (arr.length > 3 || !arr.length) {
|
|
30
|
-
return 0;
|
|
31
|
-
}
|
|
32
|
-
let res = 0;
|
|
33
|
-
let base = 1;
|
|
34
|
-
while (arr.length > 0) {
|
|
35
|
-
const current = arr.pop();
|
|
36
|
-
res += parseInt(current!) * base;
|
|
37
|
-
base *= 60;
|
|
38
|
-
}
|
|
39
|
-
return res;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
const formatNumber = (num: number) => {
|
|
43
|
-
if (num < 0) return 'Invalid number';
|
|
44
|
-
if (num >= 10) return `${ num }`;
|
|
45
|
-
return `0${ num }`;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export const formatDateNumber = (num: number) => {
|
|
49
|
-
if (num > 24 * 60 * 60) return 'Invalid date';
|
|
50
|
-
const h = Math.floor(num / 60 / 60);
|
|
51
|
-
const m = Math.floor((num - h * 60 * 60) / 60);
|
|
52
|
-
const s = num % 60;
|
|
53
|
-
return `${ formatNumber(h) }:${ formatNumber(m) }:${ formatNumber(s) }`;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const transformTime = (time: string) => {
|
|
57
|
-
const arr = time.split(':');
|
|
58
|
-
const hh = arr[arr.length - 3] ? parseInt(arr[arr.length - 3]) : 0;
|
|
59
|
-
const mm = parseInt(arr[arr.length - 2]);
|
|
60
|
-
const ss = parseFloat(arr[arr.length - 1]);
|
|
61
|
-
|
|
62
|
-
return hh * 60 * 60 + mm * 60 + ss;
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export const transformSeconds = (seconds: number) => {
|
|
66
|
-
const hh = Math.floor(seconds / 3600);
|
|
67
|
-
const mm = Math.floor((seconds - hh * 3600) / 60);
|
|
68
|
-
const ss = Math.floor(seconds - hh * 3600 - mm * 60);
|
|
69
|
-
return `${ hh ? `${ hh.toString().padStart(2, '0') }:` : '' }${ mm.toString().padStart(2, '0') }:${ ss.toString().padStart(2, '0') }`;
|
|
1
|
+
import dayjs from 'dayjs';
|
|
2
|
+
import { OptionItemT } from './types';
|
|
3
|
+
|
|
4
|
+
export const formatDate = (date: string | Date = new Date(), format: string = 'YYYY-MM-DD'): string => {
|
|
5
|
+
let dateStr = date;
|
|
6
|
+
if (!dateStr) {
|
|
7
|
+
dateStr = new Date();
|
|
8
|
+
}
|
|
9
|
+
if (!dayjs(new Date(dateStr)).isValid()) {
|
|
10
|
+
return dateStr as string;
|
|
11
|
+
}
|
|
12
|
+
return dayjs(new Date(dateStr)).format(format);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const findLabelFromOptions = (value: string | number, options: OptionItemT[], labelKey: keyof OptionItemT = 'label', valueKey: keyof OptionItemT = 'value') => {
|
|
16
|
+
const find = options.find((o) => o[valueKey] === value);
|
|
17
|
+
return find?.[labelKey] || value;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const speakerNum = (val: string) => {
|
|
21
|
+
const regex = /\d+/g;
|
|
22
|
+
const match = val.match(regex) || '';
|
|
23
|
+
|
|
24
|
+
return parseInt(match[0]);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const getDateNumber = (date: string) => {
|
|
28
|
+
const arr: string[] = date.split(':');
|
|
29
|
+
if (arr.length > 3 || !arr.length) {
|
|
30
|
+
return 0;
|
|
31
|
+
}
|
|
32
|
+
let res = 0;
|
|
33
|
+
let base = 1;
|
|
34
|
+
while (arr.length > 0) {
|
|
35
|
+
const current = arr.pop();
|
|
36
|
+
res += parseInt(current!) * base;
|
|
37
|
+
base *= 60;
|
|
38
|
+
}
|
|
39
|
+
return res;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const formatNumber = (num: number) => {
|
|
43
|
+
if (num < 0) return 'Invalid number';
|
|
44
|
+
if (num >= 10) return `${ num }`;
|
|
45
|
+
return `0${ num }`;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export const formatDateNumber = (num: number) => {
|
|
49
|
+
if (num > 24 * 60 * 60) return 'Invalid date';
|
|
50
|
+
const h = Math.floor(num / 60 / 60);
|
|
51
|
+
const m = Math.floor((num - h * 60 * 60) / 60);
|
|
52
|
+
const s = num % 60;
|
|
53
|
+
return `${ formatNumber(h) }:${ formatNumber(m) }:${ formatNumber(s) }`;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const transformTime = (time: string) => {
|
|
57
|
+
const arr = time.split(':');
|
|
58
|
+
const hh = arr[arr.length - 3] ? parseInt(arr[arr.length - 3]) : 0;
|
|
59
|
+
const mm = parseInt(arr[arr.length - 2]);
|
|
60
|
+
const ss = parseFloat(arr[arr.length - 1]);
|
|
61
|
+
|
|
62
|
+
return hh * 60 * 60 + mm * 60 + ss;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const transformSeconds = (seconds: number) => {
|
|
66
|
+
const hh = Math.floor(seconds / 3600);
|
|
67
|
+
const mm = Math.floor((seconds - hh * 3600) / 60);
|
|
68
|
+
const ss = Math.floor(seconds - hh * 3600 - mm * 60);
|
|
69
|
+
return `${ hh ? `${ hh.toString().padStart(2, '0') }:` : '' }${ mm.toString().padStart(2, '0') }:${ ss.toString().padStart(2, '0') }`;
|
|
70
70
|
};
|
package/src/i18n/en.ts
CHANGED
|
@@ -39,8 +39,8 @@ export default {
|
|
|
39
39
|
'meeting.myMeeting': 'My Meetings',
|
|
40
40
|
'meeting.meetingCancel': '[{0}] meeting canceled.',
|
|
41
41
|
'meeting.todayNonMeeting': 'No meetings scheduled for today.',
|
|
42
|
-
'meeting.online': '
|
|
43
|
-
'meeting.offline': '
|
|
42
|
+
'meeting.online': 'Online',
|
|
43
|
+
'meeting.offline': 'Offline',
|
|
44
44
|
'meeting.meetingSingle': 'This meeting',
|
|
45
45
|
'meeting.meetingCycle': 'All recurring meetings',
|
|
46
46
|
'meeting.bookMeeting': 'Book Meeting',
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface OHeaderT {
|
|
2
|
-
(e: 'go-back'): void;
|
|
3
|
-
(e: 'go-home'): void;
|
|
4
|
-
}
|
|
5
|
-
declare function __VLS_template(): {
|
|
6
|
-
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
rightConfig?(_: {}): any;
|
|
9
|
-
tool?(_: {}): any;
|
|
10
|
-
logo?(_: {}): any;
|
|
11
|
-
toolbar?(_: {}): any;
|
|
12
|
-
};
|
|
13
|
-
refs: {
|
|
14
|
-
mobileNav: import('../../../vue/dist/vue.esm-bundler.js').CreateComponentPublicInstanceWithMixins<Record<string, any> & {}, {}, {}, {}, {}, import('../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, import('../../../vue/dist/vue.esm-bundler.js').ComponentOptionsMixin, {}, import('../../../vue/dist/vue.esm-bundler.js').PublicProps, {}, false, {}, {}, {}, {}, string, {}, any, import('../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, {
|
|
15
|
-
P: {};
|
|
16
|
-
B: {};
|
|
17
|
-
D: {};
|
|
18
|
-
C: {};
|
|
19
|
-
M: {};
|
|
20
|
-
Defaults: {};
|
|
21
|
-
}, Record<string, any> & {}, {}, {}, {}, {}, {}> | null;
|
|
22
|
-
};
|
|
23
|
-
rootEl: HTMLDivElement;
|
|
24
|
-
};
|
|
25
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
-
declare const __VLS_component: import('../../../vue/dist/vue.esm-bundler.js').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('../../../vue/dist/vue.esm-bundler.js').PublicProps>;
|
|
27
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
28
|
-
export default _default;
|
|
29
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
30
|
-
new (): {
|
|
31
|
-
$slots: S;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
attrs: Partial<{}>;
|
|
3
|
-
slots: {
|
|
4
|
-
tool?(_: {}): any;
|
|
5
|
-
};
|
|
6
|
-
refs: {};
|
|
7
|
-
rootEl: HTMLDivElement;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
-
declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js').DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import('../../../../vue/dist/vue.esm-bundler.js').PublicProps>;
|
|
11
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
-
export default _default;
|
|
13
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
-
new (): {
|
|
15
|
-
$slots: S;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ref } from 'vue';
|
|
3
|
-
import { OIcon, OIconArrowLeft } from '@opensig/opendesign';
|
|
4
|
-
|
|
5
|
-
import ContentWrapper from '../common/ContentWrapper.vue';
|
|
6
|
-
import HeaderNavMoblie from './components/HeaderNavMoblie.vue';
|
|
7
|
-
|
|
8
|
-
import IconClose from '~icons/components/icon-close.svg';
|
|
9
|
-
import IconMenu from '~icons/components/icon-header-menu.svg';
|
|
10
|
-
|
|
11
|
-
export interface OHeaderT {
|
|
12
|
-
(e: 'go-back'): void;
|
|
13
|
-
(e: 'go-home'): void;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const emit = defineEmits<OHeaderT>();
|
|
17
|
-
|
|
18
|
-
const props = defineProps({
|
|
19
|
-
logo: undefined,
|
|
20
|
-
navData: undefined,
|
|
21
|
-
codeData: undefined,
|
|
22
|
-
isSimpleHeader: undefined,
|
|
23
|
-
headerTitle: undefined,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const goBack = () => {
|
|
27
|
-
emit('go-back');
|
|
28
|
-
};
|
|
29
|
-
const goHome = () => {
|
|
30
|
-
emit('go-home');
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const menuShow = ref(false);
|
|
34
|
-
const menuPanel = () => {
|
|
35
|
-
setTimeout(() => {
|
|
36
|
-
menuShow.value = !menuShow.value;
|
|
37
|
-
document.body.style.overflow = menuShow.value ? 'hidden' : '';
|
|
38
|
-
}, 200);
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const mobileClick = () => {
|
|
42
|
-
menuPanel();
|
|
43
|
-
};
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<template>
|
|
47
|
-
<div class="header">
|
|
48
|
-
<ContentWrapper class="header-wrap">
|
|
49
|
-
<!-- 二级路由简单头部 -->
|
|
50
|
-
<div v-if="isSimpleHeader" class="header-simple">
|
|
51
|
-
<div class="simple-header-left">
|
|
52
|
-
<OIcon @click="goBack">
|
|
53
|
-
<OIconArrowLeft />
|
|
54
|
-
</OIcon>
|
|
55
|
-
<div v-if="headerTitle" class="header-title">
|
|
56
|
-
{{ headerTitle }}
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
<div v-if="$slots.rightConfig" class="simple-header-right">
|
|
60
|
-
<slot name="rightConfig"></slot>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
<template v-else>
|
|
64
|
-
<div class="header-left">
|
|
65
|
-
<OIcon @click="menuPanel">
|
|
66
|
-
<IconMenu v-if="!menuShow" />
|
|
67
|
-
<IconClose v-else />
|
|
68
|
-
</OIcon>
|
|
69
|
-
</div>
|
|
70
|
-
<HeaderNavMoblie ref="mobileNav" :nav-data="navData" :code-data="codeData" :menu-show="menuShow" @link-click="mobileClick">
|
|
71
|
-
<template #tool>
|
|
72
|
-
<slot name="tool"></slot>
|
|
73
|
-
</template>
|
|
74
|
-
</HeaderNavMoblie>
|
|
75
|
-
<div class="header-center">
|
|
76
|
-
<div class="header-logo" @click="goHome">
|
|
77
|
-
<slot name="logo">
|
|
78
|
-
<img v-if="props.logo" class="logo" alt="logo" :src="props.logo" />
|
|
79
|
-
</slot>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="header-right">
|
|
83
|
-
<slot name="toolbar"></slot>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
</ContentWrapper>
|
|
87
|
-
</div>
|
|
88
|
-
</template>
|
|
89
|
-
|
|
90
|
-
<style lang="scss" scoped>
|
|
91
|
-
.header {
|
|
92
|
-
background-color: var(--o-color-fill2);
|
|
93
|
-
position: fixed;
|
|
94
|
-
left: 0;
|
|
95
|
-
right: 0;
|
|
96
|
-
top: 0;
|
|
97
|
-
z-index: 999;
|
|
98
|
-
box-shadow: 0 3px 9px 0 rgba(0, 18, 85, 0.08);
|
|
99
|
-
backdrop-filter: blur(5px);
|
|
100
|
-
--o-header-height: 56px;
|
|
101
|
-
}
|
|
102
|
-
.header-wrap {
|
|
103
|
-
display: flex;
|
|
104
|
-
align-items: center;
|
|
105
|
-
height: var(--o-header-height);
|
|
106
|
-
justify-content: space-between;
|
|
107
|
-
position: relative;
|
|
108
|
-
}
|
|
109
|
-
.header-simple {
|
|
110
|
-
width: 100%;
|
|
111
|
-
display: flex;
|
|
112
|
-
align-items: center;
|
|
113
|
-
justify-content: space-between;
|
|
114
|
-
.o-icon {
|
|
115
|
-
font-size: 24px;
|
|
116
|
-
}
|
|
117
|
-
.simple-header-left {
|
|
118
|
-
display: flex;
|
|
119
|
-
gap: 16px;
|
|
120
|
-
color: var(--o-color-info1);
|
|
121
|
-
overflow: hidden;
|
|
122
|
-
flex-grow: 1;
|
|
123
|
-
.header-title {
|
|
124
|
-
color: var(--o-color-info1);
|
|
125
|
-
font-weight: 500;
|
|
126
|
-
overflow: hidden;
|
|
127
|
-
white-space: nowrap;
|
|
128
|
-
text-overflow: ellipsis;
|
|
129
|
-
@include text2;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
.simple-header-right {
|
|
133
|
-
flex-shrink: 0;
|
|
134
|
-
color: var(--o-color-info1);
|
|
135
|
-
font-weight: 500;
|
|
136
|
-
font-size: 16px;
|
|
137
|
-
line-height: 24px;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.header-left {
|
|
142
|
-
display: flex;
|
|
143
|
-
align-items: center;
|
|
144
|
-
.o-icon {
|
|
145
|
-
--icon-size: 24px;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
.logo {
|
|
149
|
-
height: 24px;
|
|
150
|
-
width: auto;
|
|
151
|
-
}
|
|
152
|
-
</style>
|