用户的管理部门权限功能

This commit is contained in:
ahui
2025-08-14 10:35:51 +08:00
parent 2a9f5be895
commit 6e9b94aed2
5 changed files with 88 additions and 20 deletions

View File

@@ -205,10 +205,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
},
},
dept: {
title: '部门',
search: {
disabled: true,
},
title: '所属部门',
type: 'dict-tree',
dict: dict({
isTree: true,
@@ -217,7 +214,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
label: 'name'
}),
column: {
minWidth: 200, //最小列宽
minWidth: 300, //最小列宽
formatter({ value, row, index }) {
return row.dept_name_all
}
@@ -243,6 +240,39 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
},
},
},
manage_dept: {
title: '管理部门',
type: 'dict-tree',
dict: dict({
isTree: true,
url: '/api/system/dept/all_dept/',
value: 'id',
label: 'name'
}),
column: {
minWidth: 300
},
form: {
value: [],
component: {
filterable: true,
multiple: true,
placeholder: '请选择',
clearable: true,
collapseTags: true,
maxCollapseTags: 2,
collapseTagsTooltip: true,
props: {
checkStrictly: true,
props: {
value: 'id',
label: 'name',
},
},
},
helper: '不选则默认为所属部门',
},
},
role: {
title: '角色',
search: {
@@ -378,6 +408,9 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
dict: dict({
data: dictionary('button_status_bool'),
}),
form: {
value: true
}
},
avatar: {
title: '头像',
@@ -392,8 +425,8 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
},
...commonCrudConfig({
dept_belong_id: {
form: true,
table: true
form: false,
table: false
}
})
},