@@ -53,7 +55,29 @@ function handleItemClick(item: any[], index: number) {
{{ (item as any[])[3] }}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -66,7 +90,34 @@ function handleItemClick(item: any[], index: number) {
width: 100%;
}
-/* 纵向布局 */
+.message-item {
+ position: relative;
+ display: flex;
+ align-items: flex-start;
+ padding: 4px 0.75rem;
+}
+
+.message-content {
+ flex: 1;
+ cursor: pointer;
+}
+
+.hover-actions {
+ position: absolute;
+ right: 8px;
+ top: 50%;
+ height: 100%;
+ transform: translateY(-50%);
+ display: none;
+ padding: 4px 8px;
+ /* background: linear-gradient(to right, rgba(144, 147, 153, 0), var(--ep-color-info)); */
+ border-radius: 4px;
+}
+
+.message-item:hover .hover-actions {
+ display: flex;
+}
+
.message-btn {
width: 100%;
padding: 4px 0.75rem;
@@ -90,14 +141,8 @@ function handleItemClick(item: any[], index: number) {
gap: 4px;
}
-.message-content {
- display: flex;
- justify-content: flex-start;
- align-items: flex-start;
-}
-
.item-text.ep-text {
align-self: start;
- line-height: 1.5; /* 消除行高留白 */
+ line-height: 1.5;
}
diff --git a/src/pages/nav/HazardCheckResult/index.vue b/src/pages/nav/HazardCheckResult/index.vue
index 98f51b4..fa3ef9e 100644
--- a/src/pages/nav/HazardCheckResult/index.vue
+++ b/src/pages/nav/HazardCheckResult/index.vue
@@ -234,6 +234,19 @@ function handleJumpToTimePoint(seconds: number) {
videoEl.pause()
}
+function handlePlayAndSeek(item: any[]) {
+ const seconds = item[0]
+ if (Number.isNaN(seconds) || seconds < 0)
+ return
+
+ const videoEl = videoRef.value
+ if (!videoEl)
+ return
+
+ videoEl.currentTime = seconds
+ videoEl.play()
+}
+
function getAudioRecData(res: any) {
if (!res) {
console.error('音频识别结果为空')
@@ -445,7 +458,12 @@ onMounted(() => {
- handleJumpToTimePoint(Number(item[0]))" />
+ handleJumpToTimePoint(Number(item[0]))"
+ @play="(item: any[]) => handlePlayAndSeek(item)"
+ />