fix(system): 优化部门、菜单、公告、岗位、角色和用户管理功能

- 增加创建、更新和删除操作的异常处理
- 优化错误提示信息
- 重置表单状态以解决数据残留问题
- 统一错误处理方式,使用 message 组件替代 notification
This commit is contained in:
zhangtao
2025-03-06 22:25:41 +08:00
parent a6b6ed7e0c
commit 0b4ce5f396
14 changed files with 221 additions and 28 deletions
@@ -244,7 +244,7 @@ class UserService:
# 检查用户名是否存在
user = await UserCRUD(auth).get_user_by_username(username=data.username)
if user:
raise CustomException(msg='用户名已存在')
raise CustomException(msg='注册失败,用户名已存在')
data.password = PwdUtil.set_password_hash(password=data.password)
dict_data = data.model_dump(exclude_unset=True)