@opendesign-plus/components 0.0.1-rc.10
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 -0
- package/dist/chunk-OElCookieNotice.es.js +833 -0
- package/dist/components/OBanner.vue.d.ts +11 -0
- package/dist/components/OCookieNotice.vue.d.ts +17 -0
- package/dist/components/OFooter.vue.d.ts +46 -0
- package/dist/components/OHeaderSearch.vue.d.ts +692 -0
- package/dist/components/OHeaderUser.vue.d.ts +38 -0
- package/dist/components/OPlusConfigProvider.vue.d.ts +23 -0
- package/dist/components/OSection.vue.d.ts +37 -0
- package/dist/components/OSourceCode.vue.d.ts +20 -0
- package/dist/components/OThemeSwitcher.vue.d.ts +28 -0
- package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
- package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
- package/dist/components/activity/config.d.ts +15 -0
- package/dist/components/activity/index.d.ts +623 -0
- package/dist/components/activity/types.d.ts +81 -0
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
- package/dist/components/element-plus/index.d.ts +2 -0
- package/dist/components/events/OEventsApply.vue.d.ts +16 -0
- package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
- package/dist/components/events/OEventsList.vue.d.ts +26 -0
- package/dist/components/events/config.d.ts +27 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +66 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components/header/OHeader.vue.d.ts +24 -0
- package/dist/components/header/OHeaderMoblie.vue.d.ts +33 -0
- package/dist/components/header/components/HeaderContent.vue.d.ts +6 -0
- package/dist/components/header/components/HeaderNav.vue.d.ts +7 -0
- package/dist/components/header/components/HeaderNavMoblie.vue.d.ts +17 -0
- package/dist/components/header/components/HeaderUbmcNav.vue.d.ts +2 -0
- package/dist/components/header/index.d.ts +22 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +298 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +145 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +586 -0
- package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
- package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
- package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +12 -0
- package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
- package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
- package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
- package/dist/components/meeting/config.d.ts +27 -0
- package/dist/components/meeting/types.d.ts +166 -0
- package/dist/components/meeting/utils.d.ts +22 -0
- package/dist/components.cjs.js +224 -0
- package/dist/components.css +1 -0
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +45054 -0
- package/dist/index.d.ts +19 -0
- package/docs/design.md +27 -0
- package/docs/design_banner.md +41 -0
- package/docs/design_section.md +27 -0
- package/package.json +56 -0
- package/scripts/generate-components-index.js +104 -0
- package/src/assets/events/svg-icons/icon-checked.svg +3 -0
- package/src/assets/events/svg-icons/icon-competition.svg +7 -0
- package/src/assets/events/svg-icons/icon-events.svg +4 -0
- package/src/assets/events/svg-icons/icon-release.svg +4 -0
- package/src/assets/events/svg-icons/icon-summit.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
- package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
- package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
- package/src/assets/meeting/transparent.png +0 -0
- package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
- package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
- package/src/assets/svg-icons/icon-caret-left.svg +3 -0
- package/src/assets/svg-icons/icon-caret-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -0
- package/src/assets/svg-icons/icon-delete.svg +3 -0
- package/src/assets/svg-icons/icon-filter.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -0
- package/src/assets/svg-icons/icon-header-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-menu.svg +3 -0
- package/src/assets/svg-icons/icon-header-person.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -0
- package/src/assets/svg-icons/icon-loading.svg +4 -0
- package/src/assets/svg-icons/icon-locale.svg +3 -0
- package/src/assets/svg-icons/icon-log-off.svg +3 -0
- package/src/assets/svg-icons/icon-message.svg +3 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -0
- package/src/assets/svg-icons/icon-outlink.svg +3 -0
- package/src/assets/svg-icons/icon-overview.svg +3 -0
- package/src/assets/svg-icons/icon-search.svg +3 -0
- package/src/assets/svg-icons/icon-setting.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -0
- package/src/assets/svg-icons/icon-tips.svg +3 -0
- package/src/components/OBanner.vue +398 -0
- package/src/components/OCookieNotice.vue +575 -0
- package/src/components/OFooter.vue +576 -0
- package/src/components/OHeaderSearch.vue +601 -0
- package/src/components/OHeaderUser.vue +237 -0
- package/src/components/OPlusConfigProvider.vue +32 -0
- package/src/components/OSection.vue +178 -0
- package/src/components/OSourceCode.vue +153 -0
- package/src/components/OThemeSwitcher.vue +108 -0
- package/src/components/activity/OActivityApproval.vue +871 -0
- package/src/components/activity/OActivityForm.vue +548 -0
- package/src/components/activity/OMyActivityCalendar.vue +1501 -0
- package/src/components/activity/config.ts +141 -0
- package/src/components/activity/index.ts +24 -0
- package/src/components/activity/types.ts +88 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -0
- package/src/components/common/ContentWrapper.vue +85 -0
- package/src/components/common/MoreText.vue +124 -0
- package/src/components/common/ThFilter.vue +330 -0
- package/src/components/element-plus/OElCookieNotice.vue +603 -0
- package/src/components/element-plus/index.ts +3 -0
- package/src/components/events/OEventsApply.vue +419 -0
- package/src/components/events/OEventsCalendar.vue +588 -0
- package/src/components/events/OEventsList.vue +354 -0
- package/src/components/events/config.ts +35 -0
- package/src/components/events/index.ts +24 -0
- package/src/components/events/types.ts +80 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/header/OHeader.vue +175 -0
- package/src/components/header/OHeaderMoblie.vue +152 -0
- package/src/components/header/components/HeaderContent.vue +942 -0
- package/src/components/header/components/HeaderNav.vue +280 -0
- package/src/components/header/components/HeaderNavMoblie.vue +346 -0
- package/src/components/header/components/HeaderUbmcNav.vue +540 -0
- package/src/components/header/index.ts +16 -0
- package/src/components/meeting/OMeetingCalendar.vue +900 -0
- package/src/components/meeting/OMeetingForm.vue +1041 -0
- package/src/components/meeting/OMeetingPlayback.vue +439 -0
- package/src/components/meeting/OMyMeetingCalendar.vue +1502 -0
- package/src/components/meeting/OSigMeetingCalendar.vue +411 -0
- package/src/components/meeting/components/OMeetingCalendarList.vue +505 -0
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
- package/src/components/meeting/components/OMeetingDetail.vue +227 -0
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
- package/src/components/meeting/components/OSigMeetingAside.vue +197 -0
- package/src/components/meeting/config.ts +121 -0
- package/src/components/meeting/index.ts +45 -0
- package/src/components/meeting/types.ts +193 -0
- package/src/components/meeting/utils.ts +123 -0
- package/src/draft/Banner.vue +265 -0
- package/src/draft/ButtonCards.vue +106 -0
- package/src/draft/Feature.vue +134 -0
- package/src/draft/Footer.vue +512 -0
- package/src/draft/HorizontalAnchor.vue +165 -0
- package/src/draft/ItemSwiper.vue +133 -0
- package/src/draft/Logo.vue +141 -0
- package/src/draft/LogoCard.vue +75 -0
- package/src/draft/LogoV2.vue +19 -0
- package/src/draft/MainCard.vue +38 -0
- package/src/draft/MultiCard.vue +95 -0
- package/src/draft/MultiIconCard.vue +74 -0
- package/src/draft/OInfoCard.vue +176 -0
- package/src/draft/Process.vue +81 -0
- package/src/draft/Section.vue +167 -0
- package/src/draft/SingleTabCard.vue +85 -0
- package/src/draft/SliderCard.vue +110 -0
- package/src/env.d.ts +16 -0
- package/src/i18n/en.ts +261 -0
- package/src/i18n/index.ts +56 -0
- package/src/i18n/zh.ts +250 -0
- package/src/index.ts +45 -0
- package/src/shared/provide.ts +6 -0
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +10 -0
- package/tsconfig.json +37 -0
- package/vite.config.ts +118 -0
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
OCol,
|
|
4
|
+
ODivider,
|
|
5
|
+
OIcon,
|
|
6
|
+
OInput,
|
|
7
|
+
ORow,
|
|
8
|
+
OScroller,
|
|
9
|
+
OTab,
|
|
10
|
+
OTabPane,
|
|
11
|
+
} from '@opensig/opendesign';
|
|
12
|
+
import { ElSelect, ElCheckbox, ElOption, type CheckboxValueType } from 'element-plus';
|
|
13
|
+
import IconPlaying from '~icons/meeting/icon-playing.svg';
|
|
14
|
+
import IconSearch from '~icons/components/icon-search.svg';
|
|
15
|
+
import IconChevronDown from '~icons/components/icon-chevron-down.svg';
|
|
16
|
+
import IconChevronUp from '~icons/components/icon-chevron-up.svg';
|
|
17
|
+
import IconClose from '~icons/components/icon-close.svg';
|
|
18
|
+
import IconSpeaker from '~icons/meeting/icon-speaker.svg';
|
|
19
|
+
import { useDebounceFn } from '@vueuse/core';
|
|
20
|
+
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
|
21
|
+
import { useI18n } from '@/i18n';
|
|
22
|
+
import { buildVueDompurifyHTMLDirective } from 'vue-dompurify-html';
|
|
23
|
+
import { CaptionItemT, MeetingPlaybackSubtitlesPropsT } from '@/components/meeting';
|
|
24
|
+
|
|
25
|
+
// 局部注册 v-dompurify-html 指令
|
|
26
|
+
const vDompurifyHtml = buildVueDompurifyHTMLDirective();
|
|
27
|
+
|
|
28
|
+
const props = withDefaults(
|
|
29
|
+
defineProps<MeetingPlaybackSubtitlesPropsT>(),
|
|
30
|
+
{
|
|
31
|
+
captions: () => [],
|
|
32
|
+
},
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const { t } = useI18n();
|
|
36
|
+
const currentIndex = computed(() => props.trackIdx);
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
// -------------------- 右侧字幕原文鼠标滚动事件 --------------------
|
|
40
|
+
const scrollContainer = ref();
|
|
41
|
+
const wheelVisible = ref(false);
|
|
42
|
+
const handleScroll = () => {
|
|
43
|
+
wheelVisible.value = true;
|
|
44
|
+
};
|
|
45
|
+
const debounceFn = useDebounceFn(() => {
|
|
46
|
+
wheelVisible.value = false;
|
|
47
|
+
}, 3000);
|
|
48
|
+
|
|
49
|
+
watch(
|
|
50
|
+
() => wheelVisible.value,
|
|
51
|
+
(val) => {
|
|
52
|
+
if (val) {
|
|
53
|
+
debounceFn();
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
// -------------------- 右侧的字幕原文 --------------------
|
|
59
|
+
const computedCaptions = ref<CaptionItemT[]>([]);
|
|
60
|
+
watch(
|
|
61
|
+
() => props.captions,
|
|
62
|
+
() => {
|
|
63
|
+
computedCaptions.value = props.captions || [];
|
|
64
|
+
nextTick(() => {
|
|
65
|
+
if (scrollContainer.value) {
|
|
66
|
+
scrollContainer.value?.scrollTo({
|
|
67
|
+
top: 0,
|
|
68
|
+
behavior: 'smooth',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
immediate: true,
|
|
75
|
+
deep: true,
|
|
76
|
+
},
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
// 处理时间
|
|
80
|
+
const formatTime = (num: string) => {
|
|
81
|
+
const time = num.split('.')[0];
|
|
82
|
+
return (`00:${ time }`).slice(-8);
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
// 时分秒 转换成 以秒为单位的格式 - xx秒
|
|
86
|
+
const transformTime = (time: string) => {
|
|
87
|
+
const arr = time.split(':');
|
|
88
|
+
const hh = arr[arr.length - 3] ? parseInt(arr[arr.length - 3]) : 0;
|
|
89
|
+
const mm = parseInt(arr[arr.length - 2]);
|
|
90
|
+
const ss = parseFloat(arr[arr.length - 1]);
|
|
91
|
+
|
|
92
|
+
return hh * 60 * 60 + mm * 60 + ss;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
onMounted(() => {
|
|
96
|
+
scrollContainer.value = document.querySelector('#captionsScrollDom > .o-scroller-container');
|
|
97
|
+
scrollContainer.value?.addEventListener('wheel', handleScroll);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
watch(
|
|
101
|
+
() => computedCaptions.value,
|
|
102
|
+
() => {
|
|
103
|
+
scrollContainer.value = document.querySelector('#captionsScrollDom > .o-scroller-container');
|
|
104
|
+
scrollContainer.value?.addEventListener('wheel', handleScroll);
|
|
105
|
+
},
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
const activeTab = ref(0);
|
|
109
|
+
const changeTab = () => {
|
|
110
|
+
};
|
|
111
|
+
const videoPosition = (time: string) => {
|
|
112
|
+
const player = props.instance;
|
|
113
|
+
if (!player) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
const startTime = transformTime(time);
|
|
118
|
+
|
|
119
|
+
player.currentTime(startTime);
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
// -------------------- 搜索 --------------------
|
|
123
|
+
const searchValue = ref('');
|
|
124
|
+
const total = ref(0);
|
|
125
|
+
const current = ref(0);
|
|
126
|
+
|
|
127
|
+
const speakers = ref<string[]>([]);
|
|
128
|
+
const ALL = t('common.all');
|
|
129
|
+
const options = computed(() => {
|
|
130
|
+
return [
|
|
131
|
+
...new Set(
|
|
132
|
+
props.captions
|
|
133
|
+
.map((item) => item.speakerLabel)
|
|
134
|
+
.sort()
|
|
135
|
+
.reverse(),
|
|
136
|
+
),
|
|
137
|
+
];
|
|
138
|
+
});
|
|
139
|
+
watch(
|
|
140
|
+
() => currentIndex.value,
|
|
141
|
+
() => {
|
|
142
|
+
if (wheelVisible.value && searchValue.value) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
const captionActive = scrollContainer.value?.querySelectorAll('.captions-item')[currentIndex.value - 1];
|
|
146
|
+
|
|
147
|
+
scrollContainer.value?.scrollTo({
|
|
148
|
+
top: captionActive?.offsetTop - 16,
|
|
149
|
+
behavior: 'smooth',
|
|
150
|
+
});
|
|
151
|
+
},
|
|
152
|
+
);
|
|
153
|
+
|
|
154
|
+
onUnmounted(() => {
|
|
155
|
+
if (scrollContainer.value) {
|
|
156
|
+
scrollContainer.value.removeEventListener('wheel', handleScroll);
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// 搜索定位
|
|
161
|
+
const searchLocate = (step: number, val: number) => {
|
|
162
|
+
const currentLight = document.getElementsByClassName('light-keyword')[step - 1] as HTMLDivElement;
|
|
163
|
+
const nextLight = document.getElementsByClassName('light-keyword')[step - val];
|
|
164
|
+
nextLight?.classList.remove('light-keyword-active');
|
|
165
|
+
currentLight?.classList.add('light-keyword-active');
|
|
166
|
+
|
|
167
|
+
// 定位
|
|
168
|
+
const aboveVisible = currentLight.offsetTop + currentLight.offsetHeight < scrollContainer.value?.scrollTop; // 是否未到屏幕显示区域
|
|
169
|
+
const exceedVisible = currentLight.offsetTop > scrollContainer.value?.offsetHeight + scrollContainer.value?.scrollTop; // 是否超出屏幕
|
|
170
|
+
if (aboveVisible || exceedVisible) {
|
|
171
|
+
scrollContainer.value?.scrollTo({
|
|
172
|
+
top: currentLight.parentElement?.parentElement?.offsetTop,
|
|
173
|
+
behavior: 'smooth',
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
// 上一个
|
|
180
|
+
const prevKeyword = () => {
|
|
181
|
+
if (!total.value || current.value === 1) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
current.value--;
|
|
186
|
+
|
|
187
|
+
searchLocate(current.value, 0);
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// 下一个
|
|
191
|
+
const nextKeyword = (e?: any) => {
|
|
192
|
+
if (e?.shiftKey) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
if (!total.value || current.value === total.value) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
current.value++;
|
|
200
|
+
|
|
201
|
+
searchLocate(current.value, 2);
|
|
202
|
+
};
|
|
203
|
+
// 高亮匹配
|
|
204
|
+
const highlightText = (val: string) => {
|
|
205
|
+
computedCaptions.value = props.captions!.filter((v) => {
|
|
206
|
+
return speakers.value.includes(v.speakerLabel);
|
|
207
|
+
})
|
|
208
|
+
.map((item) => {
|
|
209
|
+
return {
|
|
210
|
+
...item,
|
|
211
|
+
contentHtml: val ? item.contentHtml.replaceAll(val, `<span class="light-keyword">${ val }</span>`) : item.contentHtml,
|
|
212
|
+
};
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
nextTick(() => {
|
|
216
|
+
const lightAll = document.getElementsByClassName('light-keyword');
|
|
217
|
+
total.value = lightAll.length;
|
|
218
|
+
if (total.value) {
|
|
219
|
+
nextKeyword();
|
|
220
|
+
} else {
|
|
221
|
+
scrollContainer.value?.scrollTo({
|
|
222
|
+
top: 0,
|
|
223
|
+
behavior: 'smooth',
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
const debounceTextFn = useDebounceFn(highlightText, 300);
|
|
230
|
+
|
|
231
|
+
// 监听搜索参数变化
|
|
232
|
+
watch(
|
|
233
|
+
() => searchValue.value,
|
|
234
|
+
(val) => {
|
|
235
|
+
current.value = 0;
|
|
236
|
+
debounceTextFn(val);
|
|
237
|
+
},
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
// 监听 options 变化,同步更新 speakers
|
|
241
|
+
watch(
|
|
242
|
+
() => options.value,
|
|
243
|
+
(newVal) => {
|
|
244
|
+
speakers.value = newVal;
|
|
245
|
+
},
|
|
246
|
+
{ immediate: true },
|
|
247
|
+
);
|
|
248
|
+
|
|
249
|
+
const checkAll = ref(false);
|
|
250
|
+
const indeterminate = ref(false);
|
|
251
|
+
const handleCheckAll = (checked: CheckboxValueType) => {
|
|
252
|
+
indeterminate.value = false;
|
|
253
|
+
if (checked) {
|
|
254
|
+
speakers.value = options.value;
|
|
255
|
+
} else {
|
|
256
|
+
speakers.value = [];
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
watch(
|
|
261
|
+
() => speakers.value,
|
|
262
|
+
(val) => {
|
|
263
|
+
if (val.length === 0) {
|
|
264
|
+
checkAll.value = false;
|
|
265
|
+
indeterminate.value = false;
|
|
266
|
+
} else if (val.length === options.value.length) {
|
|
267
|
+
checkAll.value = true;
|
|
268
|
+
indeterminate.value = false;
|
|
269
|
+
} else {
|
|
270
|
+
indeterminate.value = true;
|
|
271
|
+
}
|
|
272
|
+
debounceTextFn(searchValue.value);
|
|
273
|
+
},
|
|
274
|
+
{ deep: true },
|
|
275
|
+
);
|
|
276
|
+
</script>
|
|
277
|
+
|
|
278
|
+
<template>
|
|
279
|
+
<div class="o-meeting-playback-subtitles">
|
|
280
|
+
<div class="search-captions">
|
|
281
|
+
<OInput
|
|
282
|
+
v-model="searchValue"
|
|
283
|
+
@keydown.enter="nextKeyword"
|
|
284
|
+
@keydown.shift.enter.stop="prevKeyword"
|
|
285
|
+
:placeholder="t('meeting.searchSubtitlePlaceholder')"
|
|
286
|
+
size="large"
|
|
287
|
+
class="input-captions"
|
|
288
|
+
>
|
|
289
|
+
<template #prefix>
|
|
290
|
+
<OIcon>
|
|
291
|
+
<IconSearch />
|
|
292
|
+
</OIcon>
|
|
293
|
+
</template>
|
|
294
|
+
<template #suffix>
|
|
295
|
+
<div v-if="searchValue" class="suffix-box">
|
|
296
|
+
<span>{{ current }}/{{ total }}</span>
|
|
297
|
+
<OIcon @click="prevKeyword">
|
|
298
|
+
<IconChevronUp />
|
|
299
|
+
</OIcon>
|
|
300
|
+
<OIcon @click="nextKeyword">
|
|
301
|
+
<IconChevronDown />
|
|
302
|
+
</OIcon>
|
|
303
|
+
<ODivider direction="v" />
|
|
304
|
+
<OIcon class="hover-close" @click="searchValue = ''">
|
|
305
|
+
<IconClose />
|
|
306
|
+
</OIcon>
|
|
307
|
+
</div>
|
|
308
|
+
</template>
|
|
309
|
+
</OInput>
|
|
310
|
+
<div class="right-handle">
|
|
311
|
+
<ElSelect
|
|
312
|
+
multiple
|
|
313
|
+
v-model="speakers"
|
|
314
|
+
popper-class="speakers-selector-popper"
|
|
315
|
+
class="speakers-selector"
|
|
316
|
+
placement="bottom">
|
|
317
|
+
<template #prefix>
|
|
318
|
+
<OIcon>
|
|
319
|
+
<IconSpeaker />
|
|
320
|
+
</OIcon>
|
|
321
|
+
</template>
|
|
322
|
+
<template #header>
|
|
323
|
+
<ElCheckbox v-model="checkAll" :indeterminate="indeterminate" @change="handleCheckAll">{{ ALL }}
|
|
324
|
+
</ElCheckbox>
|
|
325
|
+
</template>
|
|
326
|
+
<ElOption v-for="t in options" :key="t" :label="t" :value="t">
|
|
327
|
+
<ElCheckbox :model-value="speakers.includes(t)">{{ t }}</ElCheckbox>
|
|
328
|
+
</ElOption>
|
|
329
|
+
</ElSelect>
|
|
330
|
+
</div>
|
|
331
|
+
</div>
|
|
332
|
+
<OTab v-model="activeTab" variant="text" class="captions-tab" @change="changeTab">
|
|
333
|
+
<OTabPane :value="0" :label="t('meeting.audioToText')">
|
|
334
|
+
<OScroller v-if="computedCaptions.length" id="captionsScrollDom" class="captions-scroller" show-type="hover"
|
|
335
|
+
size="small" disabled-x>
|
|
336
|
+
<ORow gap="0 12px" wrap="wrap">
|
|
337
|
+
<OCol flex="0 0 100%" v-for="(item, i) in computedCaptions" :key="i">
|
|
338
|
+
<div class="captions-item" :class="{ 'captions-item-active': currentIndex === i + 1 }"
|
|
339
|
+
@click="videoPosition(item.start_time)">
|
|
340
|
+
<div class="info">
|
|
341
|
+
<div class="num">{{ item.speakerIdx }}</div>
|
|
342
|
+
<div class="speaker">{{ item.speakerLabel }}</div>
|
|
343
|
+
<div class="start-time">{{ formatTime(item.start_time) }}</div>
|
|
344
|
+
<OIcon v-if="currentIndex === i + 1" class="playing initial-fill">
|
|
345
|
+
<IconPlaying />
|
|
346
|
+
</OIcon>
|
|
347
|
+
</div>
|
|
348
|
+
<div class="text" v-dompurify-html="item.contentHtml"></div>
|
|
349
|
+
</div>
|
|
350
|
+
</OCol>
|
|
351
|
+
</ORow>
|
|
352
|
+
</OScroller>
|
|
353
|
+
<div v-else>111</div>
|
|
354
|
+
<!-- <AppEmpty v-else height="100%" />-->
|
|
355
|
+
</OTabPane>
|
|
356
|
+
</OTab>
|
|
357
|
+
</div>
|
|
358
|
+
</template>
|
|
359
|
+
|
|
360
|
+
<style lang="scss">
|
|
361
|
+
.o-meeting-playback-subtitles {
|
|
362
|
+
width: 100%;
|
|
363
|
+
height: 100%;
|
|
364
|
+
min-height: calc(var(--layout-content-min-height) - 104px);
|
|
365
|
+
background-color: var(--o-color-fill2);
|
|
366
|
+
border-radius: var(--o-radius-xs);
|
|
367
|
+
|
|
368
|
+
.search-captions {
|
|
369
|
+
display: flex;
|
|
370
|
+
align-items: center;
|
|
371
|
+
gap: var(--o-gap-4);
|
|
372
|
+
|
|
373
|
+
.input-captions {
|
|
374
|
+
--input-radius: var(--o-radius-xs);
|
|
375
|
+
--_box-radius: var(--o-radius-xs);
|
|
376
|
+
flex-grow: 1;
|
|
377
|
+
|
|
378
|
+
.o-icon {
|
|
379
|
+
font-size: 24px;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.suffix-box {
|
|
383
|
+
display: flex;
|
|
384
|
+
align-items: center;
|
|
385
|
+
gap: var(--o-gap-2);
|
|
386
|
+
|
|
387
|
+
.o-icon {
|
|
388
|
+
font-size: 20px;
|
|
389
|
+
cursor: pointer;
|
|
390
|
+
@include hover {
|
|
391
|
+
color: var(--o-color-primary1);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.o-divider {
|
|
396
|
+
--o-divider-label-gap: 0;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.hover-close {
|
|
400
|
+
width: 24px;
|
|
401
|
+
height: 24px;
|
|
402
|
+
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
|
|
403
|
+
@include hover {
|
|
404
|
+
transform: rotate(-180deg);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.right-handle {
|
|
411
|
+
flex-shrink: 0;
|
|
412
|
+
display: flex;
|
|
413
|
+
align-items: center;
|
|
414
|
+
gap: var(--o-gap-4);
|
|
415
|
+
|
|
416
|
+
.o-icon {
|
|
417
|
+
font-size: 16px;
|
|
418
|
+
cursor: pointer;
|
|
419
|
+
color: var(--o-color-info2);
|
|
420
|
+
@include hover {
|
|
421
|
+
color: var(--o-color-primary1);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.speakers-selector {
|
|
426
|
+
--select-height: 16px;
|
|
427
|
+
height: fit-content;
|
|
428
|
+
width: fit-content;
|
|
429
|
+
|
|
430
|
+
.el-select__wrapper {
|
|
431
|
+
box-shadow: none;
|
|
432
|
+
padding: 0;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.el-select__selection,
|
|
436
|
+
.el-select__suffix {
|
|
437
|
+
display: none;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.o-tab {
|
|
444
|
+
margin-top: var(--o-gap-5);
|
|
445
|
+
height: calc(100% - 64px);
|
|
446
|
+
|
|
447
|
+
.o-tab-navs {
|
|
448
|
+
justify-content: flex-start;
|
|
449
|
+
|
|
450
|
+
.o-tab-nav {
|
|
451
|
+
padding-bottom: var(--o-gap-4);
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.o-tab-body {
|
|
456
|
+
height: calc(100% - var(--o-line_height-text2) - var(--o-gap-4));
|
|
457
|
+
.o-tab-pane {
|
|
458
|
+
height: 100%;
|
|
459
|
+
padding-top: var(--o-gap-4);
|
|
460
|
+
|
|
461
|
+
.o-scroller {
|
|
462
|
+
height: 100%;
|
|
463
|
+
|
|
464
|
+
.o-scrollbar {
|
|
465
|
+
width: calc(100% + 16px);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.o-row {
|
|
472
|
+
margin-top: var(--o-gap-5);
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.captions-tab {
|
|
477
|
+
.captions-scroller {
|
|
478
|
+
@include respond-to('<=pad_v') {
|
|
479
|
+
max-height: 600px;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.captions-item {
|
|
484
|
+
padding: 4px 8px;
|
|
485
|
+
cursor: pointer;
|
|
486
|
+
border-radius: var(--o-radius-xs);
|
|
487
|
+
@include hover {
|
|
488
|
+
background-color: rgba(var(--o-blue-6), 0.1);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
&.captions-item-active {
|
|
492
|
+
background-color: rgba(var(--o-blue-6), 0.1);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.info {
|
|
496
|
+
display: flex;
|
|
497
|
+
align-items: center;
|
|
498
|
+
|
|
499
|
+
.num {
|
|
500
|
+
width: 18px;
|
|
501
|
+
height: 18px;
|
|
502
|
+
border-radius: 50%;
|
|
503
|
+
background-color: var(--o-color-primary2);
|
|
504
|
+
color: var(--o-color-info1-inverse);
|
|
505
|
+
display: flex;
|
|
506
|
+
justify-content: center;
|
|
507
|
+
align-items: center;
|
|
508
|
+
@include tip2;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.speaker {
|
|
512
|
+
color: var(--o-color-info4);
|
|
513
|
+
margin-left: 4px;
|
|
514
|
+
@include tip2;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.start-time {
|
|
518
|
+
color: var(--o-color-info4);
|
|
519
|
+
margin-left: 16px;
|
|
520
|
+
@include tip2;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.playing {
|
|
524
|
+
margin-left: 16px;
|
|
525
|
+
color: var(--o-color-primary1);
|
|
526
|
+
|
|
527
|
+
svg {
|
|
528
|
+
width: 16px;
|
|
529
|
+
height: 16px;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.text {
|
|
535
|
+
color: var(--o-color-info2);
|
|
536
|
+
margin-top: 8px;
|
|
537
|
+
@include tip1;
|
|
538
|
+
|
|
539
|
+
.light-keyword {
|
|
540
|
+
background-color: rgba(var(--o-blue-6), 0.2);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.light-keyword-active {
|
|
544
|
+
background-color: rgba(var(--o-blue-6), 0.4);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
</style>
|
|
551
|
+
|
|
552
|
+
<style lang="scss">
|
|
553
|
+
.speakers-selector-popper {
|
|
554
|
+
border: none;
|
|
555
|
+
--item-height: 40px;
|
|
556
|
+
--el-color-primary: var(--o-color-primary1);
|
|
557
|
+
|
|
558
|
+
.el-select-dropdown {
|
|
559
|
+
padding: 4px;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.el-checkbox {
|
|
563
|
+
width: 100%;
|
|
564
|
+
cursor: pointer;
|
|
565
|
+
display: flex;
|
|
566
|
+
align-items: center;
|
|
567
|
+
}
|
|
568
|
+
.el-select-dropdown__header {
|
|
569
|
+
height: var(--item-height);
|
|
570
|
+
display: flex;
|
|
571
|
+
align-items: center;
|
|
572
|
+
padding: 0 12px;
|
|
573
|
+
border-bottom: 0;
|
|
574
|
+
cursor: pointer;
|
|
575
|
+
|
|
576
|
+
&:hover {
|
|
577
|
+
background-color: var(--o-color-control2-light);
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.el-select-dropdown__list {
|
|
582
|
+
padding: 2px 0 0;
|
|
583
|
+
|
|
584
|
+
.el-select-dropdown__item {
|
|
585
|
+
padding: 0 12px;
|
|
586
|
+
height: var(--item-height);
|
|
587
|
+
display: flex;
|
|
588
|
+
align-items: center;
|
|
589
|
+
cursor: pointer;
|
|
590
|
+
|
|
591
|
+
&.is-selected,
|
|
592
|
+
&.is-hovering {
|
|
593
|
+
background-color: transparent;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
&.is-selected::after {
|
|
597
|
+
content: none;
|
|
598
|
+
display: none;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
&:hover {
|
|
602
|
+
background-color: var(--o-color-control2-light);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.el-select-dropdown__item + .el-select-dropdown__item {
|
|
607
|
+
margin-top: 2px;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
</style>
|