Commit fa6919bf by cat

zd

parent 6688d535
......@@ -69,3 +69,11 @@ export function startConvert(id) {
method: 'post',
})
}
// 导出Word(转录文本)
export function exportWordYY(id) {
return request({
url: '/hyjyxx/hyjyxx/exportWord_YY',
method: 'post',
data: { id },
})
}
......@@ -7,10 +7,14 @@
</div>
<el-row :gutter="20">
<el-col :span="16">
<el-col :span="12">
<el-card shadow="never"
body-style="padding: 12px; height: calc(100vh - 220px); overflow: hidden; display: flex; flex-direction: column;background-color:#f6f8fa ">
<div style="font-weight: 600; margin-bottom: 8px;">转录文本</div>
<div style="display:flex; align-items:center; justify-content: space-between; margin-bottom: 8px;">
<div style="font-weight: 600;">转录文本</div>
<el-button type="primary" size="small" icon="el-icon-download" @click="handleExportWord">导出</el-button>
</div>
<div class="transcript-area flex-scroll" style="margin-left: 10px;">
<div style="padding-bottom: 10px;">
<div v-for="(segment, index) in transcriptList" :key="index" placement="top" style="margin-bottom: 15px;">
......@@ -62,7 +66,7 @@
</div>
</el-card>
</el-col>
<el-col :span="8">
<el-col :span="12">
<el-card shadow="never" body-style="padding: 12px; height: calc(100vh - 220px); overflow: auto;">
<div
style="display:flex; align-items:center; justify-content: space-between; margin-bottom: 12px;">
......@@ -79,6 +83,7 @@
<script>
import { getHyjyxx } from '@/api/hyjyxx/hyjyxx'
import { download } from '@/utils/request'
import icon1 from '@/assets/images/个人1.svg'
import icon2 from '@/assets/images/个人2.svg'
import icon3 from '@/assets/images/个人3.svg'
......@@ -237,7 +242,6 @@ export default {
const parsed = JSON.parse(bzh)
if (Array.isArray(parsed)) bzh = parsed
} catch (e) {
console.warn('Failed to parse ywBzh string:', e)
}
}
if (Array.isArray(bzh)) {
......@@ -314,6 +318,16 @@ export default {
},
reload() {
this.load()
},
/**
* 导出Word(转录文本)
*/
handleExportWord() {
if (!this.id) {
this.$message.warning('缺少会议ID')
return
}
download('hyjyxx/hyjyxx/exportWord_YY', { id: this.id }, `会议转录文本_${this.detail.ypwjName || this.id}_${new Date().getTime()}.docx`)
}
}
}
......
......@@ -3238,7 +3238,7 @@ export default {
}, 100);
},
// 处理缩略图(绿色线)点击/双击事件
onThumbLinePick(payload) {
async onThumbLinePick(payload) {
try {
if (!payload) return;
......@@ -3278,15 +3278,29 @@ export default {
const seg = this.segyList[lineIdx];
console.log('[index2] 设置 currentSegyIndex:', { lineIdx, segId: seg && seg.id, segName: seg && (seg.name || seg.segyName || seg.jbsegyName || seg.xbsegyName) });
this.currentSegyIndex = lineIdx;
if (seg) {
this.loadDualSegyFiles(seg.jbsegy, seg.xbsegy, seg.jbsegyName, seg.xbsegyName);
}
// 如果弹窗是打开的,点击后关闭弹窗
// 立即关闭弹窗,给用户反馈
if (this.showThumbDialog) {
this.showThumbDialog = false;
}
// 设置加载状态,避免显示错误的图
if (seg) {
this.isLoading = true;
try {
// 等待数据加载完成
await this.loadDualSegyFiles(seg.jbsegy, seg.xbsegy, seg.jbsegyName, seg.xbsegyName);
} catch (error) {
console.error('[index2] loadDualSegyFiles 加载失败:', error);
} finally {
// 数据加载完成后关闭加载状态
this.isLoading = false;
}
}
} catch (e) {
console.error('[index2] onThumbLinePick error:', e);
// 确保出错时也关闭加载状态
this.isLoading = false;
}
},
// 确保缩略图渲染
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment