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