会话存档

This commit is contained in:
liuye
2023-06-08 09:54:53 +08:00
parent 6f2713af4a
commit 87b606dc0e
2 changed files with 5 additions and 57 deletions

View File

@@ -20,7 +20,7 @@
</AiAreaPicker> </AiAreaPicker>
</div> </div>
<div class="item"> <div class="item">
<AiPagePicker type="dept" :selected.sync="deptUserList" nodeKey="id" single @select="deptSelect" isAuth> <AiPagePicker type="dept" :selected.sync="deptUserList" nodeKey="id" single @select="deptSelect">
<span class="label" v-if="deptUserList.length">{{deptUserList[0].name}}</span> <span class="label" v-if="deptUserList.length">{{deptUserList[0].name}}</span>
<span v-else style="color:#999;">部门名称</span> <span v-else style="color:#999;">部门名称</span>
<u-icon name="arrow-down" color="#999" size="24" style="margin-left:8px;"/> <u-icon name="arrow-down" color="#999" size="24" style="margin-left:8px;"/>
@@ -77,7 +77,7 @@ export default {
onLoad() { onLoad() {
this.areaId = this.user.areaId this.areaId = this.user.areaId
this.areaName = this.user.areaName this.areaName = this.user.areaName
this.deptUserList = [{id: this.user.departId, name: this.user.departName}] // this.deptUserList = [{id: this.user.departId, name: this.user.departName}]
this.getList() this.getList()
}, },
onShow() { onShow() {
@@ -113,7 +113,7 @@ export default {
areaId: this.areaId, areaId: this.areaId,
toUserName: this.currentTabs == 1 ? this.keyword : '', toUserName: this.currentTabs == 1 ? this.keyword : '',
roomName: this.currentTabs == 1 ? '' : this.keyword, roomName: this.currentTabs == 1 ? '' : this.keyword,
departmentId: this.deptUserList[0].id departmentId: this.deptUserList.length ? this.deptUserList[0].id : ''
} }
}).then(res=> { }).then(res=> {
if(res?.data) { if(res?.data) {

View File

@@ -50,7 +50,6 @@
<script> <script>
import {mapState} from "vuex"; import {mapState} from "vuex";
import BenzAMRRecoder from 'benz-amr-recorder';
export default { export default {
name: "conversationDetail", name: "conversationDetail",
data() { data() {
@@ -131,18 +130,17 @@ export default {
}, },
getList() { getList() {
if(this.current > this.pages) return if(this.current > this.pages) return
var msgTypeList = ['','image', 'voice', 'text']
this.$http.post(`/app/appsessionarchiveinfo/listByUser`, null, { this.$http.post(`/app/appsessionarchiveinfo/listByUser`, null, {
params: { params: {
current: this.current, current: this.current,
size: 10, size: 10,
msgType: msgTypeList[this.currentTabs], msgType: this.tabList[this.currentTabs].value,
toUserId: this.toUserId, toUserId: this.toUserId,
roomId: this.roomId, roomId: this.roomId,
type: this.type, type: this.type,
content: this.keyword, content: this.keyword,
startTime: this.dateList.length ? this.dateList[0] : '', startTime: this.dateList.length ? this.dateList[0] : '',
endTime: this.dateList.length ? '' : this.dateList[1] endTime: this.dateList.length ? this.dateList[1] : ''
} }
}).then(res=> { }).then(res=> {
if(res?.data) { if(res?.data) {
@@ -167,56 +165,6 @@ export default {
current: img current: img
}) })
}, },
openRecord (row) {
// this.amrPlayStatus = false
// this.$nextTick(() => {
// this.amrPlay = new BenzAMRRecoder()
// this.amrPlay.onPlay(() => {
// this.amrPlayStatus = true
// })
// this.amrPlay.onStop(() => {
// this.amrPlayStatus = false
// })
// this.amrPlay.onPause(() => {
// this.amrPlayStatus = false
// })
// this.amrPlay.onResume(() => {
// this.amrPlayStatus = true
// })
// this.amrPlay.initWithUrl(row.sdkFileUrl).then(() => {
// console.info('armPlay:', this.amrPlay)
// this.amrPlay.play()
// })
// })
//amr.isPlaying()音频播放状态正在播放为true否则为false
if (row.amr.isPlaying()) {
row.amr.pause(); //暂停
} else {
row.amr.play(); //播放
}
},
handleClose () {
if (this.amrPlay) {
this.amrPlay.stop()
}
},
pauseAmrPlay () {
if (this.amrPlay) {
this.amrPlay.pause()
}
},
resumeAmrPlay () {
if (this.amrPlay) {
if (this.amrPlay.isPaused()) {
this.amrPlay.resume()
} else if (!this.amrPlay.isPlaying()) {
this.amrPlay.play()
}
}
},
}, },
onReachBottom() { onReachBottom() {
this.current ++ this.current ++