feat: 数据权限
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { FormSchemaGetter } from '#/adapter';
|
||||
|
||||
import { DictEnum } from '@vben/constants';
|
||||
import { getPopupContainer } from '@vben/utils';
|
||||
|
||||
import { getDictOptions } from '#/utils/dict';
|
||||
|
||||
@@ -116,3 +117,63 @@ export const drawerSchema: FormSchemaGetter = () => [
|
||||
label: '备注',
|
||||
},
|
||||
];
|
||||
|
||||
export const authModalSchemas: FormSchemaGetter = () => [
|
||||
{
|
||||
component: 'Input',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
fieldName: 'roleId',
|
||||
label: '角色ID',
|
||||
},
|
||||
{
|
||||
component: 'Radio',
|
||||
dependencies: {
|
||||
show: () => false,
|
||||
triggerFields: [''],
|
||||
},
|
||||
fieldName: 'deptCheckStrictly',
|
||||
label: 'deptCheckStrictly',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
},
|
||||
fieldName: 'roleName',
|
||||
label: '角色名称',
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
componentProps: {
|
||||
disabled: true,
|
||||
},
|
||||
fieldName: 'roleKey',
|
||||
label: '权限标识',
|
||||
},
|
||||
{
|
||||
component: 'Select',
|
||||
componentProps: {
|
||||
allowClear: false,
|
||||
getPopupContainer,
|
||||
options: authScopeOptions,
|
||||
},
|
||||
fieldName: 'dataScope',
|
||||
help: '更改后需要用户重新登录才能生效',
|
||||
label: '权限范围',
|
||||
},
|
||||
{
|
||||
component: 'TreeSelect',
|
||||
defaultValue: [],
|
||||
dependencies: {
|
||||
show: (values) => values.dataScope === '2',
|
||||
triggerFields: ['dataScope'],
|
||||
},
|
||||
fieldName: 'deptIds',
|
||||
formItemClass: 'items-baseline',
|
||||
help: '更改后立即生效',
|
||||
label: '部门权限',
|
||||
},
|
||||
];
|
||||
|
Reference in New Issue
Block a user