@opendesign-plus-test/components 0.0.1-rc.42 → 0.0.1-rc.45

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 (109) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +132 -112
  3. package/dist/components/OHeaderSearch.vue.d.ts +824 -506
  4. package/dist/components/OSourceCode.vue.d.ts +4 -6
  5. package/dist/components/activity/OActivityApproval.vue.d.ts +6 -10
  6. package/dist/components/activity/OActivityForm.vue.d.ts +3 -5
  7. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +100 -46
  8. package/dist/components/activity/index.d.ts +56 -33
  9. package/dist/components/activity/types.d.ts +8 -1
  10. package/dist/components/events/config.d.ts +5 -18
  11. package/dist/components/events/types.d.ts +4 -1
  12. package/dist/components/header/OHeaderMobile.vue.d.ts +18 -11
  13. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +4 -1
  14. package/dist/components/header/index.d.ts +12 -5
  15. package/dist/components/header/types.d.ts +4 -0
  16. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +8 -12
  17. package/dist/components/meeting/OMeetingForm.vue.d.ts +3 -5
  18. package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
  19. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +100 -46
  20. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +1 -1
  21. package/dist/components/meeting/index.d.ts +817 -0
  22. package/dist/components/meeting/types.d.ts +82 -17
  23. package/dist/components/meeting/utils.d.ts +1 -1
  24. package/dist/components/search/OSearchInput.vue.d.ts +1003 -0
  25. package/dist/components/search/composables/useImageSearch.d.ts +48 -0
  26. package/dist/components/search/composables/useKeywordHighlight.d.ts +2 -0
  27. package/dist/components/search/composables/useSearchHistory.d.ts +14 -0
  28. package/dist/components/search/index.d.ts +590 -0
  29. package/dist/components/search/internal/HighlightText.vue.d.ts +9 -0
  30. package/dist/components/search/internal/SearchImageInput.vue.d.ts +716 -0
  31. package/dist/components/search/internal/SearchPanel.vue.d.ts +100 -0
  32. package/dist/components/search/types.d.ts +20 -0
  33. package/dist/components.cjs.js +43 -43
  34. package/dist/components.css +1 -1
  35. package/dist/components.es.js +11681 -10636
  36. package/dist/index.d.ts +1 -0
  37. package/package.json +3 -3
  38. package/src/assets/svg-icons/icon-delete-hover.svg +4 -0
  39. package/src/assets/svg-icons/icon-delete.svg +5 -1
  40. package/src/assets/svg-icons/icon-image-close.svg +4 -0
  41. package/src/assets/svg-icons/icon-image-upload.svg +3 -0
  42. package/src/assets/svg-icons/icon-image-zoomin.svg +3 -0
  43. package/src/assets/svg-icons/icon-refresh.svg +3 -0
  44. package/src/components/OBanner.vue +18 -18
  45. package/src/components/OCookieNotice.vue +21 -21
  46. package/src/components/OFooter.vue +18 -17
  47. package/src/components/OHeaderSearch.vue +402 -420
  48. package/src/components/OHeaderUser.vue +3 -2
  49. package/src/components/OSection.vue +4 -4
  50. package/src/components/OSourceCode.vue +8 -10
  51. package/src/components/activity/OActivityApproval.vue +32 -32
  52. package/src/components/activity/OActivityForm.vue +5 -5
  53. package/src/components/activity/OMyActivityCalendar.vue +66 -50
  54. package/src/components/activity/config.ts +1 -1
  55. package/src/components/activity/types.ts +8 -1
  56. package/src/components/common/ContentWrapper.vue +3 -3
  57. package/src/components/common/MoreText.vue +1 -1
  58. package/src/components/common/ThFilter.vue +7 -7
  59. package/src/components/element-plus/OElCookieNotice.vue +27 -27
  60. package/src/components/events/OEventsApply.vue +44 -44
  61. package/src/components/events/OEventsCalendar.vue +14 -14
  62. package/src/components/events/OEventsList.vue +53 -26
  63. package/src/components/events/config.ts +1 -1
  64. package/src/components/events/types.ts +4 -1
  65. package/src/components/header/OHeader.vue +2 -2
  66. package/src/components/header/OHeaderMobile.vue +8 -1
  67. package/src/components/header/components/HeaderContent.vue +67 -63
  68. package/src/components/header/components/HeaderNav.vue +4 -4
  69. package/src/components/header/components/HeaderNavMobile.vue +8 -5
  70. package/src/components/header/types.ts +4 -0
  71. package/src/components/meeting/OMeetingCalendar.vue +66 -54
  72. package/src/components/meeting/OMeetingForm.vue +70 -51
  73. package/src/components/meeting/OMeetingPlayback.vue +8 -8
  74. package/src/components/meeting/OMyMeetingCalendar.vue +56 -45
  75. package/src/components/meeting/OSigMeetingCalendar.vue +31 -28
  76. package/src/components/meeting/components/OMeetingCalendarList.vue +31 -26
  77. package/src/components/meeting/components/OMeetingCalendarSelector.vue +10 -6
  78. package/src/components/meeting/components/OMeetingDetail.vue +32 -18
  79. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +1 -1
  80. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +12 -12
  81. package/src/components/meeting/components/OSigMeetingAside.vue +8 -9
  82. package/src/components/meeting/types.ts +88 -17
  83. package/src/components/search/OSearchInput.vue +463 -0
  84. package/src/components/search/composables/useImageSearch.ts +157 -0
  85. package/src/components/search/composables/useKeywordHighlight.ts +30 -0
  86. package/src/components/search/composables/useSearchHistory.ts +75 -0
  87. package/src/components/search/index.ts +23 -0
  88. package/src/components/search/internal/HighlightText.vue +37 -0
  89. package/src/components/search/internal/SearchImageInput.vue +488 -0
  90. package/src/components/search/internal/SearchPanel.vue +430 -0
  91. package/src/components/search/types.ts +25 -0
  92. package/src/draft/Banner.vue +6 -6
  93. package/src/draft/ButtonCards.vue +1 -1
  94. package/src/draft/Feature.vue +6 -6
  95. package/src/draft/Footer.vue +29 -22
  96. package/src/draft/HorizontalAnchor.vue +4 -4
  97. package/src/draft/ItemSwiper.vue +2 -2
  98. package/src/draft/Logo.vue +3 -3
  99. package/src/draft/LogoCard.vue +2 -2
  100. package/src/draft/MultiCard.vue +1 -1
  101. package/src/draft/MultiIconCard.vue +1 -1
  102. package/src/draft/OInfoCard.vue +4 -4
  103. package/src/draft/Section.vue +4 -4
  104. package/src/draft/SingleTabCard.vue +1 -1
  105. package/src/draft/SliderCard.vue +4 -3
  106. package/src/i18n/en.ts +10 -0
  107. package/src/i18n/zh.ts +10 -0
  108. package/src/index.ts +1 -0
  109. package/vite.config.ts +4 -3
@@ -37,10 +37,10 @@ const currentPage = ref(1); // 分页-当前页
37
37
  const pageSize = ref(50); // 分页-每页数量
38
38
  const total = ref<number | null>(null); // 分页-总数
39
39
  const list = ref<MeetingItemT[]>([]); // 列表数据
40
- const originList = ref([]); // 原始数据
40
+ const originList = ref<MeetingItemT[]>([]); // 原始数据
41
41
  const canLoadMore = computed(() => total.value === null || originList.value.length < total.value);
42
42
  const reloadAll = ref(false); // 是否需要清空数据
43
- const { t, locale, weekDay, getPointStr, getWeekFromDate } = useMeetingConfig();
43
+ const { t, locale, getPointStr, getWeekFromDate } = useMeetingConfig();
44
44
  const isEn = computed(() => locale.value === Locales.EN);
45
45
 
46
46
  const props = withDefaults(defineProps<{
@@ -54,7 +54,7 @@ const props = withDefaults(defineProps<{
54
54
 
55
55
  const dialogLoading = ref(false); // 弹窗按钮状态
56
56
  const { isPhone } = useScreen();
57
- const expanded = ref([]); // 展开的数据, sub_id 或 id
57
+ const expanded = ref<(string | number)[]>([]); // 展开的数据, sub_id 或 id
58
58
  const emits = defineEmits(['edit']);
59
59
  // -------------------- 自动加载下一页 --------------------
60
60
  const nextLoading = ref(false);
@@ -73,7 +73,7 @@ const getList = async () => {
73
73
  return;
74
74
  }
75
75
  try {
76
- if (total.value > 0 && (currentPage.value - 1) * pageSize.value > total.value) {
76
+ if (total.value !== null && total.value > 0 && (currentPage.value - 1) * pageSize.value > total.value) {
77
77
  return;
78
78
  }
79
79
  // 当月数据已加载完,手动切换下一月
@@ -130,7 +130,7 @@ const getList = async () => {
130
130
  endTime: cycle_end,
131
131
  cycleType,
132
132
  });
133
- const obsData = item.obs_data?.filter((v) => v.text_video_url);
133
+ const obsData = item.obs_data?.filter((v) => v.text_video_url) || [];
134
134
  return cycle_sub
135
135
  .filter((v) => {
136
136
  return (
@@ -155,14 +155,14 @@ const getList = async () => {
155
155
  ...item,
156
156
  dateRange: `${ start } - ${ end }`,
157
157
  timeRange: `${ start } - ${ end }`,
158
- hasObsData: item.obs_data?.filter((v) => v.text_video_url)?.length > 0,
158
+ hasObsData: !!item.obs_data?.filter((v) => v.text_video_url)?.length,
159
159
  time: `${ start }-${ end }`,
160
160
  isExpired: dayjs(`${ date } ${ start }`).isBefore(dayjs()),
161
161
  },
162
162
  ];
163
163
  })
164
164
  .flat()
165
- .filter((v) => v.date.slice(0, 7) === formatDate(selectedDate.value, 'YYYY-MM-DD').slice(0, 7));
165
+ .filter((v: MeetingItemT) => v.date.slice(0, 7) === formatDate(selectedDate.value, 'YYYY-MM-DD').slice(0, 7));
166
166
  // 如果需要清空,则完全替换
167
167
  // 如果页码为1,表示第一次加载
168
168
  // 如果是移动端,则一直往里填充数据
@@ -224,12 +224,12 @@ const handleScroll = useDebounceFn(() => {
224
224
  getList();
225
225
  }
226
226
  }, 200);
227
- const calcIfAllDeleted = (date) => {
227
+ const calcIfAllDeleted = (date: string) => {
228
228
  const meetingsOfDate = list.value.filter((v) => v.date === date);
229
229
  return meetingsOfDate.length && meetingsOfDate.every((v) => v.is_delete);
230
230
  };
231
231
 
232
- const scrollerScroll = (el) => {
232
+ const scrollerScroll = (el: any) => {
233
233
  const container = el.target;
234
234
  if (!container) return;
235
235
  const scrollTop = container.scrollTop; // 已经滚动的距离
@@ -244,13 +244,13 @@ const updateScroller = () => {
244
244
  scrollerContainerEl.addEventListener('scroll', scrollerScroll);
245
245
  };
246
246
 
247
- const detailRefs = ref({}); // 会议详情组件实例
248
- const getDetailRefs = (insRef, id) => {
247
+ const detailRefs = ref<Record<string, any>>({}); // 会议详情组件实例
248
+ const getDetailRefs = (insRef: any, id: number) => {
249
249
  if (insRef && id) {
250
250
  detailRefs.value[id] = insRef;
251
251
  }
252
252
  };
253
- const copyInfo = async (idx) => {
253
+ const copyInfo = async (idx: number) => {
254
254
  const instance = detailRefs.value[idx];
255
255
  await instance.copyInfo();
256
256
  message.success({
@@ -274,6 +274,9 @@ const confirmCancel = async () => {
274
274
  if (!props.deleteMeetingRequest) {
275
275
  return;
276
276
  }
277
+ if (!currentRow.value) {
278
+ return;
279
+ }
277
280
  try {
278
281
  dialogLoading.value = true;
279
282
  await props.deleteMeetingRequest(currentRow.value.id);
@@ -289,7 +292,7 @@ const confirmCancel = async () => {
289
292
  };
290
293
  const handleDialogVisible = ref(false);
291
294
  const handleDialogType = ref('');
292
- const handleDialogRow = ref(null);
295
+ const handleDialogRow = ref<MeetingItemT | null>(null);
293
296
  const handleOptions = [
294
297
  {
295
298
  label: t('meeting.meetingSingle'),
@@ -323,6 +326,9 @@ const cancelHandleItem = () => {
323
326
  };
324
327
  const confirmHandleItem = async () => {
325
328
  const row = handleDialogRow.value;
329
+ if (!row) {
330
+ return;
331
+ }
326
332
  if (handleDialogType.value === 'cancel') {
327
333
  try {
328
334
  dialogLoading.value = true;
@@ -386,7 +392,7 @@ const cellClick = (e: PointerEvent & any, clickable: boolean) => {
386
392
  }
387
393
  };
388
394
 
389
- const changeMonth = (val) => {
395
+ const changeMonth = (val: string) => {
390
396
  if (!calendarRef.value) return;
391
397
  currentPage.value = 1;
392
398
  total.value = null;
@@ -402,8 +408,13 @@ const changeMonth = (val) => {
402
408
  });
403
409
  };
404
410
  // -------------------- 列表 --------------------
411
+ interface GroupListItemT {
412
+ date: string;
413
+ list: MeetingItemT[];
414
+ }
415
+
405
416
  const groupList = computed(() => {
406
- return list.value.reduce((prev, cur) => {
417
+ return list.value.reduce((prev: GroupListItemT[], cur: MeetingItemT) => {
407
418
  if (!prev.length) {
408
419
  return [
409
420
  {
@@ -413,7 +424,7 @@ const groupList = computed(() => {
413
424
  ];
414
425
  } else {
415
426
  const last = prev.at(-1);
416
- if (last.date === cur.date) {
427
+ if (last?.date === cur.date) {
417
428
  last.list.push(cur);
418
429
  } else {
419
430
  prev.push({
@@ -469,12 +480,12 @@ onUnmounted(() => {
469
480
  scrollerContainerEl?.removeEventListener('scroll', scrollerScroll);
470
481
  });
471
482
 
472
- const formatYearMonth = (date) => {
473
- date = dayjs(date ? date : undefined);
483
+ const formatYearMonth = (date: string) => {
484
+ const date2 = dayjs(date ? date : undefined);
474
485
  if (isEn.value) {
475
- return date.format('MMMM YYYY');
486
+ return date2.format('MMMM YYYY');
476
487
  } else {
477
- return date.format('YYYY MM月');
488
+ return date2.format('YYYY MM月');
478
489
  }
479
490
  };
480
491
  const handleActions = computed<DialogActionT[]>(() => {
@@ -776,11 +787,11 @@ const cancelActions = computed<DialogActionT[]>(() => {
776
787
  gap: var(--o-gap-4);
777
788
  height: 100%;
778
789
  --phone-padding-top: 0;
779
- @include respond-to('pad_v') {
790
+ @include respond('pad_v') {
780
791
  flex-direction: column;
781
792
  gap: var(--o-gap-4);
782
793
  }
783
- @include respond-to('phone') {
794
+ @include respond('phone') {
784
795
  flex-direction: column;
785
796
  gap: var(--o-gap-3);
786
797
  --phone-padding-top: calc(var(--o-gap-5) + var(--o-gap-3) + var(--o-gap-3));
@@ -820,7 +831,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
820
831
  }
821
832
  }
822
833
 
823
- @include respond-to('phone') {
834
+ @include respond('phone') {
824
835
  padding-top: var(--o-gap-7);
825
836
  background-color: var(--o-color-fill1);
826
837
  padding-bottom: var(--o-gap-4);
@@ -839,7 +850,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
839
850
  width: 334px;
840
851
  background-color: color-mix(in srgb, var(--o-color-control2-light) 40%, transparent);
841
852
 
842
- @include respond-to('pad_h') {
853
+ @include respond('pad_h') {
843
854
  .el-calendar {
844
855
  .el-calendar__body {
845
856
  padding-left: 12px;
@@ -857,10 +868,10 @@ const cancelActions = computed<DialogActionT[]>(() => {
857
868
  }
858
869
  }
859
870
  }
860
- @include respond-to('pad_v') {
871
+ @include respond('pad_v') {
861
872
  width: 100%;
862
873
  }
863
- @include respond-to('phone') {
874
+ @include respond('phone') {
864
875
  display: none;
865
876
  }
866
877
  .el-calendar {
@@ -995,11 +1006,11 @@ const cancelActions = computed<DialogActionT[]>(() => {
995
1006
  }
996
1007
 
997
1008
  &.expired::after {
998
- background-color: rgb(var(--o-mixedgray-6));
1009
+ background-color: rgb(var(--o-grey-6));
999
1010
  }
1000
1011
 
1001
1012
  &.all-deleted::after {
1002
- background-color: rgb(var(--o-mixedgray-6));
1013
+ background-color: rgb(var(--o-grey-6));
1003
1014
  }
1004
1015
  }
1005
1016
  }
@@ -1017,7 +1028,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1017
1028
  flex-grow: 1;
1018
1029
  background-color: var(--o-color-fill2);
1019
1030
 
1020
- @include respond-to('phone') {
1031
+ @include respond('phone') {
1021
1032
  margin-top: calc(var(--phone-padding-top) - var(--o-gap-4));
1022
1033
  }
1023
1034
  &.is-empty {
@@ -1038,7 +1049,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1038
1049
  height: 100%;
1039
1050
  max-height: calc(var(--layout-left-height, 900px) - 4 * var(--o-gap-5) - var(--header-height) * 1px);
1040
1051
 
1041
- @include respond-to('phone') {
1052
+ @include respond('phone') {
1042
1053
  max-height: fit-content;
1043
1054
  }
1044
1055
 
@@ -1050,7 +1061,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1050
1061
  flex-grow: 1;
1051
1062
  }
1052
1063
 
1053
- @include respond-to('phone') {
1064
+ @include respond('phone') {
1054
1065
  padding-left: var(--o-gap-2);
1055
1066
  }
1056
1067
 
@@ -1079,13 +1090,13 @@ const cancelActions = computed<DialogActionT[]>(() => {
1079
1090
  width: 16px;
1080
1091
  height: 26px;
1081
1092
  position: relative;
1082
- @include respond-to('laptop') {
1093
+ @include respond('laptop') {
1083
1094
  height: 24px;
1084
1095
  }
1085
- @include respond-to('pad_h') {
1096
+ @include respond('pad_h') {
1086
1097
  height: 22px;
1087
1098
  }
1088
- @include respond-to('<=pad_v') {
1099
+ @include respond('<=pad_v') {
1089
1100
  height: 22px;
1090
1101
  }
1091
1102
 
@@ -1134,7 +1145,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1134
1145
  margin-bottom: var(--o-gap-2);
1135
1146
  color: var(--o-color-info1);
1136
1147
  @include text2;
1137
- @include respond-to('phone') {
1148
+ @include respond('phone') {
1138
1149
  padding-left: var(--o-gap-5);
1139
1150
  }
1140
1151
 
@@ -1149,7 +1160,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1149
1160
  .list-body {
1150
1161
  height: 100%;
1151
1162
 
1152
- @include respond-to('phone') {
1163
+ @include respond('phone') {
1153
1164
  height: fit-content;
1154
1165
  padding: var(--o-gap-4) !important;
1155
1166
  }
@@ -1165,7 +1176,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1165
1176
  --btn-color: var(--o-color-primary2);
1166
1177
  }
1167
1178
 
1168
- @include respond-to('phone') {
1179
+ @include respond('phone') {
1169
1180
  display: none;
1170
1181
  }
1171
1182
 
@@ -1224,21 +1235,21 @@ const cancelActions = computed<DialogActionT[]>(() => {
1224
1235
  transition: margin var(--o-easing-standard) var(--o-duration-s);
1225
1236
  --copy-display: none;
1226
1237
  --icon-size: 24px;
1227
- @include respond-to('<=pad_v') {
1238
+ @include respond('<=pad_v') {
1228
1239
  padding: var(--o-gap-3) var(--o-gap-4);
1229
1240
  }
1230
1241
 
1231
1242
  &:hover {
1232
- @include respond-to('>pad_v') {
1243
+ @include respond('>pad_v') {
1233
1244
  --copy-display: inline-flex;
1234
1245
  }
1235
1246
  }
1236
1247
 
1237
- @include respond-to('phone') {
1248
+ @include respond('phone') {
1238
1249
  --icon-size: 20px;
1239
1250
  }
1240
1251
  &.o-collapse-item-expanded {
1241
- @include respond-to('<=pad_v') {
1252
+ @include respond('<=pad_v') {
1242
1253
  --copy-display: inline-flex;
1243
1254
  }
1244
1255
  }
@@ -1261,7 +1272,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1261
1272
  position: relative;
1262
1273
  top: 4px;
1263
1274
  flex-shrink: 0;
1264
- @include respond-to('phone') {
1275
+ @include respond('phone') {
1265
1276
  position: absolute;
1266
1277
  right: 0;
1267
1278
  width: 20px;
@@ -1286,7 +1297,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1286
1297
  gap: var(--o-gap-3);
1287
1298
  width: 100%;
1288
1299
  margin-bottom: var(--o-gap-2);
1289
- @include respond-to('phone') {
1300
+ @include respond('phone') {
1290
1301
  flex-grow: 1;
1291
1302
  width: 100%;
1292
1303
  align-self: stretch;
@@ -1388,7 +1399,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1388
1399
  height: 18px;
1389
1400
  width: 18px;
1390
1401
  display: var(--copy-display);
1391
- @include respond-to('phone') {
1402
+ @include respond('phone') {
1392
1403
  bottom: var(--o-gap-2);
1393
1404
  right: calc(20px + var(--o-gap-2))
1394
1405
  }
@@ -1412,7 +1423,7 @@ const cancelActions = computed<DialogActionT[]>(() => {
1412
1423
  .meeting-detail {
1413
1424
  padding-left: calc(var(--o-gap-3) + var(--icon-size));
1414
1425
 
1415
- @include respond-to('phone') {
1426
+ @include respond('phone') {
1416
1427
  padding-left: 0;
1417
1428
  }
1418
1429
 
@@ -1,10 +1,10 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, onMounted, computed, nextTick, watch } from 'vue';
3
- import { ODivider, OPopover, OIcon, OTabPane, OTab } from '@opensig/opendesign';
3
+ import { ODivider, OPopover, OIcon, OTabPane, OTab, OScroller } from '@opensig/opendesign';
4
4
  import dayjs from 'dayjs';
5
5
  import IconTips from '~icons/components/icon-tips.svg';
6
6
  import OSigMeetingAside from './components/OSigMeetingAside.vue';
7
- import { CalendarDataType, MeetingItemT } from './types.ts';
7
+ import { CalendarDataType, MeetingEventsItemT, MeetingItemT } from './types.ts';
8
8
  import { useScreen } from '@opendesign-plus/composables';
9
9
  import { useMeetingConfig } from './composables/useMeetingConfig';
10
10
  import OMeetingCalendarList from '@/components/meeting/components/OMeetingCalendarList.vue';
@@ -21,22 +21,22 @@ const { lePadV } = useScreen();
21
21
  const selectDate = ref<string>('');
22
22
 
23
23
  const loading = ref(false); // 数据加载状态
24
- const list = ref<MeetingItemT[]>([]); // 某天的会议列表
24
+ const list = ref<(MeetingItemT | MeetingEventsItemT)[]>([]); // 某天的会议列表
25
25
  const calendarRows = computed(() => (lePadV.value ? 100 : 5)); // 日历行数
26
26
 
27
27
  const latestDate = ref<string>('');
28
28
  const meetingDates = ref<string[]>([]);
29
29
  const eventsDates = ref<string[]>([]);
30
- const eventsData = ref([]);
30
+ const eventsData = ref<MeetingEventsItemT[]>([]);
31
31
  const monthIdx = ref(-1);
32
- const clickDateCell2 = (date) => {
32
+ const clickDateCell2 = (date: string) => {
33
33
  clickDateCell(date);
34
34
  };
35
- const changeSelect = (v) => {
35
+ const changeSelect = (v: string) => {
36
36
  clickDateCell(v);
37
37
  };
38
38
  // 获取所选日期的会议列表
39
- const clickDateCell = async (date) => {
39
+ const clickDateCell = async (date: string) => {
40
40
  if (!props.getMeetingListRequest) {
41
41
  return;
42
42
  }
@@ -44,7 +44,7 @@ const clickDateCell = async (date) => {
44
44
  loading.value = true;
45
45
  selectDate.value = dayjs(date).format('YYYY-MM-DD');
46
46
  const res = await props.getMeetingListRequest(selectDate.value, props.sigName);
47
- list.value = res.map((v) => {
47
+ list.value = res.map((v: MeetingItemT) => {
48
48
  return {
49
49
  ...v,
50
50
  time: `${ v.start }-${ v.end }`,
@@ -55,7 +55,7 @@ const clickDateCell = async (date) => {
55
55
  } finally {
56
56
  loading.value = false;
57
57
  eventsData.value.forEach((v) => {
58
- if (v.dates.includes(selectDate.value)) {
58
+ if (v.dates?.includes(selectDate.value)) {
59
59
  list.value.push(v);
60
60
  }
61
61
  });
@@ -69,7 +69,7 @@ const getDates = async () => {
69
69
  }
70
70
  if (props.getEventsListRequest) {
71
71
  eventsData.value = await props.getEventsListRequest();
72
- eventsDates.value = (eventsData.value || []).map(v => v.dates).flat();
72
+ eventsDates.value = (eventsData.value || []).map(v => v.dates || []).flat();
73
73
  }
74
74
  };
75
75
  const tabType = ref(CalendarDataType.ALL);
@@ -81,13 +81,14 @@ watch(
81
81
  () => lePadV.value,
82
82
  () => {
83
83
  if (lePadV.value) {
84
- selectTab(CalendarDataType.ALL);
84
+ tabType.value = CalendarDataType.ALL;
85
+ selectTab();
85
86
  }
86
87
  },
87
88
  );
88
89
  // -------------------- 获取有会议的日期 --------------------
89
90
 
90
- const getMonthAndDay = (date) => {
91
+ const getMonthAndDay = (date: string) => {
91
92
  const dateStr = dayjs(date).format('YYYY-MM-DD');
92
93
  return [dateStr.slice(0, 7), dateStr.slice(8, 10)];
93
94
  };
@@ -121,9 +122,8 @@ watch(() => dateList.value, (val) => {
121
122
  });
122
123
  }
123
124
  });
124
-
125
125
  const groupDateList = computed(() => {
126
- const obj = dateList.value.reduce((pre, cur) => {
126
+ const obj = dateList.value.reduce((pre: any, cur: any) => {
127
127
  const [month, day] = getMonthAndDay(cur);
128
128
  pre[month] = {
129
129
  count: (pre[month]?.count || 0) + 1,
@@ -139,11 +139,11 @@ const groupDateList = computed(() => {
139
139
  };
140
140
  });
141
141
  const list: any[] = [];
142
- let current = [];
142
+ let current: any[] = [];
143
143
  monthList.forEach((t) => {
144
144
  while (t.days.length) {
145
145
  if (!current.length) {
146
- t.days.splice(0, 6).forEach((day) => {
146
+ t.days.splice(0, 6).forEach((day: string) => {
147
147
  current.push({
148
148
  month: t.month,
149
149
  day: day,
@@ -160,7 +160,7 @@ const groupDateList = computed(() => {
160
160
  count += 1;
161
161
  }
162
162
  if (t.days.length + current.length <= 6) {
163
- t.days.splice(0, 6).forEach((day) => {
163
+ t.days.splice(0, 6).forEach((day: string) => {
164
164
  current.push({
165
165
  month: t.month,
166
166
  day: day,
@@ -171,7 +171,7 @@ const groupDateList = computed(() => {
171
171
  current = [];
172
172
  }
173
173
  } else {
174
- t.days.splice(0, 6 - count).forEach((day) => {
174
+ t.days.splice(0, 6 - count).forEach((day: string) => {
175
175
  current.push({
176
176
  month: t.month,
177
177
  day: day,
@@ -196,7 +196,7 @@ const groupDateList = computed(() => {
196
196
 
197
197
  const dateMapList = computed(() => {
198
198
  return groupDateList.value.map((group) => {
199
- const obj = group.reduce((prev, cur) => {
199
+ const obj = group.reduce((prev: any, cur: any) => {
200
200
  prev[cur.month] = prev[cur.month] || [];
201
201
  prev[cur.month].push(cur.day);
202
202
  return prev;
@@ -212,9 +212,9 @@ const dateMapList = computed(() => {
212
212
 
213
213
  const getMonthIdx = () => {
214
214
  if (groupDateList.value.length) {
215
- monthIdx.value = groupDateList.value.findIndex((v) => v.some((t) => latestDate.value === `${ t.month }-${ t.day }`));
215
+ monthIdx.value = groupDateList.value.findIndex((v) => v.some((t: any) => latestDate.value === `${ t.month }-${ t.day }`));
216
216
  if (monthIdx.value === -1) {
217
- monthIdx.value = groupDateList.value.findIndex((v) => v.some((t) => latestDate.value.includes(t.month)));
217
+ monthIdx.value = groupDateList.value.findIndex((v) => v.some((t: any) => latestDate.value.includes(t.month)));
218
218
  }
219
219
  } else {
220
220
  monthIdx.value = -1;
@@ -228,7 +228,7 @@ watch(
228
228
  { deep: true },
229
229
  );
230
230
 
231
- const changeMonthIdx = (step) => {
231
+ const changeMonthIdx = (step: number) => {
232
232
  monthIdx.value += step;
233
233
  };
234
234
 
@@ -292,16 +292,16 @@ onMounted(() => {
292
292
  :active="selectDate"
293
293
  />
294
294
  </template>
295
- <div class="list-content">
295
+ <OScroller class="list-content" show-type="hover" size="small">
296
296
  <OMeetingCalendarList
297
- :list="list"
297
+ :list="list as unknown as MeetingItemT[]"
298
298
  :rows="calendarRows"
299
299
  >
300
300
  <template #empty>
301
301
  <slot name="empty"></slot>
302
302
  </template>
303
303
  </OMeetingCalendarList>
304
- </div>
304
+ </OScroller>
305
305
  </div>
306
306
  </div>
307
307
  </template>
@@ -312,7 +312,7 @@ onMounted(() => {
312
312
  background-color: var(--o-color-fill2);
313
313
  border-radius: var(--o-radius-xs);
314
314
  margin-top: var(--o-gap-5);
315
- @include respond-to('phone') {
315
+ @include respond('phone') {
316
316
  .meeting-card-header {
317
317
  padding: 12px 16px 0;
318
318
 
@@ -339,7 +339,7 @@ onMounted(() => {
339
339
  align-items: center;
340
340
  padding: 12px 32px 0;
341
341
  @include text1;
342
- @include respond-to('<=pad') {
342
+ @include respond('<=pad') {
343
343
  padding: 12px 16px 0;
344
344
  }
345
345
 
@@ -404,7 +404,10 @@ onMounted(() => {
404
404
 
405
405
  .list-content {
406
406
  flex-grow: 1;
407
- height: calc(100% - 70px);
407
+ height: 400px;
408
+ @include respond('<=pad_v') {
409
+ height: auto;
410
+ }
408
411
  }
409
412
  }
410
413
  </style>