|
@@ -1,69 +1,64 @@
|
|
|
<template>
|
|
|
<div class="CompareTime">
|
|
|
- <div
|
|
|
- :class="['sentence']"
|
|
|
- v-for="(item, index) in data"
|
|
|
- :key="index + 'sen'"
|
|
|
- >
|
|
|
- <div>{{ item.onebest }}</div>
|
|
|
- <div class="time" v-if="type == '句子'">
|
|
|
- <span>开始时间:</span>
|
|
|
- <el-input
|
|
|
- style="width: 100px"
|
|
|
- v-model="item.bg"
|
|
|
- placeholder="开始时间"
|
|
|
- @change="changeTime(item)"
|
|
|
- ></el-input
|
|
|
- >~
|
|
|
- <span>结束时间:</span>
|
|
|
- <el-input
|
|
|
- style="width: 100px"
|
|
|
- v-model="item.ed"
|
|
|
- placeholder="结束时间"
|
|
|
- @change="changeTime(item)"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- <div class="time" v-else>
|
|
|
- <el-button
|
|
|
- style="margin-top: 15px"
|
|
|
- type="primary"
|
|
|
- @click="compareOneHZ(index)"
|
|
|
- size="medium"
|
|
|
- >校对文字字幕时间</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <template v-if="type == '句子'">
|
|
|
+ <table>
|
|
|
+ <tr>
|
|
|
+ <th style="width: 280px">句子</th>
|
|
|
+ <th style="width: 200px">开始时间</th>
|
|
|
+ <th style="width: 200px">结束时间</th>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(item, index) in data" :key="index + 'sen'">
|
|
|
+ <td>{{ item.onebest }}</td>
|
|
|
+ <td>
|
|
|
+ <input v-model="item.bg" @change="changeTime(item)" type="text" />
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input v-model="item.ed" @change="changeTime(item)" type="text" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <table>
|
|
|
+ <tr>
|
|
|
+ <th style="width: 280px">句子</th>
|
|
|
+ <th style="width: 200px">操作</th>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(item, index) in data" :key="index + 'sen'">
|
|
|
+ <td>{{ item.onebest }}</td>
|
|
|
+ <td>
|
|
|
+ <el-button type="primary" @click="compareOneHZ(index)" size="medium"
|
|
|
+ >校对文字字幕时间</el-button
|
|
|
+ >
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
+ </template>
|
|
|
<template v-if="wordData">
|
|
|
<el-dialog
|
|
|
title="校对字母时间"
|
|
|
:visible.sync="oneHZshow"
|
|
|
- width="50%"
|
|
|
+ width="60%"
|
|
|
:before-close="handleClose"
|
|
|
:modal="false"
|
|
|
top="0"
|
|
|
>
|
|
|
- <div
|
|
|
- :class="['sentence']"
|
|
|
- v-for="(item, index) in wordData"
|
|
|
- :key="index + 'wordsResul'"
|
|
|
- >
|
|
|
- <div class="time">
|
|
|
- <div>{{ item.wordsName?item.wordsName:item.onebest }}</div>
|
|
|
- <span>开始时间:</span>
|
|
|
- <el-input
|
|
|
- style="width: 100px"
|
|
|
- v-model="item.wordBg"
|
|
|
- placeholder="开始时间"
|
|
|
- ></el-input
|
|
|
- >~
|
|
|
- <span>结束时间:</span>
|
|
|
- <el-input
|
|
|
- style="width: 100px"
|
|
|
- v-model="item.wordEd"
|
|
|
- placeholder="结束时间"
|
|
|
- ></el-input>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <table>
|
|
|
+ <tr>
|
|
|
+ <th style="width: 250px">文字</th>
|
|
|
+ <th style="width: 200px">开始时间</th>
|
|
|
+ <th style="width: 200px">结束时间</th>
|
|
|
+ </tr>
|
|
|
+ <tr v-for="(item, index) in wordData" :key="index + 'wordsResul'">
|
|
|
+ <td>{{ item.wordsName ? item.wordsName : item.onebest }}</td>
|
|
|
+ <td>
|
|
|
+ <input v-model="item.wordBg" type="text" />
|
|
|
+ </td>
|
|
|
+ <td>
|
|
|
+ <input v-model="item.wordEd" type="text" />
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </table>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
<el-button @click="handleClose">取 消</el-button>
|
|
|
<el-button :loading="compareloading" type="primary" @click="savehz"
|
|
@@ -103,7 +98,9 @@ export default {
|
|
|
},
|
|
|
compareOneHZ(index) {
|
|
|
this.index = index;
|
|
|
- this.wordData =JSON.parse(JSON.stringify(this.data[index].wordsResultList));
|
|
|
+ this.wordData = JSON.parse(
|
|
|
+ JSON.stringify(this.data[index].wordsResultList)
|
|
|
+ );
|
|
|
this.oneHZshow = true;
|
|
|
},
|
|
|
savehz() {
|
|
@@ -111,7 +108,7 @@ export default {
|
|
|
JSON.stringify(this.wordData)
|
|
|
);
|
|
|
this.changewordsResultList(this.index, this.wordData);
|
|
|
- this.$message.success("保存成功")
|
|
|
+ this.$message.success("保存成功");
|
|
|
},
|
|
|
handleClose() {
|
|
|
this.index = null;
|
|
@@ -150,5 +147,28 @@ export default {
|
|
|
margin-top: 15px;
|
|
|
}
|
|
|
}
|
|
|
+ table {
|
|
|
+ border-collapse: collapse;
|
|
|
+ tr {
|
|
|
+ > :nth-child(2) {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ > :nth-child(3) {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ td {
|
|
|
+ border: 1px solid black;
|
|
|
+ height: 50px;
|
|
|
+ input {
|
|
|
+ border: none;
|
|
|
+ outline: none;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ th {
|
|
|
+ height: 50px;
|
|
|
+ border: 1px solid black;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|