Commit e24a3855 authored by Jeff nan's avatar Jeff nan

feat: 添加时间的微调编辑

parent 18a303ab
......@@ -297,6 +297,44 @@
background: #66b1ff;
}
/* 时间编辑入口 */
.time-edit-line {
display: inline-flex;
align-items: center;
gap: 4px;
}
.time-edit-icon {
color: #409eff;
cursor: pointer;
font-size: 13px;
margin-left: 2px;
}
.time-edit-icon:hover {
color: #66b1ff;
}
/* 时间编辑弹窗 */
.time-edit-form .time-edit-hint {
color: #909399;
font-size: 12px;
margin-bottom: 14px;
line-height: 1.5;
}
.time-edit-inputs {
display: flex;
gap: 12px;
}
.time-edit-field {
flex: 1;
min-width: 0;
}
.time-edit-field label {
display: block;
margin-bottom: 6px;
color: #606266;
font-size: 13px;
}
/* 卡片悬停效果 */
.upload-section,
.video-section,
......
......@@ -241,7 +241,21 @@
<div style="display:flex; align-items:center; color:#909399; font-size:12px; margin-bottom:4px;">
<div style="display:flex; align-items:center; gap:8px;">
<span>#{{ item.index }}</span>
<span>{{ item.start }} - {{ item.end }}</span>
<span class="time-edit-line">
<span>{{ item.start }}</span>
<i
class="el-icon-edit time-edit-icon"
title="编辑开始时间"
@click="openTimeEdit({ type: 'sentence-start', tlIndex: idx })"
></i>
<span> - </span>
<span>{{ item.end }}</span>
<i
class="el-icon-edit time-edit-icon"
title="编辑结束时间"
@click="openTimeEdit({ type: 'sentence-end', tlIndex: idx })"
></i>
</span>
<el-button
v-if="idx > 0"
size="mini"
......@@ -274,10 +288,17 @@
@cell-mouse-enter="(row, column, cell, event) => onSWordsCellEnter(idx, row, column, cell, event)"
@cell-mouse-leave="(row, column, cell, event) => onSWordsCellLeave(idx, row, column, cell, event)"
>
<el-table-column label="start" width="90">
<el-table-column label="start" width="130">
<template slot-scope="s">
<div class="swords-start-cell">
{{ formatTimeNumeric(s.row.start) }}
<span class="time-edit-line">
<span>{{ formatTimeNumeric(s.row.start) }}</span>
<i
class="el-icon-edit time-edit-icon"
title="编辑分词开始时间"
@click="openTimeEdit({ type: 'word-start', tlIndex: idx, wordIndex: s.$index })"
></i>
</span>
<el-tooltip
v-if="item._hoveredSIndex === s.$index && !isAnyTaskRunning() && s.$index < (item.sWordsRef ? item.sWordsRef.length - 1 : 0)"
content="在此处拆分为两句"
......@@ -291,9 +312,16 @@
</div>
</template>
</el-table-column>
<el-table-column label="end" width="90">
<el-table-column label="end" width="130">
<template slot-scope="s">
{{ formatTimeNumeric(s.row.end) }}
<span class="time-edit-line">
<span>{{ formatTimeNumeric(s.row.end) }}</span>
<i
class="el-icon-edit time-edit-icon"
title="编辑分词结束时间"
@click="openTimeEdit({ type: 'word-end', tlIndex: idx, wordIndex: s.$index })"
></i>
</span>
</template>
</el-table-column>
<el-table-column label="word">
......@@ -333,6 +361,53 @@
</div>
</div>
</el-dialog>
<!-- 时间编辑弹窗:句子 / 原文分词 共用 -->
<el-dialog
:title="timeEditDialog.title"
:visible.sync="timeEditDialog.visible"
width="420px"
append-to-body
:close-on-click-modal="false"
custom-class="time-edit-dialog"
>
<div class="time-edit-form">
<div v-if="timeEditDialog.boundHint" class="time-edit-hint">{{ timeEditDialog.boundHint }}</div>
<div class="time-edit-inputs">
<div class="time-edit-field">
<label>分钟</label>
<el-input
v-model="timeEditDialog.minutes"
size="small"
placeholder="0"
maxlength="6"
></el-input>
</div>
<div class="time-edit-field">
<label>秒</label>
<el-input
v-model="timeEditDialog.seconds"
size="small"
placeholder="0"
maxlength="2"
></el-input>
</div>
<div class="time-edit-field">
<label>毫秒</label>
<el-input
v-model="timeEditDialog.milliseconds"
size="small"
placeholder="0"
maxlength="3"
></el-input>
</div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="timeEditDialog.visible = false">取消</el-button>
<el-button size="small" type="primary" @click="confirmTimeEdit">确定</el-button>
</span>
</el-dialog>
</div>
</div>
</body>
......
This diff is collapsed.
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