@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.
- package/dist/chunk-OElCookieNotice.cjs.js +1 -1
- package/dist/chunk-OElCookieNotice.es.js +111 -111
- package/dist/components/OHeaderSearch.vue.d.ts +6 -10
- package/dist/components/OSourceCode.vue.d.ts +4 -6
- package/dist/components/activity/OActivityApproval.vue.d.ts +6 -10
- package/dist/components/activity/OActivityForm.vue.d.ts +3 -5
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +16 -24
- package/dist/components/activity/index.d.ts +14 -22
- package/dist/components/activity/types.d.ts +8 -1
- package/dist/components/events/config.d.ts +5 -18
- package/dist/components/events/types.d.ts +4 -1
- package/dist/components/header/OHeaderMobile.vue.d.ts +18 -11
- package/dist/components/header/components/HeaderNavMobile.vue.d.ts +4 -1
- package/dist/components/header/index.d.ts +12 -5
- package/dist/components/header/types.d.ts +4 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +8 -12
- package/dist/components/meeting/OMeetingForm.vue.d.ts +3 -5
- package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +16 -24
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +1 -1
- package/dist/components/meeting/index.d.ts +786 -0
- package/dist/components/meeting/types.d.ts +82 -17
- package/dist/components/meeting/utils.d.ts +1 -1
- package/dist/components.cjs.js +38 -38
- package/dist/components.css +1 -1
- package/dist/components.es.js +6726 -6656
- package/package.json +2 -2
- package/src/components/OSourceCode.vue +8 -10
- package/src/components/activity/OActivityApproval.vue +28 -28
- package/src/components/activity/OActivityForm.vue +3 -3
- package/src/components/activity/OMyActivityCalendar.vue +40 -24
- package/src/components/activity/types.ts +8 -1
- package/src/components/common/MoreText.vue +1 -1
- package/src/components/common/ThFilter.vue +7 -7
- package/src/components/element-plus/OElCookieNotice.vue +1 -1
- package/src/components/events/OEventsList.vue +37 -10
- package/src/components/events/config.ts +1 -1
- package/src/components/events/types.ts +4 -1
- package/src/components/header/OHeaderMobile.vue +8 -1
- package/src/components/header/components/HeaderContent.vue +7 -3
- package/src/components/header/components/HeaderNavMobile.vue +5 -2
- package/src/components/header/types.ts +4 -0
- package/src/components/meeting/OMeetingCalendar.vue +39 -27
- package/src/components/meeting/OMeetingForm.vue +54 -35
- package/src/components/meeting/OMeetingPlayback.vue +4 -4
- package/src/components/meeting/OMyMeetingCalendar.vue +31 -20
- package/src/components/meeting/OSigMeetingCalendar.vue +29 -26
- package/src/components/meeting/components/OMeetingCalendarList.vue +22 -17
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +10 -6
- package/src/components/meeting/components/OMeetingDetail.vue +30 -16
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +7 -7
- package/src/components/meeting/components/OSigMeetingAside.vue +2 -3
- package/src/components/meeting/types.ts +88 -17
- package/vite.config.ts +3 -2
|
@@ -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,
|
|
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
|
|
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
|
|
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
|
-
|
|
483
|
+
const formatYearMonth = (date: string) => {
|
|
484
|
+
const date2 = dayjs(date ? date : undefined);
|
|
474
485
|
if (isEn.value) {
|
|
475
|
-
return
|
|
486
|
+
return date2.format('MMMM YYYY');
|
|
476
487
|
} else {
|
|
477
|
-
return
|
|
488
|
+
return date2.format('YYYY MM月');
|
|
478
489
|
}
|
|
479
490
|
};
|
|
480
491
|
const handleActions = computed<DialogActionT[]>(() => {
|
|
@@ -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
|
|
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
|
-
|
|
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
|
-
<
|
|
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
|
-
</
|
|
304
|
+
</OScroller>
|
|
305
305
|
</div>
|
|
306
306
|
</div>
|
|
307
307
|
</template>
|
|
@@ -404,7 +404,10 @@ onMounted(() => {
|
|
|
404
404
|
|
|
405
405
|
.list-content {
|
|
406
406
|
flex-grow: 1;
|
|
407
|
-
height:
|
|
407
|
+
height: 400px;
|
|
408
|
+
@include respond-to('<=pad_v') {
|
|
409
|
+
height: auto;
|
|
410
|
+
}
|
|
408
411
|
}
|
|
409
412
|
}
|
|
410
413
|
</style>
|
|
@@ -3,7 +3,7 @@ import { OCollapse, OCollapseItem, ODivider, OIcon, OLink, OTag, useMessage } fr
|
|
|
3
3
|
import OMeetingDetail from './OMeetingDetail.vue';
|
|
4
4
|
import { computed, nextTick, ref, watch } from 'vue';
|
|
5
5
|
import IconCopy from '~icons/meeting/icon-copy.svg';
|
|
6
|
-
import { MeetingGroupType, MeetingItemT } from '../types.ts';
|
|
6
|
+
import { CalendarDataType, CycleSubItemT, MeetingGroupType, MeetingItemT, ObsDataItemT } from '../types.ts';
|
|
7
7
|
import IconChevronRight from '~icons/components/icon-chevron-right.svg';
|
|
8
8
|
import { INTERVAL_DAY, INTERVAL_MONTH, INTERVAL_WEEK } from '../config.ts';
|
|
9
9
|
import { formatDate } from '../utils.ts';
|
|
@@ -14,14 +14,14 @@ const { activityTypeMap } = useActivityConfig();
|
|
|
14
14
|
|
|
15
15
|
const props = withDefaults(defineProps<{
|
|
16
16
|
list: MeetingItemT[];
|
|
17
|
-
groupType
|
|
17
|
+
groupType?: MeetingGroupType;
|
|
18
18
|
}>(), {
|
|
19
19
|
list: () => [],
|
|
20
20
|
});
|
|
21
21
|
const { t, locale, getConfig, getPointStr } = useMeetingConfig();
|
|
22
|
-
const detailRefs = ref([]);
|
|
22
|
+
const detailRefs = ref<any[]>([]);
|
|
23
23
|
const message = useMessage(null);
|
|
24
|
-
const copyInfo = async (idx) => {
|
|
24
|
+
const copyInfo = async (idx: number) => {
|
|
25
25
|
const instance = detailRefs.value[idx];
|
|
26
26
|
await instance.copyInfo();
|
|
27
27
|
message.success({
|
|
@@ -29,7 +29,7 @@ const copyInfo = async (idx) => {
|
|
|
29
29
|
});
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
const collapseNames = ref([]);
|
|
32
|
+
const collapseNames = ref<number[]>([]);
|
|
33
33
|
const i18n = computed(() => {
|
|
34
34
|
return {
|
|
35
35
|
SIG_GROUP: `${ props.groupType === MeetingGroupType.GROUP ? t('meeting.groups') : t('meeting.sigs') }: `,
|
|
@@ -43,7 +43,7 @@ const i18n = computed(() => {
|
|
|
43
43
|
});
|
|
44
44
|
|
|
45
45
|
// -------------------- 监听尺寸变化 --------------------
|
|
46
|
-
const meetInfoRef = ref();
|
|
46
|
+
const meetInfoRef = ref<HTMLDivElement[]>();
|
|
47
47
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
48
48
|
for (let entry of entries) {
|
|
49
49
|
const { height } = entry.contentRect;
|
|
@@ -70,11 +70,11 @@ watch(
|
|
|
70
70
|
},
|
|
71
71
|
);
|
|
72
72
|
|
|
73
|
-
const computedList = computed(() => {
|
|
74
|
-
return props.list.map((v) => {
|
|
73
|
+
const computedList = computed<any[]>(() => {
|
|
74
|
+
return props.list.map((v: any) => {
|
|
75
75
|
const type = v.type;
|
|
76
76
|
let dateRange = '';
|
|
77
|
-
if (type !==
|
|
77
|
+
if (type !== CalendarDataType.MEETING) {
|
|
78
78
|
let activity_type = activityTypeMap.value.get(v.activity_type)?.label;
|
|
79
79
|
if (v.start && v.end) {
|
|
80
80
|
if (v.end_date === v.start_date) {
|
|
@@ -113,7 +113,7 @@ const computedList = computed(() => {
|
|
|
113
113
|
let timeRange = `${ start } - ${ end }`;
|
|
114
114
|
let replay_url = null;
|
|
115
115
|
let hasObsData = false;
|
|
116
|
-
const obsData = v.obs_data?.filter((v) => v.text_video_url) || [];
|
|
116
|
+
const obsData = v.obs_data?.filter((v: ObsDataItemT) => v.text_video_url) || [];
|
|
117
117
|
|
|
118
118
|
if (is_cycle) {
|
|
119
119
|
let cycleType = '';
|
|
@@ -122,13 +122,13 @@ const computedList = computed(() => {
|
|
|
122
122
|
}
|
|
123
123
|
if (cycle_type === INTERVAL_WEEK) {
|
|
124
124
|
if (cycle_interval > 1) {
|
|
125
|
-
cycleType = t('meeting.cycleWeek.other', [getPointStr(cycle_type, cycle_point), cycle_interval]);
|
|
125
|
+
cycleType = t('meeting.cycleWeek.other', [getPointStr(cycle_type, cycle_point as unknown as number[]), cycle_interval]);
|
|
126
126
|
} else {
|
|
127
|
-
cycleType = t('meeting.cycleWeek.one', [getPointStr(cycle_type, cycle_point)]);
|
|
127
|
+
cycleType = t('meeting.cycleWeek.one', [getPointStr(cycle_type, cycle_point as unknown as number[])]);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
if (cycle_type === INTERVAL_MONTH) {
|
|
131
|
-
cycleType = t('meeting.cycleMonth', [getPointStr(cycle_type, cycle_point)]);
|
|
131
|
+
cycleType = t('meeting.cycleMonth', [getPointStr(cycle_type, cycle_point as unknown as number[])]);
|
|
132
132
|
}
|
|
133
133
|
timeRange = t('meeting.cycleMeetingText2', {
|
|
134
134
|
startDate: cycle_start_date,
|
|
@@ -137,7 +137,7 @@ const computedList = computed(() => {
|
|
|
137
137
|
endTime: cycle_end,
|
|
138
138
|
cycleType,
|
|
139
139
|
});
|
|
140
|
-
hasObsData = obsData.some((t) => t.sub_id === v.cycle_sub.find((z) => z.date === date)?.sub_id);
|
|
140
|
+
hasObsData = obsData.some((t: ObsDataItemT) => t.sub_id === v.cycle_sub.find((z: CycleSubItemT) => z.date === date)?.sub_id);
|
|
141
141
|
} else {
|
|
142
142
|
hasObsData = obsData.length > 0;
|
|
143
143
|
}
|
|
@@ -302,7 +302,8 @@ const computedList = computed(() => {
|
|
|
302
302
|
|
|
303
303
|
.o-collapse-item-title {
|
|
304
304
|
.copy-icon {
|
|
305
|
-
|
|
305
|
+
opacity: 1;
|
|
306
|
+
visibility: visible;
|
|
306
307
|
}
|
|
307
308
|
}
|
|
308
309
|
}
|
|
@@ -323,7 +324,8 @@ const computedList = computed(() => {
|
|
|
323
324
|
&:hover {
|
|
324
325
|
.o-collapse-item-title {
|
|
325
326
|
.copy-icon {
|
|
326
|
-
|
|
327
|
+
opacity: 1;
|
|
328
|
+
visibility: visible;
|
|
327
329
|
}
|
|
328
330
|
}
|
|
329
331
|
}
|
|
@@ -343,11 +345,14 @@ const computedList = computed(() => {
|
|
|
343
345
|
|
|
344
346
|
.meet-title-left {
|
|
345
347
|
flex-grow: 1;
|
|
348
|
+
min-width: 0;
|
|
346
349
|
}
|
|
347
350
|
|
|
348
351
|
.copy-icon {
|
|
349
352
|
flex-shrink: 0;
|
|
350
|
-
display:
|
|
353
|
+
display: inline-flex;
|
|
354
|
+
opacity: 0;
|
|
355
|
+
visibility: hidden;
|
|
351
356
|
|
|
352
357
|
&:hover {
|
|
353
358
|
color: var(--o-color-primary1);
|
|
@@ -26,9 +26,9 @@ const getList = () => {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
const list = computed(() => getList());
|
|
29
|
-
const checked = ref([]);
|
|
30
|
-
const temp = ref([]);
|
|
31
|
-
const selectorRef = ref(null);
|
|
29
|
+
const checked = ref<number[]>([]);
|
|
30
|
+
const temp = ref<number[]>([]);
|
|
31
|
+
const selectorRef = ref<InstanceType<typeof ElSelect> | null>(null);
|
|
32
32
|
|
|
33
33
|
const init = () => {
|
|
34
34
|
checked.value = [...props.modelValue];
|
|
@@ -41,12 +41,16 @@ watchEffect(() => {
|
|
|
41
41
|
|
|
42
42
|
const confirm = () => {
|
|
43
43
|
emits('update:modelValue', temp.value);
|
|
44
|
-
selectorRef.value
|
|
44
|
+
if (selectorRef.value) {
|
|
45
|
+
selectorRef.value.expanded = false;
|
|
46
|
+
}
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
const cancel = () => {
|
|
48
50
|
init();
|
|
49
|
-
selectorRef.value
|
|
51
|
+
if (selectorRef.value) {
|
|
52
|
+
selectorRef.value.expanded = false;
|
|
53
|
+
}
|
|
50
54
|
};
|
|
51
55
|
|
|
52
56
|
const clickItem = (val: number) => {
|
|
@@ -83,7 +87,7 @@ const removeTag = (val: number) => {
|
|
|
83
87
|
size="large"
|
|
84
88
|
multiple
|
|
85
89
|
collapseTags
|
|
86
|
-
maxCollapseTags="3"
|
|
90
|
+
:maxCollapseTags="3"
|
|
87
91
|
:modelValue="checked"
|
|
88
92
|
@remove-tag="removeTag"
|
|
89
93
|
>
|
|
@@ -30,7 +30,7 @@ const infoList = computed(() =>
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
const activityInfoList = computed(() => {
|
|
33
|
-
const isLive = props.data.live_url?.length
|
|
33
|
+
const isLive = !!props.data.live_url?.length;
|
|
34
34
|
return [
|
|
35
35
|
{ label: t('meeting.activityDetail2'), key: 'agenda', ellipsis: true },
|
|
36
36
|
{ label: t('meeting.startDate'), key: 'start_date_time' },
|
|
@@ -43,7 +43,7 @@ const activityInfoList = computed(() => {
|
|
|
43
43
|
].slice(0, props.from === 'home' ? 5 : 8);
|
|
44
44
|
});
|
|
45
45
|
const activityInfoApprovalList = computed(() => {
|
|
46
|
-
const isLive = props.data.live_url?.length
|
|
46
|
+
const isLive = !!props.data.live_url?.length;
|
|
47
47
|
return [
|
|
48
48
|
{ label: t('meeting.activityType'), key: 'activity_type', isType: true },
|
|
49
49
|
{ label: isLive ? t('meeting.livePlatform') : t('meeting.activityAddress'), key: isLive ? 'live_url' : 'address' },
|
|
@@ -57,14 +57,28 @@ const activityInfoApprovalList = computed(() => {
|
|
|
57
57
|
];
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
interface ColumnItemT {
|
|
61
|
+
label: string;
|
|
62
|
+
key: string;
|
|
63
|
+
ellipsis?: boolean;
|
|
64
|
+
isLink?: boolean;
|
|
65
|
+
isRecord?: boolean;
|
|
66
|
+
isType?: boolean;
|
|
67
|
+
extra?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const getField = (key: string) => (props.data as Record<string, any>)[key];
|
|
71
|
+
|
|
72
|
+
const columns = computed<ColumnItemT[]>(() => {
|
|
62
73
|
if (props.data.type === CalendarDataType.EVENTS) {
|
|
63
74
|
if (props.page === CalendarDataType.APPROVAL) {
|
|
64
75
|
return activityInfoApprovalList.value;
|
|
65
76
|
}
|
|
66
77
|
return activityInfoList.value;
|
|
67
78
|
}
|
|
79
|
+
if (props.data.type === CalendarDataType.SUMMIT) {
|
|
80
|
+
return activityInfoList.value;
|
|
81
|
+
}
|
|
68
82
|
return infoList.value;
|
|
69
83
|
});
|
|
70
84
|
|
|
@@ -73,7 +87,7 @@ const domRef = ref([]);
|
|
|
73
87
|
const copyInfo = () => {
|
|
74
88
|
try {
|
|
75
89
|
let text = `${ t('meeting.meetingTopic') + props.data.topic }\n`;
|
|
76
|
-
text += [...domRef.value].reduce((pre, cur) => `${ pre }${ cur.textContent }\n`, '');
|
|
90
|
+
text += [...domRef.value].reduce((pre, cur: HTMLDivElement) => `${ pre }${ cur.textContent }\n`, '');
|
|
77
91
|
navigator.clipboard.writeText(text);
|
|
78
92
|
return Promise.resolve();
|
|
79
93
|
} catch (e) {
|
|
@@ -91,36 +105,36 @@ defineExpose({ copyInfo });
|
|
|
91
105
|
v-for="(info, infoIdx) in columns"
|
|
92
106
|
:key="infoIdx"
|
|
93
107
|
:class="{
|
|
94
|
-
'record-item': info.isRecord &&
|
|
108
|
+
'record-item': info.isRecord && getField(info.key)?.length,
|
|
95
109
|
'link-item': info.isLink,
|
|
96
|
-
'is-empty':!
|
|
110
|
+
'is-empty':!getField(info.key)?.length,
|
|
97
111
|
[`label-item_${data.id}`]: true,
|
|
98
112
|
[`type_${data.type}`]: true,
|
|
99
113
|
}"
|
|
100
114
|
>
|
|
101
|
-
<template v-if="
|
|
115
|
+
<template v-if="getField(info.key) && !info.isRecord">
|
|
102
116
|
<span class="label">{{ info.label }}</span>
|
|
103
|
-
<MoreText :show="show" v-if="info.ellipsis" :text="
|
|
117
|
+
<MoreText :show="show" v-if="info.ellipsis" :text="getField(info.key) || '-'" />
|
|
104
118
|
<OLink
|
|
105
119
|
v-else-if="info.isLink"
|
|
106
120
|
target="_blank"
|
|
107
121
|
class="value"
|
|
108
122
|
color="primary"
|
|
109
123
|
hover-underline
|
|
110
|
-
:href="
|
|
124
|
+
:href="getField(info.key)"
|
|
111
125
|
>
|
|
112
|
-
{{
|
|
126
|
+
{{ getField(info.key) }}
|
|
113
127
|
</OLink>
|
|
114
|
-
<span v-else-if="info.key === 'platform'">{{ getPlatformLabel(
|
|
128
|
+
<span v-else-if="info.key === 'platform'">{{ getPlatformLabel(getField(info.key)) }}</span>
|
|
115
129
|
<span v-else class="value">
|
|
116
|
-
<i v-if="info.extra" class="extra">{{
|
|
117
|
-
{{
|
|
130
|
+
<i v-if="info.extra" class="extra">{{ getField(info.extra) }}</i>
|
|
131
|
+
{{ getField(info.key) || '-' }}
|
|
118
132
|
</span>
|
|
119
133
|
</template>
|
|
120
|
-
<template v-if="info.isRecord &&
|
|
134
|
+
<template v-if="info.isRecord && getField(info.key)?.length">
|
|
121
135
|
<span class="label">{{ info.label }}</span>
|
|
122
136
|
<div>
|
|
123
|
-
<p v-for="re in
|
|
137
|
+
<p v-for="re in getField(info.key)" :key="re.create_time" class="value">
|
|
124
138
|
{{ re.reason }}
|
|
125
139
|
{{ formatDate(re.create_time, 'YYYY/MM/DD HH:mm:ss') }}
|
|
126
140
|
{{ re.action === 1 ? t('meeting.approveReview') : t('meeting.rejectReview') }}
|
|
@@ -26,7 +26,7 @@ const closeSpeakerMenu = () => {
|
|
|
26
26
|
speakerMenuVisible.value = false;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
const handleCue = (textTrack, init = false) => {
|
|
29
|
+
const handleCue = (textTrack: any, init = false) => {
|
|
30
30
|
const player = props.instance;
|
|
31
31
|
if (!player) return;
|
|
32
32
|
// 修改字幕
|
|
@@ -133,7 +133,7 @@ const videoInit = async () => {
|
|
|
133
133
|
FullscreenToggle: true,
|
|
134
134
|
},
|
|
135
135
|
},
|
|
136
|
-
});
|
|
136
|
+
}) as unknown as any;
|
|
137
137
|
emits('getInstance', player);
|
|
138
138
|
// 加载视频
|
|
139
139
|
player.src(props.src);
|
|
@@ -150,10 +150,10 @@ const videoInit = async () => {
|
|
|
150
150
|
|
|
151
151
|
// 添加自定义控制字幕的按钮
|
|
152
152
|
class CustomSubsCapsButton extends videojs.getComponent('Button') {
|
|
153
|
-
constructor(player, options) {
|
|
153
|
+
constructor(player: any, options: object) {
|
|
154
154
|
super(player, options);
|
|
155
155
|
this.addClass('vjs-subtitle-toggle-button', 'vjs-subtitle-hidden');
|
|
156
|
-
this.controlText('Toggle Subtitles');
|
|
156
|
+
(this as any).controlText('Toggle Subtitles');
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
buildCSSClass() {
|
|
@@ -161,7 +161,7 @@ const videoInit = async () => {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
handleClick() {
|
|
164
|
-
const tracks = this.player().textTracks();
|
|
164
|
+
const tracks = this.player().textTracks() as unknown as any[];
|
|
165
165
|
for (let i = 0; i < tracks.length; i++) {
|
|
166
166
|
if (tracks[i].kind === 'subtitles') {
|
|
167
167
|
handleCue(tracks[i], true);
|
|
@@ -181,14 +181,14 @@ const videoInit = async () => {
|
|
|
181
181
|
|
|
182
182
|
if (props.vtt) {
|
|
183
183
|
videojs.registerComponent('SubtitleToggleButton', CustomSubsCapsButton);
|
|
184
|
-
if (!player.controlBar.children_.some((v) => v.name_ === 'SubtitleToggleButton')) {
|
|
184
|
+
if (!player.controlBar.children_.some((v: any) => v.name_ === 'SubtitleToggleButton')) {
|
|
185
185
|
player.controlBar.addChild('SubtitleToggleButton', {}, 8);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
189
|
// 动态修改字幕
|
|
190
190
|
const textTracks = player?.textTracks().tracks_;
|
|
191
|
-
textTracks.forEach((textTrack) => {
|
|
191
|
+
textTracks.forEach((textTrack: any) => {
|
|
192
192
|
textTrack?.addEventListener('cuechange', () => {
|
|
193
193
|
handleCue(textTrack);
|
|
194
194
|
});
|