🐛 修复用户管理组织机构筛选 deptId 滞后
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user