|
@@ -83,6 +83,20 @@
|
|
|
@click.stop="stopWavGetText()"
|
|
|
>终止转译</el-button
|
|
|
>
|
|
|
+ <el-popover placement="top" trigger="click" v-if="!wavGetTextLoading">
|
|
|
+ <div style="display: flex;">
|
|
|
+ <el-input size="small" style="width: 150px;margin-right: 10px;" v-model="replace1" placeholder="替换之前的文字"></el-input>
|
|
|
+ <el-input size="small" style="width: 150px;margin-right: 10px;" v-model="replace2" placeholder="替换之后的文字"></el-input>
|
|
|
+ <el-button type="primary" size="small" @click="replaceText()">替换</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button
|
|
|
+ slot="reference"
|
|
|
+ style="position: absolute; bottom: 20px; right: 185px; z-index: 10002"
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ >文字替换</el-button
|
|
|
+ >
|
|
|
+ </el-popover>
|
|
|
<el-popover placement="top" trigger="hover">
|
|
|
<el-button size="small" @click.stop="startContinuousJobs('role')">
|
|
|
说话人编码
|
|
@@ -775,7 +789,9 @@ export default {
|
|
|
ws: null
|
|
|
},
|
|
|
userName: "",
|
|
|
- curRequestController: null
|
|
|
+ curRequestController: null,
|
|
|
+ replace1:"",//替换1
|
|
|
+ replace2:"",//替换2
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -3034,8 +3050,24 @@ ${JSON.stringify(_list)}
|
|
|
this.shengyangContext.recorder = null;
|
|
|
this.shengyangContext.ws = null;
|
|
|
// TODO
|
|
|
- }
|
|
|
+ },
|
|
|
// ============ end 声扬录音转译
|
|
|
+ //替换文字
|
|
|
+ replaceText(){
|
|
|
+ if(!this.tid)return;
|
|
|
+ if(!this.replace1.trim() || !this.replace2.trim()){
|
|
|
+ return this.$message.error("请输入内容")
|
|
|
+ }
|
|
|
+
|
|
|
+ let _replace1 = this.replace1.trim();
|
|
|
+ let _replace2 = this.replace2.trim();
|
|
|
+ console.log(_replace1,_replace2)
|
|
|
+ // console.log(this.editorBarData)
|
|
|
+ this.editorBarData.content = this.editorBarData.content.replace(new RegExp(_replace1, 'g'), _replace2);
|
|
|
+ this.$forceUpdate();
|
|
|
+ // this.saveEditorBar();
|
|
|
+ },
|
|
|
+
|
|
|
},
|
|
|
mounted() {
|
|
|
this.loadVoiceprints();
|