fix(account): 部门ID默认值改为undefined而非0

This commit is contained in:
小蟑螂
2026-03-29 22:59:53 +08:00
parent 9db9dcffd3
commit aadbce9968
@@ -63,7 +63,7 @@ const formData = ref<AccountDTO.CreateAccountDTO & { status?: number }>({
password: '',
phone: '',
realName: '',
departmentId: 0,
departmentId: undefined,
positionId: undefined,
remark: '',
status: 0,
@@ -97,7 +97,7 @@ function resetForm() {
password: '',
phone: '',
realName: '',
departmentId: 0,
departmentId: undefined,
positionId: undefined,
remark: '',
status: 0,
@@ -227,7 +227,7 @@ async function open(accountData?: AccountVO.AccountInfoVO | null) {
password: '', // 编辑时密码为空
phone: accountData.phone || '',
realName: accountData.realName,
departmentId: accountData.departmentId || 0,
departmentId: accountData.departmentId,
positionId: accountData.positionId || undefined,
remark: accountData.remark || '',
status: accountData.status,