@opendesign-plus-test/components 0.0.1-rc.33 → 0.0.1-rc.35

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 +339 -150
  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 +40 -40
  10. package/dist/components.css +1 -1
  11. package/dist/components.es.js +11386 -11389
  12. package/package.json +3 -3
  13. package/src/components/activity/OActivityApproval.vue +47 -38
  14. package/src/components/activity/OActivityForm.vue +51 -50
  15. package/src/components/activity/OMyActivityCalendar.vue +46 -36
  16. package/src/components/activity/composables/useActivityConfig.ts +141 -0
  17. package/src/components/activity/config.ts +1 -130
  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 -6
  23. package/src/components/meeting/components/OMeetingDetail.vue +33 -28
  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 +97 -0
  30. package/src/i18n/zh.ts +92 -0
@@ -26,9 +26,19 @@ 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 { statusMap, acticityTypeMap } 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
+ import { useI18n, Locales } from '@/i18n';
33
+
34
+ const { t, locale } = useI18n();
35
+ const isZh = computed(() => locale.value === Locales.ZH);
36
+ const { statusMap, activityTypeMap } = useActivityConfig();
37
+
38
+ const formatMonthYear = (date: string | Date) => {
39
+ const d = dayjs(date || new Date());
40
+ return isZh.value ? d.format('YYYY MM月') : d.format('MMMM YYYY');
41
+ };
32
42
 
33
43
  const message = useMessage(null);
34
44
  const { isPhone } = useScreen();
@@ -302,19 +312,19 @@ const confirm = () => {
302
312
  return;
303
313
  }
304
314
  dialogLoading.value = true;
305
- props.revokeActivityRequest(currentRow.value?.id)
315
+ props.revokeActivityRequest(currentRow.value?.id)
306
316
  .then(() => {
307
317
  message.success({
308
- content: `“${ currentRow.value.title }”活动撤销审核成功`,
318
+ content: t('meeting.revokeActivitySuccess', [currentRow.value.title]),
309
319
  });
310
320
  reloadAll.value = true;
311
321
  getList();
312
322
  })
313
323
  .catch(() => {
314
324
  message.danger({
315
- content: `“${ currentRow.value.title }”活动撤销审核失败`,
325
+ content: t('meeting.revokeActivityFail', [currentRow.value.title]),
316
326
  });
317
- })
327
+ })
318
328
  .finally(() => {
319
329
  revokeVisible.value = false;
320
330
  dialogLoading.value = false;
@@ -362,21 +372,21 @@ const handleSubmitReviewItem = (val: ActivityItemT) => {
362
372
  approver,
363
373
  is_publish: 'true',
364
374
  } as ParamsItemT;
365
- props.editActivityRequest(val.id, params)
375
+ props.editActivityRequest(val.id, params)
366
376
  .then(() => {
367
377
  message.success({
368
- content: `“${ val.title }”活动提交审核成功`,
378
+ content: t('meeting.submitReviewSuccess', [val.title]),
369
379
  });
370
380
  reloadAll.value = true;
371
381
  getList();
372
382
  })
373
383
  .catch(() => {
374
384
  message.danger({
375
- content: `“${ val.title }”活动提交审核失败`,
385
+ content: t('meeting.submitReviewFail', [val.title]),
376
386
  });
377
387
  });
378
388
  };
379
- // 删除活动
389
+ // 删除活动
380
390
  const deleteVisible = ref(false);
381
391
  const handleDeleteItem = (val: ActivityItemT) => {
382
392
  currentRow.value = val;
@@ -387,24 +397,24 @@ const confirmDelete = () => {
387
397
  return;
388
398
  }
389
399
  dialogLoading.value = true;
390
- props.deleteActivityRequest(currentRow.value?.id)
400
+ props.deleteActivityRequest(currentRow.value?.id)
391
401
  .then(() => {
392
402
  message.success({
393
- content: `“${ currentRow.value.title }”活动删除成功`,
403
+ content: t('meeting.deleteActivitySuccess', [currentRow.value.title]),
394
404
  });
395
405
  reloadAll.value = true;
396
406
  getList();
397
407
  })
398
408
  .catch(() => {
399
409
  message.danger({
400
- content: `“${ currentRow.value.title }”活动删除失败`,
410
+ content: t('meeting.deleteActivityFail', [currentRow.value.title]),
401
411
  });
402
412
  })
403
413
  .finally(() => {
404
414
  deleteVisible.value = false;
405
415
  dialogLoading.value = false;
406
416
  });
407
- };
417
+ };
408
418
  const cancelDelete = () => {
409
419
  deleteVisible.value = false;
410
420
  };
@@ -459,7 +469,7 @@ const revokeActions = computed<DialogActionT[]>(() => {
459
469
  variant: 'outline',
460
470
  round: 'pill',
461
471
  size: 'large',
462
- label: '确定',
472
+ label: t('meeting.confirmBtn'),
463
473
  onClick: () => {
464
474
  confirm();
465
475
  },
@@ -469,7 +479,7 @@ const revokeActions = computed<DialogActionT[]>(() => {
469
479
  variant: 'solid',
470
480
  round: 'pill',
471
481
  size: 'large',
472
- label: '取消',
482
+ label: t('meeting.cancelBtn'),
473
483
  onClick: () => {
474
484
  cancel();
475
485
  },
@@ -483,7 +493,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
483
493
  variant: 'outline',
484
494
  round: 'pill',
485
495
  size: 'large',
486
- label: '确定',
496
+ label: t('meeting.confirmBtn'),
487
497
  onClick: () => {
488
498
  confirmDelete();
489
499
  },
@@ -493,7 +503,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
493
503
  variant: 'solid',
494
504
  round: 'pill',
495
505
  size: 'large',
496
- label: '取消',
506
+ label: t('meeting.cancelBtn'),
497
507
  onClick: () => {
498
508
  cancelDelete();
499
509
  },
@@ -505,7 +515,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
505
515
  <div class="o-my-activity-calendar">
506
516
  <div class="activity-list">
507
517
  <div v-if="isPhone" class="list-calendar-mb">
508
- <span>{{ (selectedDate ? dayjs(new Date(selectedDate)) : dayjs()).format('YYYY MM月') }}</span>
518
+ <span>{{ formatMonthYear(selectedDate) }}</span>
509
519
  <span>
510
520
  <OIcon @click="changeMonth('prev-month')"><OIconChevronLeft /></OIcon>
511
521
  <OIcon @click="changeMonth('next-month')"><OIconChevronRight /></OIcon>
@@ -514,7 +524,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
514
524
  <div class="left-calendar">
515
525
  <ElCalendar ref="calendarRef" v-model="selectedDate">
516
526
  <template #header>
517
- <span>{{ (selectedDate ? dayjs(new Date(selectedDate)) : dayjs()).format('YYYY MM月') }}</span>
527
+ <span>{{ formatMonthYear(selectedDate) }}</span>
518
528
  <div>
519
529
  <OIcon @click="changeMonth('prev-month')">
520
530
  <OIconChevronLeft />
@@ -558,7 +568,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
558
568
  <OIcon>
559
569
  <OIconArrowLeft />
560
570
  </OIcon>
561
- <span>上个月</span>
571
+ <span>{{ t('meeting.preMonth') }}</span>
562
572
  </div>
563
573
  <div class="act-item" :class="idx === activityList.length - 1 && 'last-item'">
564
574
  <div
@@ -610,21 +620,21 @@ const deleteActions = computed<DialogActionT[]>(() => {
610
620
  variant="outline"
611
621
  :class="[`tag-${row.is_delete ? 'delete' : statusMap.get(row.status)?.id}`]">
612
622
  {{
613
- row.is_delete === 1 ? '已取消' : statusMap.get(row.status)?.text
623
+ row.is_delete === 1 ? t('meeting.statusCanceled') : statusMap.get(row.status)?.text
614
624
  }}
615
625
  </OTag>
616
626
  </div>
617
627
  <div class="act-info">
618
628
  <span class="date-range">{{ row.dateRange }}</span>
619
629
  <ODivider direction="v"></ODivider>
620
- <span>{{ acticityTypeMap.get(row.activity_type)?.label }}</span>
630
+ <span>{{ activityTypeMap.get(row.activity_type)?.label }}</span>
621
631
  </div>
622
632
  </div>
623
633
  </div>
624
634
  <div class="item-header-right"
625
635
  v-if="row.content_url && !row.is_delete && [3,4,5,6].includes(row.status)">
626
636
  <OLink v-if="row.content_url" :href="row.content_url" target="_blank" rel="noopener noreferrer">
627
- 活动详情
637
+ {{ t('meeting.activityDetail') }}
628
638
  <template #suffix>
629
639
  <OIcon>
630
640
  <OIconChevronRight></OIconChevronRight>
@@ -642,7 +652,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
642
652
  target="_blank"
643
653
  rel="noopener noreferrer"
644
654
  >
645
- 我要报名
655
+ {{ t('meeting.registerNow') }}
646
656
  <template #suffix>
647
657
  <OIcon>
648
658
  <OIconChevronRight></OIconChevronRight>
@@ -666,25 +676,25 @@ const deleteActions = computed<DialogActionT[]>(() => {
666
676
  variant="text"
667
677
  @click="handleRevokeItem(row)"
668
678
  >
669
- 撤销审核
679
+ {{ t('meeting.withdrawReview') }}
670
680
  </OButton>
671
681
  <OButton
672
682
  v-if="row.status === 1 || row.status === 3 || row.status === 4 || row.status === 7"
673
683
  variant="text" @click="handleEditItem(row)"
674
684
  >
675
- 修改活动
685
+ {{ t('meeting.modifyActivity') }}
676
686
  </OButton>
677
687
  <OButton
678
688
  v-if="row.status === 1 || row.status === 7" variant="text"
679
689
  @click="handleDeleteItem(row)"
680
690
  >
681
- 删除活动
691
+ {{ t('meeting.deleteActivity') }}
682
692
  </OButton>
683
693
  <OButton
684
694
  v-if="row.status === 1 || row.status === 7" variant="text"
685
695
  @click="handleSubmitReviewItem(row)"
686
696
  >
687
- 提交审核
697
+ {{ t('meeting.submitReview') }}
688
698
  </OButton>
689
699
  </div>
690
700
  </div>
@@ -692,12 +702,12 @@ const deleteActions = computed<DialogActionT[]>(() => {
692
702
  <div class="height-placeholder"></div>
693
703
  </div>
694
704
  <template v-if="idx === activityList.length - 1">
695
- <div class="load-text" v-if="bottomReached">加载中···</div>
705
+ <div class="load-text" v-if="bottomReached">{{ t('meeting.loading') }}</div>
696
706
  <div class="list-month-change next-month" @click="changeMonth('next-month')">
697
707
  <OIcon>
698
708
  <OIconArrowRight />
699
709
  </OIcon>
700
- <span>下个月</span>
710
+ <span>{{ t('meeting.nextMonth') }}</span>
701
711
  </div>
702
712
  </template>
703
713
  </template>
@@ -709,17 +719,17 @@ const deleteActions = computed<DialogActionT[]>(() => {
709
719
  </div>
710
720
  </div>
711
721
  </div>
712
- <!-- 撤销审核弹窗 -->
722
+ <!-- 撤销审核弹窗 -->
713
723
  <ODialog v-model:visible="revokeVisible" main-class="handle-dialog-active" :actions="revokeActions">
714
- <template #header>撤销审核</template>
715
- <div class="dialog-content">是否确认要撤销“{{ currentRow.title }}”活动?撤销审核后活动将变成草稿状态。</div>
724
+ <template #header>{{ t('meeting.withdrawReview') }}</template>
725
+ <div class="dialog-content">{{ t('meeting.confirmRevokeActivity', [currentRow.title]) }}</div>
716
726
  </ODialog>
717
727
  <!-- 删除活动弹窗 -->
718
728
  <ODialog v-model:visible="deleteVisible" main-class="handle-dialog-active" :actions="deleteActions">
719
- <template #header>删除活动</template>
720
- <div class="dialog-content">是否确认删除“{{ currentRow.title }}”活动?删除后记录将不再我的个人中心呈现。</div>
729
+ <template #header>{{ t('meeting.deleteActivity') }}</template>
730
+ <div class="dialog-content">{{ t('meeting.confirmDeleteActivity', [currentRow.title]) }}</div>
721
731
  </ODialog>
722
- </template>
732
+ </template>
723
733
 
724
734
  <style lang="scss">
725
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,130 +1 @@
1
- export const acticityTypeMap = new Map([
2
- [
3
- 1,
4
- {
5
- label: '线下',
6
- value: 1,
7
- },
8
- ],
9
- [
10
- 2,
11
- {
12
- label: '线上',
13
- value: 2,
14
- },
15
- ],
16
- [
17
- 3,
18
- {
19
- label: '线上与线下',
20
- value: 3,
21
- },
22
- ],
23
- ]);
24
-
25
- export const WEBSITE_REGEXP = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w ./?%&=-]*)?$/;
26
-
27
-
28
- export const statusMap = new Map([
29
- [
30
- 1,
31
- {
32
- id: 'draft',
33
- label: '草稿',
34
- text: '草稿',
35
- value: 1,
36
- },
37
- ],
38
- [
39
- 2,
40
- {
41
- id: 'under-review',
42
- label: '审核中',
43
- text: '未审核',
44
- value: 2,
45
- },
46
- ],
47
- [
48
- 3,
49
- {
50
- id: 'registration',
51
- label: '报名中',
52
- text: '审核通过',
53
- value: 3,
54
- },
55
- ],
56
- [
57
- 4,
58
- {
59
- id: 'in-progress',
60
- label: '进行中',
61
- text: '审核通过',
62
- value: 4,
63
- },
64
- ],
65
- [
66
- 5,
67
- {
68
- id: 'ended',
69
- label: '已结束',
70
- text: '已结束',
71
- value: 5,
72
- },
73
- ],
74
- [
75
- 6,
76
- {
77
- id: 'modified',
78
- label: '已修改',
79
- text: '已修改',
80
- value: 6,
81
- },
82
- ],
83
- [
84
- 7,
85
- {
86
- id: 'reject',
87
- label: '已驳回',
88
- text: '已驳回',
89
- value: 7,
90
- },
91
- ],
92
- ]);
93
-
94
- export const approvalStatusMap = new Map([
95
- [
96
- 'all',
97
- {
98
- label: '全部',
99
- value: 'all',
100
- },
101
- ],
102
- [
103
- 'rejected',
104
- {
105
- label: '已驳回',
106
- value: 'rejected',
107
- },
108
- ],
109
- [
110
- 'approved',
111
- {
112
- label: '已通过',
113
- value: 'approved',
114
- },
115
- ],
116
- [
117
- 'publish',
118
- {
119
- label: '未审核',
120
- value: 'publish',
121
- },
122
- ],
123
- [
124
- 'cancel',
125
- {
126
- label: '已取消',
127
- value: 'cancel',
128
- },
129
- ],
130
- ]);
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(