From 254c20dc9472a54fedbe6bf78be98e53ee9b8644 Mon Sep 17 00:00:00 2001
From: wangxiaohua <1214073490@qq.com>
Date: Thu, 18 Nov 2021 10:00:38 +0800
Subject: [PATCH] init
---
src/api/modules/http.js | 82 +++++-
src/views/Receive/index.vue | 543 +++++++++++++++++++++++++++++++-----
vue.config.js | 2 +-
3 files changed, 555 insertions(+), 72 deletions(-)
diff --git a/src/api/modules/http.js b/src/api/modules/http.js
index c047b06..5dca547 100644
--- a/src/api/modules/http.js
+++ b/src/api/modules/http.js
@@ -677,7 +677,7 @@ export function personalReceptionRecord(query) {
// 获取系统分析
export function findCARKeywords(query) {
return request({
- url: 'autoSR/matchKeywords/findCARKeywords',
+ url: 'autoSR/matchKeywords/findSystemAnalysis',
method:'get',
params:query
})
@@ -687,7 +687,7 @@ export function findCARKeywords(query) {
// 获取人工校准
export function findSystemAnalysis(query) {
return request({
- url: 'autoSR/matchKeywords/findSystemAnalysis',
+ url: 'autoSR/matchKeywords/findManualCalibration',
method:'get',
params:query
})
@@ -703,8 +703,40 @@ export function findBannedWordsByCusId(query) {
})
}
+// 标记顾问
+export function markConsultant(query) {
+ return request({
+ url: 'autoSR/zk/file/markConsultant',
+ method:'get',
+ params:query
+ })
+}
+// 标记顾问
+export function toMatchKeywords(query) {
+ return request({
+ url: 'autoSR/matchKeywords/toMatchKeywords',
+ method:'get',
+ params:query
+ })
+}
+//加入常错词
+export function addCorrectWord(obj) {
+ return request({
+ url: 'autoSR/zk/correct/addCorrectWord',
+ method: 'post',
+ data: obj
+ })
+}
+//保存校准
+export function updateManualCalibration(obj) {
+ return request({
+ url: 'autoSR/customer/updateManualCalibration',
+ method: 'post',
+ data: obj
+ })
+}
// 录音文件列表
export function filefindByPage(obj) {
@@ -715,5 +747,51 @@ export function filefindByPage(obj) {
})
}
+// 接待标记
+export function updateValidInvalid(obj) {
+ return request({
+ url: 'autoSR/customer/updateValidInvalid',
+ method: 'post',
+ data: obj
+ })
+}
+// 加精
+export function addATD(obj) {
+ return request({
+ url: 'autoSR/customer/addATD',
+ method: 'post',
+ data: obj
+ })
+}
+
+//取消加精
+export function delATD(query) {
+ return request({
+ url: 'autoSR/customer/delATD',
+ method: 'get',
+ params:query
+ })
+}
+
+
+//音频下载
+export function filedownload(query) {
+ return request({
+ url: 'autoSR/zk/file/filedownload',
+ method: 'get',
+ params:query
+ })
+}
+
+
+//获取文本优化
+export function findText(query) {
+ return request({
+ url: 'autoSR/zk/text/findText',
+ method: 'get',
+ params:query
+ })
+}
+
diff --git a/src/views/Receive/index.vue b/src/views/Receive/index.vue
index f5cef34..7911b6b 100644
--- a/src/views/Receive/index.vue
+++ b/src/views/Receive/index.vue
@@ -4,17 +4,17 @@
- 首次到访
- 无效录音|未标注|反面案例
+ {{userinformationlist.visitRecord==1?'首':userinformationlist.visitRecord || ''}}次到访
+
-
加精
-
接待标记
+
加精
+
{{userinformationlist.validInvalidName}}
- 宋先生
- 2021-10-01 10:00:00
+ {{userinformationlist.name || ''}}
+ {{userinformationlist.createTime|| ''}}
- 客户:李先生
+ 客户:{{userinformationlist.name || ''}}
@@ -343,7 +343,7 @@
系统分析
@@ -355,8 +355,13 @@
{{item.name}}
-
-
{{funche.name}}
+
+
{{funche.name}}
+
{{funche.name}}
+
+
+
{{funche.name}}
+
{{funche.name}}
@@ -364,44 +369,49 @@
-
销讲总执行率10%
+
销讲总执行率{{userinformationlist.fraction|| 0}}%
禁忌执行
-
+
-
-
-
-
超市 29%
+
+
+
+
{{item.name}} {{((item.ratepercent/item.rate).toFixed(2)*100).toFixed()}}%
-
-
+
+
-
- 常错词:
-
-
+
+
+
@@ -411,6 +421,9 @@
确 定
+
+
+
-
-
-
-
置业需求
-
-
投资
-
管家
-
婚房
-
山水相逢
-
青山不改
-
-
+
+
+
+
+
- 没电指派无录音
- 离线指派无录音
+ 没电指派无录音
+ 离线指派无录音
- 系统测试误操作
- 非接访场景录音
+ 系统测试误操作
+ 非接访场景录音
- 其他
+ 其他
-
+
+
+
+
文本优化
+
+
+
+ 纠正
+
+ 删除
+
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
A
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
B
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
C
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
D
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
E
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
F
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
G
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
H
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
I
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
J
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
K
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
L
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
M
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
N
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
O
+
+
+
![](http://121.42.63.138:9091/autoSR/static/plugins/audio/images/A.png)
+
P
+
+
+
+
+
+
+ 保存并更新文本
+ 保存草稿
+ 恢复当前文本
+ 取消
+
+
+
@@ -476,11 +582,11 @@ export default {
dialogFormVisible11:false,
dialogFormVisible12:false,
dialogFormVisible13:false,
- radio:1,
+ effectiveindex:1,
+ effectiveitext:'',
form:{
correctWord: '',//正确词
cupid: '',
- translateHtmlContent: '',
wrongWord: '', // 错词
customerId:'',
},
@@ -514,8 +620,13 @@ export default {
roleindexbiaoji:0,
aplayerSpeedNum:'1',//倍速字体更换
Getintentionlist:[],//客户意向
- argtextindex:'',
-
+ argtextindex:'',//常错词下标
+ ratelist:[],//评分集合
+ prohibitedlist:[],//违禁集合
+ textItself:'',//原词内容
+ Acquirecustomerintentlist2:[],//校准列表
+ dialogFormtext:false,
+ optimizetext:[]
};
},
mounted() {
@@ -524,13 +635,196 @@ export default {
this.init()
},
methods: {
+ texttap(){
+ this.$api.http.findText({corpusId:this.arr[this.aplayerId].id}).then((res) => {
+ console.log(res)
+ this.dialogFormtext=true;
+ })
+ },
+ // 接待标记
+ alllogo(){
+ if(this.userinformationlist.validInvalid!=0){
+ this.$confirm('是否标记为"有效录音"?', "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ this.$api.http.updateValidInvalid({
+ id:this.fileId,
+ validInvalid:'',
+ invalidReason:0
+ }).then((res) => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.init()
+ })
+ }).catch(() => {
+ this.$message({
+ type: "info",
+ message: "已取消操作",
+ });
+ });
+ }else{
+ this.dialogFormVisible13=true;
+ }
+ },
+ //无效标记
+ effectiveAdd(){
+ if(this.effectiveindex==5){
+ if(this.effectiveitext.length==0){
+ this.$message({
+ type: "error",
+ message: "备注不能为空!",
+ });
+ return
+ }
+ }
+ this.$api.http.updateValidInvalid({
+ id:this.fileId,
+ validInvalid:'',
+ validInvalid:1,
+ invalidReason:Number(this.effectiveindex),
+ invalidNote:this.effectiveitext
+ }).then((res) => {
+ this.dialogFormVisible13=false;
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.init()
+ })
+ },
+
+ //加精華
+ Addtodigest(){
+ var that = this;
+ if(that.arr[that.aplayerId].status==0){
+ that.$confirm("取消加精,是否继续?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ that.$api.http.delATD({"carId": that.fileId,}).then((res) => {
+ that.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.init()
+ })
+ }).catch(() => {
+ that.$message({
+ type: "info",
+ message: "已取消操作",
+ });
+ });
+ }else{
+ that.$confirm("加精,是否继续?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ that.$api.http.addATD({"carId": that.fileId,"status": 0,}).then((res) => {
+ that.$message({
+ type: "success",
+ message: "加精成功!",
+ });
+ this.init()
+ })
+ }).catch(() => {
+ that.$message({
+ type: "info",
+ message: "已取消加精",
+ });
+ });
+ }
+ },
+ //确认校准
+ intentlist2click(){
+ let param = {
+ keywordIds:'',
+ id: this.fileId,
+ };
+ let str = [];
+ this.Acquirecustomerintentlist2.map(item => {
+ item.children.map(item1 => {
+ if (item1.selected == 0) {
+ str.push(item1.keywordsId)
+ }
+ })
+ });
+ str = str.join(',');
+ param.keywordIds = str;
+ this.$api.http.updateManualCalibration(param).then((res) => {
+ this.dialogFormVisible12=false;
+ this.findCARKeywords()
+ })
+ },
+ // 选择校准
+ Edittag(item,item1,index,i){
+ if(this.Acquirecustomerintentlist2[index].children[i].selected==0){
+ this.Acquirecustomerintentlist2[index].children[i].selected=1;
+ }else{
+ this.Acquirecustomerintentlist2[index].children[i].selected=0;
+ }
+ this.$forceUpdate()
+ },
+ //获取校准列表
+ Acqtap(){
+ this.dialogFormVisible12=true;
+ this.$api.http.findSystemAnalysis({customerId:this.fileId,type:2}).then((res) => {
+ let newlist=res.data || [];
+ if(newlist.length==0){
+ this.$message.success('暂无数据')
+ }else{
+ newlist.forEach(item1 => {
+ item1.children.map(item => {
+ if (item.isInterval == 0) {
+ item.label = item.name + item.unit + '-' + item.endName + item
+ .unit;
+ } else {
+ item.label = item.name
+ }
+ item.value = item.id;
+ })
+ })
+ this.Acquirecustomerintentlist2 = newlist
+ }
+ })
+ },
+
//标记
biaoji(){
this.dialogFormVisible11=true
},
+ //取消标记
+ unmarktap(){
+ this.dialogFormVisible11=false;
+ this.roleindexbiaoji=this.dshfkjsdkksodofydwfkhwdfkjh;
+ },
+ // 标记选择
+ biaojixuanze(index){
+ this.roleindexbiaoji=index;
+ },
//确认标记
subMsg11(){
-
+ var num=this.roleindexbiaoji+1;
+ this.$api.http.markConsultant({
+ speaker:num,
+ id:this.isd,
+ customerId:this.fileId
+ }).then((res) => {
+ this.dialogFormVisible11=false;
+ this.init()
+ this.biaojiall()
+ this.$message.success('保存成功')
+ })
+ },
+ biaojiall(){
+ this.$api.http.toMatchKeywords({
+ carId:this.fileId,
+ }).then((res) => {})
},
// 获取用户信息
init(){
@@ -547,25 +841,87 @@ export default {
this.Getsthetransliteratecontent()
})
},
+
+
+
+
//常错词确认
subMsg(){
-
+ this.$refs.form.validate((valid)=>{
+ if(valid){
+ this.dialogFormVisible = false;
+ let sas=this.textItself.replace(this.form.wrongWord,this.form.correctWord)
+ this.transcriptionlist[this.argtextindex].onebest=sas;
+ this.subWrongMsg()
+ }
+ })
+ },
+ //常错词提交
+ subWrongMsg(){
+ this.$api.http.addCorrectWord({
+ correctWord:this.form.correctWord,
+ cupid:this.form.cupid,
+ wrongWord: this.form.wrongWord,
+ customerId:this.fileId,
+ }).then((res) => {
+ this.$message.success('保存成功')
+ })
},
//常错词点击
checkMsg(row,index){
this.aplayer.pause()
- this.form.cupid=this.arr[this.aplayerId].id,
- this.form.translateHtmlContent=this.arr[this.aplayerId].audioContent;
-
+ this.form.cupid=this.arr[this.aplayerId].id;
+ this.textItself=row.onebest;
let onebest=row.onebest;
this.form.wrongWord =onebest.replace(/<.*?>/ig,"");
this.dialogFormVisible=true;
this.argtextindex=index;
- },
+ },
+ // 销讲词禁忌tab
+ recordclick(i){
+ this.zhixingcenterindex=i;
+ },
+ // 销讲词折叠
+ changeshow(index) {
+ this.ratelist[index].show=!this.ratelist[index].show
+ },
//获取销讲词违禁词
findBannedWordsByCusId(){
this.$api.http.findBannedWordsByCusId({cusId:this.fileId}).then((res) => {
- console.log(res)
+ let list1=res.data.SalesTalk || [];
+ let list2=res.data.ProhibitedWords || [];
+ let level1 = [] // 一级
+ list1.forEach(item =>{
+ if(item.pid==0){
+ level1.push({
+ id: item.marketingId,
+ rate: item.fraction,
+ name: item.name,
+ percent: 0,
+ ratepercent: 0,
+ show: false,
+ children: []
+ })
+ }
+ })
+ list1.forEach(item =>{
+ level1.forEach(el=>{
+ if(item.pid==el.id){
+ if (item.selected == 0) {
+ el.ratepercent += item.fraction;
+ }
+ el.children.push({
+ id: item.id,
+ rate: item.fraction,
+ selected: item.selected,
+ name: item.name
+ })
+ }
+ })
+ })
+ level1[0].show = true;
+ this.ratelist=level1;
+ this.prohibitedlist=list2;
})
},
@@ -606,7 +962,7 @@ export default {
}
})
}else {
- this.$api.http.findSystemAnalysis({customerId:this.fileId}).then((res) => {
+ this.$api.http.findSystemAnalysis({customerId:this.fileId,type:1}).then((res) => {
if(res.data==null){
this.Getintentionlist=[];
return
@@ -723,17 +1079,12 @@ export default {
}
}
this.corpusId=audopbj[this.AudioIdx].id;
- this.aplayerId=this.audioIdx;
+ this.aplayerId=this.AudioIdx;
this.aplayerLength=audopbj.length;
this.arr=res.data;
this.bofangchushihua()
})
},
-
-
- recordclick(i){
- this.zhixingcenterindex=i;
- },
tapspagek(i){
this.roleindex=i;
},
@@ -782,7 +1133,9 @@ export default {
},
//下载
download(){
- // window.location.href = "${jypath}/zk/file/filedownload?videoSrc="+this.recordPath
+ // this.$api.http.filedownload({videoSrc:this.recordPath}).then((res) => {
+ // })
+ // window.location.href =this.recordPath
},
},
};
@@ -900,6 +1253,15 @@ export default {
color: #FFFFFF;
border-radius:4px ;
}
+ .zxlzx2{
+ width: 60px;
+ height: 24px;
+ line-height: 24px;
+ background: #F2F2F2;
+ text-align: center;
+ color: #999999;
+ border-radius:4px ;
+ }
}
.zxlLev2tit{
line-height: 40px;
@@ -918,6 +1280,15 @@ export default {
width: 100%;
display: flex;
flex-wrap: wrap;
+ .intentionview{
+ padding: 4px 10px;
+ border: 1px solid #E0E0E0;
+ background: #E0E0E0;
+ margin-left: 6px;
+ border-radius:6px ;
+ font-size: 14px;
+ margin-top: 10px;
+ }
}
.intentionName{
font-size: 16px;;
@@ -933,6 +1304,19 @@ export default {
margin-top: 10px;
}
+.intentionChe2{
+ width: 100%;
+ display: flex;
+ flex-wrap: wrap;
+}
+.intentionChe2 div{
+ padding: 4px 10px;
+ border: 1px solid #E0E0E0;
+ margin-left: 6px;
+ border-radius:6px ;
+ font-size: 14px;
+ margin-top: 10px;
+}
.topbox{
width: 100%;
@@ -1181,4 +1565,25 @@ export default {
color: #FFFFFF;
background-color: #2671E2;
}
+ #zhezhao{
+ width: 100%;
+ height: 100vh;
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 1000;
+ opacity: 0.5;
+ background-color: #666666;
+ }
+ .auDivhhh{
+ width: 600px;
+ height: 540px;
+ border-radius: 4px;
+ z-index: 1003;
+ position: fixed;
+ left: 50%;
+ top: 50%;
+ transform: translate(-50%, -50%);
+ background: #ffffff;
+ }
diff --git a/vue.config.js b/vue.config.js
index 6a8b53d..b514bbc 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -3,7 +3,7 @@
* https://cli.vuejs.org/zh/config/
*/
// const url = 'http://pigx-gateway'
-const url = 'http://39.97.167.65:9999' //测试
+// const url = 'http://39.97.167.65:9999' //测试
// const url = 'http://192.168.31.169:9999' //长龙
const url = 'http://192.168.31.134:9999' //嘉豪
// const url = 'http://192.168.31.100:9999' //王笑