From 30959ae83afd30dfd34f8b81fb722cfd80997fc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=A3=8E=E7=BB=A7=E7=BB=AD=E5=90=B9?= <17611323298@163.com>
Date: Wed, 12 Jul 2023 14:47:52 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96=E8=BD=AC?=
=?UTF-8?q?=E5=86=99=E5=86=85=E5=AE=B9=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config.js | 2 +
manifest.json | 2 +-
pages/mine/details2.vue | 857 +++++++++++++++++-----------------------
3 files changed, 372 insertions(+), 489 deletions(-)
diff --git a/config.js b/config.js
index dbbbffd..c91ab9c 100644
--- a/config.js
+++ b/config.js
@@ -68,6 +68,8 @@ var config = {
getSpeechAnalysis: `${host}/cms/mobile/getBytargetId`,
//同音转译接口2
getCorpusAnalysis: `${host}/corpus/audioPlay`,
+ // 获取转写内容
+ findAudioContent: `${host}/corpus/findAudioContent`,
//查询设备电量
findElectricity: `${host}/equipment/findElectricity`,
//首页设备查询
diff --git a/manifest.json b/manifest.json
index 0233b78..82f8d3e 100644
--- a/manifest.json
+++ b/manifest.json
@@ -72,7 +72,7 @@
},
"quickapp" : {},
"mp-weixin" : {
- "appid" : "wxe044603515ff2cb5",
+ "appid" : "wx8f883dca5ecc5510",
"setting" : {
"urlCheck" : false,
"es6" : true,
diff --git a/pages/mine/details2.vue b/pages/mine/details2.vue
index d5193fa..bb49988 100644
--- a/pages/mine/details2.vue
+++ b/pages/mine/details2.vue
@@ -3,7 +3,7 @@
- {{date}}
+ {{luyinList.receptionTime}}
@@ -12,95 +12,90 @@
{{item.name}}
-
+
标记
-
-
- 录音文件
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ item.speaker | toCapital }}
-
+ 录音文件
+
+
+
+
+
+
+
-
-
- {{ item.speaker | toCapital }} {{conversionTiame(item.bg/1000)}}
-
-
-
-
-
-
-
-
-
- 复制
-
-
-
- 常错词
-
-
-
- 加精华
-
-
-
- 修改角色
-
+
+
+
+
+
+ {{ item.speaker | toCapital }}
+
+
+
+
+ {{ item.speaker | toCapital }} {{conversionTiame(item.bg/1000)}}
+
+
+
+
+
+
+
+
+
+ 复制
+
+
+
+ 常错词
+
+
+
+ 加精华
+
+
+
+ 修改角色
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{dealword(subitem)[1]}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dealword(subitem)[1]}}
-
+
@@ -163,7 +158,7 @@
mode="">
{{ userlistobj.validInvalidName }}
-
+
销讲总执行率{{totalRate}}%
- 禁忌执行
需求挖掘率
@@ -364,9 +359,22 @@
- {{index+1}}.{{item}}
- 暂无数据
+
+ 顾问
+
+ {{index+1}}.{{item}}
+
+
+
+ 客户
+
+ {{index+1}}.{{item}}
+
+
+
+ 暂无数据
@@ -546,7 +554,7 @@
- 校准
+ 校准
@@ -581,9 +589,8 @@
修改角色
-
+
{{item.name}}
@@ -658,98 +665,81 @@
},
data() {
return {
- KeyWordsfractionList: [],
- customStyle: {
+ KeyWordsfractionList: [], // 客户详情需求挖掘话术列表
+ customStyle: { // 输入框自定义样式
'width': '320rpx',
'font-size': '34rpx',
'border-bottom': '1px solid #ccc'
},
- noClick: true,
- moreShow: false,
- kehuyixiangcenterindex: 0,
- Acquirecustomerintentlist2: [],
- zhixingcenterindex: 0,
- prohibitedlist: [],
- guanjianciishow: false,
- tablist: [],
- tablists: [], // 角色列表
- roleindex: 0,
+ noClick: true, // 防重点击
+ kehuyixiangcenterindex: 0, // 系统分析人工校准选项卡
+ calibration: 0, // 不知道是个啥
+ Acquirecustomerintentlist2: [], // 人工校准数组
+ Acquirecustomerintentlist: [], // 系统分析数组
+ zhixingcenterindex: 0, // 销讲总执行率 && 禁忌执行 && 需求挖掘率 选项卡下标
+ prohibitedlist: {
+ guwen: [], // 顾问违禁词
+ kehu: [], // 客户违禁词
+ }, // 禁忌执行
+
+ tablist: [], // 角色列表
+ tablists: [], // 标记顾问的角色列表
roleSelectArr: [0], // 当前选中的角色标记点
- roleindexbiaoji: -1,
- recordPath: "",
- customerId: "",
- luyinList: [], //录音文件
- newluyinList: [],
- dialogList: [], //录音识别列表
- csdFileindex: 0,
- date: "", //年月日
- tab: 0, // 默认是音频识别
- scrollTop: 0,
- scrollId: "",
- playNow: 0,
+ customerId: "", // 客户id
+ luyinList: {}, // 录音文件详情(obj形式)
+ dialogList: [], // 录音识别列表
+
+ scrollId: "", // scroll-view的锚点 id
+ playNow: 0, // 当前录音播放时间戳
+
ratelist: [], //评分列表
- totalRate: "",
+ totalRate: "", // 销讲总执行率
+
thewrongword: "", //错误词
reswrongword: "", //正确词
- isshow2: false,
- messagelisy: [],
- isshow3: false,
- biaoqianlist: [],
- biaoqianindex: 0,
- changanitem: {},
- duihuawenjianid: "",
- biaoqianid: "",
- status: 0,
- // jiaoseshow: true,
- itemobj: {},
- textindex: 0, //下拉 转写文件下标
- toptextindex: 0, //上拉 转写文件下标
- biojiisshow: false,
- speaker: '',
- userlistobj: {},
- Acquirecustomerintentlist: [],
- options1: [],
- Receivedetailsabout: false,
- Pinspeak: false,
- intention: false,
- yixingindex: 0, //意向,统计切换
- buildingID: '',
- // methodsisshow:false,
- Thetapeidisshow: false,
- // Menulist:[],
- // Menulistisshow:false,
- validInvalid: 0,
- calibration: 0,
-
- effective: false,
- effectiveindex: '0',
- effectiveitems: [],
- effectiveIndexShow: false,
- effectiveIndexText: '请选择',
-
- effectiveitext: '',
- textItself: '',
- argtextindex1: 0,
- argtextindex2: 0,
- permissions: {
- commonly1: false,
- commonly2: false,
- commonly3: false,
- commonly4: false,
- commonly5: false,
- commonly6: false
- },
+ isshow2: false, // 修改常错词弹出层控制变量
+
+ messagelisy: [], // /corpus/addCorrectWord 加入常错词接口 入参translateHtmlContent
+ isshow3: false, // 加精弹窗
+ biaoqianlist: [], // 加精华 标签的列表
+ biaoqianindex: 0, // 选中标签下标
+ biaoqianid: "", // 选择加精的标签id
+ status: 0, // 不知道是啥
+ itemobj: {}, // uni.getStorageSync('searchobj') 估计是其他页面存的筛选条件
+ biojiisshow: false, // 标记弹窗
+ userlistobj: {}, // 用户信息
+
+ Receivedetailsabout: false, // 接待详情弹窗
+ Pinspeak: false, // 销讲执行弹窗
+ intention: false, // 客户意向弹窗
- roleisshaw: false,
- roleindexrow: 0,
+ buildingID: uni.getStorageSync('buildingID').id || '', // 当前选中的项目id
+ Thetapeidisshow: false, // 底部菜单更多弹框
+
+ effective: false, // 无效原因弹窗
+ effectiveindex: '0', // 无效原因id
+ effectiveitems: [], // 无效原因数组
+ effectiveIndexShow: false, // 无效原因select弹窗
+ effectiveIndexText: '请选择', // 无效原因展示文字
+
+ effectiveitext: '', // 无效原因备注文字
+
+ textItself: '', // 存储修改的常错字对话
+ argtextindex2: 0, // 长按单次选中的对话下标
+
+ permissions: {}, // 权限菜单
+
+ roleisshaw: false, // 修改角色弹窗
+ roleindexrow: 0, // 选中需要修改的角色下标
roletiaoshu: 0,
ACTION: Symbol('zaudio'), // 唯一值区分每个页面的方法
isPageHide: false, // 是否息屏
duration: '', // 总时长
refresh: false, // 默认false
- isNum: false,
+
+ isNum: false, // 常错词输入框是否禁用
eqLog: 0,
refined: false, // 多选加精;
nowPlaying: 0, // 当前播放位置
@@ -777,14 +767,13 @@
computed: {
conversionTiame() {
return (e) => {
- return this.getTime(e);
+ return util.formatSecond(e)
}
},
},
onLoad(options) {
- this.buildingID = uni.getStorageSync('buildingID').id;
this.LOADING = true
this.status = options.status;
this.customerId = options.customerId;
@@ -808,10 +797,8 @@
})
// 获取销讲业务
this.$zaudio.on('ended', this.ACTION, e => {
- console.log('音频播放结束')
this.$zaudio.stop()
this.$nextTick(() => {
- console.log(this.$zaudio, '音频播放结束')
this.init(this.itemobj)
})
})
@@ -826,29 +813,18 @@
uni.$on('newobjStatus', status => {
this.status = status
})
+ this.firstInPage = false
},
onShow() {
//实时渲染当前的播放状态
this.$zaudio.syncRender()
-
let newmenulist = uni.getStorageSync('weapp_session_Menu_data');
- this.permissions.commonly1 = newmenulist.bjgw;
- this.permissions.commonly2 = newmenulist.jdwxbj;
- this.permissions.commonly3 = newmenulist.swyxal;
- this.permissions.commonly4 = newmenulist.ccc;
- this.permissions.commonly5 = newmenulist.xz;
- this.permissions.commonly6 = newmenulist.ckwjzx;
this.permissions = {
...newmenulist,
...this.permissions
}
- //1 标记顾问 bjgw
- //1 接待无效标记 jdwxbj
- //1 设为优秀案例 swyxal
- // 常错词 ccc
- // 校准 xz
this.intention = false;
this.kehuyixiangcenterindex = 0;
if (this.stateisshow == 2) {
@@ -873,9 +849,7 @@
},
methods: {
-
-
- // 加减
+ // 客户第几次到访 -
reduce() {
if (this.visitParams.visitRecordNum == 1) {
uni.showToast({
@@ -888,16 +862,18 @@
this.visitParams.visitRecordNum--
},
+ // 客户第几次到访+
add() {
this.visitParams.visitRecordNum++
},
+
// 取消
cancelVisitRecord() {
this.visitParams.visitRecordNum = 1
this.showVisit = false
},
- // 确定
+ // 客户第几次到访 修改
changeVisitRecord() {
this.$u.post('/customer/updateVisitRecord', this.visitParams).then(res => {
this.cancelVisitRecord()
@@ -919,10 +895,12 @@
})
},
+ // 无效接待原因 取消
effectiveIndexCancel() {
this.effectiveitext = "";
},
+ // 无效接待原因 确认
effectiveIndexConfirm(e) {
this.effectiveIndexText = e[0].label
this.effectiveindex = e[0].value
@@ -937,9 +915,12 @@
this.templateList = res
})
},
+
+ // 执行 不知道干嘛的
hangeshow2(item, type) {
item.show = !item.show;
},
+
//挖掘率话术客户标签展示
getKeywordsList(list) {
let keywords = [];
@@ -950,12 +931,14 @@
}
return keywords.join(",");
},
- // // 计算挖掘执行的完成率
+
+ // 计算挖掘执行的完成率
getPercent() {
let countArr = this.KeyWordsfractionList.filter(item => item.selected == 0)
this.percent = (countArr.length / this.KeyWordsfractionList.length) * 100
this.percent = this.percent.toFixed(0)
},
+
// 客户详情需求挖掘话术
getfindKeyWordsBycusId() {
this.$u.get("/cusLvStatistics/findKeyWordsBycusId?cusId=" + this.customerId).then(res => {
@@ -980,6 +963,8 @@
}
})
},
+
+ // 挖掘话术点击
clickWajue(item) {
if (item.isAskQuestions == 0) {
this.Pinspeak = false
@@ -990,6 +975,7 @@
})
}
},
+
// 对话加命中标签
dealTypes(type) {
if (type) {
@@ -1000,6 +986,7 @@
return []
}
},
+
// 对话加命中标签
dealword(type) {
if (type) {
@@ -1011,6 +998,7 @@
return []
}
},
+
// 跳转设备日志页面
eqLogClick() {
uni.navigateTo({
@@ -1048,51 +1036,44 @@
})
},
+ // 角色身份颜色
borderColor(index) {
let obj = {
color: '',
- borderRadius: '',
+ borderRadius: '8rpx',
border: ''
}
switch (index) {
case 1:
obj.color = '#E6625B';
- obj.borderRadius = '8rpx';
obj.border = '2rpx solid #E6625B';
break;
case 2:
obj.color = '#FF981E';
- obj.borderRadius = '8rpx';
obj.border = '2rpx solid #FF981E';
break;
case 3:
obj.color = '#F6BD16';
- obj.borderRadius = '8rpx';
obj.border = '2rpx solid #F6BD16';
break;
case 5:
obj.color = '#4980C8';
- obj.borderRadius = '8rpx';
obj.border = '2rpx solid #4980C8';
break;
case 6:
obj.color = '#60CBEC';
- obj.borderRadius = '8rpx';
obj.border = '2rpx solid #60CBEC';
break;
case 7:
obj.color = '##FF981E';
- obj.borderRadius = '8rpx';
obj.border = '2rpx solid #FF981E';
break;
case 8:
obj.color = '#4F861E';
- obj.borderRadius = '8rpx';
obj.border = '2rpx solid #4F861E';
break;
default:
obj.color = '#9F61C8';
- obj.borderRadius = '8rpx';
obj.border = '2rpx solid #9F61C8';
break;
}
@@ -1104,6 +1085,7 @@
this.cancelBeast()
this.$forceUpdate();
},
+
// 添加角色
addRole() {
this.tablist.push({
@@ -1111,36 +1093,50 @@
checked: false,
})
},
+
+ // 选择角色
rolexuanze(index) {
this.roleindexrow = index;
},
+
+ // 修改角色弹窗
showRoleisshaw() {
this.roleisshaw = true
},
+
// 修改角色
roletab() {
- this.dialogList[this.csdFileindex].message.forEach(item => {
- if (item.checked) {
- item.speaker = this.roleindexrow + 1
- }
- })
this.$u.post("/corpus/batchUpdateRole", {
- corpusId: this.luyinList[this.csdFileindex].id,
- transferContent: JSON.stringify(this.dialogList[this.csdFileindex].message),
+ corpusId: this.luyinList.id,
+ transferContent: JSON.stringify(this.dialogList),
speaker: this.roleindexrow + 1,
customerId: this.customerId
}).then(res => {
- this.dialogList[this.csdFileindex].message[this.roletiaoshu].speaker = this.roleindexrow + 1
+ uni.showToast({
+ title: '修改成功',
+ duration: 2000
+ });
this.roleisshaw = false;
this.cancelBeast()
this.cancelAllAdd()
+ //
+ this.dialogList.forEach(item => {
+ if (item.checked) {
+ item.speaker = this.roleindexrow + 1
+ }
+ })
+ }).catch(e => {
uni.showToast({
- title: '修改成功',
+ title: '修改失败,请重试!',
duration: 2000
});
-
+ this.roleisshaw = false;
+ this.cancelBeast()
+ this.cancelAllAdd()
})
},
+
+ // 跳转匹配标签页面
argece(item) {
if (item.selected == 0) {
// 关闭当前页面弹窗
@@ -1151,6 +1147,7 @@
})
}
},
+
//关键词点击
tapbadge(item) {
//进搜索页面
@@ -1159,6 +1156,8 @@
"&skpl=" + "2" + '&UpDateEvent=DETAILS2INIT'
})
},
+
+ // 销讲总执行率 && 禁忌执行 && 需求挖掘率 选项卡
recordclick(i) {
this.zhixingcenterindex = i;
if (i == 0) {
@@ -1169,6 +1168,7 @@
this.getfindKeyWordsBycusId()
}
},
+
//获取禁忌
huoqujinji() {
uni.showLoading({
@@ -1177,7 +1177,7 @@
this.$u.get("/customer/findTabooWordsByCusId", {
cusId: this.customerId
}).then(res => {
- if (res.length) {
+ if (res) {
this.prohibitedlist = res;
}
setTimeout(function() {
@@ -1185,6 +1185,7 @@
}, 1000);
})
},
+
//评分点击
clickaudeopal(item) {
if (item.selected == 0) {
@@ -1196,6 +1197,7 @@
})
}
},
+
//获取用户信息
gituserlist() {
this.$u.get("/matchKeywords/personalReceptionRecord", {
@@ -1206,6 +1208,7 @@
this.userlistobj = res;
})
},
+
// 点击更多
moreClick() {
this.gituserlist()
@@ -1213,14 +1216,14 @@
},
- Acquishow2(i) {
- this.Acquirecustomerintentlist2[i].isshow = !this.Acquirecustomerintentlist2[i].isshow;
- },
+ // 跳转系统校准页面
tocalibration() {
uni.navigateTo({
url: '/pages/mine/calibration?id=' + this.customerId
});
},
+
+ // 切换 系统分析||人工校准
customerofintention(i) {
this.kehuyixiangcenterindex = i;
if (i == 0) {
@@ -1229,6 +1232,7 @@
this.Acquirecustomerintent2()
}
},
+
//获取人工校准意向信息
Acquirecustomerintent2() {
this.Acquirecustomerintentlist2 = [];
@@ -1250,6 +1254,7 @@
this.Acquirecustomerintentlist2 = res;
})
},
+
//获取系统意向信息
Acquirecustomerintent() {
this.Acquirecustomerintentlist = [];
@@ -1270,30 +1275,17 @@
this.Acquirecustomerintentlist = res;
})
},
+
+ // 客户意向 不知道是干啥的
Acquishow(i) {
this.Acquirecustomerintentlist[i].isshow = !this.Acquirecustomerintentlist[i].isshow;
},
- Edittag(item, chend, index, i) {
- var selected = '';
- if (chend.selected == 0) {
- selected = 1;
- this.Acquirecustomerintentlist[index].children[i].selected = 1;
- } else {
- selected = 0;
- this.Acquirecustomerintentlist[index].children[i].selected = 0;
- }
- this.$u.post("/matchKeywords/updatePersonalMatchData", {
- carId: this.customerId,
- selected: selected,
- name: chend.name,
- pid: chend.pid,
- level: chend.level,
- endName: chend.endName,
- keywordsId: chend.keywordsId
- }).then(res => {
- })
+ // 客户意向 不知道是干啥的
+ Acquishow2(i) {
+ this.Acquirecustomerintentlist2[i].isshow = !this.Acquirecustomerintentlist2[i].isshow;
},
+
//取消接待详情
clenReceivedetailsabout() {
this.Receivedetailsabout = false;
@@ -1301,26 +1293,6 @@
this.intention = false;
this.Thetapeidisshow = false;
},
- //意向统计切换
- Intentiontoswitch(i) {
- this.yixingindex = i;
- if (i == 1) {
- this.statistical()
- }
- },
- statistical() {
- this.$u.get("/matchKeywords/findCARKeywords", {
- customerId: this.customerId
- }).then(res => {
- res.forEach(item => {
- if (item.isInterval == 0) {
- item.name = item.name + item.unit + '-' + item.endName + item.unit;
- }
-
- })
- this.options1 = res;
- })
- },
Receivetap() {
this.Receivedetailsabout = true;
@@ -1373,6 +1345,7 @@
}
},
+ // 无效原因
effectiveAdd() {
if (this.effectiveindex == 5) {
if (this.effectiveitext.length == 0) {
@@ -1396,7 +1369,6 @@
this.effective = false;
let parames = {
id: this.customerId,
- validInvalid: '',
validInvalid: 1,
invalidReason: this.effectiveindex,
invalidNote: this.effectiveitext
@@ -1435,29 +1407,34 @@
this.intention = true;
}
},
+
+ // 关键词菜单
guanjiancishifo() {
- // this.guanjianciishow=!this.guanjianciishow;
this.stateisshow = 1;
uni.navigateTo({
url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&status=" + this.status +
"&skpl=" + "1" + '&UpDateEvent=DETAILS2INIT&types=1'
})
},
+
//标记选择角色
biaojixuanze(item) {
item.checked = !item.checked
this.$forceUpdate()
},
+
//标记顾问
tagtap() {
this.tablists = this.tablist.slice(1, this.tablist.length)
this.biojiisshow = !this.biojiisshow;
},
+
//取消标记
unmarktap() {
this.biojiisshow = false;
this.roleisshaw = false
},
+
//确认标记
Confirmthetag() {
let arr = this.tablists.filter(item => item.checked)
@@ -1469,8 +1446,10 @@
return
}
let params = {
- id: this.luyinList[this.csdFileindex].id,
- speaker: arr.map(item => { return item.speaker }).join(","),
+ id: this.luyinList.id,
+ speaker: arr.map(item => {
+ return item.speaker
+ }).join(","),
customerId: this.customerId
}
this.$u.get(config.service.markConsultant, params).then((data) => {
@@ -1483,6 +1462,7 @@
});
})
},
+
//标记语义词
biaojiyuyi() {
let parames = {
@@ -1491,7 +1471,7 @@
this.$u.post("/matchKeywords/toMatchKeywords", parames).then(res => {})
},
- //分角色
+ // 筛选展示的角色
tapspagek(data, index) {
if (index == 0) this.resetTabList();
else this.resetAll();
@@ -1506,6 +1486,7 @@
} else {
this.roleSelectArr.push(0)
}
+ this.dialogList = []
this.fenjiaoseunfo()
},
@@ -1547,12 +1528,11 @@
return this.roleSelectArr.findIndex(item => item == 0) == -1 ? 1 : 0
},
- //分角色标记刷新
+ // 筛选展示角色刷新
fenjiaoseunfo(type) {
- this.newluyinList = [];
- this.dialogList = [];
let str =
- `?corpusId=${this.luyinList[this.csdFileindex].id}&bg=${this.playNow * 1000}&speaker=0&voFlag=${this.getVoFlagValue()}&num=50`
+ `?corpusId=${this.luyinList.id}&bg=${this.playNow * 1000}&speaker=0&voFlag=${this.getVoFlagValue()}&num=50`
+
if (this.roleSelectArr.findIndex(item => item == 0) == -1) {
str += `&speakerStr=${this.roleSelectArr.join(',')}`
}
@@ -1566,22 +1546,10 @@
},
success: (data) => {
let res = data.data.data
- let jsonInfo = JSON.parse(res.audioContent);
- //上拉标记点
- this.textindex = res.index;
- //下拉标记点
- this.toptextindex = res.index;
- jsonInfo.forEach(item => {
- item.message = JSON.parse(item.onebest)
- item.backindex = this.csdFileindex
- item.message.forEach(info => {
- info.checked = false
- })
- })
// 当页面标记重新刷新时
if (type == 'refresh') {
this.tablist = []
- this.roleSelectArr = [0]
+ this.roleSelectArr = this.$options.data().roleSelectArr // 重置
this.creatTabList(res.speakerNum)
this.tablist[0].select = true
this.consultant = res.speaker
@@ -1590,21 +1558,23 @@
if (this.roleSelectArr.length == 0) {
this.tablist[0].select = true
}
-
- this.newluyinList = jsonInfo;
- if (this.textindex == null) {
- return
- } else {
- this.dialogList.push(jsonInfo[this.textindex]);
+ const info = {
+ seek: 1,
+ bg: this.playNow * 1000,
+ voFlag: this.getVoFlagValue(),
+ }
+ if (this.roleSelectArr.findIndex(item => item == 0) == -1) {
+ info.speakerStr = this.roleSelectArr.join(',');
}
+ this.getFindAudioContent(info)
+
}
})
},
-
+
// 设置顾问
setConsultant() {
let arr = this.consultant.split(',') || []
- console.log(this.consultant,arr)
this.tablist.map(obj => {
if (arr.includes(obj.speaker.toString())) {
obj.name += '顾问'
@@ -1612,31 +1582,21 @@
})
},
- toKeywordsearch() {
- this.stateisshow = 1;
- uni.navigateTo({
- url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&status=" + this.status +
- "&skpl=" + "1" + '&UpDateEvent=DETAILS2INIT'
- })
- },
-
-
+ // 播放时定位到下面的位置
TimeUpdate(currentTime) {
this.playNow = Number(currentTime)
- if (this.dialogList.length == 0) {
- return
- } else {
- const message = this.dialogList[0].message;
+ if (this.dialogList.length > 0) {
+ const message = this.dialogList;
if (!message) return
for (let i = 0; i < message.length; i++) {
if ((Math.floor(message[i].bg / 1000) <= this.playNow && this.playNow < Math.floor(message[i].ed /
1000))) {
- this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
+ this.scrollId = "dialogtext" + message[i].bg;
break;
}
if (i < message.length - 1 && Math.floor(message[i].ed / 1000) < this.playNow && this.playNow <
Math.floor(message[i + 1].bg / 1000)) {
- this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
+ this.scrollId = "dialogtext" + message[i].bg;
break;
}
}
@@ -1662,14 +1622,10 @@
this.kehuyixiangcenterindex = 1;
}
if (info.bg != 0) {
- this.luyinList = res;
- this.recordPath = res[0].recordPath
- this.date = res[0].receptionTime;
+ this.luyinList = res[0];
this.getCorpusAnalysis(info);
} else {
- this.luyinList = res;
- this.recordPath = res[0].recordPath
- this.date = res[0].receptionTime;
+ this.luyinList = res[0];
this.getCorpusAnalysis(info);
this.zyAudio()
}
@@ -1678,69 +1634,39 @@
}
})
},
- //搜索跳转 定位到选择
- adasdasdasd(e) {
- this.stepPlay(e)
- },
- //下一页
- ltolower() {
- var lengthcz = this.newluyinList.length - 1;
- if (this.textindex >= lengthcz) {
- uni.showToast({
- title: '到底了',
- icon: 'none',
- duration: 2000
- });
- return
- } else {
- this.textindex = this.textindex + 1;
- this.newluyinList[this.textindex].message.forEach(item => {
- this.dialogList[0].message.push(item)
- })
- }
- },
- //下一页
+ //下一页 seek 往后seek传1
ltolower() {
- var lengthcz = this.newluyinList.length - 1;
- if (this.textindex >= lengthcz) {
- uni.showToast({
- title: '到底了',
- icon: 'none',
- duration: 2000
- });
- return
- } else {
- this.textindex = this.textindex + 1;
- this.newluyinList[this.textindex].message.forEach(item => {
- this.dialogList[0].message.push(item)
- })
+ if (this.dialogList.length == 0) return
+ console.log('ltolower')
+ const info = {
+ seek: 1,
+ bg: this.dialogList[this.dialogList.length - 1].bg,
+ voFlag: this.getVoFlagValue(),
+ }
+ if (this.roleSelectArr.findIndex(item => item == 0) == -1) {
+ info.speakerStr = this.roleSelectArr.join(',');
}
- console.log("下一页", this.textindex)
+ this.getFindAudioContent(info)
},
- //上一页
+
+ //上一页 seek 往前seek传-1
rolltoupper() {
- if (this.toptextindex == 0) {
- // uni.showToast({
- // title: '到头了',
- // duration: 2000
- // });
- return
- } else {
- if (this.dialogList[0] == undefined) {
- return
- } else {
- this.toptextindex = this.toptextindex - 1;
- let reverselist = this.newluyinList[this.toptextindex].message;
- let runlist = reverselist.reverse();
- runlist.forEach(item => {
- this.dialogList[0].message.unshift(item)
- })
- }
+ console.log('rolltoupper')
+ if (this.dialogList.length == 0) return
+ const info = {
+ bg: this.dialogList[0].bg,
+ seek: -1,
+ voFlag: this.getVoFlagValue(),
}
- console.log("上一页", this.toptextindex)
+ if (this.roleSelectArr.findIndex(item => item == 0) == -1) {
+ info.speakerStr = this.roleSelectArr.join(',');
+ }
+ this.getFindAudioContent(info)
},
+
+ // 加精
jiajing() {
if (this.status == 1) { // 加精
this.tappick()
@@ -1785,22 +1711,21 @@
//全部加精
tappick() {
- var that = this;
uni.showModal({
title: '提示',
content: '确认加精?',
- success: function(res) {
+ success: (res) => {
if (res.confirm) {
console.log('用户点击确定');
let objdata = {
- "carId": that.customerId, //客户id
+ "carId": this.customerId, //客户id
"status": 0,
- "itemId": that.buildingID,
+ "itemId": this.buildingID,
}
- that.$u.post(config.service.addATD, objdata).then(data => {
+ this.$u.post(config.service.addATD, objdata).then(data => {
console.log(data)
if (!data || data.code == 10000) {
- that.status = 0
+ this.status = 0
uni.showToast({
title: '加精成功',
duration: 2000
@@ -1825,19 +1750,16 @@
},
//复制
clickcopy() {
- var that = this;
uni.setClipboardData({
- data: that.thewrongword,
- success: function() {
- that.dialogList.forEach(res => {
- res.message.forEach(asd => {
- asd.isshow = false;
- })
- })
- that.$forceUpdate();
+ data: this.thewrongword,
+ success: () => {
+ this.cancelBeast()
+ this.$forceUpdate();
}
});
},
+
+
//确认加入常错词
Confirmtheexit() {
if (this.reswrongword.length > 8 || this.thewrongword.length > 8) {
@@ -1861,17 +1783,14 @@
if (this.reswrongword) {
let parames = {
customerId: this.customerId,
- cupid: this.luyinList[this.csdFileindex].id,
+ cupid: this.luyinList.id,
wrongWord: this.thewrongword, //错误词
correctWord: this.reswrongword, //正确词
translateHtmlContent: this.messagelisy,
}
this.isshow2 = false;
-
-
- let sas = this.textItself.replace(this.thewrongword, this.reswrongword)
- this.dialogList[this.argtextindex1].message[this.argtextindex2].onebest = sas
-
+ this.dialogList[this.argtextindex2].onebest = this.textItself.replace(this.thewrongword,
+ this.reswrongword)
this.cancelBeast()
this.$u.post("/corpus/addCorrectWord", parames).then(data => {
this.thewrongword = "";
@@ -1920,10 +1839,8 @@
},
// 隐藏长按提示框
cancelBeast() {
- this.dialogList.forEach(res => {
- res.message.forEach(asd => {
- asd.isshow = false;
- })
+ this.dialogList.forEach(asd => {
+ asd.isshow = false;
})
},
@@ -1941,16 +1858,13 @@
// 重置选择的内容
cancelAllAdd() {
console.log('chufa')
- this.dialogList.forEach(item => {
- if (item.message && item.message.length > 0) {
- item.message.forEach(items => {
- items.checked = false
- })
- }
+ this.dialogList.forEach(items => {
+ items.checked = false
})
this.refined = false
// this.$forceUpdate()
},
+
// 确认批量加精
sureRefinement() {
this.isshow3 = true;
@@ -1986,21 +1900,17 @@
itemId: this.buildingID,
carId: this.customerId, //客户id
status: 1,
- startFile: this.duihuawenjianid, //对话所在录音文件id
+ startFile: this.luyinList.id, //对话所在录音文件id
marketingId: this.biaoqianid, //对应一级父id
toDigestList: [], // 加精多选的内容
}
// 将数据筛选出来并排序并且翻转数据让后端获取第一条加精的数据在分点加精的学习列表使用
- this.dialogList.forEach(items => {
- if (items.message && items.message.length > 0) {
- items.message.forEach(item => {
- if (item.checked) {
- objdata.toDigestList.push({
- jjTransfer: item.onebest,
- startTime: item.bg,
- endTime: item.ed,
- })
- }
+ this.dialogList.forEach(item => {
+ if (item.checked) {
+ objdata.toDigestList.push({
+ jjTransfer: item.onebest,
+ startTime: item.bg,
+ endTime: item.ed,
})
}
})
@@ -2024,41 +1934,22 @@
})
},
//长按对话
- changanxiaoguo(item, index, i) {
+ changanxiaoguo(item, index) {
this.messagelisy = [];
- this.changanitem = {};
- this.duihuawenjianid = "";
this.cancelBeast()
- this.changanitem = item;
- this.duihuawenjianid = this.luyinList[this.csdFileindex].id;
- this.dialogList[i].message[index].isshow = !this.dialogList[i].message[index].isshow;
+ this.dialogList[index].isshow = !this.dialogList[index].isshow;
this.textItself = item.onebest;
let onebest = item.onebest;
this.thewrongword = onebest.replace(/<.*?>/ig, "");
- this.messagelisy = this.dialogList[i].message
- this.argtextindex1 = i;
+ this.messagelisy = this.dialogList
this.argtextindex2 = index;
},
- //回到顶部
- gotoTop() {
- this.scrollId = null;
- this.$nextTick(() => {
- this.scrollId = "top";
- })
- },
- //切换tab
- changeTab(type) {
- if (type == 0) {
- this.tab = 0
- } else {
- this.tab = 1;
- this.getRatelist();
- }
- },
+
//评分上下显隐
changeshow(item, type) {
item.show = !item.show;
},
+
changeshow2(item, type) {
item.show = !item.show;
},
@@ -2140,11 +2031,10 @@
// 获取转义后的对话结果
getCorpusAnalysis(info) {
- this.dialogList = [];
- this.newluyinList = []
+ console.log("getCorpusAnalysis")
uni.request({
- url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id +
- "&bg=" + info.bg + "&speaker=" + this.roleindex + '&num=50', //仅为示例,并非真实接口地址。
+ url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList.id +
+ "&bg=" + info.bg + "&speaker=0" + '&num=50', //仅为示例,并非真实接口地址。
method: "GET",
header: {
'content-type': 'application/json',
@@ -2153,7 +2043,6 @@
success: (data) => {
this.LOADING = false
this.tablist = [];
- let jsonInfo = JSON.parse(data.data.data.audioContent);
this.creatTabList(data.data.data.speakerNum)
this.tablist[0].select = true // 默认选中第一个
@@ -2162,29 +2051,8 @@
this.consultant = data.data.data.speaker
this.setConsultant()
}
-
- //上拉标记点
- this.textindex = data.data.data.index;
- //下拉标记点
- this.toptextindex = data.data.data.index;
-
- jsonInfo.forEach(item => {
- item.message = JSON.parse(item.onebest)
- item.backindex = this.csdFileindex;
- if (info.onebest) {
- item.message.forEach(che => {
- if (che.onebest == info.onebest) {
- che.onebest =
- `${che.onebest}`;
- }
- })
- }
- })
- this.dialogList = [];
- this.newluyinList = []
- this.newluyinList = jsonInfo;
- this.dialogList.push(jsonInfo[this.textindex]);
- this.adasdasdasd(Math.floor(info.bg / 1000))
+ this.getFindAudioContent(info);
+ this.stepPlay(Math.floor(info.bg / 1000))
},
fail: () => {
this.LOADING = false
@@ -2193,36 +2061,58 @@
},
- getTime(time) {
- return util.formatSecond(time)
- },
+ // 获取录音内容
+ getFindAudioContent(info) {
+ const params = {
+ corpusId: this.luyinList.id,
+ speaker: 0,
+ bg: info.bg || 0,
+ num: 50,
+ seek: info.seek || 1,
+ }
+ if (info.speakerStr) {
+ params.speakerStr = info.speakerStr
+ }
+ this.$u.get(config.service.findAudioContent, params).then(res => {
+ res.forEach(che => {
+ if (che.onebest == info.onebest) {
+ che.onebest =
+ `${che.onebest}`;
+ }
+ })
- // 音频前进回退
- sliderChangeComplate(currentTime) {
- this.dialogList = []
- this.$u.get(config.service.fastForward, {
- corpusId: this.luyinList[this.csdFileindex].id,
- bg: (currentTime * 1000) || 0
- }).then(data => {
- this.textindex = data.index;
- this.toptextindex = data.index;
- if (data.index > this.newluyinList.length) {
- this.dialogList.push(this.newluyinList[0])
+ if (info.reset) {
+ this.dialogList = res
} else {
- this.dialogList.push(this.newluyinList[data.index])
+ if (info.seek > 0) {
+ this.dialogList = [...this.dialogList, ...res];
+ } else {
+ this.dialogList = [...res, ...this.dialogList];
+ }
}
+ }).catch(e => {
+ console.log(e, 'catch')
})
},
- //长按点击播放
- clickbofang(dialog, item) {
+ // 音频前进回退
+ sliderChangeComplate(currentTime) {
+ const info = {
+ bg: (currentTime * 1000) || 0,
+ seek: 1,
+ reset: true
+ }
+ this.getFindAudioContent(info)
+ },
+
+ // 点击播放
+ clickbofang(item) {
this.cancelBeast()
this.$forceUpdate()
let platetime = item.bg;
let newtime = Math.floor(item.bg / 1000);
- this.dialogList = []
uni.request({
- url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id +
+ url: config.service.fastForward + '?corpusId=' + this.luyinList.id +
"&bg=" + platetime || 0, //仅为示例,并非真实接口地址。
method: "GET",
header: {
@@ -2230,9 +2120,6 @@
'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
- this.textindex = data.data.data.index;
- this.toptextindex = data.data.data.index;
- this.dialogList.push(this.newluyinList[data.data.data.index])
this.stepPlay(newtime);
}
})
@@ -2247,11 +2134,6 @@
if (min < 10) min = '0' + min;
return min + ":" + second;
},
- changeEditing() {
- this.dialogListres[0].message.forEach(asd => {
- asd.isshow = false;
- })
- },
// 迅速切换音频源并切换回来
@@ -2280,7 +2162,7 @@
//录音实例
zyAudio() {
let data = [{
- src: this.recordPath,
+ src: this.luyinList.recordPath,
title: '录音音频',
singer: '',
coverImgUrl: ''
@@ -2984,23 +2866,22 @@
+ .fileName {
+ max-width: 200rpx;
+ text-align: center;
+ margin: 10rpx auto;
+ font-size: 28rpx;
+ font-weight: 400;
+ color: #666;
+ height: 52rpx;
+ line-height: 52rpx;
+ background: #F8F8F8;
+ border-radius: 4rpx;
+ padding: 0 20rpx;
+ }
+
.dialog-block {
margin: 20rpx 0;
- border-bottom: 1px solid #ccc;
-
- .fileName {
- max-width: 200rpx;
- text-align: center;
- margin: 10rpx auto;
- font-size: 28rpx;
- font-weight: 400;
- color: #666;
- height: 52rpx;
- line-height: 52rpx;
- background: #F8F8F8;
- border-radius: 4rpx;
- padding: 0 20rpx;
- }
}
.scroll-Y {