| @@ -415,11 +415,7 @@ | |||
| > | |||
| <el-form :model="form" ref="form" label-width="80px" :rules="rules"> | |||
| <el-form-item label="常错词" prop="wrongWord"> | |||
| <el-input | |||
| v-model="form.wrongWord" | |||
| maxlength="8" | |||
| autocomplete="off" | |||
| ></el-input> | |||
| <el-input v-model="form.wrongWord" :disabled="isNum" maxlength="8" autocomplete="off"></el-input> | |||
| </el-form-item> | |||
| <el-form-item label="正确词" prop="correctWord"> | |||
| <el-input | |||
| @@ -566,6 +562,13 @@ | |||
| > | |||
| 文本优化 | |||
| </div> | |||
| <div style="width: 100%; display: flex; height: 32px;justify-content: space-between;padding: 0 15px; margin-bottom: 20px;"> | |||
| <div style="width: 100%; height: 100%;display: flex;justify-content: center;"> | |||
| <el-input placeholder="请输入关键词搜索" v-model="searchText" style="width:300px"> | |||
| <el-button slot="append" icon="el-icon-search"></el-button> | |||
| </el-input> | |||
| </div> | |||
| </div> | |||
| <div | |||
| class="center3" | |||
| style=" | |||
| @@ -580,7 +583,7 @@ | |||
| class="text" | |||
| :data-bg="item.bg" | |||
| :data-ed="item.ed" | |||
| v-for="(item, index) in optimizetext" | |||
| v-for="(item, index) in optimizetext1" | |||
| :key="index" | |||
| :class="{ actRight: item.speaker % 2 == 0 }" | |||
| :data-speaker="item.speaker" | |||
| @@ -590,7 +593,7 @@ | |||
| >纠正</span | |||
| > | |||
| | |||
| <span style="cursor: pointer" @click="optimdel(index)">删除</span> | |||
| <span style="cursor: pointer" @click="optimdel(item,index)">删除</span> | |||
| <span | |||
| style="cursor: pointer; margin-left: 10px" | |||
| @click="editRole(item, index)" | |||
| @@ -829,6 +832,7 @@ export default { | |||
| textItself: "", //原词内容 | |||
| Acquirecustomerintentlist2: [], //校准列表 | |||
| dialogFormtext: false, | |||
| optimizetextTemp: [], | |||
| optimizetext: [], //文本优化list | |||
| optimizeobj: {}, //文本优化obj | |||
| textarea: "", | |||
| @@ -847,6 +851,8 @@ export default { | |||
| rec_index_textyh: false, | |||
| outSpeechSkillList: [], // 导出话术列表 | |||
| isNum:false, | |||
| searchText:"", | |||
| }; | |||
| }, | |||
| created() { | |||
| @@ -867,6 +873,11 @@ export default { | |||
| }, | |||
| computed: { | |||
| ...mapGetters(["permissions"]), | |||
| optimizetext1(){ | |||
| return this.optimizetext.filter(value => { | |||
| 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) { | |||