chore: search form

This commit is contained in:
dap
2024-09-24 10:39:36 +08:00
parent 741915e5cd
commit c5971e4407
3 changed files with 91 additions and 37 deletions

View File

@@ -1,3 +1,9 @@
import type { FormSchemaGetter } from '#/adapter';
import { DictEnum } from '@vben/constants';
import { getDictOptions } from '#/utils/dict';
/**
* authScopeOptions user也会用到
*/
@@ -8,3 +14,36 @@ export const authScopeOptions = [
{ color: 'cyan', label: '本部门及以下数据权限', value: '4' },
{ color: 'error', label: '仅本人数据权限', value: '5' },
];
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: '创建时间',
},
];