Commit dfcddb1e by qiyeqing

客户聊天!

1 parent 6c2a7ef0
...@@ -9,14 +9,12 @@ ...@@ -9,14 +9,12 @@
</div> </div>
<div v-else-if="item.msgtype=='image'" class="msgtypeimg"> <div v-else-if="item.msgtype=='image'" class="msgtypeimg">
<img src="http://146.56.222.200/api/profile/upload/2021/01/14/544c8259-b3b6-4a49-8a53-b5eeac476384.png"> <img src="http://146.56.222.200/api/profile/upload/2021/01/14/544c8259-b3b6-4a49-8a53-b5eeac476384.png">
<!-- http://146.56.222.200:8080 -->
</div> </div>
<div v-else-if="item.msgtype=='file'" class="msgtypefile" @click="down(item.file)"> <div v-else-if="item.msgtype=='file'" class="msgtypefile" @click="down(item.file)">
{{item.file.filename}} {{item.file.filename}}
</div> </div>
<!-- <div v-else-if="item.msgtype=='link'&&item.text" class="msgtypelink">
{{item.text.content}}
</div>-->
<div v-else-if="item.msgtype=='voice'" class="msgtypevoice"> <div v-else-if="item.msgtype=='voice'" class="msgtypevoice">
<i class="el-icon-video-play" @click="play(item,'voice')"></i> <i class="el-icon-video-play" @click="play(item,'voice')"></i>
</div> </div>
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
<el-row style="padding:10px"> <el-row style="padding:10px">
<el-col :span="3"><img :src="item.receiveWeUser.avatarMediaid" ></el-col> <el-col :span="3"><img :src="item.receiveWeUser.avatarMediaid" ></el-col>
<el-col :span="21"> <el-col :span="21">
<p>{{item.receiveWeUser.name}} <span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p> <p>{{item.receiveWeUser.name}} <span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p>
<p class="gray padt10" v-if="item.finalChatContext.text">{{item.finalChatContext.text.content}}</p> <p class="gray padt10" v-if="item.finalChatContext.text">{{item.finalChatContext.text.content}}</p>
</el-col> </el-col>
...@@ -48,7 +47,7 @@ ...@@ -48,7 +47,7 @@
margin: 0;} margin: 0;}
.list { .list {
overflow-y:scroll; overflow-y:scroll;
height: 708px; height: 651px;
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<el-tabs v-model="activeName" @tab-click="getChatList()"> <el-tabs v-model="activeName" @tab-click="getChatList()">
<el-tab-pane label="单聊" name="0"> <el-tab-pane label="单聊" name="0">
<div class="hd_tabs_content"> <div class="hd_tabs_content">
<list v-if="activeName==0" :personList="personList" :loading="loading" > <list v-if="activeName==0" :personList="personList" :loading="loading" @chatFn="chatFn" >
</list> </list>
</div> </div>
</el-tab-pane> </el-tab-pane>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="hd_box"> <div class="hd_box">
<div class="hd_name"><span v-if="chatData&&chatData.finalChatContext">与{{chatData.finalChatContext.roomInfo.name}} 的聊天</span> <div class="hd_name"><span v-if="chatData&&chatData.finalChatContext">与{{chatData.finalChatContext.fromInfo.name}} 的聊天</span>
<span class="fr hd_nameRi">下载会话</span></div> <span class="fr hd_nameRi">下载会话</span></div>
</div> </div>
<div class=" hd_tabthree"> <div class=" hd_tabthree">
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"
align="right" @change="activeNameThreeClick"> align="right" @change="activeNameThreeClick">
</el-date-picker> </el-date-picker>
</div> </div>~
<chat :allChat="allChat" v-if="allChat.length>=1"></chat> <chats :allChat="allChat" v-if="allChat.length>=1"></chats>
<el-pagination background v-if="allChat.length>=1" layout="prev, pager, next" <el-pagination background v-if="allChat.length>=1" layout="prev, pager, next"
class="pagination" :current-page="currentPage" @current-change="currentChange" class="pagination" :current-page="currentPage" @current-change="currentChange"
:total="total"> :total="total">
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
align="right" @change="activeNameThreeClick"> align="right" @change="activeNameThreeClick">
</el-date-picker> </el-date-picker>
</div> </div>
<chat :allChat="allChatImg" v-if="allChatImg.length>=1"></chat> <!-- <chat :allChat="allChatImg" v-if="allChatImg.length>=1"></chat> -->
<el-pagination background v-if="allChatImg.length>=1" class="pagination" <el-pagination background v-if="allChatImg.length>=1" class="pagination"
layout="prev, pager, next" :total="total" @current-change="currentChange" layout="prev, pager, next" :total="total" @current-change="currentChange"
:current-page="currentPage"> :current-page="currentPage">
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
</template> </template>
<script> <script>
import list from '../component/customerList.vue' import list from '../component/customerList.vue'
import chat from '../component/chat.vue' import chats from '../component/chat.vue'
import grouplist from '../component/groupList.vue' import grouplist from '../component/groupList.vue'
import { import {
...@@ -172,7 +172,7 @@ import { ...@@ -172,7 +172,7 @@ import {
} from '@/utils/common.js' } from '@/utils/common.js'
export default { export default {
components:{ components:{
list,chat,grouplist list,chats,grouplist
}, },
data() { data() {
return { return {
...@@ -180,7 +180,7 @@ import { ...@@ -180,7 +180,7 @@ import {
employName: '', employName: '',
talkName: '', talkName: '',
personIndex: '-1', personIndex: '-1',
activeName: "2", activeName: "0",
activeNameThree: '0', activeNameThree: '0',
takeTime: '', takeTime: '',
fileData: [], fileData: [],
...@@ -205,9 +205,8 @@ import { ...@@ -205,9 +205,8 @@ import {
methods: { methods: {
chatFn(data){ chatFn(data){
this.chatData=data this.chatData=data
if (data.fromId) { console.log(data)
this.activeNameThreeClick() this.activeNameThreeClick()
}
}, },
currentChange(){ currentChange(){
this.currentPage = e this.currentPage = e
...@@ -257,7 +256,7 @@ import { ...@@ -257,7 +256,7 @@ import {
} }
let query = { let query = {
fromId: this.chatData.fromId, fromId: this.chatData.fromId,
receiveId: this.chatData.roomId, receiveId: this.chatData.receiveId,
msgType, msgType,
pageSize: '10', pageSize: '10',
pageNum: this.currentPage, pageNum: this.currentPage,
...@@ -266,8 +265,9 @@ import { ...@@ -266,8 +265,9 @@ import {
} }
content.chatList(query).then(res => { content.chatList(query).then(res => {
this.total = Number(res.total) this.total = Number(res.total)
console.log(res,'chatData') console.log( res,this.activeNameThree ,'resresresresres')
if (this.activeNameThree == 0) { if (this.activeNameThree == 0) {
console.log('cahar')
return this.allChat = res.rows return this.allChat = res.rows
} }
if (this.activeNameThree == 1) { if (this.activeNameThree == 1) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!