From c5971e4407d3a74807123e0a1106779a8f45b8df Mon Sep 17 00:00:00 2001
From: dap <15891557205@163.com>
Date: Tue, 24 Sep 2024 10:39:36 +0800
Subject: [PATCH] chore: search form
---
apps/web-antd/src/views/system/role/data.tsx | 39 +++++++++++++++
apps/web-antd/src/views/system/role/index.vue | 42 ++++++++++-------
apps/web-antd/src/views/system/user/index.vue | 47 +++++++++++--------
3 files changed, 91 insertions(+), 37 deletions(-)
diff --git a/apps/web-antd/src/views/system/role/data.tsx b/apps/web-antd/src/views/system/role/data.tsx
index 26fc8765..cc4cd230 100644
--- a/apps/web-antd/src/views/system/role/data.tsx
+++ b/apps/web-antd/src/views/system/role/data.tsx
@@ -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: '创建时间',
+ },
+];
diff --git a/apps/web-antd/src/views/system/role/index.vue b/apps/web-antd/src/views/system/role/index.vue
index 3f3073e5..a778a7db 100644
--- a/apps/web-antd/src/views/system/role/index.vue
+++ b/apps/web-antd/src/views/system/role/index.vue
@@ -1,28 +1,36 @@