Commit e9c06ea2 by qiyeqing

会话显示

1 parent 8ef8938a
<template> <template>
<div class="list" v-loading="loading"> <div class="list" v-loading="loading">
<div v-if="personList"> <div v-if="personList.length>=1">
<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">
......
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="activeNameThreeClick"> start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="activeNameThreeClick">
</el-date-picker> </el-date-picker>
</div> </div>
<chat :allChat="allChat" v-if="allChat.length>=1"></chat> <chat :allChat="allChat" v-if="allChat&&allChat.length>=1"></chat>
<el-pagination background v-if="allChat.length>=1" layout="prev, pager, next" class="pagination" <el-pagination background v-if="allChat&&allChat.length>=1" layout="prev, pager, next" class="pagination"
:current-page="currentPage" @current-change="currentChange" :total="total"> :current-page="currentPage" @current-change="currentChange" :total="total">
</el-pagination> </el-pagination>
</div> </div>
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
start-placeholder="开始日期" end-placeholder="结束日期" align="right" @change="activeNameThreeClick"> start-placeholder="开始日期" end-placeholder="结束日期" 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&&allChatImg.length>=1"></chat>
<el-pagination background v-if="allChatImg.length>=1" class="pagination" layout="prev, pager, next" <el-pagination background v-if="allChatImg&&allChatImg.length>=1" class="pagination" layout="prev, pager, next"
:total="total" @current-change="currentChange" :current-page="currentPage"> :total="total" @current-change="currentChange" :current-page="currentPage">
</el-pagination> </el-pagination>
</div> </div>
...@@ -288,14 +288,13 @@ ...@@ -288,14 +288,13 @@
content.chatGrounpList(query).then(res => { content.chatGrounpList(query).then(res => {
this.total = Number(res.total) this.total = Number(res.total)
console.log(res,'this.activeName=') console.log(res,'this.activeName=')
this.resortData(res.data) this.resortData(res)
}) })
} else { } else {
content.chatList(query).then(res => { content.chatList(query).then(res => {
console.log(res,'ssss') console.log(res.rows,'ssss')
this.total = Number(res.total) this.total = Number(res.total)
this.resortData(res.data) this.resortData(res)
}) })
} }
} }
...@@ -348,9 +347,9 @@ ...@@ -348,9 +347,9 @@
content.getTree({ content.getTree({
fromId: this.employId, fromId: this.employId,
searchType: this.activeName searchType: this.activeName
}).then((res) => { }).then(({rows}) => {
this.loading = false this.loading = false
this.personList = res.data.rows this.personList =rows
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
}) })
...@@ -360,18 +359,7 @@ ...@@ -360,18 +359,7 @@
if (!value) return true; if (!value) return true;
return data.name.indexOf(value) !== -1; return data.name.indexOf(value) !== -1;
}, },
// getAmount(){
// let querys = {
// pageNum: '1',
// pageSize: '999',
// department: ''
// }
// api.getList(querys).then(({
// total
// }) => {
// this.employAmount= total
// })
// },
handleNodeClick(data, add) { handleNodeClick(data, add) {
if (!data.userId) { if (!data.userId) {
let querys = { let querys = {
...@@ -379,9 +367,10 @@ ...@@ -379,9 +367,10 @@
pageSize: '999', pageSize: '999',
department: data.id department: data.id
} }
api.getList(querys).then(res => { api.getList(querys).then(({rows}) => {
this.$set(data, 'children', []); this.$set(data, 'children', []);
data.children = res.data.rows
data.children =rows
}) })
} else { } else {
this.talkName = data.name; this.talkName = data.name;
......
...@@ -144,8 +144,8 @@ ...@@ -144,8 +144,8 @@
} }
content.getChatAllList(query).then(res => { content.getChatAllList(query).then(res => {
console.log(res) console.log(res)
this.fileData = res.data.rows; this.fileData = res.rows;
this.total = Number(res.data.total) this.total = Number(res.total)
}) })
}, },
chechName(e) { chechName(e) {
......
...@@ -231,10 +231,10 @@ ...@@ -231,10 +231,10 @@
fromId: this.employId, fromId: this.employId,
searchType: this.activeName searchType: this.activeName
}).then(( }).then((
res {rows}
) => { ) => {
this.loading = false this.loading = false
this.personList =res.data.rows this.personList =rows
}).catch(err => { }).catch(err => {
this.loading = false this.loading = false
}) })
...@@ -270,13 +270,13 @@ ...@@ -270,13 +270,13 @@
} }
if (group) { if (group) {
content.chatGrounpList(query).then(res => { content.chatGrounpList(query).then(res => {
this.total = Number(res.data.total) this.total = Number(res.total)
this.resortData(res.data) this.resortData(res)
}) })
} else { } else {
content.chatList(query).then(res => { content.chatList(query).then(res => {
this.total = Number(res.data.total) this.total = Number(res.total)
this.resortData(res.data) this.resortData(res)
}) })
} }
}, },
...@@ -310,12 +310,9 @@ ...@@ -310,12 +310,9 @@
isOpenChat: '1' isOpenChat: '1'
} }
content.listByCustomer(querys).then(res => { content.listByCustomer(querys).then(res => {
console.log(res) console.log(res,'rows')
res.rows = res.data.rows.filter((a, b) => { this.CList = res.rows
return a && a.name this.employAmount = res.total;
})
this.CList = res.data.rows
this.employAmount = res.data.total;
}) })
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!