Browse Source

常错词重复问题

newStyle
jyt 2 years ago
parent
commit
7be0d43e97
2 changed files with 31 additions and 3 deletions
  1. +8
    -0
      src/api/modules/api.js
  2. +23
    -3
      src/views/Receive/index.vue

+ 8
- 0
src/api/modules/api.js View File

@@ -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
})
}

+ 23
- 3
src/views/Receive/index.vue View File

@@ -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;


Loading…
Cancel
Save