diff --git a/apps/web-antd/src/views/system/dept/data.ts b/apps/web-antd/src/views/system/dept/data.ts
index cd5714fe..59e3e656 100644
--- a/apps/web-antd/src/views/system/dept/data.ts
+++ b/apps/web-antd/src/views/system/dept/data.ts
@@ -1,8 +1,9 @@
import { DictEnum } from '@vben/constants';
import { getPopupContainer } from '@vben/utils';
-import { type FormSchemaGetter, z } from '#/adapter';
+import { type FormSchemaGetter, type VxeGridProps, z } from '#/adapter';
import { getDictOptions } from '#/utils/dict';
+import { renderDict } from '#/utils/render';
export const querySchema: FormSchemaGetter = () => [
{
@@ -21,6 +22,45 @@ export const querySchema: FormSchemaGetter = () => [
},
];
+export const columns: VxeGridProps['columns'] = [
+ {
+ field: 'deptName',
+ title: '部门名称',
+ treeNode: true,
+ width: 200,
+ },
+ {
+ field: 'deptCategory',
+ title: '类别编码',
+ },
+ {
+ field: 'orderNum',
+ title: '排序',
+ width: 180,
+ },
+ {
+ field: 'status',
+ width: 180,
+ title: '状态',
+ slots: {
+ default: ({ row }) => {
+ return renderDict(row.status, DictEnum.SYS_NORMAL_DISABLE);
+ },
+ },
+ },
+ {
+ field: 'createTime',
+ title: '创建时间',
+ },
+ {
+ field: 'action',
+ fixed: 'right',
+ slots: { default: 'action' },
+ title: '操作',
+ width: 180,
+ },
+];
+
export const drawerSchema: FormSchemaGetter = () => [
{
component: 'Input',
@@ -76,7 +116,7 @@ export const drawerSchema: FormSchemaGetter = () => [
label: '联系电话',
rules: z
.string()
- .regex(/^\d{1,3}-\d{8,11}$/, { message: '请输入正确的手机号' })
+ .regex(/^1[3,4578]\d{9}$/, { message: '请输入正确的手机号' })
.optional(),
},
{
diff --git a/apps/web-antd/src/views/system/dept/index.vue b/apps/web-antd/src/views/system/dept/index.vue
index e2c70629..630288f8 100644
--- a/apps/web-antd/src/views/system/dept/index.vue
+++ b/apps/web-antd/src/views/system/dept/index.vue
@@ -1,62 +1,146 @@
-
-
-
-
-
-
-
- {{ $t('pages.common.add') }}
-
-
新增 上级id=103
-
新增 上级id=105
-
-
-
+
+
+
+ 部门列表
+
+
+
+
+ {{ $t('pages.common.collapse') }}
+
+
+ {{ $t('pages.common.expand') }}
+
+
+ {{ $t('pages.common.add') }}
+
+
+
+
+
+
+ {{ $t('pages.common.edit') }}
+
+
+
+ {{ $t('pages.common.delete') }}
+
+
+
+
+
+
diff --git a/apps/web-antd/src/views/system/menu/index.vue b/apps/web-antd/src/views/system/menu/index.vue
index d683446f..b9e68991 100644
--- a/apps/web-antd/src/views/system/menu/index.vue
+++ b/apps/web-antd/src/views/system/menu/index.vue
@@ -18,14 +18,6 @@ const formOptions: VbenFormProps = {
};
const gridOptions: VxeGridProps = {
- checkboxConfig: {
- // 高亮
- highlight: true,
- // 翻页时保留选中状态
- reserve: true,
- // 点击行选中
- // trigger: 'row',
- },
columns,
height: 'auto',
keepSource: true,