fix(用户管理): 🐛 用户管理查询
This commit is contained in:
@@ -228,16 +228,7 @@ class UserViewSet(CustomModelViewSet):
|
||||
serializer_class = UserSerializer
|
||||
create_serializer_class = UserCreateSerializer
|
||||
update_serializer_class = UserUpdateSerializer
|
||||
# filter_fields = ["name", "username", "gender", "is_active", "dept", "user_type"]
|
||||
filter_fields = {
|
||||
"name": ["exact"],
|
||||
"mobile": ["exact"],
|
||||
"username": ["exact"],
|
||||
"gender": ["icontains"],
|
||||
"is_active": ["icontains"],
|
||||
"dept": ["exact"],
|
||||
"user_type": ["exact"],
|
||||
}
|
||||
filter_fields = ["name", "username", "gender", "is_active", "dept", "user_type"]
|
||||
search_fields = ["username", "name", "gender", "dept__name", "role__name"]
|
||||
# 导出
|
||||
export_field_label = {
|
||||
|
||||
@@ -6,7 +6,7 @@ export function GetList(query: PageQuery) {
|
||||
return request({
|
||||
url: apiPrefix,
|
||||
method: 'get',
|
||||
data: query,
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
export function GetObj(id: InfoReq) {
|
||||
|
||||
Reference in New Issue
Block a user