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

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 (54) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -1
  2. package/dist/chunk-OElCookieNotice.es.js +111 -111
  3. package/dist/components/OHeaderSearch.vue.d.ts +6 -10
  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 +16 -24
  8. package/dist/components/activity/index.d.ts +14 -22
  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 +16 -24
  20. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +1 -1
  21. package/dist/components/meeting/index.d.ts +786 -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.cjs.js +38 -38
  25. package/dist/components.css +1 -1
  26. package/dist/components.es.js +6726 -6656
  27. package/package.json +2 -2
  28. package/src/components/OSourceCode.vue +8 -10
  29. package/src/components/activity/OActivityApproval.vue +28 -28
  30. package/src/components/activity/OActivityForm.vue +3 -3
  31. package/src/components/activity/OMyActivityCalendar.vue +40 -24
  32. package/src/components/activity/types.ts +8 -1
  33. package/src/components/common/MoreText.vue +1 -1
  34. package/src/components/common/ThFilter.vue +7 -7
  35. package/src/components/element-plus/OElCookieNotice.vue +1 -1
  36. package/src/components/events/OEventsList.vue +37 -10
  37. package/src/components/events/config.ts +1 -1
  38. package/src/components/events/types.ts +4 -1
  39. package/src/components/header/OHeaderMobile.vue +8 -1
  40. package/src/components/header/components/HeaderContent.vue +7 -3
  41. package/src/components/header/components/HeaderNavMobile.vue +5 -2
  42. package/src/components/header/types.ts +4 -0
  43. package/src/components/meeting/OMeetingCalendar.vue +39 -27
  44. package/src/components/meeting/OMeetingForm.vue +54 -35
  45. package/src/components/meeting/OMeetingPlayback.vue +4 -4
  46. package/src/components/meeting/OMyMeetingCalendar.vue +31 -20
  47. package/src/components/meeting/OSigMeetingCalendar.vue +29 -26
  48. package/src/components/meeting/components/OMeetingCalendarList.vue +22 -17
  49. package/src/components/meeting/components/OMeetingCalendarSelector.vue +10 -6
  50. package/src/components/meeting/components/OMeetingDetail.vue +30 -16
  51. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +7 -7
  52. package/src/components/meeting/components/OSigMeetingAside.vue +2 -3
  53. package/src/components/meeting/types.ts +88 -17
  54. package/vite.config.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendesign-plus-test/components",
3
- "version": "0.0.1-rc.42",
3
+ "version": "0.0.1-rc.43",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -32,7 +32,7 @@
32
32
  "dayjs": "^1.11.13",
33
33
  "video.js": "^8.23.7",
34
34
  "vue-dompurify-html": "^3.1.2",
35
- "@opendesign-plus/composables": "0.0.1-rc.6",
35
+ "@opendesign-plus/composables": "0.0.1-rc.11",
36
36
  "@opendesign-plus/styles": "0.0.1-rc.2"
37
37
  },
38
38
  "devDependencies": {
@@ -6,28 +6,26 @@ import IconChevronDown from '~icons/components/icon-chevron-down.svg';
6
6
 
7
7
  interface CodeItemT {
8
8
  label: string;
9
- url: string;
9
+ href: string;
10
10
  icon?: string;
11
+ target?: string;
11
12
  }
12
13
 
13
14
  interface CodePropsT {
14
15
  title?: string;
15
16
  options?: CodeItemT[];
16
- url?: string;
17
+ href?: string;
18
+ target?: string;
17
19
  icon?: string;
18
20
  justify?: string;
19
21
  }
20
22
 
21
23
  withDefaults(defineProps<CodePropsT>(), {
22
- title: undefined,
23
- options: undefined,
24
- url: undefined,
25
- icon: undefined,
26
24
  justify: 'center',
27
25
  });
28
26
 
29
- const itemChange = (data: any) => {
30
- window.open(data.url, '_blank');
27
+ const itemChange = (data: Pick<CodeItemT, 'href' | 'target'>) => {
28
+ window.open(data.href, data.target ? data.target : '_blank');
31
29
  };
32
30
 
33
31
  const dropdownVisible = ref(false);
@@ -38,7 +36,7 @@ const visibleChange = (val: boolean) => {
38
36
 
39
37
  <template>
40
38
  <div class="source-code">
41
- <div v-if="url" class="info-wrap" @click="itemChange({ url: url })">
39
+ <div v-if="href" class="info-wrap" @click="itemChange({ href: href, target: target })">
42
40
  <span class="title">{{ title }}</span>
43
41
  <OIcon v-if="icon">
44
42
  <component :is="icon" class="icon" />
@@ -57,7 +55,7 @@ const visibleChange = (val: boolean) => {
57
55
  <OIcon class="icon"><IconChevronDown /></OIcon>
58
56
  </div>
59
57
  <template #dropdown>
60
- <ODropdownItem v-for="item in options" @click="itemChange(item)" :key="item.url" class="list" :style="{ '--dropdown-item-justify': justify }">
58
+ <ODropdownItem v-for="item in options" @click="itemChange(item)" :key="item.href" class="list" :style="{ '--dropdown-item-justify': justify }">
61
59
  {{ item.label }}
62
60
  <OIcon v-if="item.icon">
63
61
  <component :is="item.icon" class="icon" />
@@ -14,12 +14,12 @@ import {
14
14
  } from '@opensig/opendesign';
15
15
  import { useScreen } from '@opendesign-plus/composables';
16
16
  import { onMounted, watch, ref, reactive, computed } from 'vue';
17
- import { ActivityItemT, ActivityTablePropsT, ReviewParamsT, TypeOptionT } from './types';
17
+ import { ActivityItemT, ActivityTablePropsT, ReviewParamsT } from './types';
18
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
- import { CalendarDataType } from '@/components/meeting';
22
+ import { CalendarDataType, MeetingItemT } from '@/components/meeting';
23
23
 
24
24
  const { t, locale } = useI18n();
25
25
  const isZh = computed(() => locale.value === 'zh');
@@ -55,13 +55,12 @@ const sortTime = () => {
55
55
 
56
56
  // -------------------- 状态 --------------------
57
57
  const statusValue = ref();
58
- const statusOptions = computed<TypeOptionT[]>(() => {
59
- let list: TypeOptionT[] | { label: string; value: string; }[] = [];
58
+ const statusOptions = computed(() => {
59
+ const list: { label: string; value: string | number }[] = [];
60
60
  approvalStatusMap.value.forEach((item) => {
61
61
  list.push(item);
62
62
  });
63
63
  return list.slice(1);
64
-
65
64
  });
66
65
  const filterStatusList = () => {
67
66
  params.status = statusValue.value;
@@ -72,7 +71,7 @@ const filterStatusList = () => {
72
71
  }
73
72
  };
74
73
 
75
- const tableData = ref([]);
74
+ const tableData = ref<ActivityItemT[]>([]);
76
75
  const total = ref(0);
77
76
 
78
77
  const COUNT_PER_PAGE = [10, 20, 30, 40];
@@ -93,7 +92,7 @@ const getData = async () => {
93
92
  }
94
93
  const res = await props.getTableDataRequest(paramsData);
95
94
  tableData.value = (res.data || [])
96
- .map((item) => {
95
+ .map((item: ActivityItemT) => {
97
96
  const { start_date, end_date, start, end, activity_type } = item;
98
97
  return [
99
98
  {
@@ -144,14 +143,14 @@ const confirm = async () => {
144
143
  try {
145
144
  loading.value = true;
146
145
  const valid = await formRef.value?.validate();
147
- if (valid.some((v) => !!v)) {
146
+ if (!valid || valid.some((v: any) => !!v)) {
148
147
  loading.value = false;
149
148
  return;
150
149
  }
151
150
  if (reviewStatus.value === 1) {
152
- await props.approveActivityRequest(currentRow.value.id, form.value);
151
+ await props.approveActivityRequest(currentRow.value?.id, form.value);
153
152
  } else {
154
- await props.rejectActivityRequest(currentRow.value.id, form.value);
153
+ await props.rejectActivityRequest(currentRow.value?.id, form.value);
155
154
  }
156
155
  getData();
157
156
  cancel();
@@ -175,9 +174,9 @@ const confirmCancel = async () => {
175
174
  try {
176
175
  loading.value = true;
177
176
  if (cancelStatus.value === 1) {
178
- await props.cancelActivityRequest(currentRow.value.id, form.value);
177
+ await props.cancelActivityRequest(currentRow.value!.id, form.value);
179
178
  } else {
180
- await props.deleteActivityRequest(currentRow.value.id, form.value);
179
+ await props.deleteActivityRequest(currentRow.value!.id, form.value);
181
180
  }
182
181
  getData();
183
182
  cancel();
@@ -224,16 +223,17 @@ const rejectItem = (row: ActivityItemT) => {
224
223
  reviewVisible.value = true;
225
224
  };
226
225
 
227
- const expandList = ref([]);
228
- const expandedRows = ref([]);
226
+ const expandList = ref<string[]>([]);
227
+ const expandedRows = ref<string[]>([]);
229
228
 
230
- const getActivityDetail = (val: number) => {
229
+ const getActivityDetail = (id: number) => {
230
+ const val = id.toString();
231
231
  if (!props.getActivityDetailRequest) {
232
232
  return;
233
233
  }
234
234
  if (!expandList.value.includes(val)) {
235
235
  expandList.value.push(val);
236
- props.getActivityDetailRequest(val).then((res) => {
236
+ props.getActivityDetailRequest(val).then((res: ActivityItemT) => {
237
237
  tableData.value?.forEach((item) => {
238
238
  if (item.id === res.id) {
239
239
  item.approve_record = res.approve_record;
@@ -250,26 +250,26 @@ const getActivityDetail = (val: number) => {
250
250
  }
251
251
  };
252
252
 
253
- const expandChange = (val) => {
253
+ const expandChange = (val: ActivityItemT) => {
254
254
  getActivityDetail(val.id);
255
255
  };
256
256
 
257
- const getRowKey = (row) => {
258
- return row.id;
257
+ const getRowKey = (row: ActivityItemT): string => {
258
+ return row.id.toString();
259
259
  };
260
260
 
261
261
  // -------------------- 移动端 ---------------------
262
- const expanded = ref([]); // 展开的数据,id
263
- const change = (val: number[]) => {
262
+ const expanded = ref<(string | number)[]>([]); // 展开的数据,id
263
+ const change = (val: (string | number)[]) => {
264
264
  if (val.length) {
265
- val.forEach((item: number) => {
266
- getActivityDetail(item);
265
+ val.forEach((item) => {
266
+ getActivityDetail(item as number);
267
267
  });
268
268
  }
269
269
  };
270
270
 
271
- const detailRefs = ref({});
272
- const getDetailRefs = (insRef, id) => {
271
+ const detailRefs = ref<Record<number, any>>({});
272
+ const getDetailRefs = (insRef: any, id: number) => {
273
273
  if (insRef && id) {
274
274
  detailRefs.value[id] = insRef;
275
275
  }
@@ -345,7 +345,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
345
345
  <ElTableColumn type="expand">
346
346
  <template #default="props">
347
347
  <div class="expand-detail">
348
- <OMeetingDetail :data="props.row" page="approval" show />
348
+ <OMeetingDetail :data="props.row" :page="CalendarDataType.APPROVAL" show />
349
349
  </div>
350
350
  </template>
351
351
  </ElTableColumn>
@@ -447,7 +447,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
447
447
  </div>
448
448
  <div v-else class="collapse-wrapper">
449
449
  <OCollapse v-model="expanded" :accordion="isPhone" @change="change">
450
- <template v-for="(act, idx) in tableData" :key="act.id">
450
+ <template v-for="(act) in tableData" :key="act.id">
451
451
  <div class="title-top">
452
452
  <p class="act-title">{{ act.title }}</p>
453
453
  <OTag v-if="act.is_delete !== 1" color="primary" variant="outline"
@@ -502,7 +502,7 @@ const reviewActions = computed<DialogActionT[]>(() => {
502
502
  <div class="activity-detail">
503
503
  <OMeetingDetail
504
504
  :show="expanded.includes(act.id)"
505
- :data="act"
505
+ :data="act as unknown as MeetingItemT"
506
506
  :ref="(insRef) => getDetailRefs(insRef, act.id)"
507
507
  :page="CalendarDataType.APPROVAL"
508
508
  />
@@ -225,7 +225,7 @@ const approverList = computed(() => {
225
225
  return props.admins || [];
226
226
  });
227
227
 
228
- const typeValue = ref<string>('');
228
+ const typeValue = ref<string | undefined>('');
229
229
  const typeOptions = ref<TypeOptionT[]>([]); // 活动类型
230
230
  activityTypeMap.value.forEach((item) => {
231
231
  typeOptions.value.push(item);
@@ -280,7 +280,7 @@ watch(
280
280
  organizer,
281
281
  } as ParamsItemT;
282
282
  form.value = { ...params };
283
- typeValue.value = activityTypeMap.value.get(val.activity_type)?.label;
283
+ typeValue.value = activityTypeMap.value.get(Number(val.activity_type))?.label;
284
284
  form.value.start_date = `${ form.value.start_date } ${ form.value.start }`;
285
285
  form.value.end_date = `${ form.value.end_date } ${ form.value.end }`;
286
286
  }
@@ -292,7 +292,7 @@ const confirm = async (val: boolean) => {
292
292
  let type = isEdit.value ? t('meeting.modifyActivity') : val ? t('meeting.create') : t('meeting.saveDraft');
293
293
  try {
294
294
  const valid = await formRef.value?.validate();
295
- if (valid.some((v) => !!v)) {
295
+ if (valid.some((v: any) => !!v)) {
296
296
  return;
297
297
  }
298
298
  loading.value = true;
@@ -27,7 +27,7 @@ import type { ActivityItemT, MyActivityCalendarPropsT, ParamsItemT } from './typ
27
27
  import { useScreen } from '@opendesign-plus/composables';
28
28
  import { formatDate, getDateNumber } from '../meeting/utils';
29
29
  import { useActivityConfig } from './composables/useActivityConfig';
30
- import { CalendarDataType, PageParamsT } from '../meeting/types';
30
+ import { CalendarDataType, MeetingItemT, PageParamsT } from '../meeting/types';
31
31
  import OMeetingDetail from '@/components/meeting/components/OMeetingDetail.vue';
32
32
  import { useI18n, Locales } from '@/i18n';
33
33
 
@@ -47,19 +47,19 @@ const props = defineProps<MyActivityCalendarPropsT>();
47
47
 
48
48
  const emits = defineEmits(['edit']);
49
49
  const list = ref<ActivityItemT[]>([]); // 列表数据
50
- const originList = ref([]); // 原始数据
50
+ const originList = ref<ActivityItemT[]>([]); // 原始数据
51
51
 
52
52
  const currentPage = ref(1); // 分页-当前页
53
53
  const pageSize = ref(50); // 分页-每页数量
54
- const total = ref(null); // 分页-总数
54
+ const total = ref<number | null>(null); // 分页-总数
55
55
  const reloadAll = ref(false); // 是否需要清空数据
56
56
 
57
- const expanded = ref([]); // 展开的数据,id
57
+ const expanded = ref<number[]>([]); // 展开的数据,id
58
58
 
59
59
  const nextLoading = ref(false);
60
60
  const bottomReached = ref(false);
61
61
 
62
- const canLoadMore = computed(() => originList.value.length < total.value || total.value === null);
62
+ const canLoadMore = computed(() => total.value === null || originList.value.length < total.value);
63
63
 
64
64
  const getList = async () => {
65
65
  if (!props.getListRequest) {
@@ -69,7 +69,7 @@ const getList = async () => {
69
69
  return;
70
70
  }
71
71
  try {
72
- if (total.value > 0 && (currentPage.value - 1) * pageSize.value > total.value) {
72
+ if (total.value !== null && total.value > 0 && (currentPage.value - 1) * pageSize.value > total.value) {
73
73
  return;
74
74
  }
75
75
  // 当月数据已加载完,手动切换下一月
@@ -99,7 +99,7 @@ const getList = async () => {
99
99
  ];
100
100
  })
101
101
  .flat()
102
- .filter((v) => {
102
+ .filter((v: ActivityItemT) => {
103
103
  return v.start_date.slice(0, 7) === formatDate(selectedDate.value, 'YYYY-MM-DD').slice(0, 7);
104
104
  });
105
105
  if (reloadAll.value) {
@@ -143,7 +143,7 @@ const getActivityDetail = (val: number) => {
143
143
  }
144
144
  if (!expandList.value.includes(val)) {
145
145
  expandList.value.push(val);
146
- props.getActivityDetailRequest(val).then((res) => {
146
+ props.getActivityDetailRequest(val).then((res: ActivityItemT) => {
147
147
  list.value?.forEach((item) => {
148
148
  if (item.id === res.id) {
149
149
  item.approve_record = res.approve_record;
@@ -153,20 +153,20 @@ const getActivityDetail = (val: number) => {
153
153
  }
154
154
  };
155
155
 
156
- const change = (val: number[]) => {
156
+ const change = (val: (number | string)[]) => {
157
157
  if (val.length) {
158
- val.forEach((item: number) => {
159
- getActivityDetail(item);
158
+ val.forEach((item) => {
159
+ getActivityDetail(item as unknown as number);
160
160
  });
161
161
  }
162
162
  };
163
163
 
164
- const calcIfApproved = (date) => {
164
+ const calcIfApproved = (date: string) => {
165
165
  const activityOfDate = list.value.filter((v) => v.start_date === date);
166
166
  return activityOfDate.length && activityOfDate.every((v) => v.status === 3 || v.status === 4);
167
167
  };
168
168
 
169
- const scrollerScroll = (el) => {
169
+ const scrollerScroll = (el: any) => {
170
170
  const container = el.target;
171
171
  if (!container) return;
172
172
  const scrollTop = container.scrollTop; // 已经滚动的距离
@@ -183,7 +183,7 @@ const updateScroller = () => {
183
183
 
184
184
  // -------------------- 日历 --------------------
185
185
  const calendarRef = ref();
186
- const selectedDate = ref(dayjs().format('YYYY-MM-DD'));
186
+ const selectedDate = ref<any>(dayjs().format('YYYY-MM-DD'));
187
187
  const allDateList = computed<string[]>(() => [...new Set(list.value.map((v) => v.start_date))].sort((a, b) => (dayjs(a).isBefore(dayjs(b)) ? -1 : 1)));
188
188
  const dateList = computed<string[]>(() =>
189
189
  [...new Set(list.value.filter((v) => !v.isExpired && !v.is_delete).map((v) => v.start_date))].sort((a, b) => (dayjs(a).isBefore(dayjs(b)) ? -1 : 1)),
@@ -231,8 +231,13 @@ const changeMonth = (val: string) => {
231
231
 
232
232
 
233
233
  // -------------------- 活动列表 --------------------
234
- const activityList = computed(() => {
235
- return list.value.reduce((prev, cur) => {
234
+ interface ActivityListItemT {
235
+ start_date: string;
236
+ list: ActivityItemT[];
237
+ }
238
+
239
+ const activityList = computed<ActivityListItemT[]>(() => {
240
+ return list.value.reduce((prev: ActivityListItemT[], cur: ActivityItemT) => {
236
241
  if (!prev.length) {
237
242
  return [
238
243
  {
@@ -256,13 +261,19 @@ const activityList = computed(() => {
256
261
  });
257
262
 
258
263
  // -------------------- 活动详情组件实例 --------------------
259
- const detailRefs = ref({});
260
- const getDetailRefs = (insRef, id) => {
264
+ const detailRefs = ref<any>({});
265
+ const getDetailRefs = (insRef: any, id: number) => {
261
266
  if (insRef && id) {
262
267
  detailRefs.value[id] = insRef;
263
268
  }
264
269
  };
265
-
270
+ const copyInfo = async (idx: number) => {
271
+ const instance = detailRefs.value[idx];
272
+ await instance.copyInfo();
273
+ message.success({
274
+ content: t('common.copySuccess'),
275
+ });
276
+ };
266
277
  // -------------------- 处理滚动事件 --------------------
267
278
  const scrollerRef = ref();
268
279
  const scrollToSelectedDate = (date: string) => {
@@ -312,11 +323,14 @@ const confirm = () => {
312
323
  if (!props.revokeActivityRequest) {
313
324
  return;
314
325
  }
326
+ if (!currentRow.value) {
327
+ return;
328
+ }
315
329
  dialogLoading.value = true;
316
330
  props.revokeActivityRequest(currentRow.value?.id)
317
331
  .then(() => {
318
332
  message.success({
319
- content: t('meeting.revokeActivitySuccess', [currentRow.value.title]),
333
+ content: t('meeting.revokeActivitySuccess', [currentRow.value?.title]),
320
334
  });
321
335
  reloadAll.value = true;
322
336
  getList();
@@ -391,7 +405,7 @@ const confirmDelete = () => {
391
405
  props.deleteActivityRequest(currentRow.value?.id)
392
406
  .then(() => {
393
407
  message.success({
394
- content: t('meeting.deleteActivitySuccess', [currentRow.value.title]),
408
+ content: t('meeting.deleteActivitySuccess', [currentRow.value?.title]),
395
409
  });
396
410
  reloadAll.value = true;
397
411
  getList();
@@ -495,6 +509,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
495
509
  },
496
510
  }];
497
511
  });
512
+
498
513
  </script>
499
514
 
500
515
  <template>
@@ -653,7 +668,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
653
668
  <div class="activity-detail">
654
669
  <OMeetingDetail
655
670
  :show="expanded.includes(row.id)"
656
- :data="row"
671
+ :data="row as unknown as MeetingItemT"
657
672
  :ref="(insRef) => getDetailRefs(insRef, row.id)"
658
673
  />
659
674
  <div class="activity-btn" v-if="!row.isExpired && !row.is_delete">
@@ -708,12 +723,12 @@ const deleteActions = computed<DialogActionT[]>(() => {
708
723
  <!-- 撤销审核弹窗 -->
709
724
  <ODialog v-model:visible="revokeVisible" main-class="handle-dialog-active" :actions="revokeActions">
710
725
  <template #header>{{ t('meeting.withdrawReview') }}</template>
711
- <div class="dialog-content">{{ t('meeting.confirmRevokeActivity', [currentRow.title]) }}</div>
726
+ <div class="dialog-content">{{ t('meeting.confirmRevokeActivity', [currentRow?.title]) }}</div>
712
727
  </ODialog>
713
728
  <!-- 删除活动弹窗 -->
714
729
  <ODialog v-model:visible="deleteVisible" main-class="handle-dialog-active" :actions="deleteActions">
715
730
  <template #header>{{ t('meeting.deleteActivity') }}</template>
716
- <div class="dialog-content">{{ t('meeting.confirmDeleteActivity', [currentRow.title]) }}</div>
731
+ <div class="dialog-content">{{ t('meeting.confirmDeleteActivity', [currentRow?.title]) }}</div>
717
732
  </ODialog>
718
733
  </template>
719
734
 
@@ -1259,6 +1274,7 @@ const deleteActions = computed<DialogActionT[]>(() => {
1259
1274
  align-items: flex-start;
1260
1275
  gap: var(--o-gap-3);
1261
1276
  width: 100%;
1277
+ padding-right: 48px;
1262
1278
  @include respond-to('phone') {
1263
1279
  flex-grow: 1;
1264
1280
  width: 100%;
@@ -14,10 +14,11 @@ export interface ParamsItemT {
14
14
  end: string; // 活动结束时间
15
15
  schedules?: string;
16
16
  is_publish: string; // 是否发布 true-发布审核 false-发布为草稿
17
- update_activity_id?: string;
17
+ update_activity_id?: string | number;
18
18
  email_list?: string; // 邮件列表
19
19
  organizer?: string; // 主办方
20
20
  approver: string; // 审批人
21
+ status?: number; // 状态
21
22
  }
22
23
 
23
24
  export interface ActivityFormPropsT {
@@ -50,12 +51,18 @@ export interface ActivityItemT {
50
51
  live_address: string;
51
52
  register_end_date: string;
52
53
  register_url: string;
54
+ content_url: string;
53
55
  start: string;
54
56
  status: number; // 1-草稿 2-审核中 3-报名中 4-进行中 5-已结束 6-已修改 7-驳回
55
57
  synopsis: string;
56
58
  title: string;
57
59
  update_activity_id: number;
58
60
  user: string;
61
+ sponsor: string; // 创建人
62
+ create_time: string; // 创建时间
63
+ isExpired?: number; // 计算属性表示是否过期
64
+ sub_id?: string;
65
+ dateRange?: string; // 计算属性
59
66
  }
60
67
 
61
68
  export interface ReviewParamsT {
@@ -23,7 +23,7 @@ const { t } = useI18n();
23
23
  const expanded = ref(false); // 是否展开
24
24
  const showBtn = ref(false); // 受否显示展开按钮
25
25
  const offsetHeight = ref(0); // 内容高度
26
- const contentRef = ref(null); // 内容节点
26
+ const contentRef = ref<any>(null); // 内容节点
27
27
 
28
28
  onMounted(() => {
29
29
  determineHeight();
@@ -58,7 +58,7 @@ const visible = ref(false); // 控制浮窗展示
58
58
 
59
59
  watch(
60
60
  () => props.modelValue,
61
- (val: TItem) => {
61
+ (val: any) => {
62
62
  if (!props.multiple) {
63
63
  checked.value = val;
64
64
  } else {
@@ -67,16 +67,16 @@ watch(
67
67
  },
68
68
  );
69
69
  // -------------------- 普通多选 --------------------
70
- const multiChecked = ref([]); // 选中的值
70
+ const multiChecked = ref<any>([]); // 选中的值
71
71
 
72
- const change = (val: string | number) => {
72
+ const change = (val: (string | number)[]) => {
73
73
  multiChecked.value = val;
74
74
  };
75
75
 
76
76
  // -------------------- 级联选择 --------------------
77
77
  const cascaderValue = ref([]);
78
78
  // -------------------- 单选 --------------------
79
- const checked = ref(null); // 选中的值
79
+ const checked = ref<any>(null); // 选中的值
80
80
  // 单选没有按钮,点击即是确认
81
81
  const handleCommand = (val: string | number) => {
82
82
  if (checked.value === val) {
@@ -115,8 +115,8 @@ const hasChecked = computed(() => {
115
115
  return multiChecked.value.length || cascaderValue.value.length || checked.value || props.modelValue;
116
116
  });
117
117
  // -------------------- 自定义级联选择器label --------------------
118
- const aref = ref(null);
119
- const clickLabelSpan = async (e) => {
118
+ const aref = ref<any>(null);
119
+ const clickLabelSpan = async (e: any) => {
120
120
  const ele = e.target.parentElement.parentElement;
121
121
  await nextTick();
122
122
  const input = ele.querySelector('input');
@@ -127,7 +127,7 @@ const clickLabelSpan = async (e) => {
127
127
  aref.value?.$forceUpdate();
128
128
  cascaderValue.value = JSON.parse(JSON.stringify(cascaderValue.value));
129
129
  };
130
- const renderLabel = ({ data }) => {
130
+ const renderLabel = ({ data }: any) => {
131
131
  return h('span', { onclick: clickLabelSpan }, data.label);
132
132
  };
133
133
  </script>
@@ -25,7 +25,7 @@ const emits = defineEmits<{
25
25
  (e: 'update:visible', value: boolean): void;
26
26
  }>();
27
27
 
28
- const { lePadV, isPhone } = useScreen();
28
+ const { lePadV } = useScreen();
29
29
  const { locale, t } = useI18n();
30
30
  const isZh = computed(() => locale.value === 'zh');
31
31
 
@@ -17,6 +17,7 @@ import { useI18n } from '@/i18n';
17
17
 
18
18
  import { CITY_MAP, DEFAULT_COVER } from './config.ts';
19
19
  import { useScreen } from '@opendesign-plus/composables';
20
+ import dayjs from 'dayjs';
20
21
 
21
22
  const { t } = useI18n();
22
23
  const { lePadV } = useScreen();
@@ -84,12 +85,30 @@ const changeKeyword = () => {
84
85
  const list = computed(() => {
85
86
  return props.data
86
87
  .map((v: EventsCardItemT) => {
88
+ let startDate = v.startDate;
89
+ let endDate = v.endDate;
90
+ let dateStr = dayjs(v.date).format('YYYY/MM/DD');
91
+ if (startDate && endDate) {
92
+ const yearFirstDay = dayjs().format('YYYY-01-01');
93
+ if (compareDate(yearFirstDay, startDate)) {
94
+ startDate = yearFirstDay;
95
+ }
96
+ const yearLastDay = dayjs().format('YYYY-12-31');
97
+ if (compareDate(endDate, yearLastDay)) {
98
+ endDate = yearLastDay;
99
+ }
100
+ dateStr = `${ dayjs(startDate).format('YYYY/MM/DD') }-${ dayjs(endDate).format('MM/DD') }`;
101
+ }
87
102
  return {
88
103
  ...v,
89
- status: !compareDate(new Date(), v.date as string) ? EventsStatusT.ING : EventsStatusT.FINISH,
104
+ startDate,
105
+ endDate,
106
+ dateStr,
107
+ status: !compareDate(new Date(), v.date || v.endDate as string) ? EventsStatusT.ING : EventsStatusT.FINISH,
108
+
90
109
  };
91
110
  })
92
- .sort((a: EventsCardItemT, b: EventsCardItemT) => (compareDate(a.date as string, b.date as string) ? -1 : 1))
111
+ .sort((a: EventsCardItemT, b: EventsCardItemT) => (compareDate(a.date || a.endDate as string, b.date || b.endDate as string) ? -1 : 1))
93
112
  .map((v) => {
94
113
  const city = v.city?.replace('市', '')?.replace('中国', '')?.replaceAll(' ', '');
95
114
  let cover = null;
@@ -143,7 +162,7 @@ const list = computed(() => {
143
162
  </OTag>
144
163
  <div class="event-name">{{ item.name }}</div>
145
164
  <div class="event-desc">
146
- <div class="event-date">{{ item.date }}</div>
165
+ <div class="event-date">{{ item.dateStr }}</div>
147
166
  <ODivider direction="v" />
148
167
  <div class="event-location" v-if="item.city">{{ item.city }}</div>
149
168
  </div>
@@ -249,18 +268,17 @@ const list = computed(() => {
249
268
  }
250
269
  @container (max-width: 300px) {
251
270
  height: 140px;
271
+ width: 100%;
252
272
  aspect-ratio: unset;
253
273
  }
254
274
 
255
275
  .o-card-cover {
256
276
  padding: 0;
277
+ height: 100%;
257
278
  }
258
279
 
259
- .o-card-content {
260
- display: flex;
261
- flex-direction: column;
262
- align-items: center;
263
- justify-content: center;
280
+ .o-card-main {
281
+ padding: 0;
264
282
  position: absolute;
265
283
  overflow: hidden; // 防止内容溢出
266
284
  box-sizing: border-box; // 确保 padding 计入总尺寸
@@ -268,11 +286,20 @@ const list = computed(() => {
268
286
  top: 0;
269
287
  width: 100%;
270
288
  height: 100%;
289
+ }
290
+ .o-card-content {
291
+ position: absolute;
292
+ top: 0;
293
+ left: 0;
294
+ right: 0;
295
+ bottom: 0;
296
+ display: flex;
297
+ flex-direction: column;
298
+ align-items: center;
299
+ justify-content: center;
271
300
  color: var(--o-color-white);
272
301
  text-align: center;
273
- cursor: pointer;
274
302
  padding: var(--o-gap-6);
275
- z-index: 10;
276
303
 
277
304
  @include respond-to('pad_v') {
278
305
  margin-top: var(--o-gap-4);
@@ -17,7 +17,7 @@ export const EVENTS_ICON_MAP = {
17
17
  summit: IconSummit,
18
18
  };
19
19
 
20
- export const CITY_MAP = {
20
+ export const CITY_MAP: Record<string, string | string[]> = {
21
21
  上海: 'https://infrastructure-website.osinfra.cn/picture/city/shanghai.jpg',
22
22
  北京: 'https://infrastructure-website.osinfra.cn/picture/city/beijing.jpg',
23
23
  南京: 'https://infrastructure-website.osinfra.cn/picture/city/nanjing.jpg',
@@ -47,7 +47,10 @@ export interface StepItemT {
47
47
  // 活动列表
48
48
  export interface EventsCardItemT {
49
49
  name: string; // 事件名称
50
- date: string; // 事件日期
50
+ date?: string; // 事件日期
51
+ startDate?: string; // 事件开始日期
52
+ endDate?: string; // 事件结束日期
53
+ dateStr?: string; // 经处理后的展示时间
51
54
  city: string; // 事件城市
52
55
  cover?: string; // 卡片封面,如果不传递,组件内部通过date计算得出
53
56
  status?: EventsStatusT; // 事件状态,不传递,组件内部通过date计算得出