2024-09-24 10:39:36 +08:00
|
|
|
import type { FormSchemaGetter } from '#/adapter';
|
|
|
|
|
|
|
|
import { DictEnum } from '@vben/constants';
|
|
|
|
|
|
|
|
import { getDictOptions } from '#/utils/dict';
|
|
|
|
|
2024-09-22 18:14:04 +08:00
|
|
|
/**
|
|
|
|
* authScopeOptions user也会用到
|
|
|
|
*/
|
|
|
|
export const authScopeOptions = [
|
|
|
|
{ color: 'green', label: '全部数据权限', value: '1' },
|
|
|
|
{ color: 'default', label: '自定数据权限', value: '2' },
|
|
|
|
{ color: 'orange', label: '本部门数据权限', value: '3' },
|
|
|
|
{ color: 'cyan', label: '本部门及以下数据权限', value: '4' },
|
|
|
|
{ color: 'error', label: '仅本人数据权限', value: '5' },
|
|
|
|
];
|
2024-09-24 10:39:36 +08:00
|
|
|
|
|
|
|
export const querySchema: FormSchemaGetter = () => [
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入',
|
|
|
|
},
|
|
|
|
fieldName: 'roleName',
|
|
|
|
label: '角色名称',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Input',
|
|
|
|
componentProps: {
|
|
|
|
placeholder: '请输入',
|
|
|
|
},
|
|
|
|
fieldName: 'roleKey',
|
|
|
|
label: '权限字符',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'Select',
|
|
|
|
componentProps: {
|
|
|
|
options: getDictOptions(DictEnum.SYS_NORMAL_DISABLE),
|
|
|
|
placeholder: '请选择',
|
|
|
|
},
|
|
|
|
fieldName: 'status',
|
|
|
|
label: '状态',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
component: 'RangePicker',
|
|
|
|
fieldName: 'createTime',
|
|
|
|
label: '创建时间',
|
|
|
|
},
|
|
|
|
];
|