提交 9a44d76f 编写于 作者: 孙喜旺

会话存档客户检索接口调整

上级 d2f0484b
import request from '@/utils/request'
const getExternalChatList = (params) => {
return request({
url: '/linkwechat/msg/selectExternalChatList/'+ params.fromId,
url: '/chat/msg/selectExternalChatList/'+ params.fromId,
method: 'get'
})
}
const selectAloneChatList = (params) => {
return request({
url: '/chat/msg/selectAloneChatList\n/',
method: 'get',
params
})
}
const getInternalChatList = (params) => {
return request({
url: '/linkwechat/msg/selectInternalChatList/'+ params.fromId,
url: '/chat/msg/selectInternalChatList/'+ params.fromId,
method: 'get'
})
}
const getGroupChatList = (params) => {
return request({
url: '/linkwechat/msg/selectGroupChatList/'+ params.fromId,
url: '/chat/msg/selectGroupChatList/'+ params.fromId,
method: 'get'
})
}
const chatList = (params) => {
return request({
url: '/linkwechat/msg/list',
url: '/chat/msg/list',
method: 'get',
params,
})
......@@ -66,6 +75,7 @@ export const content = {
indexEchart,
indexTable,
getExternalChatList,
selectAloneChatList,
getInternalChatList,
getGroupChatList,
chatList,
......
......@@ -9,17 +9,17 @@
>
<el-row style="padding:10px">
<el-col :span="3"
><img :src="item.receiveWeUser.avatarMediaid"
><img :src="item.avatar"
/></el-col>
<el-col :span="21">
<p>
{{ item.receiveWeUser.name }}
{{ item.name }}
<span class="fr gray">{{
parseTime(item.finalChatContext.msgtime)
item.msgTime
}}</span>
</p>
<p class="gray padt10" v-if="item.finalChatContext.text">
{{ item.finalChatContext.text.content }}
<p class="gray padt10" v-if="item.contact">
{{ JSON.parse(item.contact).content }}
</p>
</el-col>
</el-row>
......
......@@ -42,6 +42,7 @@
placeholder="搜索聊天记录"
prefix-icon="el-icon-search"
v-model="chatContent"
@keyup.enter.native="chatMsgList"
>
</el-input>
</div>
......@@ -271,7 +272,7 @@ export default {
CList: [],
personList: [],
loading: false,
employId: '',
fromId: '',
chatData: {},
allChat: [],
......@@ -288,7 +289,7 @@ export default {
methods: {
chatFn(data) {
this.chatData = data
console.log(data)
console.log(data,"<><><><>><")
this.activeNameThreeClick()
},
groupFn(data) {
......@@ -305,29 +306,43 @@ export default {
personCheck(data, e) {
this.personIndex = e
this.talkName = data.name
this.employId = data.externalUserid
this.fromId = data.externalUserid
this.getChatList()
},
getChatList(flag) {
if (!this.employId) {
if (!this.fromId) {
return
}
if (flag) {
this.loading = true
}
this.personList = []
content
.getTree({
fromId: this.employId,
searchType: this.activeName
})
.then(({ rows }) => {
this.loading = false
this.personList = rows
})
.catch((err) => {
this.loading = false
})
if(this.activeName == '0'){
content
.selectAloneChatList({
fromId: this.fromId,
contact: this.chatContent
})
.then(({ data }) => {
this.loading = false
this.personList = data
})
.catch((err) => {
this.loading = false
})
}else {
content
.getGroupChatList({
roomId: this.fromId
})
.then(({ data }) => {
this.loading = false
this.personList = data
})
.catch((err) => {
this.loading = false
})
}
},
activeNameThreeClick(page, group) {
if (!!!page) {
......@@ -345,8 +360,10 @@ export default {
} else if (this.activeNameThree == 4) {
msgType = 'voice'
}
let query = {
fromId: this.chatData.fromId,
fromId: this.fromId,
toList: this.chatData.receiver,
msgType,
pageSize: '10',
pageNum: this.currentPage,
......@@ -392,11 +409,6 @@ export default {
pageNum: 1,
pageSize: 999,
name: this.employName,
userId: '',
tagIds: '',
beginTime: '',
endTime: '',
status: '',
isOpenChat: '1'
}
content.listByCustomer(querys).then((res) => {
......@@ -404,6 +416,9 @@ export default {
this.CList = res.rows
this.employAmount = res.total
})
},
chatMsgList() {
this.getChatList();
}
},
mounted() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册