From 5dcec7a4cd40e5a37cb66e9faa7d1d3a2f00b3c8 Mon Sep 17 00:00:00 2001 From: ysn <2126564605@qq.com> Date: Tue, 16 Jun 2026 11:54:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E5=BD=95-=E5=B8=B8=E7=94=A8?= =?UTF-8?q?=E8=81=94=E7=B3=BB=E4=BA=BA=E5=88=B7=E6=96=B0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/contacts/index.vue | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/views/contacts/index.vue b/src/views/contacts/index.vue index 59e92e5..d688b9b 100644 --- a/src/views/contacts/index.vue +++ b/src/views/contacts/index.vue @@ -43,11 +43,7 @@ /> -
+
-
+
加载更多... 没有更多数据了
@@ -273,13 +272,15 @@ export default { resList = data.list || []; } else { // 组织架构:不分页,一次性全量获取 - const { data } = await getGroupsListUser({ group_id: this.currentGroupId }); + const { data } = await getGroupsListUser({ + group_id: this.currentGroupId, + }); resList = data.list || []; } - const formatList = resList.map(item => ({ + const formatList = resList.map((item) => ({ ...item, - online: [1, true].includes(item.online) + online: [1, true].includes(item.online), })); if (isRefresh) { @@ -312,7 +313,7 @@ export default { try { const { data } = await getGroupsList(); this.treeData = data.list; - this.defaultExpandedKeys = this.treeData.map(node => node.id); + this.defaultExpandedKeys = this.treeData.map((node) => node.id); if (!this.userGroupId) return; const parentKeys = this.findParentKeys(this.treeData, this.userGroupId); this.$nextTick(() => { @@ -332,7 +333,10 @@ export default { for (const node of tree) { if (node.id === targetId) return [...parents, node.id]; if (node.child && node.child.length) { - const res = this.findParentKeys(node.child, targetId, [...parents, node.id]); + const res = this.findParentKeys(node.child, targetId, [ + ...parents, + node.id, + ]); if (res.length) return res; } }