|
@@ -7,7 +7,7 @@ |
|
|
<div class="topbox"> |
|
|
<div class="topbox"> |
|
|
<div class="topzuo"> |
|
|
<div class="topzuo"> |
|
|
<div class="title" style="display: flex"> |
|
|
<div class="title" style="display: flex"> |
|
|
<div style="flex: 1"> |
|
|
|
|
|
|
|
|
<div style="flex-grow: 1"> |
|
|
<span class="span1" |
|
|
<span class="span1" |
|
|
>{{ |
|
|
>{{ |
|
|
userinformationlist.visitRecord == 1 |
|
|
userinformationlist.visitRecord == 1 |
|
@@ -21,7 +21,7 @@ |
|
|
}} |
|
|
}} |
|
|
</span> |
|
|
</span> |
|
|
</div> |
|
|
</div> |
|
|
<div style="width: 120px; display: flex; color: #2671e2"> |
|
|
|
|
|
|
|
|
<div style="flex-shrink: 0; display: flex; color: #2671e2"> |
|
|
<div v-if="rec_index_addJ" @click="Addtodigest()">加精</div> |
|
|
<div v-if="rec_index_addJ" @click="Addtodigest()">加精</div> |
|
|
<div |
|
|
<div |
|
|
v-if="rec_index_receflag" |
|
|
v-if="rec_index_receflag" |
|
@@ -30,6 +30,8 @@ |
|
|
> |
|
|
> |
|
|
{{ userinformationlist.validInvalidName }} |
|
|
{{ userinformationlist.validInvalidName }} |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<!-- 导出 --> |
|
|
|
|
|
<div class="outDownLoad" @click="exportWord">导出话术</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="title" style="margin-top: 6px"> |
|
|
<div class="title" style="margin-top: 6px"> |
|
@@ -160,7 +162,13 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if="rec_index_flag" class="headpade"> |
|
|
<div v-if="rec_index_flag" class="headpade"> |
|
|
<div class="biaoji" @click="biaoji()" v-if="userinformationlist.merge==0">标记</div> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
class="biaoji" |
|
|
|
|
|
@click="biaoji()" |
|
|
|
|
|
v-if="userinformationlist.merge == 0" |
|
|
|
|
|
> |
|
|
|
|
|
标记 |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div style="width: 100%"> |
|
|
<div style="width: 100%"> |
|
@@ -195,10 +203,17 @@ |
|
|
{{ item.bg | timestamp }} |
|
|
{{ item.bg | timestamp }} |
|
|
</div> |
|
|
</div> |
|
|
<div class="textcontent"> |
|
|
<div class="textcontent"> |
|
|
<div class="content123s" |
|
|
|
|
|
:class="{ adjskdjroleindexclass: item.isShow == 1 }" |
|
|
|
|
|
v-html="item.onebest"></div> |
|
|
|
|
|
<img @click.stop="play(item)" src="../../../public/img/play.png" alt="" style="flex-shrink: 0;width: 24px;height: 24px;"> |
|
|
|
|
|
|
|
|
<div |
|
|
|
|
|
class="content123s" |
|
|
|
|
|
:class="{ adjskdjroleindexclass: item.isShow == 1 }" |
|
|
|
|
|
v-html="item.onebest" |
|
|
|
|
|
></div> |
|
|
|
|
|
<img |
|
|
|
|
|
@click.stop="play(item)" |
|
|
|
|
|
src="../../../public/img/play.png" |
|
|
|
|
|
alt="" |
|
|
|
|
|
style="flex-shrink: 0; width: 24px; height: 24px" |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@@ -400,10 +415,18 @@ |
|
|
> |
|
|
> |
|
|
<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" 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 v-model="form.correctWord" maxlength="8" autocomplete="off"></el-input> |
|
|
|
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="form.correctWord" |
|
|
|
|
|
maxlength="8" |
|
|
|
|
|
autocomplete="off" |
|
|
|
|
|
></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
@@ -735,6 +758,12 @@ import "aplayer/dist/APlayer.min.css"; |
|
|
import APlayer from "aplayer"; |
|
|
import APlayer from "aplayer"; |
|
|
import { mapGetters } from "vuex"; |
|
|
import { mapGetters } from "vuex"; |
|
|
import { getStore, setStore } from "@/util/store"; |
|
|
import { getStore, setStore } from "@/util/store"; |
|
|
|
|
|
|
|
|
|
|
|
import docxtemplater from "docxtemplater"; |
|
|
|
|
|
import PizZip from "pizzip"; |
|
|
|
|
|
import JSZipUtils from "jszip-utils"; |
|
|
|
|
|
import { saveAs } from "file-saver"; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
@@ -815,6 +844,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, |
|
|
|
|
|
|
|
|
|
|
|
outSpeechSkillList: [], // 导出话术列表 |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
@@ -869,6 +900,67 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 格式化话术内容 |
|
|
|
|
|
formatAudioList() { |
|
|
|
|
|
let list = this.arr[0].audioContent |
|
|
|
|
|
list = JSON.parse(list) |
|
|
|
|
|
console.log(list) |
|
|
|
|
|
list.map(item => { |
|
|
|
|
|
this.outSpeechSkillList.push({ |
|
|
|
|
|
id: this.$options.filters.toCapital(item.speaker), |
|
|
|
|
|
times: this.$options.filters.timestamp(item.bg), |
|
|
|
|
|
content: item.onebest.replace(/<.*?>/gi, "") |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
console.log(this.outSpeechSkillList) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 导出word |
|
|
|
|
|
exportWord() { |
|
|
|
|
|
// 读取并获得模板文件的二进制内容 |
|
|
|
|
|
JSZipUtils.getBinaryContent("/model.docx", (error, content) => { |
|
|
|
|
|
console.log(error, content); |
|
|
|
|
|
// model.docx是模板。我们在导出的时候,会根据此模板来导出对应的数据 |
|
|
|
|
|
// 抛出异常 |
|
|
|
|
|
if (error) { |
|
|
|
|
|
throw error; |
|
|
|
|
|
} |
|
|
|
|
|
// 创建一个PizZip实例,内容为模板的内容 |
|
|
|
|
|
let zip = new PizZip(content); |
|
|
|
|
|
// 创建并加载docxtemplater实例对象 |
|
|
|
|
|
let doc = new docxtemplater().loadZip(zip); |
|
|
|
|
|
// 设置模板变量的值 |
|
|
|
|
|
doc.setData({ |
|
|
|
|
|
audioList: this.outSpeechSkillList, |
|
|
|
|
|
}); |
|
|
|
|
|
try { |
|
|
|
|
|
// 用模板变量的值替换所有模板变量 |
|
|
|
|
|
doc.render(); |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
// 抛出异常 |
|
|
|
|
|
let e = { |
|
|
|
|
|
message: error.message, |
|
|
|
|
|
name: error.name, |
|
|
|
|
|
stack: error.stack, |
|
|
|
|
|
properties: error.properties, |
|
|
|
|
|
}; |
|
|
|
|
|
console.log(JSON.stringify({ error: e })); |
|
|
|
|
|
throw error; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 生成一个代表docxtemplater对象的zip文件(不是一个真实的文件,而是在内存中的表示) |
|
|
|
|
|
let out = doc.getZip().generate({ |
|
|
|
|
|
type: "blob", |
|
|
|
|
|
mimeType: |
|
|
|
|
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", |
|
|
|
|
|
}); |
|
|
|
|
|
// 将目标文件对象保存为目标类型的文件,并命名 |
|
|
|
|
|
saveAs(out, "接待话术.docx"); |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 返回颜色 |
|
|
// 返回颜色 |
|
|
spackerColor(index) { |
|
|
spackerColor(index) { |
|
|
let obj = { |
|
|
let obj = { |
|
@@ -1362,8 +1454,14 @@ export default { |
|
|
subMsg() { |
|
|
subMsg() { |
|
|
this.$refs.form.validate((valid) => { |
|
|
this.$refs.form.validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
this.form.correctWord = this.ruleForm.correctWord.replace(/[^\w\u4e00-\u9fa5]/g,"") |
|
|
|
|
|
this.form.wrongWord = this.ruleForm.wrongWord.replace(/[^\w\u4e00-\u9fa5]/g,"") |
|
|
|
|
|
|
|
|
this.form.correctWord = this.ruleForm.correctWord.replace( |
|
|
|
|
|
/[^\w\u4e00-\u9fa5]/g, |
|
|
|
|
|
"" |
|
|
|
|
|
); |
|
|
|
|
|
this.form.wrongWord = this.ruleForm.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, |
|
@@ -1391,7 +1489,7 @@ export default { |
|
|
|
|
|
|
|
|
// 播放 |
|
|
// 播放 |
|
|
play(item) { |
|
|
play(item) { |
|
|
let num = parseInt(item.bg / 1000) |
|
|
|
|
|
|
|
|
let num = parseInt(item.bg / 1000); |
|
|
this.aplayer.seek(num); |
|
|
this.aplayer.seek(num); |
|
|
this.searchisshow = false; |
|
|
this.searchisshow = false; |
|
|
this.aplayer.play(); |
|
|
this.aplayer.play(); |
|
@@ -1635,6 +1733,7 @@ export default { |
|
|
this.aplayerLength = audopbj.length; |
|
|
this.aplayerLength = audopbj.length; |
|
|
this.arr = res.data; |
|
|
this.arr = res.data; |
|
|
this.bofangchushihua(); |
|
|
this.bofangchushihua(); |
|
|
|
|
|
this.formatAudioList() |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
tapspagek(i) { |
|
|
tapspagek(i) { |
|
@@ -1829,8 +1928,8 @@ export default { |
|
|
text-align: left; |
|
|
text-align: left; |
|
|
|
|
|
|
|
|
.textcontent { |
|
|
.textcontent { |
|
|
flex-direction: row-reverse; |
|
|
|
|
|
text-align: left; |
|
|
|
|
|
|
|
|
flex-direction: row-reverse; |
|
|
|
|
|
text-align: left; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@@ -2083,6 +2182,10 @@ export default { |
|
|
margin-left: 2px; |
|
|
margin-left: 2px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.outDownLoad { |
|
|
|
|
|
margin: 0 0 0 0.5em; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
.topyou { |
|
|
.topyou { |
|
|
width: 24%; |
|
|
width: 24%; |
|
|