@opendesign-plus/components 0.0.1-rc.10 → 0.0.1-rc.13

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.
Files changed (30) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +47 -41
  3. package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
  4. package/dist/components/activity/config.d.ts +0 -14
  5. package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
  6. package/dist/components/meeting/config.d.ts +1 -16
  7. package/dist/components/meeting/types.d.ts +1 -0
  8. package/dist/components/meeting/utils.d.ts +1 -15
  9. package/dist/components.cjs.js +39 -39
  10. package/dist/components.css +1 -1
  11. package/dist/components.es.js +10456 -10473
  12. package/package.json +1 -1
  13. package/src/components/activity/OActivityApproval.vue +3 -4
  14. package/src/components/activity/OActivityForm.vue +5 -4
  15. package/src/components/activity/OMyActivityCalendar.vue +11 -12
  16. package/src/components/activity/composables/useActivityConfig.ts +141 -0
  17. package/src/components/activity/config.ts +1 -141
  18. package/src/components/meeting/OMeetingCalendar.vue +7 -9
  19. package/src/components/meeting/OMeetingForm.vue +11 -18
  20. package/src/components/meeting/OMyMeetingCalendar.vue +4 -8
  21. package/src/components/meeting/OSigMeetingCalendar.vue +3 -5
  22. package/src/components/meeting/components/OMeetingCalendarList.vue +7 -8
  23. package/src/components/meeting/components/OMeetingDetail.vue +9 -8
  24. package/src/components/meeting/components/OSigMeetingAside.vue +3 -1
  25. package/src/components/meeting/composables/useMeetingConfig.ts +111 -0
  26. package/src/components/meeting/config.ts +58 -120
  27. package/src/components/meeting/types.ts +1 -0
  28. package/src/components/meeting/utils.ts +69 -122
  29. package/src/i18n/en.ts +18 -15
  30. package/src/i18n/zh.ts +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus/components",
3
- "version": "0.0.1-rc.10",
3
+ "version": "0.0.1-rc.13",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -15,15 +15,14 @@ import {
15
15
  import { useScreen } from '@opendesign-plus/composables';
16
16
  import { onMounted, watch, ref, reactive, computed } from 'vue';
17
17
  import { ActivityItemT, ActivityTablePropsT, ReviewParamsT, TypeOptionT } from './types';
18
- import { getApprovalStatusMap, getStatusMap } from './config';
18
+ import { useActivityConfig } from './composables/useActivityConfig';
19
19
  import ThFilter from '../common/ThFilter.vue';
20
20
  import OMeetingDetail from '@/components/meeting/components/OMeetingDetail.vue';
21
21
  import { useI18n } from '@/i18n';
22
22
 
23
23
  const { t, locale } = useI18n();
24
24
  const isZh = computed(() => locale.value === 'zh');
25
- const approvalStatusMap = getApprovalStatusMap();
26
- const statusMap = getStatusMap();
25
+ const { approvalStatusMap, statusMap } = useActivityConfig();
27
26
 
28
27
 
29
28
  const message = useMessage(null);
@@ -58,7 +57,7 @@ const sortTime = () => {
58
57
  const statusValue = ref();
59
58
  const statusOptions = computed<TypeOptionT[]>(() => {
60
59
  let list: TypeOptionT[] | { label: string; value: string; }[] = [];
61
- approvalStatusMap.forEach((item) => {
60
+ approvalStatusMap.value.forEach((item) => {
62
61
  list.push(item);
63
62
  });
64
63
  return list.slice(1);
@@ -15,9 +15,10 @@ import { computed, ref, watch } from 'vue';
15
15
  import { ActivityFormPropsT, ParamsItemT } from './types';
16
16
  import { useScreen } from '@opendesign-plus/composables';
17
17
  import { dayjs, ElDatePicker } from 'element-plus';
18
- import { getActicityTypeMap, WEBSITE_REGEXP } from './config';
18
+ import { WEBSITE_REGEXP } from './config';
19
19
  import { EMAIL_REGEX } from '@/components/meeting/config.ts';
20
20
  import { useI18n } from '@/i18n';
21
+ import { useActivityConfig } from './composables/useActivityConfig';
21
22
 
22
23
  const emits = defineEmits(['confirm', 'close']);
23
24
 
@@ -25,7 +26,7 @@ const message = useMessage(null);
25
26
  const { lePadV } = useScreen();
26
27
  const { t } = useI18n();
27
28
  const $t = t;
28
- const acticityTypeMap = getActicityTypeMap();
29
+ const { activityTypeMap } = useActivityConfig();
29
30
 
30
31
  interface TypeOptionT {
31
32
  label: string;
@@ -226,7 +227,7 @@ const approverList = computed(() => {
226
227
 
227
228
  const typeValue = ref<string>('');
228
229
  const typeOptions = ref<TypeOptionT[]>([]); // 活动类型
229
- acticityTypeMap.forEach((item) => {
230
+ activityTypeMap.value.forEach((item) => {
230
231
  typeOptions.value.push(item);
231
232
  });
232
233
  const changeType = (val: SelectValueT) => {
@@ -279,7 +280,7 @@ watch(
279
280
  organizer,
280
281
  } as ParamsItemT;
281
282
  form.value = { ...params };
282
- typeValue.value = acticityTypeMap.get(val.activity_type)?.label;
283
+ typeValue.value = activityTypeMap.value.get(val.activity_type)?.label;
283
284
  form.value.start_date = `${ form.value.start_date } ${ form.value.start }`;
284
285
  form.value.end_date = `${ form.value.end_date } ${ form.value.end }`;
285
286
  }
@@ -26,15 +26,14 @@ import IconEvent from '~icons/meeting/icon-event.svg';
26
26
  import type { ActivityItemT, MyActivityCalendarPropsT, ParamsItemT } from './types';
27
27
  import { useScreen } from '@opendesign-plus/composables';
28
28
  import { formatDate, getDateNumber } from '../meeting/utils';
29
- import { getStatusMap, getActicityTypeMap } from './config';
29
+ import { useActivityConfig } from './composables/useActivityConfig';
30
30
  import { PageParamsT } from '../meeting/types';
31
31
  import OMeetingDetail from '@/components/meeting/components/OMeetingDetail.vue';
32
32
  import { useI18n, Locales } from '@/i18n';
33
33
 
34
34
  const { t, locale } = useI18n();
35
35
  const isZh = computed(() => locale.value === Locales.ZH);
36
- const statusMap = getStatusMap();
37
- const acticityTypeMap = getActicityTypeMap();
36
+ const { statusMap, activityTypeMap } = useActivityConfig();
38
37
 
39
38
  const formatMonthYear = (date: string | Date) => {
40
39
  const d = dayjs(date || new Date());
@@ -313,7 +312,7 @@ const confirm = () => {
313
312
  return;
314
313
  }
315
314
  dialogLoading.value = true;
316
- props.revokeActivityRequest(currentRow.value?.id)
315
+ props.revokeActivityRequest(currentRow.value?.id)
317
316
  .then(() => {
318
317
  message.success({
319
318
  content: t('meeting.revokeActivitySuccess', [currentRow.value.title]),
@@ -325,7 +324,7 @@ props.revokeActivityRequest(currentRow.value?.id)
325
324
  message.danger({
326
325
  content: t('meeting.revokeActivityFail', [currentRow.value.title]),
327
326
  });
328
- })
327
+ })
329
328
  .finally(() => {
330
329
  revokeVisible.value = false;
331
330
  dialogLoading.value = false;
@@ -373,7 +372,7 @@ const handleSubmitReviewItem = (val: ActivityItemT) => {
373
372
  approver,
374
373
  is_publish: 'true',
375
374
  } as ParamsItemT;
376
- props.editActivityRequest(val.id, params)
375
+ props.editActivityRequest(val.id, params)
377
376
  .then(() => {
378
377
  message.success({
379
378
  content: t('meeting.submitReviewSuccess', [val.title]),
@@ -387,7 +386,7 @@ props.editActivityRequest(val.id, params)
387
386
  });
388
387
  });
389
388
  };
390
- // 删除活动
389
+ // 删除活动
391
390
  const deleteVisible = ref(false);
392
391
  const handleDeleteItem = (val: ActivityItemT) => {
393
392
  currentRow.value = val;
@@ -398,7 +397,7 @@ const confirmDelete = () => {
398
397
  return;
399
398
  }
400
399
  dialogLoading.value = true;
401
- props.deleteActivityRequest(currentRow.value?.id)
400
+ props.deleteActivityRequest(currentRow.value?.id)
402
401
  .then(() => {
403
402
  message.success({
404
403
  content: t('meeting.deleteActivitySuccess', [currentRow.value.title]),
@@ -415,7 +414,7 @@ props.deleteActivityRequest(currentRow.value?.id)
415
414
  deleteVisible.value = false;
416
415
  dialogLoading.value = false;
417
416
  });
418
- };
417
+ };
419
418
  const cancelDelete = () => {
420
419
  deleteVisible.value = false;
421
420
  };
@@ -628,7 +627,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
628
627
  <div class="act-info">
629
628
  <span class="date-range">{{ row.dateRange }}</span>
630
629
  <ODivider direction="v"></ODivider>
631
- <span>{{ acticityTypeMap.get(row.activity_type)?.label }}</span>
630
+ <span>{{ activityTypeMap.get(row.activity_type)?.label }}</span>
632
631
  </div>
633
632
  </div>
634
633
  </div>
@@ -720,7 +719,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
720
719
  </div>
721
720
  </div>
722
721
  </div>
723
- <!-- 撤销审核弹窗 -->
722
+ <!-- 撤销审核弹窗 -->
724
723
  <ODialog v-model:visible="revokeVisible" main-class="handle-dialog-active" :actions="revokeActions">
725
724
  <template #header>{{ t('meeting.withdrawReview') }}</template>
726
725
  <div class="dialog-content">{{ t('meeting.confirmRevokeActivity', [currentRow.title]) }}</div>
@@ -730,7 +729,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
730
729
  <template #header>{{ t('meeting.deleteActivity') }}</template>
731
730
  <div class="dialog-content">{{ t('meeting.confirmDeleteActivity', [currentRow.title]) }}</div>
732
731
  </ODialog>
733
- </template>
732
+ </template>
734
733
 
735
734
  <style lang="scss">
736
735
 
@@ -0,0 +1,141 @@
1
+ import { computed } from 'vue';
2
+ import { useI18n } from '@/i18n';
3
+
4
+ export const useActivityConfig = () => {
5
+ const { t } = useI18n();
6
+
7
+ const activityTypeMap = computed(() => new Map([
8
+ [
9
+ 1,
10
+ {
11
+ label: t('meeting.offline'),
12
+ value: 1,
13
+ },
14
+ ],
15
+ [
16
+ 2,
17
+ {
18
+ label: t('meeting.online'),
19
+ value: 2,
20
+ },
21
+ ],
22
+ [
23
+ 3,
24
+ {
25
+ label: t('meeting.onlineOffline'),
26
+ value: 3,
27
+ },
28
+ ],
29
+ ]));
30
+
31
+ const statusMap = computed(() => new Map([
32
+ [
33
+ 1,
34
+ {
35
+ id: 'draft',
36
+ label: t('meeting.statusDraft'),
37
+ text: t('meeting.statusDraft'),
38
+ value: 1,
39
+ },
40
+ ],
41
+ [
42
+ 2,
43
+ {
44
+ id: 'under-review',
45
+ label: t('meeting.statusUnderReview'),
46
+ text: t('meeting.statusPending'),
47
+ value: 2,
48
+ },
49
+ ],
50
+ [
51
+ 3,
52
+ {
53
+ id: 'registration',
54
+ label: t('meeting.statusRegistering'),
55
+ text: t('meeting.statusApproved'),
56
+ value: 3,
57
+ },
58
+ ],
59
+ [
60
+ 4,
61
+ {
62
+ id: 'in-progress',
63
+ label: t('meeting.statusInProgress'),
64
+ text: t('meeting.statusApproved'),
65
+ value: 4,
66
+ },
67
+ ],
68
+ [
69
+ 5,
70
+ {
71
+ id: 'ended',
72
+ label: t('meeting.statusEnded'),
73
+ text: t('meeting.statusEnded'),
74
+ value: 5,
75
+ },
76
+ ],
77
+ [
78
+ 6,
79
+ {
80
+ id: 'modified',
81
+ label: t('meeting.statusModified'),
82
+ text: t('meeting.statusModified'),
83
+ value: 6,
84
+ },
85
+ ],
86
+ [
87
+ 7,
88
+ {
89
+ id: 'reject',
90
+ label: t('meeting.statusRejected'),
91
+ text: t('meeting.statusRejected'),
92
+ value: 7,
93
+ },
94
+ ],
95
+ ]));
96
+
97
+ const approvalStatusMap = computed(() => new Map([
98
+ [
99
+ 'all',
100
+ {
101
+ label: t('common.all'),
102
+ value: 'all',
103
+ },
104
+ ],
105
+ [
106
+ 'rejected',
107
+ {
108
+ label: t('meeting.statusRejected'),
109
+ value: 'rejected',
110
+ },
111
+ ],
112
+ [
113
+ 'approved',
114
+ {
115
+ label: t('meeting.statusApproved'),
116
+ value: 'approved',
117
+ },
118
+ ],
119
+ [
120
+ 'publish',
121
+ {
122
+ label: t('meeting.statusPending'),
123
+ value: 'publish',
124
+ },
125
+ ],
126
+ [
127
+ 'cancel',
128
+ {
129
+ label: t('meeting.statusCanceled'),
130
+ value: 'cancel',
131
+ },
132
+ ],
133
+ ]));
134
+
135
+ return {
136
+ t,
137
+ activityTypeMap,
138
+ statusMap,
139
+ approvalStatusMap,
140
+ };
141
+ };
@@ -1,141 +1 @@
1
- import { useI18n } from '@/i18n';
2
-
3
- export const getActicityTypeMap = () => {
4
- const { t } = useI18n();
5
- return new Map([
6
- [
7
- 1,
8
- {
9
- label: t('meeting.offline'),
10
- value: 1,
11
- },
12
- ],
13
- [
14
- 2,
15
- {
16
- label: t('meeting.online'),
17
- value: 2,
18
- },
19
- ],
20
- [
21
- 3,
22
- {
23
- label: t('meeting.onlineOffline'),
24
- value: 3,
25
- },
26
- ],
27
- ]);
28
- };
29
-
30
- export const WEBSITE_REGEXP = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w ./?%&=-]*)?$/;
31
-
32
-
33
- export const getStatusMap = () => {
34
- const { t } = useI18n();
35
- return new Map([
36
- [
37
- 1,
38
- {
39
- id: 'draft',
40
- label: t('meeting.statusDraft'),
41
- text: t('meeting.statusDraft'),
42
- value: 1,
43
- },
44
- ],
45
- [
46
- 2,
47
- {
48
- id: 'under-review',
49
- label: t('meeting.statusUnderReview'),
50
- text: t('meeting.statusPending'),
51
- value: 2,
52
- },
53
- ],
54
- [
55
- 3,
56
- {
57
- id: 'registration',
58
- label: t('meeting.statusRegistering'),
59
- text: t('meeting.statusApproved'),
60
- value: 3,
61
- },
62
- ],
63
- [
64
- 4,
65
- {
66
- id: 'in-progress',
67
- label: t('meeting.statusInProgress'),
68
- text: t('meeting.statusApproved'),
69
- value: 4,
70
- },
71
- ],
72
- [
73
- 5,
74
- {
75
- id: 'ended',
76
- label: t('meeting.statusEnded'),
77
- text: t('meeting.statusEnded'),
78
- value: 5,
79
- },
80
- ],
81
- [
82
- 6,
83
- {
84
- id: 'modified',
85
- label: t('meeting.statusModified'),
86
- text: t('meeting.statusModified'),
87
- value: 6,
88
- },
89
- ],
90
- [
91
- 7,
92
- {
93
- id: 'reject',
94
- label: t('meeting.statusRejected'),
95
- text: t('meeting.statusRejected'),
96
- value: 7,
97
- },
98
- ],
99
- ]);
100
- };
101
-
102
- export const getApprovalStatusMap = () => {
103
- const { t } = useI18n();
104
- return new Map([
105
- [
106
- 'all',
107
- {
108
- label: t('common.all'),
109
- value: 'all',
110
- },
111
- ],
112
- [
113
- 'rejected',
114
- {
115
- label: t('meeting.statusRejected'),
116
- value: 'rejected',
117
- },
118
- ],
119
- [
120
- 'approved',
121
- {
122
- label: t('meeting.statusApproved'),
123
- value: 'approved',
124
- },
125
- ],
126
- [
127
- 'publish',
128
- {
129
- label: t('meeting.statusPending'),
130
- value: 'publish',
131
- },
132
- ],
133
- [
134
- 'cancel',
135
- {
136
- label: t('meeting.statusCanceled'),
137
- value: 'cancel',
138
- },
139
- ],
140
- ]);
141
- };
1
+ export const WEBSITE_REGEXP = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w ./?%&=-]*)?$/;
@@ -17,10 +17,10 @@ import OMeetingCalendarList from './components/OMeetingCalendarList.vue';
17
17
  import IconEvent from '~icons/meeting/icon-event.svg';
18
18
  import IconSummit from '~icons/meeting/icon-summit.svg';
19
19
  import IconMeeting from '~icons/meeting/icon-meet.svg';
20
- import { Locales, useI18n } from '@/i18n';
21
- import { MEETING_TABS } from './config';
20
+ import { Locales } from '@/i18n';
21
+ import { useMeetingConfig } from './composables/useMeetingConfig';
22
22
  import { CalendarDataType, GroupItemT, MeetingCalendarPropsT, MeetingGroupType } from './types.ts';
23
- import { formatDate, getConfig } from './utils.ts';
23
+ import { formatDate } from './utils.ts';
24
24
  import { useDebounceFn } from '@vueuse/core';
25
25
 
26
26
  const props = withDefaults(defineProps<MeetingCalendarPropsT>(), {
@@ -31,11 +31,10 @@ const props = withDefaults(defineProps<MeetingCalendarPropsT>(), {
31
31
  groupType: MeetingGroupType.SIG,
32
32
  });
33
33
 
34
- const { t, locale } = useI18n();
34
+ const { t, locale, meetingTabs, getConfig } = useMeetingConfig();
35
35
  const isEn = computed(() => locale.value === Locales.EN);
36
36
 
37
- // -------------------- 获取存在会议的日期列表 --------------------
38
- const latestDay = ref<string>(''); // 截止当天最新的活动日期
37
+ const latestDay = ref<string>('');
39
38
  const dateList = ref([]);
40
39
  const summitData = ref([]);
41
40
  const summitDates = ref([]);
@@ -43,11 +42,10 @@ const eventsData = ref([]);
43
42
  const eventsDates = ref([]);
44
43
  const allDates = ref<string[]>([]);
45
44
  const meetingData = ref([]);
46
- // 日历展示时间限制
47
45
  const limitTime = '2021-01-01';
48
- const tabType = ref(MEETING_TABS[0].value);
46
+ const tabType = ref(CalendarDataType.ALL);
49
47
  const tabs = computed(() => {
50
- let list = MEETING_TABS;
48
+ let list = meetingTabs.value;
51
49
  if (props.hiddenEvents) {
52
50
  list = list.filter((item) => item.value !== CalendarDataType.EVENTS);
53
51
  }
@@ -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, getPlatformLabel } from './utils';
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 { useI18n } from '@/i18n';
28
+ import { useMeetingConfig } from './composables/useMeetingConfig';
36
29
 
37
- const { t, locale } = useI18n();
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 = ref(CYCLE_TYPE_OPTIONS0);
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 }}</ORadio>
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, WEEKDAY } from './config.ts';
26
+ import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from './config.ts';
27
27
  import { formatDate, getDateNumber } from './utils.ts';
28
- import { getPointStr } from './utils.ts';
28
+ import { useMeetingConfig } from './composables/useMeetingConfig';
29
29
  import { useDebounceFn } from '@vueuse/core';
30
30
  import { useScreen } from '@opendesign-plus/composables';
31
- import { Locales, useI18n } from '@/i18n';
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 } = useI18n();
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(
@@ -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 { MEETING_TABS } from './config.ts';
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 } = useI18n();
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 MEETING_TABS.slice(0, -1)" :key="item.value" :value="item.value">
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" />
@@ -11,13 +11,12 @@ import IconEvent from '~icons/meeting/icon-event.svg';
11
11
  import IconSummit from '~icons/meeting/icon-summit.svg';
12
12
  import IconMeeting from '~icons/meeting/icon-meet.svg';
13
13
  import IconChevronRight from '~icons/components/icon-chevron-right.svg';
14
- import { CYCLE_TYPE_OPTIONS, INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from '../config.ts';
14
+ import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from '../config.ts';
15
+ import { formatDate } from '../utils.ts';
16
+ import { useMeetingConfig } from '../composables/useMeetingConfig';
17
+ import { useActivityConfig } from '@/components/activity/composables/useActivityConfig';
15
18
 
16
- import { formatDate, getConfig, getPointStr } from '../utils.ts';
17
- import { useI18n } from '@/i18n';
18
- import { getActicityTypeMap } from '@/components/activity/config.ts';
19
-
20
- const acticityTypeMap = getActicityTypeMap();
19
+ const { activityTypeMap } = useActivityConfig();
21
20
 
22
21
  const props = withDefaults(defineProps<{
23
22
  list: MeetingItemT[];
@@ -25,7 +24,7 @@ const props = withDefaults(defineProps<{
25
24
  }>(), {
26
25
  list: () => [],
27
26
  });
28
- const { t, locale } = useI18n();
27
+ const { t, locale, getConfig, getPointStr } = useMeetingConfig();
29
28
  const detailRefs = ref([]);
30
29
  const message = useMessage();
31
30
  const copyInfo = async (idx) => {
@@ -88,7 +87,7 @@ const computedList = computed(() => {
88
87
  const type = v.type;
89
88
  let dateRange = '';
90
89
  if (['activity'].includes(type)) {
91
- let activity_type = acticityTypeMap.get(v.activity_type)?.label;
90
+ let activity_type = activityTypeMap.value.get(v.activity_type)?.label;
92
91
  if (v.end_date === v.start_date) {
93
92
  return {
94
93
  ...v,