Commit ca79ced2 by qiyeqing

客户列表修改

1 parent 2fe63995
...@@ -16,7 +16,7 @@ const getTree=(params)=>{ ...@@ -16,7 +16,7 @@ const getTree=(params)=>{
} }
const listByCustomer=(params)=>{ const listByCustomer=(params)=>{
return request({ return request({
url:'/chat/mapping/listByCustomer', url:'/wecom/customer/list',
method: 'get', method: 'get',
params, params,
}) })
......
...@@ -8,7 +8,8 @@ ...@@ -8,7 +8,8 @@
{{item.text.content}} {{item.text.content}}
</div> </div>
<div v-else-if="item.msgtype=='image'" class="msgtypeimg"> <div v-else-if="item.msgtype=='image'" class="msgtypeimg">
<img :src="item.image.attachment"> <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}}
...@@ -124,8 +125,10 @@ ...@@ -124,8 +125,10 @@
width: 100px; width: 100px;
height: 80px; height: 80px;
margin: 10px; margin: 10px;
img{width: 100px;
height: 80px;}
} }
.msgtypecard { .msgtypecard {
width: 300px; width: 300px;
height: 140px; height: 140px;
......
<template>
<div class="list" v-loading="loading">
<div v-if="personList.length>=1">
<ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)">
<el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='text'">
<el-col :span="3"> <img :src="item.finalChatContext.fromInfo.avatar"></el-col>
<el-col :span="21">
<p>{{item.roomInfo.groupName}} <span class="fr gray">{{parseTime(item.finalChatContext.fromInfo.updateTime)}}</span></p>
<p class="gray padt10" v-if="item.finalChatContext.fromInfo">{{item.finalChatContext.fromInfo.name}}:{{item.finalChatContext.text.content}}</p>
</el-col>
</el-row>
<el-row style="padding:10px" v-if="item.finalChatContext.msgtype=='file'">
<el-col :span="3">&nbsp;</el-col>
<el-col :span="21">
<p><span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p>
<p class="gray padt10" >{{item.finalChatContext.from}}:
<span v-if="item.finalChatContext.file.fileext=='mp4'">[视频]</span>
</p>
</el-col>
</el-row>
</li>
</ul>
</div>
<div v-else></div>
</div>
</template>
<script>
import {parseTime} from '@/utils/common.js'
export default {
props: {
personList: {
type: Array,
defluat: () => []
},
loading: {
type: Boolean,
defluat: false
},
},
data() {
return{
loadings:true
}
},
methods:{
liClick(e){
this.$emit('chatFn',e)
}
}
}
</script>
<style lang="scss" scoped>
*{ padding: 0;
margin: 0;}
.list {
overflow-y:scroll;
height: 708px;
::-webkit-scrollbar {
display: none;
}
/deep/ .el-loading-spinner{margin-top: 20px;}
.fr{float:right;}
.gray{color: #999;}
.padt10{padding-top: 10px;}
ul li {
padding: 10px;
overflow: hidden;
border-bottom: 1px solid #efefef;
cursor: pointer;
p{white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;}
:hover{ background: #efefef;}
img {
width: 40px;
height: 40px;
float: left
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
<ul> <ul>
<li v-for="(item,index) in personList" :key="index" @click="liClick(item)"> <li v-for="(item,index) in personList" :key="index" @click="liClick(item)">
<el-row style="padding:10px"> <el-row style="padding:10px">
<el-col :span="4"> <img :src="item.receiveWeCustomer.avatar"></el-col> <el-col :span="3"> <img :src="item.receiveWeCustomer.avatar"></el-col>
<el-col :span="20"> <el-col :span="21">
<p>{{item.receiveWeCustomer.name}} <span class="fr gray">{{parseTime(item.finalChatContext.msgtime)}}</span></p> <p>{{item.receiveWeCustomer.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>
</el-row> </el-row>
</li> </li>
......
...@@ -32,7 +32,8 @@ ...@@ -32,7 +32,8 @@
</list> </list>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="群聊" name="2"> <el-tab-pane label="群聊" name="2">
<grouplist v-if="activeName==2" :personList="personList" :loading="loading" @chatFn='chatFn'>
</grouplist>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -151,6 +152,7 @@ ...@@ -151,6 +152,7 @@
<script> <script>
import list from '../component/list.vue' import list from '../component/list.vue'
import chat from '../component/chat.vue' import chat from '../component/chat.vue'
import grouplist from '../component/groupList.vue'
import * as api from '@/api/organization' import * as api from '@/api/organization'
import { import {
content content
...@@ -160,7 +162,7 @@ ...@@ -160,7 +162,7 @@
} from '@/utils/common.js' } from '@/utils/common.js'
export default { export default {
components: { components: {
list, list,grouplist,
chat chat
}, },
data() { data() {
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
</div> </div>
<div class="ct_box ct_boxFirst"> <div class="ct_box ct_boxFirst">
<ul> <ul>
<!-- -->
<li v-for="(i,t) in CList" :key="t" @click="personCheck(i,t)" :class="{'liActive':t==personIndex}"> <li v-for="(i,t) in CList" :key="t" @click="personCheck(i,t)" :class="{'liActive':t==personIndex}">
<el-row :gutter="20" style=" padding: 10px 0;margin:0"> <el-row :gutter="20" style=" padding: 10px 0;margin:0">
<el-col :span="4"> <el-col :span="4">
...@@ -287,10 +286,22 @@ import { ...@@ -287,10 +286,22 @@ import {
}) })
}, },
customerList(){ customerList(){
content.listByCustomer().then(res=>{ let querys={
res.rows= res.rows.filter((a,b)=>{ return a&&a.name}) pageNum:1,
this.CList=res.rows pageSize:999,
this.employAmount=res.total; name:this.employName,
userId:'',
tagIds:'',
beginTime:'',
endTime:'',
status:'',
isOpenChat:'1'
}
content.listByCustomer(querys).then(res=>{
console.log(res)
res.rows= res.rows.filter((a,b)=>{ return a&&a.name})
this.CList=res.rows
this.employAmount=res.total;
}) })
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!