|
@@ -415,7 +415,11 @@ |
|
|
> |
|
|
> |
|
|
<el-form :model="form" ref="form" label-width="80px" :rules="rules"> |
|
|
<el-form :model="form" ref="form" label-width="80px" :rules="rules"> |
|
|
<el-form-item label="常错词" prop="wrongWord"> |
|
|
<el-form-item label="常错词" prop="wrongWord"> |
|
|
<el-input v-model="form.wrongWord" :disabled="isNum" maxlength="8" autocomplete="off"></el-input> |
|
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="form.wrongWord" |
|
|
|
|
|
maxlength="8" |
|
|
|
|
|
autocomplete="off" |
|
|
|
|
|
></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label="正确词" prop="correctWord"> |
|
|
<el-form-item label="正确词" prop="correctWord"> |
|
|
<el-input |
|
|
<el-input |
|
@@ -562,22 +566,6 @@ |
|
|
> |
|
|
> |
|
|
文本优化 |
|
|
文本优化 |
|
|
</div> |
|
|
</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;"> |
|
|
|
|
|
<!-- <input |
|
|
|
|
|
v-model="searchText" |
|
|
|
|
|
class="inputclass" |
|
|
|
|
|
type="text" |
|
|
|
|
|
placeholder="请输入关键词搜索" |
|
|
|
|
|
/> --> |
|
|
|
|
|
<el-input placeholder="请输入关键词搜索" v-model="searchText" style="width:300px"> |
|
|
|
|
|
<el-button slot="append" icon="el-icon-search"></el-button> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- <div style="height: 100%"> |
|
|
|
|
|
<div class="inputclass2" style="margin: 0 auto;width: 110px;">搜索</div> |
|
|
|
|
|
</div> --> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
<div |
|
|
class="center3" |
|
|
class="center3" |
|
|
style=" |
|
|
style=" |
|
@@ -592,7 +580,7 @@ |
|
|
class="text" |
|
|
class="text" |
|
|
:data-bg="item.bg" |
|
|
:data-bg="item.bg" |
|
|
:data-ed="item.ed" |
|
|
:data-ed="item.ed" |
|
|
v-for="(item, index) in optimizetext1" |
|
|
|
|
|
|
|
|
v-for="(item, index) in optimizetext" |
|
|
:key="index" |
|
|
:key="index" |
|
|
:class="{ actRight: item.speaker % 2 == 0 }" |
|
|
:class="{ actRight: item.speaker % 2 == 0 }" |
|
|
:data-speaker="item.speaker" |
|
|
:data-speaker="item.speaker" |
|
@@ -602,7 +590,7 @@ |
|
|
>纠正</span |
|
|
>纠正</span |
|
|
> |
|
|
> |
|
|
|
|
|
|
|
|
<span style="cursor: pointer" @click="optimdel(item,index)">删除</span> |
|
|
|
|
|
|
|
|
<span style="cursor: pointer" @click="optimdel(index)">删除</span> |
|
|
<span |
|
|
<span |
|
|
style="cursor: pointer; margin-left: 10px" |
|
|
style="cursor: pointer; margin-left: 10px" |
|
|
@click="editRole(item, index)" |
|
|
@click="editRole(item, index)" |
|
@@ -777,7 +765,6 @@ import JSZipUtils from "jszip-utils"; |
|
|
import { saveAs } from "file-saver"; |
|
|
import { saveAs } from "file-saver"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name:"receiveIndex", |
|
|
|
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
recordsText:[], |
|
|
recordsText:[], |
|
@@ -842,7 +829,6 @@ export default { |
|
|
textItself: "", //原词内容 |
|
|
textItself: "", //原词内容 |
|
|
Acquirecustomerintentlist2: [], //校准列表 |
|
|
Acquirecustomerintentlist2: [], //校准列表 |
|
|
dialogFormtext: false, |
|
|
dialogFormtext: false, |
|
|
optimizetextTemp: [], //文本优化list |
|
|
|
|
|
optimizetext: [], //文本优化list |
|
|
optimizetext: [], //文本优化list |
|
|
optimizeobj: {}, //文本优化obj |
|
|
optimizeobj: {}, //文本优化obj |
|
|
textarea: "", |
|
|
textarea: "", |
|
@@ -859,9 +845,8 @@ export default { |
|
|
rec_index_todo: false, |
|
|
rec_index_todo: false, |
|
|
rec_index_receflag: false, |
|
|
rec_index_receflag: false, |
|
|
rec_index_textyh: false, |
|
|
rec_index_textyh: false, |
|
|
isNum:false, |
|
|
|
|
|
|
|
|
|
|
|
outSpeechSkillList: [], // 导出话术列表 |
|
|
outSpeechSkillList: [], // 导出话术列表 |
|
|
searchText:"", |
|
|
|
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@@ -882,11 +867,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapGetters(["permissions"]), |
|
|
...mapGetters(["permissions"]), |
|
|
optimizetext1(){ |
|
|
|
|
|
return this.optimizetext.filter(value => { |
|
|
|
|
|
return value.onebest.match(this.searchText) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
destroyed() { |
|
|
destroyed() { |
|
|
this.aplayer.destroy(); |
|
|
this.aplayer.destroy(); |
|
@@ -922,27 +902,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
// searchTextFun(){ |
|
|
|
|
|
// let arr = this.optimizetext |
|
|
|
|
|
// if(this.searchText==""){ |
|
|
|
|
|
// this.optimizetext = arr |
|
|
|
|
|
// }else{ |
|
|
|
|
|
// this.optimizetext = this.optimizetext.filter(item=>{ |
|
|
|
|
|
// return item.onebest.match(this.searchText) |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// let arr = this.optimizetext.filter((item,index)=>{ |
|
|
|
|
|
// var reg = new RegExp(this.searchText); |
|
|
|
|
|
// return item.onebest.match(reg); |
|
|
|
|
|
// }) |
|
|
|
|
|
// let tempArr = [] |
|
|
|
|
|
// for (let i = 0; i < arr.length; i++) { |
|
|
|
|
|
// tempArr.push(arr[i]); |
|
|
|
|
|
// console.log(tempArr) |
|
|
|
|
|
// } |
|
|
|
|
|
// this.optimizetext = tempArr |
|
|
|
|
|
|
|
|
|
|
|
// }, |
|
|
|
|
|
// 格式化话术内容 |
|
|
// 格式化话术内容 |
|
|
formatAudioList() { |
|
|
formatAudioList() { |
|
|
let list = this.arr[0].audioContent |
|
|
let list = this.arr[0].audioContent |
|
@@ -1056,7 +1015,7 @@ export default { |
|
|
customerId: this.fileId, |
|
|
customerId: this.fileId, |
|
|
}, |
|
|
}, |
|
|
}).then((res) => { |
|
|
}).then((res) => { |
|
|
this.optimizetext1[this.roleidx].speaker = this.roleFlag / 1 + 1; |
|
|
|
|
|
|
|
|
this.optimizetext[this.roleidx].speaker = this.roleFlag / 1 + 1; |
|
|
this.roleVisible = false; |
|
|
this.roleVisible = false; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
@@ -1204,7 +1163,6 @@ export default { |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
this.dialogFormtext = false; |
|
|
this.dialogFormtext = false; |
|
|
this.$message.success("优化完成"); |
|
|
this.$message.success("优化完成"); |
|
|
|
|
|
|
|
|
if (i == 1) { |
|
|
if (i == 1) { |
|
|
this.init(); |
|
|
this.init(); |
|
|
} |
|
|
} |
|
@@ -1212,7 +1170,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//文本编辑确认 |
|
|
//文本编辑确认 |
|
|
summunct() { |
|
|
summunct() { |
|
|
this.optimizetext1[this.textareaindex].onebest = this.textarea; |
|
|
|
|
|
|
|
|
this.optimizetext[this.textareaindex].onebest = this.textarea; |
|
|
this.texteditorishow = false; |
|
|
this.texteditorishow = false; |
|
|
}, |
|
|
}, |
|
|
//文本编辑 |
|
|
//文本编辑 |
|
@@ -1223,7 +1181,7 @@ export default { |
|
|
this.texteditorishow = true; |
|
|
this.texteditorishow = true; |
|
|
}, |
|
|
}, |
|
|
//文本优化删除 |
|
|
//文本优化删除 |
|
|
optimdel(t,i) { |
|
|
|
|
|
|
|
|
optimdel(i) { |
|
|
console.log(i); |
|
|
console.log(i); |
|
|
var that = this; |
|
|
var that = this; |
|
|
this.$confirm("此操作将删除该条, 是否继续?", "提示", { |
|
|
this.$confirm("此操作将删除该条, 是否继续?", "提示", { |
|
@@ -1232,8 +1190,7 @@ export default { |
|
|
type: "warning", |
|
|
type: "warning", |
|
|
}) |
|
|
}) |
|
|
.then(() => { |
|
|
.then(() => { |
|
|
this.optimizetext = this.optimizetext.filter(tt=>tt.onebest!=t.onebest) |
|
|
|
|
|
this.$forceUpdate() |
|
|
|
|
|
|
|
|
that.optimizetext.splice(i, 1); |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
type: "success", |
|
|
type: "success", |
|
|
message: "删除成功!", |
|
|
message: "删除成功!", |
|
@@ -1250,14 +1207,12 @@ export default { |
|
|
texttap() { |
|
|
texttap() { |
|
|
this.optimizeobj = {}; |
|
|
this.optimizeobj = {}; |
|
|
this.optimizetext = []; |
|
|
this.optimizetext = []; |
|
|
this.optimizetextTemp = []; |
|
|
|
|
|
this.$api.http |
|
|
this.$api.http |
|
|
.findText({ corpusId: this.arr[this.aplayerId].id }) |
|
|
.findText({ corpusId: this.arr[this.aplayerId].id }) |
|
|
.then((res) => { |
|
|
.then((res) => { |
|
|
console.log(res, "获取文本"); |
|
|
console.log(res, "获取文本"); |
|
|
this.optimizeobj = res.data; |
|
|
this.optimizeobj = res.data; |
|
|
this.optimizetext = JSON.parse(res.data.textContent); |
|
|
this.optimizetext = JSON.parse(res.data.textContent); |
|
|
this.optimizetextTemp = JSON.parse(res.data.textContent); |
|
|
|
|
|
this.dialogFormtext = true; |
|
|
this.dialogFormtext = true; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
@@ -1508,8 +1463,8 @@ export default { |
|
|
}else{ |
|
|
}else{ |
|
|
this.$refs.form.validate((valid) => { |
|
|
this.$refs.form.validate((valid) => { |
|
|
if (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; |
|
|
this.dialogFormVisible = false; |
|
|
let sas = this.textItself.replace( |
|
|
let sas = this.textItself.replace( |
|
|
this.form.wrongWord, |
|
|
this.form.wrongWord, |
|
@@ -1558,12 +1513,6 @@ export default { |
|
|
this.form.wrongWord = onebest.replace(/<.*?>/gi, ""); |
|
|
this.form.wrongWord = onebest.replace(/<.*?>/gi, ""); |
|
|
this.dialogFormVisible = true; |
|
|
this.dialogFormVisible = true; |
|
|
this.argtextindex = index; |
|
|
this.argtextindex = index; |
|
|
|
|
|
|
|
|
this.isNum = false; |
|
|
|
|
|
let reg = /^[0-9]+$/ |
|
|
|
|
|
if (reg.test(this.form.wrongWord)) { |
|
|
|
|
|
this.isNum = true |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 销讲词禁忌tab |
|
|
// 销讲词禁忌tab |
|
|
recordclick(i) { |
|
|
recordclick(i) { |
|
@@ -1856,31 +1805,8 @@ export default { |
|
|
//下载 |
|
|
//下载 |
|
|
download() { |
|
|
download() { |
|
|
console.log(this.recordPath); |
|
|
console.log(this.recordPath); |
|
|
// window.href = this.recordPath |
|
|
|
|
|
// this.$api.api.filedownload({videoSrc:this.recordPath}).then((res) => { |
|
|
|
|
|
// console.log(res); |
|
|
|
|
|
// }) |
|
|
|
|
|
// window.location.href = `https://zanyong.hfju.com/autoSR/zk/file/filedownload?videoSrc=${this.recordPath}` |
|
|
|
|
|
// this.exportMethodPost("/autoSR/zk/file/filedownload", "接待详情", { |
|
|
|
|
|
// videoSrc: this.recordPath, |
|
|
|
|
|
// }); |
|
|
|
|
|
this.downloadMp3(this.recordPath) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
downloadMp3(filePath) { |
|
|
|
|
|
fetch(filePath).then(res => res.blob()).then(blob => { |
|
|
|
|
|
const a = document.createElement('a'); |
|
|
|
|
|
document.body.appendChild(a) |
|
|
|
|
|
a.style.display = 'none' |
|
|
|
|
|
// 使用获取到的blob对象创建的url |
|
|
|
|
|
const url = window.URL.createObjectURL(blob); |
|
|
|
|
|
a.href = url; |
|
|
|
|
|
// 指定下载的文件名,就‘’写默认的下载名字。不指定他就根据上传名直接下载了宝。 |
|
|
|
|
|
a.download = ''; |
|
|
|
|
|
a.click(); |
|
|
|
|
|
document.body.removeChild(a) |
|
|
|
|
|
// 移除blob对象的url |
|
|
|
|
|
window.URL.revokeObjectURL(url); |
|
|
|
|
|
|
|
|
this.exportMethodPost("/autoSR/zk/file/filedownload", "接待详情", { |
|
|
|
|
|
videoSrc: this.recordPath, |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
exportMethodPost(url, name, data = {}) { |
|
|
exportMethodPost(url, name, data = {}) { |
|
@@ -1895,26 +1821,21 @@ export default { |
|
|
let blob = new Blob([res], { type: "audio/*" }); |
|
|
let blob = new Blob([res], { type: "audio/*" }); |
|
|
let date = new Date(); |
|
|
let date = new Date(); |
|
|
let time = date.toLocaleDateString(); |
|
|
let time = date.toLocaleDateString(); |
|
|
// console.log(time, "时间"); |
|
|
|
|
|
if ("download" in document.createElement("a")) { |
|
|
|
|
|
const link = document.createElement("a"); |
|
|
|
|
|
link.style.display = "none"; |
|
|
|
|
|
link.href = URL.createObjectURL(blob); |
|
|
|
|
|
// link.download = res.headers['content-disposition'] //下载后文件名 |
|
|
|
|
|
link.download = (name || "导出文件") + time + ".mp3"; //下载的文件名 |
|
|
|
|
|
document.body.appendChild(link); |
|
|
|
|
|
link.click(); |
|
|
|
|
|
document.body.removeChild(link); |
|
|
|
|
|
} else { |
|
|
|
|
|
// console.log("--------------------jingla") |
|
|
|
|
|
let fileName = (name || "导出文件") + time + ".mp3"; //下载的文件名 |
|
|
|
|
|
navigator.msSaveBlob(blob, fileName); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const a = document.createElement('a'); |
|
|
|
|
|
document.body.appendChild(a) |
|
|
|
|
|
a.style.display = 'none' |
|
|
|
|
|
// 使用获取到的blob对象创建的url |
|
|
|
|
|
const url = window.URL.createObjectURL(res); |
|
|
|
|
|
a.href = url; |
|
|
|
|
|
// 指定下载的文件名,就‘’写默认的下载名字。不指定他就根据上传名直接下载了宝。 |
|
|
|
|
|
a.download = ''; |
|
|
|
|
|
a.click(); |
|
|
|
|
|
document.body.removeChild(a) |
|
|
|
|
|
// 移除blob对象的url |
|
|
|
|
|
window.URL.revokeObjectURL(url); |
|
|
}) |
|
|
}) |
|
|
.catch((error) => { |
|
|
.catch((error) => { |
|
|
// Message.error({ |
|
|
|
|
|
// message: '网络连接错误' |
|
|
|
|
|
// }) |
|
|
|
|
|
console.log(error); |
|
|
console.log(error); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|