douzhuo пре 2 година
родитељ
комит
af52c02ce4
3 измењених фајлова са 53 додато и 43 уклоњено
  1. +48
    -39
      pages/learning/Equinoctial/index.vue
  2. +3
    -2
      pages/mine/reception/consultant.vue
  3. +2
    -2
      utils/domain.js

+ 48
- 39
pages/learning/Equinoctial/index.vue Прегледај датотеку

@@ -17,18 +17,17 @@
</view> </view>
<zaudio :duration="duration" theme="theme4"></zaudio> <zaudio :duration="duration" theme="theme4"></zaudio>
</view> </view>
<scroll-view lower-threshold='20px' @scrolltolower="ltolower()" scroll-y="true"
class="text scroll-Y" :scroll-top="scrollTop" :scroll-into-view="scrollId">
<scroll-view lower-threshold='20px' @scrolltolower="ltolower()" scroll-y="true" class="text scroll-Y"
:scroll-top="scrollTop" :scroll-into-view="scrollId">
<!-- 音频识别模块 --> <!-- 音频识别模块 -->
<view> <view>
<!-- 聊天记录--> <!-- 聊天记录-->
<view class="dialog-block" v-for="(dialog,i) in dialogList" :key="i"> <view class="dialog-block" v-for="(dialog,i) in dialogList" :key="i">
<view :id="'dialog'+i" class="fileName">录音文件</view> <view :id="'dialog'+i" class="fileName">录音文件</view>
<view class="text dingweishiy"
v-for="(item,index) in dialog.message" :key="index" :id="'dialog'+csdFileindex+'text'+item.bg"
:class="{active: Math.floor(item.bg/1000) <= playNow && Math.floor(item.ed/1000) > playNow && i==0}"
:data-speaker="item.speaker"
>
<view class="text dingweishiy" v-for="(item,index) in dialog.message" :key="index"
:id="'dialog'+csdFileindex+'text'+item.bg"
:class="{active: Math.floor(item.bg/1000) <= playNow && Math.floor(item.ed/1000) > playNow && i==0}"
:data-speaker="item.speaker">
<view class="avatar"> <view class="avatar">
<text :style="[SPEAKERSTYLE(item.speaker)]">{{ item.speaker | toCapital }}</text> <text :style="[SPEAKERSTYLE(item.speaker)]">{{ item.speaker | toCapital }}</text>
</view> </view>
@@ -208,23 +207,23 @@
startFile: '', startFile: '',
num: 0, //上拉 转写文件下标 num: 0, //上拉 转写文件下标
Bnum: 0, //下拉 转写文件下标 Bnum: 0, //下拉 转写文件下标
ACTION: Symbol('zaudio'), // 唯一值区分每个页面的方法 ACTION: Symbol('zaudio'), // 唯一值区分每个页面的方法
isPageHide: false, // 是否息屏 isPageHide: false, // 是否息屏
duration: '', duration: '',
}; };
}, },
onLoad(options) { onLoad(options) {
this.startTime=options.startTime
this.customerId=options.customerId,
this.biaoqian=options.biaoqian;
this.startFile=options.startFile;
this.startTime = options.startTime
this.customerId = options.customerId;
this.biaoqian = options.biaoqian;
this.startFile = options.startFile;
this.getdianzan() this.getdianzan()
this.getCommentList(); this.getCommentList();
//注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响; //注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响;
this.$zaudio.on('stop', this.ACTION, () => { this.$zaudio.on('stop', this.ACTION, () => {
console.log('我是强制暂停或关闭小程序音频浮窗触发的') console.log('我是强制暂停或关闭小程序音频浮窗触发的')
@@ -241,14 +240,16 @@
}) })
}, },
onShow() { onShow() {
//实时渲染当前的播放状态
this.$zaudio.syncRender()
this.initRecord(); this.initRecord();
!this.isPageHide && this.getluyinList(); !this.isPageHide && this.getluyinList();
}, },
onHide() { onHide() {
this.isPageHide = true this.isPageHide = true
}, },
onUnload(){
onUnload() {
//卸载不需要的业务和获取播放状态的业务,提高页面性能 //卸载不需要的业务和获取播放状态的业务,提高页面性能
this.$zaudio.off('seek', this.ACTION); this.$zaudio.off('seek', this.ACTION);
this.$zaudio.off('stop', this.ACTION); this.$zaudio.off('stop', this.ACTION);
@@ -264,11 +265,13 @@
const message = this.dialogList[0].message; const message = this.dialogList[0].message;
if (!message) return if (!message) return
for (let i = 0; i < message.length; i++) { 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))) {
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 = "dialog" + this.csdFileindex + "text" + message[i].bg;
break; break;
} }
if (i < message.length - 1 && Math.floor(message[i].ed / 1000) < this.playNow && this.playNow < Math.floor(message[i + 1].bg / 1000)) {
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 = "dialog" + this.csdFileindex + "text" + message[i].bg;
break; break;
} }
@@ -286,8 +289,8 @@
duration: 2000 duration: 2000
}); });
return return
}else {
this.num=this.num+1;
} else {
this.num = this.num + 1;
uni.request({ uni.request({
url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.num].id + url: config.service.getCorpusAnalysis + '?corpusId=' + this.luyinList[this.num].id +
"&customerId=" + this.customerId, //仅为示例,并非真实接口地址。 "&customerId=" + this.customerId, //仅为示例,并非真实接口地址。
@@ -298,8 +301,7 @@
}, },
success: (data) => { success: (data) => {
if (data.data.code == 10000) { if (data.data.code == 10000) {
if (data.data.data.audioContent.length == 0) {
} else {
if (data.data.data.audioContent.length == 0) {} else {
const jsonInfo = JSON.parse(data.data.data.audioContent); const jsonInfo = JSON.parse(data.data.data.audioContent);
this.dialogList.push({ this.dialogList.push({
message: jsonInfo message: jsonInfo
@@ -386,9 +388,9 @@
if (cet.id == this.startFile) { if (cet.id == this.startFile) {
this.csdFileindex = index; this.csdFileindex = index;
this.recordPath = res[index].recordPath this.recordPath = res[index].recordPath
this.date=res[index].receptionTime
this.num=index;//下拉起始位置
this.Bnum=index;
this.date = res[index].receptionTime
this.num = index; //下拉起始位置
this.Bnum = index;
this.luyinList = res; this.luyinList = res;
this.zyAudio(); this.zyAudio();
this.getCorpusAnalysis() this.getCorpusAnalysis()
@@ -455,7 +457,7 @@
uni.hideLoading(); uni.hideLoading();
} }
}, },
//音频前进回退 //音频前进回退
sliderChangeComplate(currentTime) {}, sliderChangeComplate(currentTime) {},
// 获取转义后的对话结果 // 获取转义后的对话结果
@@ -477,11 +479,11 @@
}); });
setTimeout(function() { setTimeout(function() {
uni.hideLoading(); uni.hideLoading();
}, 2000);
}else{}
},
}, 2000);
} else {}
},
fail(error) { fail(error) {
return false;
return false;
} }
}); });
}, },
@@ -490,12 +492,12 @@
}, },
// 文件切换播放 // 文件切换播放
filechange(item, i) { filechange(item, i) {
this.num=i;//下拉起始位置
this.Bnum=i;
this.csdFileindex=i;
this.num = i; //下拉起始位置
this.Bnum = i;
this.csdFileindex = i;
this.recordPath = item.recordPath; this.recordPath = item.recordPath;
this.date=item.receptionTime;
this.isshowFile=false;
this.date = item.receptionTime;
this.isshowFile = false;
setTimeout(() => { setTimeout(() => {
this.$zaudio.operate(i) this.$zaudio.operate(i)
}, 50) }, 50)
@@ -663,7 +665,7 @@
}) })
}) })
}, },
//录音实例 //录音实例
zyAudio() { zyAudio() {
let data = this.luyinList.map((item, index) => { let data = this.luyinList.map((item, index) => {
@@ -677,10 +679,17 @@
this.$zaudio.setAudio(data) this.$zaudio.setAudio(data)
//渲染第一首音频 //渲染第一首音频
this.$zaudio.setRender(0) this.$zaudio.setRender(0)
if (this.startTime) {
setTimeout(() => {
this.stepPlay(parseInt(this.startTime / 1000))
})
}

}, },
// 跳转指定位置播放 // 跳转指定位置播放
stepPlay(t) { stepPlay(t) {
console.log(t)
this.$zaudio.seek(t) this.$zaudio.seek(t)
if (this.$zaudio.paused) { if (this.$zaudio.paused) {
this.$zaudio.operate() this.$zaudio.operate()


+ 3
- 2
pages/mine/reception/consultant.vue Прегледај датотеку

@@ -103,7 +103,7 @@
// //
searchFunc() { searchFunc() {
this.getFreeList();
}, },


async iniPage() { async iniPage() {
@@ -130,9 +130,10 @@
// 获取空闲顾问 // 获取空闲顾问
async getFreeList() { async getFreeList() {
try { try {
let deptId = this.list.length > 0 ? this.list[this.listCurrent].id : ''
// deptId 部门id // deptId 部门id
// name 顾问名称 // name 顾问名称
let res = await this.$u.get(`/zkAgentPool/freeList?itemId=${this.buildingID}&name=${this.keywords||''}&deptId=${this.list[this.listCurrent].id || ''}`)
let res = await this.$u.get(`/zkAgentPool/freeList?itemId=${this.buildingID}&name=${this.keywords||''}&deptId=${deptId}`)
if (res.length == 0) { if (res.length == 0) {
this.freeList = [] this.freeList = []
} else { } else {


+ 2
- 2
utils/domain.js Прегледај датотеку

@@ -1,8 +1,8 @@
// http.js使用域名 // http.js使用域名
const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试
// const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试
// const baseUrl = 'http://127.0.0.1:8080/autoSR/api'; // 本地 // const baseUrl = 'http://127.0.0.1:8080/autoSR/api'; // 本地
// const baseUrl = 'http://192.168.31.169:8080/autoSR/api'; // 长龙 // const baseUrl = 'http://192.168.31.169:8080/autoSR/api'; // 长龙
// const baseUrl = 'http://192.168.31.149:9090/api'; // 盛浩
const baseUrl = 'http://192.168.31.149:9090/api'; // 盛浩
// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式 // const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
// const baseUrl = 'https://hfju.com/api'; // 数智正式 // const baseUrl = 'https://hfju.com/api'; // 数智正式
// const baseUrl = 'https://xitong.pachira.cn/api'; // AI营销辅助 普强使用 // const baseUrl = 'https://xitong.pachira.cn/api'; // AI营销辅助 普强使用


Loading…
Откажи
Сачувај