From b320495f2cec0a38035c3cdc80c570b4401ad6d5 Mon Sep 17 00:00:00 2001
From: douzhuo <17611323298@163.com>
Date: Thu, 10 Mar 2022 18:19:25 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=99=E8=B7=9F=E8=BF=9B?=
=?UTF-8?q?=E5=9B=9E=E6=98=BE=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/center/consumer/consumerDetail.vue | 4 +-
.../consumer/newFollowup/newFollowup.vue | 32 +-
pages/index/consumer/index.vue | 6 +-
pages/mine/details.vue | 501 ++++++++++--------
pages/mine/details2.vue | 2 -
5 files changed, 322 insertions(+), 223 deletions(-)
diff --git a/pages/center/consumer/consumerDetail.vue b/pages/center/consumer/consumerDetail.vue
index f360166..983ed35 100644
--- a/pages/center/consumer/consumerDetail.vue
+++ b/pages/center/consumer/consumerDetail.vue
@@ -385,15 +385,13 @@
res.forEach(item => {
item.agentName = this.customerInfo.agentName
})
-
-
this.fllowList = res;
})
},
// 新增跟进
followRecordAdd() {
uni.navigateTo({
- url: `/pages/center/consumer/newFollowup/newFollowup?id=${this.customerId}`
+ url: `/pages/center/consumer/newFollowup/newFollowup?id=${this.customerId}&level=${this.customerInfo.level}&clientStageName=${this.customerInfo.clientStageName}`
})
},
// 去编辑
diff --git a/pages/center/consumer/newFollowup/newFollowup.vue b/pages/center/consumer/newFollowup/newFollowup.vue
index e1b2599..921f192 100644
--- a/pages/center/consumer/newFollowup/newFollowup.vue
+++ b/pages/center/consumer/newFollowup/newFollowup.vue
@@ -59,8 +59,9 @@
跟进内容
-
-
+
+
+
-
-
+
+
@@ -238,29 +236,44 @@
status: 0,
num: 0, //上拉 转写文件下标
Bnum: 0, //下拉 转写文件下标
- itemobj:{},
- buildingID:'',
- userlistobj:{},
+ itemobj: {},
+ buildingID: '',
+ userlistobj: {},
// Menulist:[],
// Menulistisshow:false,
-
- effective:false,
- effectiveindex:'0',
- effectiveitems: [
- {value: '1',name: '没电指派无录音',checked:true},
- {value: '2',name: '离线指派无录音',},
- {value: '3',name: '系统测试误操作'},
- {value: '4',name: '非接访场景录音'},
- {value: '5',name: '其他'}
+
+ effective: false,
+ effectiveindex: '0',
+ effectiveitems: [{
+ value: '1',
+ name: '没电指派无录音',
+ checked: true
+ },
+ {
+ value: '2',
+ name: '离线指派无录音',
+ },
+ {
+ value: '3',
+ name: '系统测试误操作'
+ },
+ {
+ value: '4',
+ name: '非接访场景录音'
+ },
+ {
+ value: '5',
+ name: '其他'
+ }
],
- effectiveitext:'',
- textItself:'',
- argtextindex1:0,
- argtextindex2:0,
- permissions:{
- commonly2:false,
- commonly3:false,
- commonly4:false,
+ effectiveitext: '',
+ textItself: '',
+ argtextindex1: 0,
+ argtextindex2: 0,
+ permissions: {
+ commonly2: false,
+ commonly3: false,
+ commonly4: false,
}
};
},
@@ -268,32 +281,32 @@
this.status = options.status;
this.customerId = options.customerId;
this.itemobj = uni.getStorageSync('searchobj');
- this.stateisshow=options.stateisshow;
+ this.stateisshow = options.stateisshow;
},
onShow() {
- let newmenulist= uni.getStorageSync('weapp_session_Menu_data');
- this.permissions.commonly2=newmenulist.jdwxbj;
- this.permissions.commonly3=newmenulist.swyxal;
- this.permissions.commonly4=newmenulist.ccc;
+ let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
+ this.permissions.commonly2 = newmenulist.jdwxbj;
+ this.permissions.commonly3 = newmenulist.swyxal;
+ this.permissions.commonly4 = newmenulist.ccc;
//1 接待无效标记 jdwxbj
//1 设为优秀案例 swyxal
// 常错词 ccc
-
+
this.buildingID = uni.getStorageSync('buildingID').id;
- if(this.stateisshow==2){
- var info =this.itemobj;
- }else{
+ if (this.stateisshow == 2) {
+ var info = this.itemobj;
+ } else {
var pages = getCurrentPages();
var currPage = pages[pages.length - 1]; //当前页面
var info = currPage.data.info;
}
-
+
this.gituserlist()
-
+
this.innerAudioContext = uni.createInnerAudioContext();
this.innerAudioContext.autoplay = false;
this.innerAudioContext.title = '音频';
-
+
this.onPlay()
this.onPause()
this.onCanplay()
@@ -318,125 +331,126 @@
this.innerAudioContext.destroy();
},
methods: {
- effectiveAdd(){
- if(this.effectiveindex==4){
- if(this.effectiveitext.length==0){
+ effectiveAdd() {
+ if (this.effectiveindex == 4) {
+ if (this.effectiveitext.length == 0) {
uni.showToast({
- title: '备注不能为空',
- icon:"none",
- duration: 2000
+ title: '备注不能为空',
+ icon: "none",
+ duration: 2000
});
return
}
}
- this.effective=false;
- let parames={
- id:this.customerId,
- validInvalid:'',
- validInvalid:1,
- invalidReason:Number(this.effectiveindex)+1,
- invalidNote:this.effectiveitext
+ this.effective = false;
+ let parames = {
+ id: this.customerId,
+ validInvalid: '',
+ validInvalid: 1,
+ invalidReason: Number(this.effectiveindex) + 1,
+ invalidNote: this.effectiveitext
}
this.$u.post("/customer/updateValidInvalid", parames).then(res => {
console.log(res)
this.gituserlist()
- })
+ })
},
- radioChange(evt) {
- this.effectiveitext="";
+ radioChange(evt) {
+ this.effectiveitext = "";
for (let i = 0; i < this.effectiveitems.length; i++) {
if (this.effectiveitems[i].value === evt.detail.value) {
- this.effectiveindex = i;
+ this.effectiveindex = i;
break;
}
}
},
//标记
- alllogo(){
- var that=this;
- let msg='';
- if(this.userlistobj.validInvalid!=0){
- msg='是否标记为"有效录音"?';
+ alllogo() {
+ var that = this;
+ let msg = '';
+ if (this.userlistobj.validInvalid != 0) {
+ msg = '是否标记为"有效录音"?';
uni.showModal({
- title: '提示',
- content: msg,
- success: function (res) {
- if (res.confirm) {
- let parames={
- id:that.customerId,
- validInvalid:'',
- invalidReason:0
+ title: '提示',
+ content: msg,
+ success: function(res) {
+ if (res.confirm) {
+ let parames = {
+ id: that.customerId,
+ validInvalid: '',
+ invalidReason: 0
}
- if(that.userlistobj.validInvalid==0){
- parames.validInvalid=1;
- }else{
- parames.validInvalid=0;
+ if (that.userlistobj.validInvalid == 0) {
+ parames.validInvalid = 1;
+ } else {
+ parames.validInvalid = 0;
}
that.$u.post("/customer/updateValidInvalid", parames).then(res => {
console.log(res)
that.gituserlist()
})
- }
- }
+ }
+ }
});
- }else{
- this.effective=true;
+ } else {
+ this.effective = true;
}
},
-
+
//获取用户信息
- gituserlist(){
+ gituserlist() {
this.$u.get("/matchKeywords/personalReceptionRecord", {
customerId: this.customerId
}).then(res => {
- res.endTime1=res.endTime.substring(0, 19);
- this.userlistobj=res;
+ res.endTime1 = res.endTime.substring(0, 19);
+ this.userlistobj = res;
})
},
- toKeywordsearch(){
+ toKeywordsearch() {
this.innerAudioContext.destroy();
- this.stateisshow=1;
+ this.stateisshow = 1;
uni.navigateTo({
- url: '/pages/learning/Keywordsearch?customerId='+this.customerId +"&status="+this.status +"&skpl="+"1"
+ url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&status=" + this.status +
+ "&skpl=" + "1"
})
},
-onPlay(){
+ onPlay() {
this.innerAudioContext.onPlay(() => {
// 播放监听
console.log('播放!');
this.audioPlay = true;
wx.enableAlertBeforeUnload({
- message: "是否确认退出详情页面?",
- success: function (res) {
- console.log("方法注册成功:", res);
- },
- fail: function (errMsg) {
- console.log("方法注册失败:", errMsg);
- },
+ message: "是否确认退出详情页面?",
+ success: function(res) {
+ console.log("方法注册成功:", res);
+ },
+ fail: function(errMsg) {
+ console.log("方法注册失败:", errMsg);
+ },
});
});
},
- onPause(){
+ onPause() {
this.innerAudioContext.onPause(() => {
- wx.disableAlertBeforeUnload({
- success:function(res){
- console.log(res)
- },
- fail:function(e){
- console.log(e)
- }
- });
+ wx.disableAlertBeforeUnload({
+ success: function(res) {
+ console.log(res)
+ },
+ fail: function(e) {
+ console.log(e)
+ }
+ });
// 暂停监听
console.log('暂停播放!');
this.audioPlay = false
});
},
onCanplay() {
- this.innerAudioContext.onCanplay((callback) => {
- console.log("缓冲回调",this.innerAudioContext.duration);
- })
- },
- onEnded(){
+ this.innerAudioContext.onCanplay((callback) => {
+ console.log("缓冲回调", this.innerAudioContext.duration);
+ })
+ },
+ onEnded() {
this.innerAudioContext.onEnded(() => {
// 结束播放监听
console.log('播放结束!');
@@ -444,18 +458,18 @@ onPlay(){
this.qeihuanwenjian()
});
},
- onSeeking(){
+ onSeeking() {
this.innerAudioContext.onSeeking((res) => {
console.log("进行跳转", res);
})
},
- onSeeked(){
+ onSeeked() {
this.innerAudioContext.onSeeked((res) => {
console.log("结束跳转", res);
this.$forceUpdate()
});
},
- TimeUpdate(){
+ TimeUpdate() {
this.innerAudioContext.onTimeUpdate(() => {
const {
currentTime,
@@ -463,7 +477,7 @@ onPlay(){
} = this.innerAudioContext;
this.playNow = parseInt(currentTime * 1000)
if (this.dialogList.length == 0) {
-
+
} else {
const message = this.dialogList[0].message
for (let i = 0; i < message.length; i++) {
@@ -483,8 +497,8 @@ onPlay(){
this.$forceUpdate()
});
},
-
-
+
+
init(info) {
this.sliderMax = 0; //进度条最大值
this.timeStr = "00:00"; //总的时间
@@ -499,38 +513,38 @@ onPlay(){
if (res && res.length) {
let alltime = 1;
res.forEach(item => {
- item.recordDuration=item.recordDuration/1
+ item.recordDuration = item.recordDuration / 1
alltime += item.recordDuration
})
- console.log(res,alltime,"999999999999")
+ console.log(res, alltime, "999999999999")
this.alltimeStr = this.getTime(alltime)
- if(info){
- res.forEach((item,index) => {
- if(item.id==info.id){
+ if (info) {
+ res.forEach((item, index) => {
+ if (item.id == info.id) {
this.luyinList = res;
- this.csdFileindex=index;
+ this.csdFileindex = index;
this.recordPath = res[index].recordPath
this.sliderMax = this.getTime(res[index].recordDuration)
this.timeStr = this.getTime(res[index].recordDuration)
this.date = res[index].receptionTime;
-
+
this.isshowFile = false;
this.getCorpusAnalysis(info);
this.creatAudio()
- var itc=parseInt(info.bg/1000)
+ var itc = parseInt(info.bg / 1000)
this.adasdasdasd(itc)
}
- })
- }else{
+ })
+ } else {
this.recordPath = res[0].recordPath
this.sliderMax = this.getTime(res[0].recordDuration)
this.timeStr = this.getTime(res[0].recordDuration)
this.date = res[0].receptionTime
this.innerAudioContext.src = this.recordPath;
// if(uni.getStorageSync('entrance')==2){
- // this.changePlayState()
+ // this.changePlayState()
// }
-
+
this.luyinList = res;
this.getCorpusAnalysis()
}
@@ -545,33 +559,34 @@ onPlay(){
// if(uni.getStorageSync('entrance')==1){
// return
// }else{
- // this.innerAudioContext.play();
+ // this.innerAudioContext.play();
// }
},
//下一页
ltolower() {
- var lengthcz=this.luyinList.length-1;
+ var lengthcz = this.luyinList.length - 1;
if (this.num >= lengthcz) {
uni.showToast({
title: '到底了',
duration: 2000
});
return
- }else {
- this.num=this.num+1;
+ } else {
+ this.num = this.num + 1;
setTimeout(function() {
uni.hideLoading();
}, 2000);
uni.request({
- url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.num].id+"&customerId="+this.customerId, //仅为示例,并非真实接口地址。
+ url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.num].id +
+ "&customerId=" + this.customerId, //仅为示例,并非真实接口地址。
method: "GET",
header: {
'content-type': 'application/json',
- 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
+ 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
if (data.data.code == 10000) {
- if (data.data.data.audioContent.length == 0) {
+ if (!data.data.data.audioContent) {
setTimeout(function() {
uni.hideLoading();
}, 2000);
@@ -579,7 +594,7 @@ onPlay(){
const jsonInfo = JSON.parse(data.data.data.audioContent);
this.dialogList.push({
message: jsonInfo,
- backindex:this.num
+ backindex: this.num
});
this.dialogList.forEach((asd, idx) => {
asd.message.forEach((qwe, inde) => {
@@ -590,7 +605,7 @@ onPlay(){
}
}
},
-
+
fail: () => {
uni.hideLoading();
}
@@ -605,27 +620,28 @@ onPlay(){
duration: 2000
});
return
- } else if(this.Bnum == 0){
+ } else if (this.Bnum == 0) {
uni.showToast({
title: '到头了',
duration: 2000
});
return
- }else {
- this.Bnum=this.Bnum-1;
+ } else {
+ this.Bnum = this.Bnum - 1;
setTimeout(function() {
uni.hideLoading();
}, 2000);
uni.request({
- url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.Bnum].id+"&customerId="+this.customerId, //仅为示例,并非真实接口地址。
+ url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.Bnum].id +
+ "&customerId=" + this.customerId, //仅为示例,并非真实接口地址。
method: "GET",
header: {
'content-type': 'application/json',
- 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
+ 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
if (data.data.code == 10000) {
- if (data.data.data.audioContent.length == 0) {
+ if (!data.data.data.audioContent) {
setTimeout(function() {
uni.hideLoading();
}, 2000);
@@ -642,7 +658,7 @@ onPlay(){
uni.hideLoading();
}
}
-
+
},
fail: () => {
uni.hideLoading();
@@ -664,7 +680,8 @@ onPlay(){
method: "GET",
header: {
'content-type': 'application/json',
- 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
+ 'Authorization': 'Bearer ' + uni.getStorageSync(
+ 'weapp_session_login_data').token
},
success: (data) => {
if (data.data.code == 10000) {
@@ -699,14 +716,15 @@ onPlay(){
let objdata = {
"carId": that.customerId, //客户id
"status": 0,
- "itemId":that.buildingID,
+ "itemId": that.buildingID,
}
uni.request({
url: config.service.addATD,
method: "POST",
header: {
'content-type': 'application/json',
- 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
+ 'Authorization': 'Bearer ' + uni.getStorageSync(
+ 'weapp_session_login_data').token
},
data: objdata,
success: (data) => {
@@ -756,7 +774,7 @@ onPlay(){
if (this.thewrongword) {
if (this.reswrongword) {
let parames = {
- customerId:this.customerId,
+ customerId: this.customerId,
cupid: this.luyinList[this.csdFileindex].id,
wrongWord: this.thewrongword, //错误词
correctWord: this.reswrongword, //正确词
@@ -764,8 +782,8 @@ onPlay(){
}
this.isshow2 = false;
- let sas=this.textItself.replace(this.thewrongword,this.reswrongword)
- this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest=sas
+ let sas = this.textItself.replace(this.thewrongword, this.reswrongword)
+ this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas
this.dialogList.forEach(res => {
res.message.forEach(asd => {
asd.isshow = false;
@@ -852,7 +870,7 @@ onPlay(){
method: "POST",
header: {
'content-type': 'application/json',
- 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
+ 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
},
data: objdata,
success: (data) => {
@@ -883,13 +901,13 @@ onPlay(){
this.changanitem = item;
this.duihuawenjianid = this.luyinList[this.csdFileindex].id;
this.dialogList[i].message[index].isshow = !this.dialogList[i].message[index].isshow;
- this.textItself=item.onebest;
- let onebest=item.onebest;
- this.thewrongword =onebest.replace(/<.*?>/ig,"");
+ this.textItself = item.onebest;
+ let onebest = item.onebest;
+ this.thewrongword = onebest.replace(/<.*?>/ig, "");
this.thewrongword = item.onebest;
this.messagelisy = this.dialogList[i].message
- this.argtextindex1=i;
- this.argtextindex2=index;
+ this.argtextindex1 = i;
+ this.argtextindex2 = index;
},
//回到顶部
gotoTop() {
@@ -976,55 +994,56 @@ onPlay(){
},
-
+
// 获取转义后的对话结果
getCorpusAnalysis(info) {
this.dialogList = [];
uni.request({
- url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&customerId="+this.customerId, //仅为示例,并非真实接口地址。
+ url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.csdFileindex].id +
+ "&customerId=" + this.customerId, //仅为示例,并非真实接口地址。
method: "GET",
header: {
'content-type': 'application/json',
- 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
+ 'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
if (data.data.code == 10000) {
- if (data.data.data.audioContent.length == 0) {
+ if (!data.data.data.audioContent) {
setTimeout(function() {
uni.hideLoading();
}, 2000);
} else {
const jsonInfo = JSON.parse(data.data.data.audioContent);
console.log(jsonInfo)
- if(this.luyinList[this.csdFileindex].recordDuration>360){
+ if (this.luyinList[this.csdFileindex].recordDuration > 360) {
//拿到总条数
- var stusnum=jsonInfo.length;
+ var stusnum = jsonInfo.length;
this.dialogList.push({
- message: jsonInfo.splice(0,80),
- backindex:this.csdFileindex
+ message: jsonInfo.splice(0, 80),
+ backindex: this.csdFileindex
});
-
+
var auth_timetimer = setInterval(() => {
- stusnum-=100;
- console.log("还剩下"+stusnum)
+ stusnum -= 100;
+ console.log("还剩下" + stusnum)
if (stusnum <= 0) {
console.log("停止")
clearInterval(auth_timetimer);
- }else{
+ } else {
console.log("添加")
-
- var newlistwang=[];
- newlistwang=jsonInfo.splice(0,100);
- console.log("新数组",newlistwang)
- newlistwang.forEach(item=>{
+
+ var newlistwang = [];
+ newlistwang = jsonInfo.splice(0, 100);
+ console.log("新数组", newlistwang)
+ newlistwang.forEach(item => {
this.dialogList[0].message.push(item)
})
}
- }, 1000);
- }else{
+ }, 1000);
+ } else {
this.dialogList.push({
message: jsonInfo,
- backindex:this.csdFileindex
+ backindex: this.csdFileindex
});
}
this.dialogList.forEach((asd, idx) => {
@@ -1056,7 +1075,7 @@ onPlay(){
return false;
}
});
- },
+ },
getTime(time) {
return util.formatSecond(time)
},
@@ -1076,7 +1095,7 @@ onPlay(){
this.innerAudioContext.play();
},
//长按点击播放
- clickbofang(dialog,item) {
+ clickbofang(dialog, item) {
this.innerAudioContext.pause()
this.dialogList.forEach(res => {
res.message.forEach(asd => {
@@ -1084,17 +1103,17 @@ onPlay(){
})
})
this.$forceUpdate()
- if(dialog==this.csdFileindex){
+ if (dialog == this.csdFileindex) {
let time = parseInt(item.bg / 1000)
const currTimeStr = this.formatTime(time)
this.currentTimeStr = currTimeStr
this.innerAudioContext.seek(time);
this.innerAudioContext.play();
return
- }else{
+ } else {
let time = parseInt(item.bg / 1000)
this.innerAudioContext.destroy()
-
+
this.csdFileindex = dialog;
this.recordPath = this.luyinList[dialog].recordPath;
this.sliderMax = this.getTime(this.luyinList[dialog].recordDuration);
@@ -1102,7 +1121,7 @@ onPlay(){
this.date = this.luyinList[dialog].receptionTime;
this.creatAudio()
this.getCorpusAnalysis()
-
+
const currTimeStr = this.formatTime(time)
this.currentTimeStr = currTimeStr
this.innerAudioContext.seek(time);
@@ -1111,8 +1130,8 @@ onPlay(){
},
// 文件切换播放
filechange(item, i) {
- this.num=i;//下拉起始位置
- this.Bnum=i;
+ this.num = i; //下拉起始位置
+ this.Bnum = i;
this.innerAudioContext.destroy();
this.csdFileindex = i;
this.recordPath = item.recordPath;
@@ -1127,9 +1146,9 @@ onPlay(){
creatAudio() {
this.innerAudioContext = uni.createInnerAudioContext();
// if(uni.getStorageSync('entrance')==1){
- this.innerAudioContext.autoplay = false;
+ this.innerAudioContext.autoplay = false;
// }else{
- // this.innerAudioContext.autoplay = true;
+ // this.innerAudioContext.autoplay = true;
// }
this.innerAudioContext.src = this.recordPath;
this.innerAudioContext.title = '音频';
@@ -1172,19 +1191,20 @@ onPlay(){
}