会话存档
This commit is contained in:
@@ -26,7 +26,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
component: "Detail",
|
||||
component: "List",
|
||||
params: {},
|
||||
include: [],
|
||||
};
|
||||
|
||||
@@ -45,48 +45,46 @@
|
||||
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="onChange">
|
||||
</el-date-picker>
|
||||
<el-input size="small" placeholder="输入搜索内容" v-model="searchMsg" clearable
|
||||
@clear="msgCurrent = 1, searchMsg = '', getMsgListInit()" suffix-icon="iconfont iconSearch"
|
||||
v-throttle="() => {(msgCurrent = 1), getMsgListInit();}"/>
|
||||
<ai-download :instance="instance" url="/app/appconvenientaddressbook/export" :params="search" fileName="会话存档"
|
||||
@clear="msgCurrent = 1, searchMsg = '', getMsgListInit()" suffix-icon="iconfont iconSearch"
|
||||
v-throttle="() => {(msgCurrent = 1), getMsgListInit();}"/>
|
||||
<!-- <ai-download :instance="instance" url="/app/appconvenientaddressbook/export" :params="search" fileName="会话存档"
|
||||
:disabled="msgList.length == 0">
|
||||
<el-button icon="iconfont iconExported" :disabled="msgList.length == 0">导出</el-button>
|
||||
</ai-download>
|
||||
</ai-download> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-right-info">
|
||||
<div v-for="(item, index) in msgList" :key="index">
|
||||
<div class="item item-right" v-if="item.userId == user.wxUserId">
|
||||
<div class="item" :class="item.userId == user.wxUserId ? 'item-right' : 'item-left'">
|
||||
<p class="time" v-if="index == 0">{{item.createTime}}</p>
|
||||
<div class="item-content-flex">
|
||||
<!-- <i class="el-icon-warning"></i> -->
|
||||
<!-- <i class="el-icon-warning" v-if="item.userId == user.wxUserId"></i> -->
|
||||
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId != user.wxUserId">
|
||||
|
||||
<div class="content" v-if="item.msgType == 'text'">
|
||||
<span></span>
|
||||
<p>{{item.content}}</p>
|
||||
</div>
|
||||
|
||||
<div class="img-list" v-if="item.msgType == 'image'">
|
||||
<img :src="item.sdkFileUrl" alt="" v-viewer>
|
||||
</div>
|
||||
<div class="voice-info">
|
||||
<ai-audio :src="item.sdkFileUrl" skin="flat" v-if="item.msgType == 'voice'" />
|
||||
|
||||
<div class="voice-info" v-if="item.msgType == 'voice'">
|
||||
<ai-audio :src="item.sdkFileUrl" skin="flat" />
|
||||
</div>
|
||||
<img :src="item.userAvatar" alt="" class="user-img">
|
||||
</div>
|
||||
</div>
|
||||
<div class="item item-left" v-else>
|
||||
<p class="time" v-if="index == 0">{{item.createTime}}</p>
|
||||
<div class="item-content-flex">
|
||||
<img :src="item.userAvatar" alt="" class="user-img">
|
||||
<div class="content" v-if="item.msgType == 'text'">
|
||||
<span></span>
|
||||
<p>{{item.content}}</p>
|
||||
</div>
|
||||
<div class="img-list" v-if="item.msgType == 'image'">
|
||||
<img :src="item.sdkFileUrl" alt="" v-viewer>
|
||||
</div>
|
||||
<div class="voice-info">
|
||||
<ai-audio :src="item.sdkFileUrl" skin="flat" v-if="item.msgType == 'voice'" />
|
||||
</div>
|
||||
<!-- <i class="el-icon-warning"></i> -->
|
||||
|
||||
<video style="width: 300px; object-fit: fill;" controls :src="item.sdkFileUrl" v-if="item.msgType == 'video'"></video>
|
||||
|
||||
<ai-file-list v-if="item.msgType == 'file'"
|
||||
:fileList="item.files"
|
||||
:fileOps="{ name: 'name', size: 'fileSizeStr' }"
|
||||
></ai-file-list>
|
||||
|
||||
<div class="revoke-text" v-if="item.msgType == 'revoke'">{{item.userName}}{{item.msgSendTime.substring(0, 16)}}撤回了一条消息</div>
|
||||
|
||||
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId == user.wxUserId">
|
||||
<!-- <i class="el-icon-warning" v-if="item.userId != user.wxUserId"></i> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -131,12 +129,12 @@
|
||||
msgType: 0,
|
||||
msgTypeList: [
|
||||
{name: '全部', value: ''},
|
||||
{name: '文本', value: 'text'},
|
||||
{name: '图片', value: 'image'},
|
||||
{name: '图片/视频', value: 'imagevideo'},
|
||||
{name: '语音', value: 'voice'},
|
||||
{name: '文件', value: 'file'},
|
||||
],
|
||||
searchMsg: '',
|
||||
id: 'LiuYe'
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -148,7 +146,6 @@
|
||||
this.id = this.params.id
|
||||
this.getList()
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -188,10 +185,11 @@
|
||||
this.instance.post(`/app/appsessionarchiveinfo/listByUser`, null, {
|
||||
params: {
|
||||
userId: this.id,
|
||||
type: this.tabIndex,
|
||||
// type: this.tabIndex,
|
||||
size: 20,
|
||||
current: this.msgCurrent,
|
||||
msgType: this.msgTypeList[this.msgType].value,
|
||||
// msgType: 'file',
|
||||
toUserId: this.list[this.leftActiveIndex].type == 1 ? '' : this.list[this.leftActiveIndex].toUserId,
|
||||
roomId: this.list[this.leftActiveIndex].type == 1 ? this.list[this.leftActiveIndex].roomId : '',
|
||||
type: this.list[this.leftActiveIndex].type,
|
||||
@@ -201,6 +199,11 @@
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
res.data.records.map((item) => {
|
||||
if(item.msgType == 'file') {
|
||||
item.files = [{url: item.sdkFileUrl, accessUrl: item.sdkFileUrl, name: item.sdkFileName, fileSizeStr: item.fileSizeStr}]
|
||||
}
|
||||
})
|
||||
this.msgList = res.data.records
|
||||
this.msgTotal = res.data.total || 0
|
||||
}
|
||||
@@ -233,26 +236,6 @@
|
||||
this.msgType = index
|
||||
this.getMsgListInit()
|
||||
},
|
||||
|
||||
onConfirm() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`/app/appintegralmerchandiseorder/writeOffOrder`, null, {
|
||||
params: {
|
||||
code: this.form.code,
|
||||
id: this.params.id,
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.isShow = false
|
||||
this.getInfo(this.params.id)
|
||||
this.$message.success('核销成功')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
cancel () {
|
||||
this.$emit('change', {
|
||||
type: 'List',
|
||||
@@ -470,6 +453,14 @@
|
||||
color: #f46;
|
||||
margin-top: 8px;
|
||||
}
|
||||
.revoke-text {
|
||||
line-height: 44px;
|
||||
padding: 0 6px;
|
||||
border-radius: 4px;
|
||||
background-color: #EEE;
|
||||
color: #999;
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.item-left {
|
||||
|
||||
Reference in New Issue
Block a user