From 71c71868536a7b31d34eac067da2633fb624d4e5 Mon Sep 17 00:00:00 2001 From: yueliuli <1628111725@qq.com> Date: Thu, 23 Apr 2026 15:43:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=B9=E8=AF=9D=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=BB=84=E4=BB=B6=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=BA=BF=E7=BB=84=E4=BB=B6=E5=B8=83=E5=B1=80bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components.d.ts | 1 + .../hazard_inspect/SubtitleList.vue | 103 ++++++++++++++++++ .../hazard_inspect/timeline/timeline.css | 1 - .../nav/hazardCheck/HazardCheckResult.vue | 62 ++++++++--- 4 files changed, 149 insertions(+), 18 deletions(-) create mode 100644 src/components/hazard_inspect/SubtitleList.vue diff --git a/src/components.d.ts b/src/components.d.ts index 8419878..181d985 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -56,6 +56,7 @@ declare module 'vue' { MessageBoxDemo: typeof import('./components/MessageBoxDemo.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] + SubtitleList: typeof import('./components/hazard_inspect/SubtitleList.vue')['default'] Timeline: typeof import('./components/hazard_inspect/timeline/timeline.vue')['default'] } } diff --git a/src/components/hazard_inspect/SubtitleList.vue b/src/components/hazard_inspect/SubtitleList.vue new file mode 100644 index 0000000..3dec326 --- /dev/null +++ b/src/components/hazard_inspect/SubtitleList.vue @@ -0,0 +1,103 @@ + + + + + + + + + {{ props.title }} (共 {{ props.data.length }} 条) + + + + + + + + + + + + + + {{ (item as any[])[1] }} + + + {{ (item as any[])[2] }} + + + + {{ (item as any[])[3] }} + + + + + + + + + + diff --git a/src/components/hazard_inspect/timeline/timeline.css b/src/components/hazard_inspect/timeline/timeline.css index 0e95490..2b55bed 100644 --- a/src/components/hazard_inspect/timeline/timeline.css +++ b/src/components/hazard_inspect/timeline/timeline.css @@ -2,7 +2,6 @@ height: 33.333%; display: flex; flex-direction: column; - border-top: 1px solid var(--ep-border-color); font-family: 'Inter', sans-serif; } diff --git a/src/pages/nav/hazardCheck/HazardCheckResult.vue b/src/pages/nav/hazardCheck/HazardCheckResult.vue index 9e9f3f0..3f63920 100644 --- a/src/pages/nav/hazardCheck/HazardCheckResult.vue +++ b/src/pages/nav/hazardCheck/HazardCheckResult.vue @@ -20,7 +20,7 @@ interface HazardItem { interface DataFormat { 隐患列表: [number, string][] - // 隐患列表: [number, string, string][] + 对话列表: [number, string, string, string][] 隐患范围字典: Record 隐患数据: HazardItem[] } @@ -63,6 +63,7 @@ const data = ref({ 隐患列表: [], 隐患范围字典: {}, 隐患数据: [], + 对话列表: [], }) // const data = ref({ // 隐患列表: ['隐患1', '隐患2'], @@ -174,6 +175,20 @@ function getData() { 整改建议: obj.recommend || '', } }) + + // 模拟数据 + data.value.对话列表 = [ + [0, '00:00', '客户', '当前对话仅为测试数据'], + [3, '00:03', '客户', '你好'], + [5.2, '00:05', '专家', '你好,有什么我可以帮助你的吗?'], + [8, '00:08', '客户', '我想知道我的隐患等级'], + [10.5, '00:10', '专家', '你的隐患等级是一般隐患'], + [12.3, '00:12', '客户', '我需要一个整改建议'], + [20.1, '00:20', '专家', '好的,我会尽快给你一个整改建议'], + [16.5, '00:16', '客户', '我需要一个整改建议'], + [18.2, '00:28', '专家', '好的,我会尽快给你一个整改建议'], + [18.2, '00:30', '专家', '好的,我会尽快给你一个整改建议'], + ] } // 点击隐患列表项,更新选中隐患 @@ -242,22 +257,31 @@ onMounted(() => { // 从路由参数中获取数据 const vidFile = router.currentRoute.value.query.vid_file as string if (vidFile) { - runApi('/get_full_vid_path', { - vid_file: vidFile, - }).then((res) => { - // console.log('接口调用成功,返回数据:', res) - vidUrl.value = (res as string[])[0] + // 调用接口获取完整视频路径 + // runApi('/get_full_vid_path', { + // vid_file: vidFile, + // }).then((res) => { + // // console.log('接口调用成功,返回数据:', res) + // vidUrl.value = (res as string[])[0] - // 截取文件名 - const fileName = vidUrl.value.split('\\').pop() || '' - // 去掉文件扩展名 - const fileNameNoExt = fileName.split('.')[0] - // 文件扩展名 - const fileExt = fileName.split('.')[1] - // 临时拼接视频路径 - vidUrl.value = `http://localhost:8086/${fileNameNoExt}_h264.${fileExt}` - }) + // // 截取文件名 + // const fileName = vidUrl.value.split('\\').pop() || '' + // // 去掉文件扩展名 + // const fileNameNoExt = fileName.split('.')[0] + // // 文件扩展名 + // const fileExt = fileName.split('.')[1] + // // 临时拼接视频路径 + // vidUrl.value = `http://localhost:8086/${fileNameNoExt}_h264.${fileExt}` + // }) + // 临时拼接视频路径 + // 去掉文件扩展名 + const fileNameNoExt = vidFile.split('.')[0] + // 文件扩展名 + const fileExt = vidFile.split('.')[1] + vidUrl.value = `http://localhost:8086/${fileNameNoExt}_h264.${fileExt}` + + // 调用接口获取隐患数据 // runApi('/run', { // vid_file: vidFile, // run_sam3: false, @@ -270,6 +294,7 @@ onMounted(() => { // console.log('接口调用成功,返回数据:', JSON.stringify(res)) // }) + // 模拟数据 resultData.value = { class_list: [ '消火栓', @@ -435,7 +460,7 @@ onMounted(() => { - + @@ -504,6 +529,9 @@ onMounted(() => { + + +