|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div style="width: 100%;height: 100%">
|
|
|
|
|
|
- <!-- <el-tabs class="im-tabs" type="card" v-model="appKey" @tab-click="qwUserChange">
|
|
|
+<!-- <el-tabs class="im-tabs" type="card" v-model="appKey" @tab-click="qwUserChange">
|
|
|
<el-tab-pane
|
|
|
v-for="item in qwUserList"
|
|
|
:key="item.id"
|
|
|
@@ -46,12 +46,13 @@
|
|
|
@send="handleSend">
|
|
|
<template #menu-top>
|
|
|
<div class="qiwei">
|
|
|
- <div v-for="item in qwUserList" :key="item.id" @click="qwUserChange(item)" :class="appKey==item.appKey?'q-item active':'q-item'">
|
|
|
+ <div v-for="item in qwUserList" :key="item.id" @click="qwUserChange(item)" :class="appId==item.id?'q-item active':'q-item'">
|
|
|
<el-badge :value="getUnreadCount(item.appKey)"
|
|
|
:max="99"
|
|
|
:hidden="getUnreadCount(item.appKey) < 1">
|
|
|
<el-avatar shape="square" :src="item.avatar"></el-avatar>
|
|
|
- <div class="name">{{item.qwUserName}}</div>
|
|
|
+ <div class="name" :title="item.qwUserName">{{item.qwUserName}}</div>
|
|
|
+ <div class="text" :title="item.corpName">{{item.corpName}}</div>
|
|
|
</el-badge>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -186,6 +187,7 @@ export default {
|
|
|
return {
|
|
|
contactName:'',
|
|
|
appKey:null,
|
|
|
+ appId:null,
|
|
|
qwUserId:null,
|
|
|
qwUserList:[],
|
|
|
theme: "default",
|
|
|
@@ -266,6 +268,7 @@ export default {
|
|
|
if (this.qwUserList.length>0){
|
|
|
this.qwUser = this.qwUserList[0];
|
|
|
this.appKey = this.qwUser.appKey;
|
|
|
+ this.appId=this.qwUser.id;
|
|
|
this.companyId = this.qwUser.companyId; // 保存公司ID用于WebSocket连接
|
|
|
this.setQwUserInfo();
|
|
|
this.getConversation();
|
|
|
@@ -274,6 +277,8 @@ export default {
|
|
|
|
|
|
// 初始化未读消息数
|
|
|
this.initUnreadCount();
|
|
|
+ //联系人
|
|
|
+ this.initContact(this.qwUser.id)
|
|
|
}else {
|
|
|
this.qwUser={};
|
|
|
}
|
|
|
@@ -501,6 +506,7 @@ export default {
|
|
|
// 切换企微账号
|
|
|
qwUserChange(tab){
|
|
|
this.appKey = tab.appKey;
|
|
|
+ this.appId = tab.id;
|
|
|
let index= this.qwUserList.findIndex(item => item.appKey === tab.appKey);
|
|
|
this.qwUser=this.qwUserList[index];
|
|
|
// 清除当前账号的未读消息数
|
|
|
@@ -516,7 +522,7 @@ export default {
|
|
|
initContact(id){
|
|
|
getContactList(id).then(response => {
|
|
|
this.qwContactList = response.rows;
|
|
|
- this.$refs.IMUI.initContacts(this.qwContactList);
|
|
|
+ this.$refs.IMUI.initContacts(response.rows);
|
|
|
// this.getConversationId(id)
|
|
|
});
|
|
|
},
|
|
|
@@ -1065,8 +1071,13 @@ export default {
|
|
|
align-items:center;
|
|
|
position: relative;
|
|
|
background: #409EFF;
|
|
|
- // overflow: hidden;
|
|
|
+ overflow-y: auto;
|
|
|
+ scrollbar-width: none; /* Firefox */
|
|
|
+ -ms-overflow-style: none; /* IE 和 Edge */
|
|
|
position:relative;
|
|
|
+ &::-webkit-scrollbar {
|
|
|
+ display: none; /* 隐藏滚动条 */
|
|
|
+ }
|
|
|
.q-item{
|
|
|
width: 72px;
|
|
|
padding: 12px;
|
|
|
@@ -1093,6 +1104,18 @@ border-radius: 0 6px 6px 0;
|
|
|
text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
|
color: #fff;
|
|
|
text-align: center;
|
|
|
+}
|
|
|
+ .text{
|
|
|
+ margin-top: 2px;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 14px;
|
|
|
+ width: 72px;
|
|
|
+ padding: 0 2px;
|
|
|
+ white-space: nowrap; /* 强制文本不换行 */
|
|
|
+ overflow: hidden; /* 超出部分隐藏 */
|
|
|
+ text-overflow: ellipsis; /* 超出部分显示省略号 */
|
|
|
+ color: #fff;
|
|
|
+ text-align: center;
|
|
|
}
|
|
|
&.active{
|
|
|
background: #F1F4F8;
|
|
|
@@ -1101,7 +1124,9 @@ border-radius: 0 6px 6px 0;
|
|
|
position: relative; /* 确保z-index生效 */
|
|
|
z-index: 1; /* 高于相邻元素的默认层级 */
|
|
|
.name{
|
|
|
- color: #fff;
|
|
|
+ color: #202124;
|
|
|
+ }
|
|
|
+ .text{
|
|
|
color: #202124;
|
|
|
}
|
|
|
// &:before{
|
|
|
@@ -1239,6 +1264,9 @@ border-radius: 0 6px 6px 0;
|
|
|
.lemon-editor__tool-item{
|
|
|
padding: 0px 10px 0 0 !important;
|
|
|
}
|
|
|
+.lemon-container:empty {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
.lemon-container div{
|
|
|
scrollbar-width: none; /* Firefox */
|
|
|
-ms-overflow-style: none; /* IE 和 Edge */
|