delete: 注释语音交互的导出
This commit is contained in:
parent
de09c4cef9
commit
e7986ec2eb
@ -95,7 +95,7 @@
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -104,7 +104,7 @@
|
||||
v-hasPermi="['vi:corpus:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -104,7 +104,7 @@
|
||||
v-hasPermi="['vi:corpus:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
@ -148,14 +148,6 @@
|
||||
v-hasPermi="['vi:corpus:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="VideoPlay"
|
||||
@click="handlePlay(row)"
|
||||
v-hasPermi="['vi:corpus:play']"
|
||||
>试听</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -170,7 +162,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 添加或修改语料库对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="740px" append-to-body>
|
||||
<el-dialog :title="title" v-model="open" width="1000px" append-to-body>
|
||||
<el-form
|
||||
ref="corpusRef"
|
||||
:inline="true"
|
||||
@ -233,6 +225,24 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="minioUrl" label="音频地址">
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item
|
||||
:prop="`tableData[${$index}].minioUrl`"
|
||||
class="tableFormItem"
|
||||
>
|
||||
<el-tooltip
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
:content="row.minioUrl"
|
||||
placement="top-start"
|
||||
>
|
||||
<span class="minioUrl" v-if="row.minioUrl">{{ row.minioUrl }}</span>
|
||||
</el-tooltip>
|
||||
<UploadFile @success="(data) => uploadSuccess(data, row)" @error="uploadError" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="audioPath" label="音频文件">
|
||||
<template #default="{ row, $index }">
|
||||
<el-form-item
|
||||
@ -267,7 +277,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template #default="{ _row, $index }">
|
||||
<template #default="{ row, $index }">
|
||||
<el-button
|
||||
:icon="Plus"
|
||||
circle
|
||||
@ -281,6 +291,13 @@
|
||||
size="small"
|
||||
@click="deleteRow($index)"
|
||||
></el-button>
|
||||
<el-button
|
||||
circle
|
||||
v-if="row.minioUrl"
|
||||
size="small"
|
||||
:icon="VideoPlay"
|
||||
@click="handlePlay(row.minioUrl)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -296,7 +313,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { Plus, Minus } from "@element-plus/icons-vue";
|
||||
import { Plus, Minus, VideoPlay } from "@element-plus/icons-vue";
|
||||
import {
|
||||
getBatchCorpus,
|
||||
deleteBatchCorpus,
|
||||
@ -304,6 +321,8 @@ import {
|
||||
batchUpdateCorpus,
|
||||
} from "@/api/vi/corpus";
|
||||
import { useContainerHeight } from "@/hooks/tableHeight";
|
||||
import UploadFile from "../../../components/UploadFile.vue";
|
||||
import { usePlayAudio } from '@/hooks/usePlayAudio'
|
||||
|
||||
const topContainerRef = ref();
|
||||
const containerHeight = useContainerHeight(topContainerRef);
|
||||
@ -484,8 +503,17 @@ function handleDelete(row) {
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
const handlePlay = () => {
|
||||
console.log("播放");
|
||||
const uploadSuccess = (data, row) => {
|
||||
row.minioUrl = data
|
||||
}
|
||||
|
||||
const uploadError = () => {
|
||||
console.log("uploadError")
|
||||
}
|
||||
|
||||
const handlePlay = (url) => {
|
||||
const { playAudio } = usePlayAudio()
|
||||
playAudio(url)
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
@ -519,4 +547,12 @@ onMounted(() => {
|
||||
.tableFormItem {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.minioUrl {
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -104,7 +104,7 @@
|
||||
v-hasPermi="['vi:corpus:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
|
||||
@ -125,7 +125,7 @@
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -135,7 +135,7 @@
|
||||
v-hasPermi="['system:project:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
@ -74,7 +74,7 @@
|
||||
v-hasPermi="['system:scheme:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user