From c1863d0b6a5593399c71d7c42dd245f2cc561941 Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Wed, 21 Oct 2026 11:53:55 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=86=8D=E6=AC=A1=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E7=BB=84=E7=BB=87=E5=8F=96=E6=B6=88=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cursor --- src/views/system/user.vue | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/views/system/user.vue b/src/views/system/user.vue index 57782f0..266deea 100644 --- a/src/views/system/user.vue +++ b/src/views/system/user.vue @@ -4,7 +4,7 @@
- +
@@ -647,7 +647,17 @@ export default { }, methods: { nodeClick(data) { - this.treeDeptId = data.id; + const deptId = data?.id; + if (deptId != null && String(this.treeDeptId) === String(deptId)) { + this.treeDeptId = ''; + this.page.currentPage = 1; + this.$nextTick(() => { + this.$refs.deptTree?.setCurrentKey?.(null); + }); + this.onLoad(this.page); + return; + } + this.treeDeptId = deptId; this.page.currentPage = 1; this.onLoad(this.page); }, @@ -1075,6 +1085,9 @@ export default { searchReset() { this.query = {}; this.treeDeptId = ''; + this.$nextTick(() => { + this.$refs.deptTree?.setCurrentKey?.(null); + }); this.onLoad(this.page); }, searchChange(params, done) {