From a3806c32c99ea92fe7de993c4e20783045cfe64d Mon Sep 17 00:00:00 2001 From: jyt <1592211625@qq.com> Date: Thu, 19 May 2022 15:02:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=BC=98=E5=8C=96=E6=90=9C?= =?UTF-8?q?=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Receive/index.vue | 46 ++++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/src/views/Receive/index.vue b/src/views/Receive/index.vue index 2b819ad..5cce4f3 100644 --- a/src/views/Receive/index.vue +++ b/src/views/Receive/index.vue @@ -415,11 +415,7 @@ > - + 文本优化 +
+
+ + + +
+
纠正     - 删除 + 删除 { + return value.onebest.match(this.searchText) + }) + } }, destroyed() { this.aplayer.destroy(); @@ -1015,7 +1026,7 @@ export default { customerId: this.fileId, }, }).then((res) => { - this.optimizetext[this.roleidx].speaker = this.roleFlag / 1 + 1; + this.optimizetext1[this.roleidx].speaker = this.roleFlag / 1 + 1; this.roleVisible = false; }); }, @@ -1170,7 +1181,7 @@ export default { }, //文本编辑确认 summunct() { - this.optimizetext[this.textareaindex].onebest = this.textarea; + this.optimizetext1[this.textareaindex].onebest = this.textarea; this.texteditorishow = false; }, //文本编辑 @@ -1181,7 +1192,7 @@ export default { this.texteditorishow = true; }, //文本优化删除 - optimdel(i) { + optimdel(t,i) { console.log(i); var that = this; this.$confirm("此操作将删除该条, 是否继续?", "提示", { @@ -1190,7 +1201,9 @@ export default { type: "warning", }) .then(() => { - that.optimizetext.splice(i, 1); + // that.optimizetext.splice(i, 1); + this.optimizetext = this.optimizetext.filter(tt=>tt.onebest!=t.onebest) + this.$forceUpdate() this.$message({ type: "success", message: "删除成功!", @@ -1207,12 +1220,14 @@ export default { texttap() { this.optimizeobj = {}; this.optimizetext = []; + this.optimizetextTemp = []; this.$api.http .findText({ corpusId: this.arr[this.aplayerId].id }) .then((res) => { console.log(res, "获取文本"); this.optimizeobj = res.data; this.optimizetext = JSON.parse(res.data.textContent); + this.optimizetextTemp = JSON.parse(res.data.textContent); this.dialogFormtext = true; }); }, @@ -1463,8 +1478,8 @@ export default { }else{ this.$refs.form.validate((valid) => { if (valid) { - this.form.correctWord = this.form.correctWord.replace(/[^\w\u4e00-\u9fa5]/g,"") - this.form.wrongWord = this.form.wrongWord.replace(/[^\w\u4e00-\u9fa5]/g,"") + // this.form.correctWord = this.form.correctWord.replace(/[^\w\u4e00-\u9fa5]/g,"") + // this.form.wrongWord = this.form.wrongWord.replace(/[^\w\u4e00-\u9fa5]/g,"") this.dialogFormVisible = false; let sas = this.textItself.replace( this.form.wrongWord, @@ -1513,6 +1528,11 @@ export default { this.form.wrongWord = onebest.replace(/<.*?>/gi, ""); this.dialogFormVisible = true; this.argtextindex = index; + this.isNum = false; + let reg = /^[0-9]+$/ + if (reg.test(this.form.wrongWord)) { + this.isNum = true + } }, // 销讲词禁忌tab recordclick(i) {