Commit 9a44d76f by 孙喜旺

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

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