diff --git a/components/uniapp-zaudio/dist/util.js b/components/uniapp-zaudio/dist/util.js
index a51f9c8..d55954b 100644
--- a/components/uniapp-zaudio/dist/util.js
+++ b/components/uniapp-zaudio/dist/util.js
@@ -1,74 +1,73 @@
"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
+Object.defineProperty(exports, "__esModule", {
+ value: true
+});
exports.EventBus = exports.throttle = exports.formatSeconds = void 0;
+
function formatSeconds(seconds) {
- var result = typeof seconds === "string" ? parseFloat(seconds) : seconds;
- if (isNaN(result))
- return "";
- let h = Math.floor(result / 3600) < 10
- ? "0" + Math.floor(result / 3600)
- : Math.floor(result / 3600);
- let m = Math.floor((result / 60) % 60) < 10
- ? "0" + Math.floor((result / 60) % 60)
- : Math.floor((result / 60) % 60) + h * 60;
- let s = Math.floor(result % 60) < 10
- ? "0" + Math.floor(result % 60)
- : Math.floor(result % 60);
- return `${m}:${s}`;
+ var result = typeof seconds === "string" ? parseFloat(seconds) : seconds;
+ if (isNaN(result)) return "";
+ let h = Math.floor(result / 3600) < 10 ? "0" + Math.floor(result / 3600) : Math.floor(result / 3600);
+ let m = Math.floor((result / 60) % 60) < 10 ? "0" + Math.floor((result / 60) % 60) : Math.floor((result / 60) % 60);
+ let s = Math.floor(result % 60) < 10 ? "0" + Math.floor(result % 60) : Math.floor(result % 60);
+
+ return `${h}:${m}:${s}`;
+ //time为毫秒数
}
exports.formatSeconds = formatSeconds;
+
function throttle(fn, wait) {
- let previous = 0;
- return function (...arg) {
- let context = this;
- let now = Date.now();
- //每隔一段时间执行一次;
- if (now - previous > wait) {
- fn.apply(context, arg);
- previous = now;
- }
- };
+ let previous = 0;
+ return function(...arg) {
+ let context = this;
+ let now = Date.now();
+ //每隔一段时间执行一次;
+ if (now - previous > wait) {
+ fn.apply(context, arg);
+ previous = now;
+ }
+ };
}
exports.throttle = throttle;
class EventBus {
- constructor() {
- this._events = new Map();
- }
- on(event, action, fn) {
- let arr = this._events.get(event);
- let hasAction = arr
- ? arr.findIndex((i) => i.action == action)
- : -1;
- if (hasAction > -1) {
- return;
- }
- this._events.set(event, [
- ...(this._events.get(event) || []),
- {
- action,
- fn,
- },
- ]);
- }
- has(event) {
- return this._events.has(event);
- }
- emit(event, data) {
- if (!this.has(event)) {
- return;
- }
- let arr = this._events.get(event);
- arr.forEach((i) => {
- i.fn(data);
- });
- }
- off(event, action) {
- if (!this.has(event)) {
- return;
- }
- let arr = this._events.get(event);
- let newdata = arr.filter((i) => i.action !== action);
- this._events.set(event, [...newdata]);
- }
+ constructor() {
+ this._events = new Map();
+ }
+ on(event, action, fn) {
+ let arr = this._events.get(event);
+ let hasAction = arr ?
+ arr.findIndex((i) => i.action == action) :
+ -1;
+ if (hasAction > -1) {
+ return;
+ }
+ this._events.set(event, [
+ ...(this._events.get(event) || []),
+ {
+ action,
+ fn,
+ },
+ ]);
+ }
+ has(event) {
+ return this._events.has(event);
+ }
+ emit(event, data) {
+ if (!this.has(event)) {
+ return;
+ }
+ let arr = this._events.get(event);
+ arr.forEach((i) => {
+ i.fn(data);
+ });
+ }
+ off(event, action) {
+ if (!this.has(event)) {
+ return;
+ }
+ let arr = this._events.get(event);
+ let newdata = arr.filter((i) => i.action !== action);
+ this._events.set(event, [...newdata]);
+ }
}
exports.EventBus = EventBus;
diff --git a/components/uniapp-zaudio/dist/zaudio.js b/components/uniapp-zaudio/dist/zaudio.js
index 313bf9d..1ffd19a 100644
--- a/components/uniapp-zaudio/dist/zaudio.js
+++ b/components/uniapp-zaudio/dist/zaudio.js
@@ -89,8 +89,8 @@ class ZAudio extends util_1.EventBus {
this.renderIndex = 0;
this.audiolist = [];
this.renderinfo = {
- current: "00:00",
- duration: "00:00",
+ current: "00:00:00",
+ duration: "00:00:00",
duration_value: 0,
current_value: 0,
src: "",
@@ -99,8 +99,8 @@ class ZAudio extends util_1.EventBus {
coverImgUrl: "",
};
this.playinfo = {
- current: "00:00",
- duration: "00:00",
+ current: "00:00:00",
+ duration: "00:00:00",
duration_value: 0,
current_value: 0,
src: "",
@@ -251,7 +251,7 @@ class ZAudio extends util_1.EventBus {
this.commit("setPause", true);
this.audioCtx.startTime = 0;
this.commit("setPlayinfo", {
- current: "00:00",
+ current: "00:00:00",
current_value: 0,
src: "",
});
@@ -296,9 +296,9 @@ class ZAudio extends util_1.EventBus {
coverImgUrl: "",
});
this.commit("setPlayinfo", {
- current: "00:00",
+ current: "00:00:00",
current_value: 0,
- duration: "00:00",
+ duration: "00:00:00",
duration_value: 0,
title: "",
src: "",
@@ -548,8 +548,8 @@ class ZAudio extends util_1.EventBus {
title: this.audiolist[this.renderIndex].title,
singer: this.audiolist[this.renderIndex].singer,
coverImgUrl: this.audiolist[this.renderIndex].coverImgUrl,
- current: "00:00",
- duration: "00:00",
+ current: "00:00:00",
+ duration: "00:00:00",
current_value: 0,
duration_value: 100,
};
diff --git a/components/uniapp-zaudio/zaudio.vue b/components/uniapp-zaudio/zaudio.vue
index c2b92e6..46f9517 100644
--- a/components/uniapp-zaudio/zaudio.vue
+++ b/components/uniapp-zaudio/zaudio.vue
@@ -23,7 +23,7 @@
:value="renderData('current_value')" :max="renderData('duration_value')" @change="change"
:disabled="!renderIsPlay">
- {{renderData('duration')}}
+ {{renderData('duration') || '00:00:00'}}
@@ -146,10 +146,6 @@
type: String,
default: '#42b983'
},
- duration: {
- type: String,
- default: '00:00'
- }
},
data() {
return {
@@ -180,12 +176,6 @@
};
}
},
-
- created() {
- console.log(this.$zaudio, 'this.$zaudio')
- console.log(this.$zaudio.setAudio, 'this.$zaudio')
- },
-
mounted() {
this.$nextTick(() => {
let action = this.action;
@@ -229,6 +219,8 @@
}
},
beforeDestroy() {
+ this.$zaudio.playinfo.duration = '00:00:00'
+ this.$zaudio.playinfo.duration_value = '00:00:00'
//组件卸载时卸载业务逻辑
let action = this.action;
this.$zaudio.syncStateOff(action)
diff --git a/pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue b/pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue
index 59e35f4..fd4c637 100644
--- a/pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue
+++ b/pages/center/Piabodata/Customerportrait/Detailsofthesearch.vue
@@ -2,45 +2,51 @@
- 画像语义词选择
+
+ 画像语义词选择
- 关键词输入
+ 关键词输入
+
-
+
画像语义词:
请选择
{{Semanticword}}
-
-
+
+
-
+
+
-
+
-
-
+
+
-
+
{{item.Content.time}}
-
+
@@ -54,63 +60,66 @@
export default {
data() {
return {
- customerId:'',
- listarr:[],
- keyword:'',
- skpl:'',
- roleindex:0,
- Showhiddenunits:false,
- selectlist:[],
- Semanticword:'',
- qujian:true
+ customerId: '',
+ listarr: [],
+ keyword: '',
+ skpl: '',
+ roleindex: 0,
+ Showhiddenunits: false,
+ selectlist: [],
+ Semanticword: '',
+ qujian: true,
+
+ tipFncEvent: '', // 提醒之前页面的方法更新当前页面的播放位置
};
},
- onLoad: function(options) {
+ onLoad(options) {
+ if (options.UpDateEvent) this.tipFncEvent = options.UpDateEvent
this.customerId = options.customerId;
this.statistical()
},
methods: {
- statistical(){
+ statistical() {
this.$u.get("/matchKeywords/findCARKeywords", {
customerId: this.customerId
}).then(res => {
- res.forEach((item,index)=>{
- if(item.isInterval==0){
- item.label=item.name+item.unit +'-'+ item.endName+item.unit;
- item.value=index
- }else{
- item.label=item.name;
- item.value=index
+ res.forEach((item, index) => {
+ if (item.isInterval == 0) {
+ item.label = item.name + item.unit + '-' + item.endName + item.unit;
+ item.value = index
+ } else {
+ item.label = item.name;
+ item.value = index
}
})
- this.selectlist=res;
+ this.selectlist = res;
})
},
- oninputtap(){
- this.Showhiddenunits=true;
+ oninputtap() {
+ this.Showhiddenunits = true;
},
confirm(e) {
- let indexs=e[0].value;
- this.selectlist.forEach((item,index)=>{
- if(indexs==item.value){
- this.Semanticword=item.name;
- this.keyword=item.matchName;
- if(item.isInterval==0){
- this.qujian=false;
- this.Semanticword=item.name+item.unit+ '-'+ item.endName+item.unit;
- }else{
- this.qujian=true;
+ let indexs = e[0].value;
+ this.selectlist.forEach((item, index) => {
+ if (indexs == item.value) {
+ this.Semanticword = item.name;
+ this.keyword = item.matchName;
+ if (item.isInterval == 0) {
+ this.qujian = false;
+ this.Semanticword = item.name + item.unit + '-' + item.endName + item.unit;
+ } else {
+ this.qujian = true;
}
}
})
this.searchinfo()
},
- tapspagek(i){
- this.roleindex=i;
- this.keyword="";
- this.Semanticword='';
- this.qujian=true;
- this.listarr=[];
+ tapspagek(i) {
+ this.roleindex = i;
+ this.keyword = "";
+ this.Semanticword = '';
+ this.qujian = true;
+ this.listarr = [];
},
formatTime(num) {
//格式化时间格式
@@ -121,27 +130,27 @@
if (min < 10) min = '0' + min;
return min + ":" + second;
},
- searchinfo(){
- if(this.keyword.length==0){
+ searchinfo() {
+ if (this.keyword.length == 0) {
return
- }else{
- let parames={
- keyword:this.keyword,
- customerId:this.customerId
- }
- this.$u.post("/corpus/keyWordsMatching", parames).then(res => {
- res.forEach(item=>{
- item.Content=JSON.parse(item.transferContent)
- })
- res.forEach(cet=>{
- cet.Content.time=this.formatTime(cet.Content.bg/1000)
- if(this.qujian==false){
- cet.Content.text=cet.Content.onebest;
- }else{
- cet.Content.text=this.brightKeyword(cet.Content.onebest)
+ } else {
+ let parames = {
+ keyword: this.keyword,
+ customerId: this.customerId
+ }
+ this.$u.post("/corpus/keyWordsMatching", parames).then(res => {
+ res.forEach(item => {
+ item.Content = JSON.parse(item.transferContent)
+ })
+ res.forEach(cet => {
+ cet.Content.time = this.formatTime(cet.Content.bg / 1000)
+ if (this.qujian == false) {
+ cet.Content.text = cet.Content.onebest;
+ } else {
+ cet.Content.text = this.brightKeyword(cet.Content.onebest)
}
})
- this.listarr=res;
+ this.listarr = res;
})
}
},
@@ -154,26 +163,27 @@
}
},
//跳转
- toaidoinfo(item,id,index){
+ toaidoinfo(item, id, index) {
uni.setStorageSync("entrance", 2); //写入缓存
- item.customerId=this.customerId;
- item.id=id;
- item.index=index;
-
- let pages = getCurrentPages() //获取当前页面栈的信息
- let prevPage = pages[pages.length - 2] //获取上一个页面
- prevPage.setData({ //把需要回传的值保存到上一个页面
- info: item
+ item.customerId = this.customerId;
+ item.id = id;
+ item.index = index;
+
+ let pages = getCurrentPages() //获取当前页面栈的信息
+ let prevPage = pages[pages.length - 2] //获取上一个页面
+ if (this.tipFncEvent) uni.$emit(this.tipFncEvent, item)
+ prevPage.setData({ //把需要回传的值保存到上一个页面
+ info: item
});
- wx.navigateBack({ //然后返回上一个页面
- delta: 1
+ wx.navigateBack({ //然后返回上一个页面
+ delta: 1
})
- }
+ }
},
}
diff --git a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
index acaae9d..9c7f2b7 100644
--- a/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
+++ b/pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
@@ -5,8 +5,10 @@
{{datetiem}}
-
-
+
+
+
-
+
@@ -26,131 +29,68 @@
-
-
-
-
-
-
- 录音文件
-
+
+
+
+
+
+
+ 录音文件
+
-
-
- A
-
-
-
- B
-
-
-
- C
-
-
-
- D
-
-
-
- E
-
-
-
-
- F
-
-
-
- G
-
-
-
- H
-
-
-
- I
-
-
-
- J
-
-
-
- K
-
-
-
- L
-
-
-
- M
-
-
-
- N
-
-
-
- O
-
-
-
- P
+
+
+
+ {{ item.speaker | toCapital }}
-
-
-
-
-
-
-
- 复制
-
- 常错词
-
- 加精华
-
- 播放
+
+
+ {{ item.speaker | toCapital }}
+ {{conversionTiame(item.bg/1000)}}
+
+
+
+
+
+
+
+ 复制
+
+
+ 常错词
+
+
+ 加精华
+
+
+
+ 修改角色
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
- {{currentTimeStr}}
-
-
-
- {{timeStr}}
-
-
-
+
@@ -174,19 +114,20 @@
-
+
-
+
标记为顾问
-
-
+
+
{{item.name}}
@@ -195,12 +136,13 @@
确认
-
+
-
+
接待详情
@@ -208,80 +150,93 @@
-
+
接待顾问
{{userlistobj.agentName}}
-
+
意向项目
{{userlistobj.projectName}}
-
+
接待开始时间
{{userlistobj.staTime}}
-
+
接待结束时间
{{userlistobj.endTime1}}
-
+
录音时长
{{userlistobj.mm}}分钟
-
+
-
+
销讲执行
-
- 销讲总执行率{{totalRate}}%
- 禁忌执行
+
+ 销讲总执行率{{totalRate}}%
+
+ 禁忌执行
-
+
指标
- 执行率
+ 执行率
+
-
+
{{item.name.substring(0,8)}}
-
+
{{((item.ratepercent/item.rate).toFixed(2)*100).toFixed()}}%
-
-
+
+
-
-
+
+
{{subitem.name.substring(0,8)}}
-
- 已执行
+
+ 已执行
未执行
-
+
话术内容
-
- {{inc+1}}.{{che.name}}
+
+ {{inc+1}}.{{che.name}}
-
+
@@ -289,73 +244,88 @@
- {{index+1}}.{{item}}
- 暂无数据
+ {{index+1}}.{{item}}
+ 暂无数据
+
-
+
-
+
客户意向
-
- 系统分析
- 人工校准
+
+ 系统分析
+
+ 人工校准
+
-
+
暂无数据
-
+
{{item.name}}
-
-
+
+
+
-
-
+
+
{{chend.text}}
-
- {{chend.text}}
+
+ {{chend.text}}
-
+
-
-
+
+
-
+
暂无数据
-
+
{{item.name}}
-
-
+
+
+
-
- {{chend.text}}
+
+
+ {{chend.text}}
+
校准
-
+
@@ -378,7 +348,7 @@
确认
-
+
@@ -402,48 +372,46 @@
var app = getApp();
var util = require("../../../../utils/util.js");
var config = require("../../../../config");
+ import zaudio from '@/components/uniapp-zaudio/zaudio';
export default {
+ components: {
+ zaudio
+ },
data() {
return {
- kehuyixiangcenterindex:0,
- Acquirecustomerintentlist2:[],
- zhixingcenterindex:0,
- prohibitedlist:[],
- guanjianciishow:false,
+ kehuyixiangcenterindex: 0,
+ Acquirecustomerintentlist2: [],
+ zhixingcenterindex: 0,
+ prohibitedlist: [],
+ guanjianciishow: false,
Aimg: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAACqVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/f3////9/f39/f3////////9/f3////////////9/f3////9/f39/f3////9/f3////////9/f3////9/f3////////////////9/f39/f3////////9/f39/f3////9/f39/f3////////9/f39/f3////////9/f39/f39/f3////////////////+/v7+/v7////+/v7////+/v7////+/v7+/v7////////+/v7+/v7////+/v7////+/v7////////////////////////////+/v7////+/v7////+/v7+/v7////////////+/v7////+/v7////+/v7+/v7////////+/v7////+/v7////////+/v7////////+/v7////+/v7+/v7+/v7////////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7+/v7////+/v5jdC9iAAAA4nRSTlMAAQIDBAUGBwgLDA0ODxARExQVFhgbHB4fICEiIyQmJygpKy4wMTIzNDY3ODk6Oz0+P0BBQkRGR0lKTE5PUFFTVFVXWFlcXV9gYWJjZWZnaGlqa2xtbm9wcXJzdHV2d3h6e319foGBgoODh4mKiouMjI2QkZKSk5OUlpeYmZmam5ycnZ+foKGio6SmqKmpq6yur7CwsbGytba5uru8wMDBwcLCw8XGx8jJysrLzM7P0dLT1dXW1tfY2drc3N7f4OHh5Obm5+jp6uvs7vDx8vLz8/T09fX29/f4+fn6+vz8/f7+RVDt+wAAA55JREFUGBntwf9/1HMAB/DX7XYbuXWV1cyMoixfugrRGNXytW33pbVdJ83XkiMLSb4LJd/zZUi0SKT5FmGS77HUVaixnHP2+kt8vt3Zbp/3+7P3XR5+8XziP1E4uiYcrh1bjMNi6NzXumnoeX3eSOSrpHUv+zi0ogJ5qd3JLN1XuJGzwqW0sW4oclT0Im19XIqcuNdQ4D0vcnEDhdYgB2f+SbFZUHbEdkrsLYeqFko9CEVH7qJUohxqLqODO6BmLR18XwAVRQfpZDxUnExHjVBRR0eroGIZHX0AFe10tA8qdtNZIRR00VEPVLxLRzuh4jk62gIVy+joSaiI0tECqPDT0blQ4f6RDpI+KHmYDjZBzWQ6aIaibZSK+6BoOqViUOXqoER8BJSdlqJYFDm4h0LveJAD7+cUiFciJ1U/01aiGjk65zfaSF6EnE3azQEO1iAPFZuZZes45MUT3cM+emLFyNfwK3fQ8k1sFA6L0cElTzx9d1OVC/8bNG/gzY+GQaKk461gCQZr8iMHSNZD4nySv6wYj0EYFv2UhqcgcTsN70ePhtzER3+lJe6BxXP9jTctvrl1yS1jkLaNlkTbBR6IlF3dyT78sHh+oqkSlrJe/uOH1jGw4apem2I/1yLtGRo6kRZiP73t57mQxb+Z2dqRdikNtyLtBWb78Cz05bomyQH+KIGljIYaWNxxDtC72ouMgsdpZzosHhqqYDmFdraOQNpttHUfLKU0TITlKtra6IZpCu3tgMVPQx0sG2ivDqaVFDgOppk0LIbJm6C9DTB1UCAMU4SGZ2GqocAumL6jQBtMMRq2wLScAik3dMV/UWB/EQwrafgSpk6KlEJ3LIXOgGE9DQdgqKDQSdBNoNAiGL6i6SjowhSaAt1UCm2CzpOk6QTonqfQJdBdSKGkD5pKWqZCU7iHQtdB10KxWmjOpqUJmtMp9gB091LsIWiCtCyFZiHFXoZuHcW+hiZGy0vQvE2xT6DbTolKAI/R8hmA4SmKdUG3jxIhAG/QkigAZlAi6QJQTJk2AF1MGwXcRRkfgJGU2V8EHzP8wBeUqQQwllKTcCozpuFESk0AMJNSC3AxM8KYT6lpAFootRGLmLEQ6ynVCCBAqcSQ1cy4f8ghSs0HcMzvlKp+lRmvVFMqNQ6aaIoyd3Yy49vllOmuh+H4WZFIpFnTpJmjadTM1oQ1oVAgFNQENA0N9f01BIKh8OzGOU3NkbmXzwuV41/wNztgHKhu7WKTAAAAAElFTkSuQmCC",
scrollTop: 0,
scrollId: "",
- audioPlay: false, //当前的播放状态控制
- currentTimeStr: "00:00", //当前进度的时间
- timeStr: "00:00", //总的时间
- sliderValue: 0, //进度条最小值
- sliderMax: 0, //进度条最大值
roleindex: 0,
- biojiisshow:false,//标记显隐
- roleindexbiaoji:0,//标记下标
- tablist:[],//标记集合
- Receivedetailsabout:false,//接待详情显示隐藏
- Pinspeak:false,
- intention:false,
- yixingindex:0,//意向,统计切换
- customerId:'',
- luyinList:[],
- recordPath:'',//
- datetiem:'',
- Alladdtodigest:0,
- innerAudioContext:'',
- textindex:0,//下拉 转写文件下标
- toptextindex:0,//上拉 转写文件下标
+ biojiisshow: false, //标记显隐
+ roleindexbiaoji: 0, //标记下标
+ tablist: [], //标记集合
+ Receivedetailsabout: false, //接待详情显示隐藏
+ Pinspeak: false,
+ intention: false,
+ yixingindex: 0, //意向,统计切换
+ customerId: '',
+ luyinList: [],
+ recordPath: '', //
+ datetiem: '',
+ Alladdtodigest: 0,
+ textindex: 0, //下拉 转写文件下标
+ toptextindex: 0, //上拉 转写文件下标
dialogList: [], //录音识别列表
csdFileindex: 0,
- speaker:'',
- newluyinList:[],
+ speaker: '',
+ newluyinList: [],
playNow: 0,
- ratelist:[],
- totalRate:'',
- userlistobj:{},
- Acquirecustomerintentlist:[],
- options1:[],
+ ratelist: [],
+ totalRate: '',
+ userlistobj: {},
+ Acquirecustomerintentlist: [],
+ options1: [],
messagelisy: [],
changanitem: {},
duihuawenjianid: "",
@@ -455,85 +423,105 @@
biaoqianid: "",
biaoqianlist: [],
biaoqianindex: 0,
- dshfkjsdkksodofydwfkhwdfkjh:0,
- buildingID:'',
+ dshfkjsdkksodofydwfkhwdfkjh: 0,
+ buildingID: '',
// methodsisshow:false,
- calibration:0,
-
- textItself:'',
- argtextindex1:0,
- argtextindex2:0,
- permissions:{
- commonly1:false,
- commonly2:false,
- commonly3:false,
- commonly4:false,
- commonly5:false,
- }
+ calibration: 0,
+
+ textItself: '',
+ argtextindex1: 0,
+ argtextindex2: 0,
+ permissions: {
+ commonly1: false,
+ commonly2: false,
+ commonly3: false,
+ commonly4: false,
+ commonly5: false,
+ },
+
+ ACTION: Symbol('zaudio'), // 唯一值区分每个页面的方法
+ isPageHide: false, // 是否息屏
};
},
+
+ computed: {
+ conversionTiame() {
+ return (e) => {
+ return this.getTime(e);
+ }
+ },
+ },
+
+ onLoad(options) {
+ this.customerId = options.customerId;
+
+ this.$zaudio.autoPlay = true
+ //注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响;
+ this.$zaudio.on('stop', this.ACTION, () => {
+ console.log('我是强制暂停或关闭小程序音频浮窗触发的')
+ })
+ this.$zaudio.on('seek', this.ACTION, (time) => {
+ this.sliderChangeComplate(this.TIMEEVENT(time))
+ })
+ this.$zaudio.on('playing', this.ACTION, (obj) => {
+ this.TimeUpdate(this.TIMEEVENT(obj.current))
+ })
+ this.$zaudio.on('error', this.ACTION, e => {
+ // this.qeihuanwenjian()
+ console.log(e, '加载失败')
+ })
+ uni.$on('Receivedetailabout', info => {
+ this.init(info)
+ })
+ },
+
onShow() {
- let newmenulist= uni.getStorageSync('weapp_session_Menu_data');
- this.permissions.commonly1=newmenulist.bjgw;
+ 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.commonly3 = newmenulist.swyxal;
+ this.permissions.commonly4 = newmenulist.ccc;
+ this.permissions.commonly5 = newmenulist.xz;
+ this.permissions.commonly6 = newmenulist.ckwjzx;
//1 标记顾问 bjgw
//1 接待无效标记 jdwxbj
//1 设为优秀案例 swyxal
// 常错词 ccc
// 校准 xz
- this.intention=false;
- this.kehuyixiangcenterindex=0;
+ this.intention = false;
+ this.kehuyixiangcenterindex = 0;
this.buildingID = uni.getStorageSync('buildingID').id;
var pages = getCurrentPages();
var currPage = pages[pages.length - 1]; //当前页面
var info = currPage.data.info;
- if(info){
- info=info;
+ if (info) {
+ info = info;
console.log('1')
- }else{
- info={
- bg:0
+ } else {
+ info = {
+ bg: 0
}
}
- this.innerAudioContext = uni.createInnerAudioContext();
- this.innerAudioContext.autoplay = false;
- this.innerAudioContext.title = '音频';
- this.onPlay()
- this.onPause()
- this.onCanplay()
- this.onEnded()
- this.onSeeking()
- this.onSeeked()
- this.TimeUpdate()
- this.init(info)
- },
- onLoad(options) {
- this.customerId=options.customerId;
+
+ !this.isPageHide && this.init(info)
},
- // 在组件实例被从页面节点树移除时执行
- destroyed: function() {
- //暂停
- // this.innerAudioContext.pause()
- // 销毁
- this.innerAudioContext.destroy();
+
+ onHide() {
+ this.isPageHide = true
},
+
// 销毁实例
- onUnload: function() {
- //暂停
- // this.innerAudioContext.pause()
- // 销毁
- this.innerAudioContext.destroy();
+ onUnload() {
+ //卸载不需要的业务和获取播放状态的业务,提高页面性能
+ this.$zaudio.off('seek', this.ACTION);
+ this.$zaudio.off('stop', this.ACTION);
+ this.$zaudio.off('playing', this.ACTION);
},
methods: {
// 跳转详情
argece(item) {
console.log(item)
- this.innerAudioContext.destroy();
if (item.selected == 0) {
console.log(item)
uni.navigateTo({
@@ -543,23 +531,24 @@
}
},
//关键词点击
- tapbadge(item){
+ tapbadge(item) {
//进搜索页面
uni.navigateTo({
- url: '/pages/learning/Keywordsearch?customerId='+this.customerId +"&keyword="+item +"&skpl="+ "2"
+ url: '/pages/learning/Keywordsearch?customerId=' + this.customerId + "&keyword=" + item +
+ "&skpl=" + "2" + '&UpDateEvent=Receivedetailabout'
})
},
- recordclick(i){
- this.zhixingcenterindex=i;
- if(i==0){
+ recordclick(i) {
+ this.zhixingcenterindex = i;
+ if (i == 0) {
this.getRatelist()
- }else{
+ } else {
console.log('999')
this.huoqujinji()
}
},
//获取禁忌
- huoqujinji(){
+ huoqujinji() {
uni.showLoading({
title: '加载中'
});
@@ -567,24 +556,23 @@
cusId: this.customerId
}).then(res => {
if (res.length) {
- this.prohibitedlist=res;
+ this.prohibitedlist = res;
}
setTimeout(function() {
uni.hideLoading();
}, 1000);
})
},
- guanjiancishifo(){
- // this.guanjianciishow=!this.guanjianciishow;
- this.innerAudioContext.destroy();
+ guanjiancishifo() {
uni.navigateTo({
- url: '/pages/center/Piabodata/Customerportrait/Detailsofthesearch?customerId='+this.customerId
+ url: '/pages/center/Piabodata/Customerportrait/Detailsofthesearch?customerId=' + this
+ .customerId + '&UpDateEvent=Receivedetailabout'
})
},
- tosearch(){
- this.innerAudioContext.destroy();
+ tosearch() {
uni.navigateTo({
- url: '/pages/center/Piabodata/Customerportrait/Detailsofthesearch?customerId='+this.customerId
+ url: '/pages/center/Piabodata/Customerportrait/Detailsofthesearch?customerId=' + this
+ .customerId + '&UpDateEvent=Receivedetailabout'
})
},
//标签选择
@@ -597,8 +585,8 @@
Addtheessence() {
this.isshow3 = true;
this.biaoqianlist = []
- let parames={
- "itemId":this.buildingID
+ let parames = {
+ "itemId": this.buildingID
}
this.$u.post("/addtodigest/findAllYi", parames).then(data => {
this.biaoqianlist = data
@@ -638,7 +626,7 @@
})
})
let objdata = {
- "itemId":this.buildingID,
+ "itemId": this.buildingID,
"carId": this.customerId, //客户id
"startTime": this.changanitem.bg, //开始时间
"startFile": this.duihuawenjianid, //对话所在录音文件id
@@ -652,7 +640,7 @@
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) => {
@@ -675,22 +663,22 @@
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, //正确词
translateHtmlContent: this.messagelisy,
-
+
}
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;
})
})
- this.$u.post("/corpus/addCorrectWord", parames).then(data => {
+ this.$u.post("/corpus/addCorrectWord", parames).then(data => {
this.thewrongword = "";
this.reswrongword = "";
})
@@ -736,85 +724,42 @@
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.messagelisy = this.dialogList[i].message
-
- this.argtextindex1=i;
- this.argtextindex2=index;
+
+ this.argtextindex1 = i;
+ this.argtextindex2 = index;
this.$forceUpdate()
},
- onPlay(){
- this.innerAudioContext.onPlay(() => {
- // 播放监听
- console.log('播放!');
- this.audioPlay = true;
- });
- },
- onPause(){
- this.innerAudioContext.onPause(() => {
- // 暂停监听
- console.log('暂停播放!');
- this.audioPlay = false
- });
- },
- onCanplay() {
- this.innerAudioContext.onCanplay((callback) => {
- console.log("缓冲回调",this.innerAudioContext.duration);
- })
- },
- onEnded(){
- this.innerAudioContext.onEnded(() => {
- // 结束播放监听
- console.log('播放结束!');
- this.audioPlay = false;
- });
- },
- onSeeking(){
- this.innerAudioContext.onSeeking((res) => {
- console.log("进行跳转", res);
- })
- },
- onSeeked(){
- this.innerAudioContext.onSeeked((res) => {
- console.log("结束跳转", res);
- this.$forceUpdate()
- });
- },
- TimeUpdate(){
- this.innerAudioContext.onTimeUpdate(() => {
- const {
- currentTime,
- duration
- } = this.innerAudioContext;
- this.playNow = parseInt(currentTime * 1000)
- if (this.dialogList.length == 0) {
- return
- } else {
- const message = this.dialogList[0].message;
- for (let i = 0; i < message.length; i++) {
- if (Number(message[i].bg) < this.playNow && Number(message[i].ed) > this.playNow) {
- this.scrollId = "dialog" + '0' + "text" + message[i].bg;
- break;
- }
+
+ TimeUpdate(currentTime) {
+ this.playNow = Number(currentTime)
+ if (this.dialogList.length == 0) {
+ return
+ } else {
+ const message = this.dialogList[0].message;
+ 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;
+ 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;
+ break;
}
}
-
- this.sliderValue = parseInt(currentTime);
- const currTimeStr = this.formatTime(currentTime);
- // 变动的时间
- this.currentTimeStr = currTimeStr;
- //进度条最大值
- this.sliderMax = this.luyinList[0].recordDuration;
- this.$forceUpdate()
- });
+ }
+ this.$forceUpdate()
},
+
init(info) {
- this.sliderMax = 0; //进度条最大值
- this.timeStr = "00:00"; //总的时间
const parames = {
pageNum: 1,
pageSize: 100,
@@ -826,138 +771,78 @@
if (res && res.length) {
this.luyinList = res;
this.recordPath = res[0].recordPath;
- this.calibration=res[0].calibration;
- if(this.calibration==0){
- this.kehuyixiangcenterindex=0;
- }else{
- this.kehuyixiangcenterindex=1;
+ this.calibration = res[0].calibration;
+ if (this.calibration == 0) {
+ this.kehuyixiangcenterindex = 0;
+ } else {
+ this.kehuyixiangcenterindex = 1;
}
- this.sliderMax = this.getTime(res[0].recordDuration)
- this.timeStr = this.getTime(res[0].recordDuration)
this.datetiem = res[0].receptionTime;
- this.Alladdtodigest=res[0].status;
+ this.Alladdtodigest = res[0].status;
this.getCorpusAnalysis(info)
- this.creatAudio()
+ if (info.bg == 0) this.zyAudio()
}
})
},
// 获取转义后的对话结果
getCorpusAnalysis(info) {
this.dialogList = [];
- this.newluyinList=[]
+ this.newluyinList = []
uni.request({
- url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+info.bg+"&speaker="+this.roleindex, //仅为示例,并非真实接口地址。并非真实接口地址。
+ url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id +
+ "&bg=" + info.bg + "&speaker=" + this.roleindex, //仅为示例,并非真实接口地址。并非真实接口地址。
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) => {
- this.tablist=[];
+ this.tablist = [];
let jsonInfo = JSON.parse(data.data.data.audioContent);
- for(var i=0;i<=data.data.data.speakerNum;i++){
- if(i==0){
- this.tablist.push({
- name:'全部'
- })
- }else if(i==1){
- this.tablist.push({
- name:'A'
- })
- }else if(i==2){
- this.tablist.push({
- name:'B'
- })
- }else if(i==3){
- this.tablist.push({
- name:'C'
- })
- }else if(i==4){
- this.tablist.push({
- name:'D'
- })
- }else if(i==5){
- this.tablist.push({
- name:'E'
- })
- }else if(i==6){
- this.tablist.push({
- name:'F'
- })
- }else if(i==7){
- this.tablist.push({
- name:'G'
- })
- }else if(i==8){
- this.tablist.push({
- name:'H'
- })
- }else if(i==9){
- this.tablist.push({
- name:'I'
- })
- }else if(i==10){
- this.tablist.push({
- name:'J'
- })
- }else if(i==11){
- this.tablist.push({
- name:'K'
- })
- }else if(i==12){
- this.tablist.push({
- name:'L'
- })
- }else if(i==13){
- this.tablist.push({
- name:'M'
- })
- }else if(i==14){
- this.tablist.push({
- name:'N'
- })
- }else if(i==15){
- this.tablist.push({
- name:'O'
- })
- }else{
- this.tablist.push({
- name:'P'
- })
- }
- }
-
- this.tablist[data.data.data.speaker].name=this.tablist[data.data.data.speaker].name+"顾问";
- this.roleindexbiaoji=data.data.data.speaker-1;
- this.dshfkjsdkksodofydwfkhwdfkjh=data.data.data.speaker-1;
- this.speaker=data.data.data.speaker;
-
+ for (var i = 0; i <= data.data.data.speakerNum; i++) {
+ if (i === 0) {
+ this.tablist.push({
+ name: '全部'
+ })
+ } else {
+ this.tablist.push({
+ name: String.fromCharCode(i + 64)
+ })
+ }
+ }
+
+ this.tablist[data.data.data.speaker].name = this.tablist[data.data.data.speaker].name +
+ "顾问";
+ this.roleindexbiaoji = data.data.data.speaker - 1;
+ this.dshfkjsdkksodofydwfkhwdfkjh = data.data.data.speaker - 1;
+ this.speaker = data.data.data.speaker;
+
//上拉标记点
- this.textindex=data.data.data.index;
+ 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.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.newluyinList=jsonInfo;
+ this.newluyinList = jsonInfo;
this.dialogList.push(jsonInfo[this.textindex]);
this.dialogList.forEach(res => {
res.message.forEach(asd => {
asd.isshow = false;
})
})
- var itc=parseInt(info.bg/1000)
- this.adasdasdasd(itc)
+ this.adasdasdasd(Math.floor(info.bg / 1000))
}
})
},
@@ -978,99 +863,55 @@
});
},
//长按点击播放
- clickbofang(dialog,item) {
- this.innerAudioContext.pause()
+ clickbofang(dialog, item) {
this.dialogList.forEach(res => {
res.message.forEach(asd => {
asd.isshow = false;
})
})
this.$forceUpdate()
- let platetime=item.bg;
- let newtime=item.bg/1000;
- this.dialogList=[]
+ let platetime = item.bg;
+ let newtime = item.bg / 1000;
+ this.dialogList = []
uni.request({
- url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+platetime, //仅为示例,并非真实接口地址。
+ url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id +
+ "&bg=" + platetime, //仅为示例,并非真实接口地址。
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) => {
- this.textindex=data.data.data.index;
- this.toptextindex=data.data.data.index;
+ this.textindex = data.data.data.index;
+ this.toptextindex = data.data.data.index;
this.dialogList.push(this.newluyinList[data.data.data.index])
- const currTimeStr = this.formatTime(newtime)
- this.currentTimeStr = currTimeStr
- this.innerAudioContext.seek(newtime);
- this.innerAudioContext.play();
+ this.stepPlay(newtime);
}
})
},
- //音频前进回退
- sliderChangeComplate(e) {
- let platetime=e.detail.value*1000;
- this.dialogList=[]
- uni.request({
- url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+platetime, //仅为示例,并非真实接口地址。
- method: "GET",
- header: {
- 'content-type': 'application/json',
- 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
- },
- success: (data) => {
- this.textindex=data.data.data.index;
- this.toptextindex=data.data.data.index;
- if(data.data.data.index>this.newluyinList.length){
- this.dialogList.push(this.newluyinList[0])
- }else{
- this.dialogList.push(this.newluyinList[data.data.data.index])
- }
- const currTimeStr = this.formatTime(e.detail.value)
- this.currentTimeStr = currTimeStr
- this.innerAudioContext.seek(e.detail.value);
- this.innerAudioContext.play();
+
+ // 音频前进回退
+ 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])
+ } else {
+ this.dialogList.push(this.newluyinList[data.index])
}
})
},
+
//搜索跳转
adasdasdasd(e) {
- const currTimeStr = this.formatTime(e)
- this.currentTimeStr = currTimeStr
- this.innerAudioContext.seek(e);
-
- if(uni.getStorageSync('entrance')==1){
- return
- }else{
- this.innerAudioContext.play();
- }
- },
- // 播放/暂停
- changePlayState(){
- if (this.audioPlay == false) {
- this.innerAudioContext.play();
- } else {
- this.innerAudioContext.pause()
- }
- },
- //录音实例
- creatAudio() {
- this.innerAudioContext = uni.createInnerAudioContext();
- if(uni.getStorageSync('entrance')==1){
- this.innerAudioContext.autoplay = false;
- }else{
- this.innerAudioContext.autoplay = true;
- }
- this.innerAudioContext.src = this.recordPath;
- this.innerAudioContext.title = '音频';
- this.onPlay()
- this.onPause()
- this.onCanplay()
- this.onEnded()
- this.onSeeking()
- this.onSeeked()
- this.TimeUpdate()
+ this.stepPlay(e)
},
+
formatTime(num) {
//格式化时间格式
num = num.toFixed(0);
@@ -1081,162 +922,164 @@
return min + ":" + second;
},
//意向统计切换
- Intentiontoswitch(i){
- this.yixingindex=i;
- if(i==1){
+ Intentiontoswitch(i) {
+ this.yixingindex = i;
+ if (i == 1) {
this.statistical()
}
},
- 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;
+ res.forEach(item => {
+ if (item.isInterval == 0) {
+ item.name = item.name + item.unit + '-' + item.endName + item.unit;
}
-
+
})
- this.options1=res;
+ this.options1 = res;
})
},
//接待详情点击
- Receivedetailsabouttab(stringa){
- if(stringa=='Receivedetailsabout'){
+ Receivedetailsabouttab(stringa) {
+ if (stringa == 'Receivedetailsabout') {
this.gituserlist()
- this.Receivedetailsabout=true;
- }else if(stringa=='Pinspeak'){
+ this.Receivedetailsabout = true;
+ } else if (stringa == 'Pinspeak') {
this.getRatelist()
- this.Pinspeak=true;
- }else{
- if(this.kehuyixiangcenterindex==0){
+ this.Pinspeak = true;
+ } else {
+ if (this.kehuyixiangcenterindex == 0) {
this.Acquirecustomerintent()
- }else{
+ } else {
this.Acquirecustomerintent2()
}
- this.intention=true;
- }
+ this.intention = 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;
})
},
- Acquishow2(i){
- this.Acquirecustomerintentlist2[i].isshow=!this.Acquirecustomerintentlist2[i].isshow;
+ Acquishow2(i) {
+ this.Acquirecustomerintentlist2[i].isshow = !this.Acquirecustomerintentlist2[i].isshow;
},
- tocalibration(){
- this.innerAudioContext.destroy();
+ tocalibration() {
uni.navigateTo({
- url: '/pages/mine/calibration?id='+this.customerId
+ url: '/pages/mine/calibration?id=' + this.customerId
});
},
- customerofintention(i){
- this.kehuyixiangcenterindex=i;
- if(i==0){
+ customerofintention(i) {
+ this.kehuyixiangcenterindex = i;
+ if (i == 0) {
this.Acquirecustomerintent()
- }else{
+ } else {
this.Acquirecustomerintent2()
}
},
//获取人工校准意向信息
- Acquirecustomerintent2(){
- this.Acquirecustomerintentlist2=[];
+ Acquirecustomerintent2() {
+ this.Acquirecustomerintentlist2 = [];
this.$u.get("/matchKeywords/findManualCalibration", {
customerId: this.customerId,
- type:1
+ type: 1
}).then(res => {
- res.forEach(item=>{
- item.isshow=true;
- item.children.forEach(chend=>{
- if(chend.isInterval==0){
- chend.text=chend.name+chend.unit+'-'+chend.endName+chend.unit
- }else{
- chend.text=chend.name
+ res.forEach(item => {
+ item.isshow = true;
+ item.children.forEach(chend => {
+ if (chend.isInterval == 0) {
+ chend.text = chend.name + chend.unit + '-' + chend.endName + chend
+ .unit
+ } else {
+ chend.text = chend.name
}
})
})
- this.Acquirecustomerintentlist2=res;
+ this.Acquirecustomerintentlist2 = res;
})
},
//获取意向信息
- Acquirecustomerintent(){
+ Acquirecustomerintent() {
this.$u.get("/matchKeywords/findSystemAnalysis", {
customerId: this.customerId
}).then(res => {
- res.forEach(item=>{
- item.isshow=true;
- item.children.forEach(chend=>{
- if(chend.isInterval==0){
- chend.text=chend.name+chend.unit+'-'+chend.endName+chend.unit
- }else{
- chend.text=chend.name
+ res.forEach(item => {
+ item.isshow = true;
+ item.children.forEach(chend => {
+ if (chend.isInterval == 0) {
+ chend.text = chend.name + chend.unit + '-' + chend.endName + chend
+ .unit
+ } else {
+ chend.text = chend.name
}
})
})
- this.Acquirecustomerintentlist=res;
+ this.Acquirecustomerintentlist = res;
})
},
- Acquishow(i){
- this.Acquirecustomerintentlist[i].isshow=!this.Acquirecustomerintentlist[i].isshow;
+ 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;
+ 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
+ selected: selected,
+ name: chend.name,
+ pid: chend.pid,
+ level: chend.level,
+ endName: chend.endName,
+ keywordsId: chend.keywordsId
}).then(res => {
-
+
})
},
//取消接待详情
- clenReceivedetailsabout(){
- this.Receivedetailsabout=false;
- this.Pinspeak=false;
- this.intention=false;
+ clenReceivedetailsabout() {
+ this.Receivedetailsabout = false;
+ this.Pinspeak = false;
+ this.intention = false;
},
//标记选择角色
- biaojixuanze(index){
- this.roleindexbiaoji=index;
+ biaojixuanze(index) {
+ this.roleindexbiaoji = index;
},
//标记顾问
- tagtap(){
- this.biojiisshow=!this.biojiisshow;
+ tagtap() {
+ this.biojiisshow = !this.biojiisshow;
},
//取消标记
- unmarktap(){
- this.biojiisshow=false;
- this.roleindexbiaoji=this.dshfkjsdkksodofydwfkhwdfkjh;
-
+ unmarktap() {
+ this.biojiisshow = false;
+ this.roleindexbiaoji = this.dshfkjsdkksodofydwfkhwdfkjh;
+
},
//确认标记
- Confirmthetag(){
- var num=this.roleindexbiaoji+1;
+ Confirmthetag() {
+ var num = this.roleindexbiaoji + 1;
uni.request({
- url: config.service.markConsultant + '?id=' + this.luyinList[this.csdFileindex].id+"&speaker="+num+'&customerId='+this.customerId, //仅为示例,并非真实接口地址。
+ url: config.service.markConsultant + '?id=' + this.luyinList[this.csdFileindex].id +
+ "&speaker=" + num + '&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) => {
- this.biojiisshow=false;
+ this.biojiisshow = false;
this.biaojiyuyi()
this.fenjiaoseunfo()
uni.showToast({
@@ -1247,9 +1090,9 @@
})
},
//标记语义词
- biaojiyuyi(){
- let parames={
- carId:this.customerId
+ biaojiyuyi() {
+ let parames = {
+ carId: this.customerId
}
this.$u.post("/matchKeywords/toMatchKeywords", parames).then(res => {
console.log(res)
@@ -1258,116 +1101,66 @@
//标记tab切换
tapspagek2(index) {
this.roleindex = index;
- this.newluyinList=[];
+ this.newluyinList = [];
this.fenjiaoseunfo()
},
//分角色标记刷新
- fenjiaoseunfo(){
- var bgcd=this.sliderValue*1000;
- this.newluyinList=[];
+ //分角色标记刷新
+ fenjiaoseunfo() {
+ var bgcd = this.playNow * 1000;
+ this.newluyinList = [];
this.dialogList = [];
- uni.request({
- url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+bgcd+"&speaker="+this.roleindex, //仅为示例,并非真实接口地址。
- method: "GET",
- header: {
- 'content-type': 'application/json',
- 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
- },
- success: (data) => {
- this.tablist=[];
- let jsonInfo = JSON.parse(data.data.data.audioContent);
- for(var i=0;i<=data.data.data.speakerNum;i++){
- if(i==0){
- this.tablist.push({
- name:'全部'
- })
- }else if(i==1){
- this.tablist.push({
- name:'A'
- })
- }else if(i==2){
- this.tablist.push({
- name:'B'
- })
- }else if(i==3){
- this.tablist.push({
- name:'C'
- })
- }else if(i==4){
- this.tablist.push({
- name:'D'
- })
- }else if(i==5){
- this.tablist.push({
- name:'E'
- })
- }else if(i==6){
- this.tablist.push({
- name:'F'
- })
- }else if(i==7){
- this.tablist.push({
- name:'G'
- })
- }else if(i==8){
- this.tablist.push({
- name:'H'
- })
- }else if(i==9){
- this.tablist.push({
- name:'I'
- })
- }else if(i==10){
- this.tablist.push({
- name:'J'
- })
- }else if(i==11){
- this.tablist.push({
- name:'K'
- })
- }else if(i==12){
- this.tablist.push({
- name:'L'
- })
- }else if(i==13){
- this.tablist.push({
- name:'M'
- })
- }else if(i==14){
- this.tablist.push({
- name:'N'
- })
- }else if(i==15){
+ let obj = {
+ corpusId: this.luyinList[this.csdFileindex].id,
+ bg: bgcd,
+ speaker: this.roleindex
+ }
+ this.$u.get(config.service.getCorpusAnal, obj).then((data) => {
+ this.tablist = [];
+ let jsonInfo = JSON.parse(data.audioContent);
+ for (var i = 0; i <= data.speakerNum; i++) {
+ if (i === 0) {
this.tablist.push({
- name:'O'
+ name: '全部'
})
- }else{
+ } else {
this.tablist.push({
- name:'P'
+ name: String.fromCharCode(i + 64)
})
- }
- }
-
- this.tablist[data.data.data.speaker].name=this.tablist[data.data.data.speaker].name+"顾问";
- this.roleindexbiaoji=data.data.data.speaker-1;
- this.dshfkjsdkksodofydwfkhwdfkjh=data.data.data.speaker-1;
- this.speaker=data.data.data.speaker;
- //上拉标记点
- 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
- })
- this.newluyinList=jsonInfo;
- if(this.textindex==null){
- return
- }else{
- this.dialogList.push(jsonInfo[this.textindex]);
}
}
+
+ if (data.speaker == null) {
+ this.roleindexbiaoji = 0;
+ this.dshfkjsdkksodofydwfkhwdfkjh = 0;
+ } else {
+ this.tablist[data.speaker].name = this.tablist[data.speaker]
+ .name + "顾问";
+ this.roleindexbiaoji = data.speaker - 1;
+ this.dshfkjsdkksodofydwfkhwdfkjh = data.speaker - 1;
+ }
+
+ if (this.roleindex > this.tablist.length - 1) {
+ this.roleindex = this.tablist.length - 1
+ this.fenjiaoseunfo()
+ }
+ this.speaker = data.speaker;
+ //上拉标记点
+ this.textindex = data.index;
+ //下拉标记点
+ this.toptextindex = data.index;
+
+ jsonInfo.forEach(item => {
+ item.message = JSON.parse(item.onebest)
+ item.backindex = this.csdFileindex
+ })
+
+ this.newluyinList = jsonInfo;
+ if (this.textindex == null) {
+ return
+ } else {
+ this.dialogList.push(jsonInfo[this.textindex]);
+ }
})
},
getTime(time) {
@@ -1375,7 +1168,6 @@
},
//回到顶部
gotoTop() {
- console.log("11111111111111111")
this.scrollId = null;
this.$nextTick(() => {
this.scrollId = "top";
@@ -1385,7 +1177,7 @@
changeshow(item, type) {
item.show = !item.show;
},
- changeshow2(item, type){
+ changeshow2(item, type) {
item.show = !item.show;
},
// 获取评分
@@ -1411,7 +1203,7 @@
ratepercent: 0,
children: []
})
- } else {
+ } else {
if (item.selected == 0) {
level2rate += item.fraction
}
@@ -1431,7 +1223,7 @@
selected: subitem.selected,
name: subitem.name,
show: false,
- marketingId:subitem.marketingId,
+ marketingId: subitem.marketingId,
children: []
})
}
@@ -1439,16 +1231,16 @@
})
res.forEach(subitem => {
let subitempid = subitem.pid
- level1.forEach(chen=>{
- chen.children.forEach(zxc=>{
- if(subitempid == zxc.marketingId){
+ level1.forEach(chen => {
+ chen.children.forEach(zxc => {
+ if (subitempid == zxc.marketingId) {
zxc.children.push({
- id: subitem.id,
- rate: subitem.fraction,
- selected: subitem.selected,
- name: subitem.name,
- marketingId:subitem.marketingId,
- })
+ id: subitem.id,
+ rate: subitem.fraction,
+ selected: subitem.selected,
+ name: subitem.name,
+ marketingId: subitem.marketingId,
+ })
}
})
})
@@ -1464,52 +1256,51 @@
}
},
//评分点击
- clickaudeopal(item){
- if(item.selected==0){
+ clickaudeopal(item) {
+ if (item.selected == 0) {
uni.navigateTo({
- url: '/pages/mine/ScoringPlaylist?customerId='+this.customerId +"&id="+item.marketingId
+ url: '/pages/mine/ScoringPlaylist?customerId=' + this.customerId + "&id=" + item
+ .marketingId
})
}
},
//下一页
ltolower() {
- var lengthcz=this.newluyinList.length-1;
+ var lengthcz = this.newluyinList.length - 1;
if (this.textindex >= lengthcz) {
uni.showToast({
title: '到底了',
duration: 2000
});
return
- }else {
- this.textindex=this.textindex+1;
- this.newluyinList[this.textindex].message.forEach(item=>{
- this.dialogList[0].message.push(item)
+ } else {
+ this.textindex = this.textindex + 1;
+ this.newluyinList[this.textindex].message.forEach(item => {
+ this.dialogList[0].message.push(item)
})
}
- console.log("下一页",this.textindex)
+ console.log("下一页", this.textindex)
},
+
//上一页
rolltoupper() {
- if(this.toptextindex == 0){
- // uni.showToast({
- // title: '到头了',
- // duration: 2000
- // });
+ if (this.toptextindex == 0) {
return
- }else {
- if(this.dialogList[0]==undefined ){
+ } 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=>{
+ } 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("上一页",this.toptextindex)
+ console.log("上一页", this.toptextindex)
},
+
// 取消全部加精
notappick() {
var that = this;
@@ -1520,11 +1311,13 @@
if (res.confirm) {
console.log('用户点击确定');
uni.request({
- url: config.service.delATD + "?carId=" + that.customerId+'&itemId='+that.buildingID,
+ url: config.service.delATD + "?carId=" + that.customerId + '&itemId=' +
+ that.buildingID,
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) {
@@ -1547,6 +1340,7 @@
}
});
},
+
//全部加精
tappick() {
var that = this;
@@ -1559,14 +1353,15 @@
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) => {
@@ -1590,534 +1385,740 @@
}
});
},
+
+ //录音实例
+ zyAudio() {
+ let data = [{
+ src: this.recordPath,
+ title: '录音音频',
+ singer: '',
+ coverImgUrl: ''
+ }]
+ this.$zaudio.setAudio(data)
+ //渲染第一首音频
+ this.$zaudio.setRender(0)
+
+ setTimeout(() => {
+ this.$zaudio.operate()
+ }, 150)
+ },
+
+
+ // 跳转指定位置播放
+ stepPlay(t) {
+ this.$zaudio.seek(t)
+ if (this.$zaudio.paused) {
+ this.$zaudio.operate()
+ }
+ }
}
};