From 7be0d43e977d5727ed592e2323f1fedf94f69e4a Mon Sep 17 00:00:00 2001 From: jyt <1592211625@qq.com> Date: Thu, 19 May 2022 17:31:14 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=B8=E9=94=99=E8=AF=8D=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/api.js | 8 ++++++++ src/views/Receive/index.vue | 26 +++++++++++++++++++++++--- 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/api/modules/api.js b/src/api/modules/api.js index 9d03ff5..3eb2b9d 100644 --- a/src/api/modules/api.js +++ b/src/api/modules/api.js @@ -1182,3 +1182,11 @@ export function audioFile(data) { params: data }) } +// 常错词不分页列表 +export function correctList(data) { + return request({ + url: '/autoSR/zk/correct/findWrongList', + method: 'get', + params: data + }) +} \ No newline at end of file diff --git a/src/views/Receive/index.vue b/src/views/Receive/index.vue index 5cce4f3..8279435 100644 --- a/src/views/Receive/index.vue +++ b/src/views/Receive/index.vue @@ -849,7 +849,7 @@ export default { rec_index_todo: false, rec_index_receflag: false, rec_index_textyh: false, - + mistakenList:[], outSpeechSkillList: [], // 导出话术列表 isNum:false, searchText:"", @@ -1469,12 +1469,18 @@ export default { //常错词确认 subMsg() { + if (this.mistakenList.indexOf(this.form.wrongWord) != -1) { + this.$message.error("错误词已添加过~"); + return; + }else{ if(this.form.wrongWord.length>8){ this.$message.warning("常错词不能超过8个字!"); - }else{ + return; + }else{ let reg = /^[0-9]+$/ if(reg.test(this.form.wrongWord)){ this.$message.warning("常错词不能为纯数字!"); + return; }else{ this.$refs.form.validate((valid) => { if (valid) { @@ -1490,7 +1496,9 @@ export default { } }); } - } + } + } + }, //常错词提交 subWrongMsg() { @@ -1518,6 +1526,7 @@ export default { //常错词点击 checkMsg(row, index) { + this.correctListFun() if (this.rec_index_wrongword == false) { return; } @@ -1534,6 +1543,17 @@ export default { this.isNum = true } }, + correctListFun() { + let obj = { + houseId : localStorage.getItem("houseId") + }; + this.$api.api.correctList(obj).then((res) => { + this.mistakenList = res.data.map((item) => { + return item.wrongWord; + }); + console.log(this.mistakenList, this.correctList); + }); + }, // 销讲词禁忌tab recordclick(i) { this.zhixingcenterindex = i;