fix(dept): no parentDept can edit parentDept (#3255)

This commit is contained in:
bowen 2023-11-08 11:43:24 +08:00 committed by GitHub
parent 71c3fea88a
commit 2142506ce5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -69,7 +69,11 @@ export const formSchema: FormSchema[] = [
field: 'parentDept',
label: '上级部门',
component: 'TreeSelect',
ifShow({ values }) {
const { deptName, parentDept } = values;
// Hide without a parentDept when editing
return parentDept || (!deptName && !parentDept);
},
componentProps: {
fieldNames: {
label: 'deptName',