From d947393b1deff8798c58a25025587b48d8388e07 Mon Sep 17 00:00:00 2001 From: jianzhichu Date: Mon, 1 Dec 2025 13:05:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=92=AD=E6=94=BE=E9=A1=B5=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=AD=98=E5=82=A8=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/pages/workplace/RecordTable.vue | 51 +- app/src/pages/workplace/statics copy 2.vue | 745 ----------------- app/src/pages/workplace/statics copy.vue | 922 --------------------- 3 files changed, 50 insertions(+), 1668 deletions(-) delete mode 100644 app/src/pages/workplace/statics copy 2.vue delete mode 100644 app/src/pages/workplace/statics copy.vue diff --git a/app/src/pages/workplace/RecordTable.vue b/app/src/pages/workplace/RecordTable.vue index c3b366d..efb4dc5 100644 --- a/app/src/pages/workplace/RecordTable.vue +++ b/app/src/pages/workplace/RecordTable.vue @@ -67,13 +67,19 @@ - + +
@@ -146,6 +152,7 @@ interface DataItem { dyUser?: string; // CK名称 fileHash?: string; authorId?: string; + videoSavePath: string; } interface QuaryParam { @@ -317,6 +324,33 @@ const videoId = ref(''); const playingTitle = ref(''); let videoProgressListener: ((e: Event) => void) | null = null; // 进度监听器 +/** 格式化存储路径(过长时中间省略) */ +const formatFilePath = (filePath?: string) => { + if (!filePath) return '暂无存储路径信息'; + // 路径超过80字符时,保留前40和后30字符,中间用...省略 + if (filePath.length > 80) { + return `${filePath.slice(0, 40)}...${filePath.slice(-30)}`; + } + return filePath; +}; + +/** 渲染弹窗标题(带悬停显示存储路径) */ +const renderModalTitle = () => { + // 获取存储路径(优先显示实际路径,无路径时显示提示) + const filePath = formatFilePath(currentVideoInfo.value?.videoSavePath); + // 格式化后的标题文本 + const titleText = formatModalTitle(currentVideoInfo.value?.videoTitle); + + return h( + 'span', + { + class: 'modal-title-with-tooltip', + title: filePath, // 悬停时显示的存储路径 + }, + titleText + ); +}; + // -------------------------- 核心工具方法 -------------------------- /** 格式化表格视频标题:超过20字符显示省略号 */ const formatVideoTitle = (title?: string) => { @@ -455,6 +489,7 @@ const handleVideoClick = (record: DataItem) => { } // 保存当前视频信息 currentVideoInfo.value = record; + console.log(currentVideoInfo); videoId.value = record.id; playingTitle.value = formatModalTitle(record.videoTitle); // 重置错误状态 @@ -1152,4 +1187,18 @@ onMounted(() => { gap: 4px !important; } } +/* 弹窗标题悬停样式 */ +.modal-title-with-tooltip { + position: relative; + cursor: help; /* 鼠标变为帮助图标,提示可悬停 */ + padding: 2px 0; +} + +/* 可选:添加下划线动画增强交互提示 */ +.modal-title-with-tooltip:hover { + text-decoration: underline; + text-underline-offset: 4px; + text-decoration-color: #1890ff; + text-decoration-thickness: 1px; +} \ No newline at end of file diff --git a/app/src/pages/workplace/statics copy 2.vue b/app/src/pages/workplace/statics copy 2.vue deleted file mode 100644 index 572c088..0000000 --- a/app/src/pages/workplace/statics copy 2.vue +++ /dev/null @@ -1,745 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/src/pages/workplace/statics copy.vue b/app/src/pages/workplace/statics copy.vue deleted file mode 100644 index db166d8..0000000 --- a/app/src/pages/workplace/statics copy.vue +++ /dev/null @@ -1,922 +0,0 @@ - - - - - \ No newline at end of file