mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-08 22:57:11 +08:00
fix(system/dept):🐛 修复 修改部门时上级部门选择的问题
- 修复了在修改部门时,上级部门选择框显示逻辑的问题 - 增加了对部门树数据的判断,确保选择的上级部门有效存在
This commit is contained in:
@@ -75,7 +75,9 @@ const columns: ColumnItem[] = reactive([
|
||||
},
|
||||
rules: [{ required: true, message: '请选择上级部门' }],
|
||||
hide: (form) => {
|
||||
return form.parentId === 0
|
||||
const tree = deptSelectTree.value || []
|
||||
const hasParentNode = Boolean(tree.find((node) => node?.key === form.parentId))
|
||||
return form.parentId === 0 || (!hasParentNode && isUpdate.value)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
Reference in New Issue
Block a user