Commit 3303e0d0 by 孙喜旺

会话存档消息查询接口修改

1 parent 9a44d76f
...@@ -48,14 +48,7 @@ const indexEchart = () => { ...@@ -48,14 +48,7 @@ const indexEchart = () => {
method: 'get' method: 'get'
}) })
} }
//
const chatGrounpList = (params) => {
return request({
url: '/wecom/finance/getChatRoomContactList',
method: 'get',
params,
})
}
const listByCustomer = (params) => { const listByCustomer = (params) => {
return request({ return request({
url: '/wecom/customer/list', url: '/wecom/customer/list',
...@@ -63,9 +56,9 @@ const listByCustomer = (params) => { ...@@ -63,9 +56,9 @@ const listByCustomer = (params) => {
params, params,
}) })
} }
const getChatAllList = (params) => { const getFullSearchChatList = (params) => {
return request({ return request({
url: '/wecom/finance/getChatAllList', url: '/chat/msg/selectFullSearchChatList',
method: 'get', method: 'get',
params, params,
}) })
...@@ -80,6 +73,5 @@ export const content = { ...@@ -80,6 +73,5 @@ export const content = {
getGroupChatList, getGroupChatList,
chatList, chatList,
listByCustomer, listByCustomer,
getChatAllList, getFullSearchChatList
chatGrounpList
} }
...@@ -383,8 +383,6 @@ export default { ...@@ -383,8 +383,6 @@ export default {
msgType = 'voice' msgType = 'voice'
} }
let query = { let query = {
fromId: this.fromId,
msgType, msgType,
pageSize: '10', pageSize: '10',
pageNum: this.currentPage, pageNum: this.currentPage,
...@@ -394,6 +392,7 @@ export default { ...@@ -394,6 +392,7 @@ export default {
endTime: this.takeTime ? yearMouthDay(this.takeTime[1]) : '' endTime: this.takeTime ? yearMouthDay(this.takeTime[1]) : ''
} }
if (this.activeName != '2') { if (this.activeName != '2') {
query.fromId = this.fromId
query.toList = this.chat.receiver query.toList = this.chat.receiver
}else { }else {
query.roomId = this.chat.receiver query.roomId = this.chat.receiver
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
<el-table :data="fileData" stripe style="width: 100%" :header-cell-style="{background:'#fff'}"> <el-table :data="fileData" stripe style="width: 100%" :header-cell-style="{background:'#fff'}">
<el-table-column prop="date" label="发送者" width="180"> <el-table-column prop="date" label="发送者" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.fromInfo">{{scope.row.fromInfo.name}}</p> <p v-if="scope.row">{{scope.row.name}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label=" 内容"> <el-table-column prop="name" label=" 内容">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="!!scope.row.content" class="emcode" v-html="scope.row.content"></p> <p v-if="!!scope.row.contact" class="emcode" v-html="scope.row.contact"></p>
<p v-else-if="!!!scope.row.content&&scope.row.text">{{scope.row.text.content}}</p> <p v-else-if="!!!scope.row.contact&&scope.row.text">{{JSON.parse(scope.row.contact).content}}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="消息状态" width="200"> <el-table-column label="消息状态" width="200">
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="address" label="发送时间" width="200"> <el-table-column prop="address" label="发送时间" width="200">
<template slot-scope="scope" v-if="scope.row.text"> <template slot-scope="scope">
{{parseTime(scope.row.msgtime)}} {{ scope.row.msgTime }}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -134,16 +134,17 @@ ...@@ -134,16 +134,17 @@
this.currentPage = 1 this.currentPage = 1
} }
let query = { let query = {
userName: this.form.Ename, name: this.form.Ename,
customerName: this.form.Cname, customerName: this.form.Cname,
keyWord: this.form.Scontent, contact: this.form.Scontent,
beginTime: this.form.Stime ? yearMouthDay(this.form.Stime[0]) : "", beginTime: this.form.Stime ? yearMouthDay(this.form.Stime[0]) : "",
endTime: this.form.Stime ? yearMouthDay(this.form.Stime[1]) : "", endTime: this.form.Stime ? yearMouthDay(this.form.Stime[1]) : "",
pageNum: this.currentPage, pageNum: this.currentPage,
action: this.ac action: this.ac,
orderByColumn: "msg_time",
isAsc: "desc"
} }
content.getChatAllList(query).then(res => { content.getFullSearchChatList(query).then(res => {
console.log(res)
this.fileData = res.rows; this.fileData = res.rows;
this.total = Number(res.total) this.total = Number(res.total)
}) })
......
...@@ -333,7 +333,7 @@ export default { ...@@ -333,7 +333,7 @@ export default {
}else { }else {
content content
.getGroupChatList({ .getGroupChatList({
roomId: this.fromId fromId: this.fromId
}) })
.then(({ data }) => { .then(({ data }) => {
this.loading = false this.loading = false
...@@ -362,8 +362,6 @@ export default { ...@@ -362,8 +362,6 @@ export default {
} }
let query = { let query = {
fromId: this.fromId,
toList: this.chatData.receiver,
msgType, msgType,
pageSize: '10', pageSize: '10',
pageNum: this.currentPage, pageNum: this.currentPage,
...@@ -371,12 +369,13 @@ export default { ...@@ -371,12 +369,13 @@ export default {
endTime: this.takeTime ? yearMouthDay(this.takeTime[1]) : '' endTime: this.takeTime ? yearMouthDay(this.takeTime[1]) : ''
} }
if (group) { if (group) {
query.roomId = this.chatData.roomId query.roomId = this.chatData.receiver
} else { } else {
query.receiveId = this.chatData.receiveId query.fromId = this.fromId
query.toList = this.chatData.receiver
} }
if (group) { if (group) {
content.chatGrounpList(query).then((res) => { content.chatList(query).then((res) => {
this.total = Number(res.total) this.total = Number(res.total)
this.resortData(res) this.resortData(res)
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!