Commit 85b1d613 by 怪兽?别跑

会话存档问题修复

1 parent 77c7e7fd
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
placeholder="搜索客户名称" placeholder="搜索客户名称"
clearable clearable
v-model="customerQuery.name" v-model="customerQuery.name"
@keyup.enter.native="getCustomerList(1)"> @keyup.enter.native="getCustomerList(1)"
>
<el-button slot="append" icon="el-icon-search" @click="getCustomerList(1)"></el-button> <el-button slot="append" icon="el-icon-search" @click="getCustomerList(1)"></el-button>
</el-input> </el-input>
<div v-loading="customerLoading"> <div v-loading="customerLoading">
...@@ -23,12 +24,13 @@ ...@@ -23,12 +24,13 @@
:class="['customer-li', { active: index == personIndex }]" :class="['customer-li', { active: index == personIndex }]"
:gutter="20" :gutter="20"
type="flex" type="flex"
align="middle"> align="middle"
>
<el-col :span="4"> <el-col :span="4">
<img v-if="item.avatar" :src="item.avatar" alt="头像" /> <img v-if="item.avatar" :src="item.avatar" alt="头像" />
</el-col> </el-col>
<el-col :span="10" v-if="item" class="toe"> <el-col :span="10" v-if="item" class="toe">
<span style="line-height: 40px">{{ item.customerName }}</span> <span style="line-height: 40px;">{{ item.customerName }}</span>
</el-col> </el-col>
<el-col :span="10" class="ar"> <el-col :span="10" class="ar">
<span :style="{ color: item.customerType === 1 ? '#4bde03' : '#f9a90b' }"> <span :style="{ color: item.customerType === 1 ? '#4bde03' : '#f9a90b' }">
...@@ -55,21 +57,24 @@ ...@@ -55,21 +57,24 @@
placeholder="搜索联系人" placeholder="搜索联系人"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="chatContent" v-model="chatContent"
@keyup.enter.native="getChatList()"></el-input> @keyup.enter.native="getChatList()"
></el-input>
<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">
<userList <userList
v-if="activeName == 0" v-if="activeName == 0"
:personList="personList" :personList="personList"
:loading="loading" :loading="loading"
@chatFn="chatFn"></userList> @chatFn="chatFn"
></userList>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="群聊" name="2"> <el-tab-pane label="群聊" name="2">
<grouplist <grouplist
v-if="activeName == 2" v-if="activeName == 2"
:personList="personList" :personList="personList"
:loading="loading" :loading="loading"
@groupFn="groupFn"></grouplist> @groupFn="groupFn"
></grouplist>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
...@@ -86,16 +91,16 @@ ...@@ -86,16 +91,16 @@
</div> </div>
</template> </template>
<script> <script>
import chatListClass from './component/chatListClass.vue' import chatListClass from './component/chatListClass.vue'
import userList from './component/userList.vue' import userList from './component/userList.vue'
import grouplist from './component/groupList.vue' import grouplist from './component/groupList.vue'
import * as api from '@/api/conversation/content.js' import * as api from '@/api/conversation/content.js'
import * as apiCustomer from '@/api/customer/index' import * as apiCustomer from '@/api/customer/index'
export default { export default {
components: { components: {
userList, userList,
grouplist, grouplist,
chatListClass, chatListClass
}, },
data() { data() {
return { return {
...@@ -104,7 +109,7 @@ export default { ...@@ -104,7 +109,7 @@ export default {
customerQuery: { customerQuery: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
name: '', name: ''
}, },
customerList: [], customerList: [],
customerTotal: 0, customerTotal: 0,
...@@ -117,7 +122,7 @@ export default { ...@@ -117,7 +122,7 @@ export default {
loading: false, loading: false,
fromId: '', fromId: '',
queryChat: {}, queryChat: {}
} }
}, },
created() { created() {
...@@ -128,7 +133,7 @@ export default { ...@@ -128,7 +133,7 @@ export default {
this.queryChat = { this.queryChat = {
fromId: this.fromId, fromId: this.fromId,
receiveName: data.name, receiveName: data.name,
toList: data.receiver, toList: data.receiver
} }
}, },
groupFn(data) { groupFn(data) {
...@@ -136,7 +141,7 @@ export default { ...@@ -136,7 +141,7 @@ export default {
this.queryChat = { this.queryChat = {
// fromId: this.fromId, // fromId: this.fromId,
receiveName: data.name, receiveName: data.name,
roomId: data.chatId, roomId: data.receiver
} }
}, },
choiceCustomer(data, index) { choiceCustomer(data, index) {
...@@ -157,7 +162,7 @@ export default { ...@@ -157,7 +162,7 @@ export default {
api api
.selectAloneChatList({ .selectAloneChatList({
fromId: this.fromId, fromId: this.fromId,
contact: this.chatContent, contact: this.chatContent
}) })
.then(({ data }) => { .then(({ data }) => {
this.loading = false this.loading = false
...@@ -207,16 +212,16 @@ export default { ...@@ -207,16 +212,16 @@ export default {
} }
} }
} }
}, }
}, }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep.el-tabs__nav-scroll { ::v-deep.el-tabs__nav-scroll {
padding-left: 15px; padding-left: 15px;
} }
.customer { .customer {
// background: #f6f6f9; // background: #f6f6f9;
text-align: center; text-align: center;
...@@ -264,9 +269,9 @@ export default { ...@@ -264,9 +269,9 @@ export default {
} }
} }
} }
} }
.el-icon-s-custom { .el-icon-s-custom {
font-size: 16px; font-size: 16px;
margin-left: 4px; margin-left: 4px;
color: #999; color: #999;
...@@ -276,9 +281,9 @@ export default { ...@@ -276,9 +281,9 @@ export default {
&.woman { &.woman {
color: #f753b2; color: #f753b2;
} }
} }
.userList { .userList {
height: calc(100vh - 328px); height: calc(100vh - 328px);
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!