diff --git a/backend/dvadmin/system/views/dept.py b/backend/dvadmin/system/views/dept.py
index c5179d0..e362bd0 100644
--- a/backend/dvadmin/system/views/dept.py
+++ b/backend/dvadmin/system/views/dept.py
@@ -123,6 +123,7 @@ class DeptViewSet(CustomModelViewSet):
data = serializer.data
return SuccessResponse(data=data)
+ @action(methods=["GET"], detail=False, permission_classes=[IsAuthenticated], extra_filter_class=[])
def dept_lazy_tree(self, request, *args, **kwargs):
parent = self.request.query_params.get('parent')
is_superuser = request.user.is_superuser
diff --git a/web/src/views/system/user/api.ts b/web/src/views/system/user/api.ts
index aa00f9e..fb96384 100644
--- a/web/src/views/system/user/api.ts
+++ b/web/src/views/system/user/api.ts
@@ -2,6 +2,15 @@ import { request } from '/@/utils/service';
import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud';
export const apiPrefix = '/api/system/user/';
+
+export function GetDept(query: PageQuery) {
+ return request({
+ url: "/api/system/dept/dept_lazy_tree/",
+ method: 'get',
+ params: query,
+ });
+}
+
export function GetList(query: PageQuery) {
return request({
url: apiPrefix,
diff --git a/web/src/views/system/user/crud.tsx b/web/src/views/system/user/crud.tsx
index 9825255..f86143f 100644
--- a/web/src/views/system/user/crud.tsx
+++ b/web/src/views/system/user/crud.tsx
@@ -63,8 +63,10 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
search: {
show: true,
},
- minWidth: 100,
type: 'input',
+ column:{
+ minWidth: 100 //最小列宽
+ },
form: {
rules: [
// 表单校验规则
@@ -114,6 +116,9 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
show: true,
},
type: 'input',
+ column:{
+ minWidth: 100 //最小列宽
+ },
form: {
rules: [
// 表单校验规则
@@ -147,6 +152,9 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
});
},
}),
+ column:{
+ minWidth: 150 //最小列宽
+ },
form: {
rules: [
// 表单校验规则
@@ -190,6 +198,9 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
});
},
}),
+ column:{
+ minWidth: 100 //最小列宽
+ },
form: {
rules: [
// 表单校验规则
@@ -211,6 +222,9 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
show: true,
},
type: 'input',
+ column:{
+ minWidth: 120 //最小列宽
+ },
form: {
rules: [
{
@@ -269,6 +283,9 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
dict: dict({
data: dictionary('user_type'),
}),
+ column:{
+ minWidth: 100 //最小列宽
+ },
form: {
show: false,
value: 0,
diff --git a/web/src/views/system/user/index.vue b/web/src/views/system/user/index.vue
index 7d130b6..c6fe04d 100644
--- a/web/src/views/system/user/index.vue
+++ b/web/src/views/system/user/index.vue
@@ -1,124 +1,116 @@
-
-
-
-
-
- 用户列表
-
-
-
-
-
-
-
- {{ node.label }}
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ 部门列表
+
+
+
+
+
+
+
+
+
+ {{ node.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+