From 2ed0e0c77d81cc9871cdd2ed95320d572bab26a3 Mon Sep 17 00:00:00 2001 From: caojia <1301869380@qq.com> Date: Mon, 26 Oct 2026 16:57:10 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=BB=84=E7=BB=87=E6=9C=BA=E6=9E=84=E7=AD=9B?= =?UTF-8?q?=E9=80=89=20deptId=20=E6=BB=9E=E5=90=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bms-front/src/views/system/user/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bms-front/src/views/system/user/index.vue b/bms-front/src/views/system/user/index.vue index 5be3face..17b44706 100644 --- a/bms-front/src/views/system/user/index.vue +++ b/bms-front/src/views/system/user/index.vue @@ -175,15 +175,15 @@ const tableRef = ref() const syncLoading = ref(false) const open = ref(false) const title = ref("") -const deptId = ref(undefined) const deptOptions = ref(undefined) const enabledDeptOptions = ref(undefined) const initPassword = ref(undefined) const postOptions = ref([]) const roleOptions = ref([]) -// 部门联动参数(不参与搜索重置,由树点击控制) -const extraParams = computed(() => ({ deptId: deptId.value })) +// 部门联动参数(不参与搜索重置,由树点击控制)。保持对象引用稳定, +// 确保树点击后立即 reload 时,表格能读取到最新 deptId。 +const extraParams = reactive({ deptId: undefined }) // 搜索项配置 const searchColumns = [ @@ -248,7 +248,7 @@ function filterDisabledDept(deptList) { /** 节点单击事件 */ function handleNodeClick(data) { - deptId.value = data.id + extraParams.deptId = data.id tableRef.value.reload() }