From a3a14031448c4a0894aa566de05084c884940740 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Sat, 5 Oct 2024 16:02:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B2=97=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/system/post/data.ts | 43 +++- apps/web-antd/src/views/system/post/index.vue | 197 +++++++++++++++--- 2 files changed, 205 insertions(+), 35 deletions(-) diff --git a/apps/web-antd/src/views/system/post/data.ts b/apps/web-antd/src/views/system/post/data.ts index 103dab5f..8e8a9ce9 100644 --- a/apps/web-antd/src/views/system/post/data.ts +++ b/apps/web-antd/src/views/system/post/data.ts @@ -1,8 +1,9 @@ import { DictEnum } from '@vben/constants'; import { getPopupContainer } from '@vben/utils'; -import { type FormSchemaGetter } from '#/adapter'; +import { type FormSchemaGetter, type VxeGridProps } from '#/adapter'; import { getDictOptions } from '#/utils/dict'; +import { renderDict } from '#/utils/render'; export const querySchema: FormSchemaGetter = () => [ { @@ -26,6 +27,46 @@ export const querySchema: FormSchemaGetter = () => [ }, ]; +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '岗位编码', + field: 'postCode', + }, + { + title: '类别编码', + field: 'postCategory', + }, + { + title: '岗位名称', + field: 'postName', + }, + { + title: '排序', + field: 'postSort', + }, + { + title: '状态', + field: 'status', + slots: { + default: ({ row }) => { + return renderDict(row.status, DictEnum.SYS_NORMAL_DISABLE); + }, + }, + }, + { + title: '创建时间', + field: 'createTime', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + export const drawerSchema: FormSchemaGetter = () => [ { component: 'Input', diff --git a/apps/web-antd/src/views/system/post/index.vue b/apps/web-antd/src/views/system/post/index.vue index a233a3c0..9886a865 100644 --- a/apps/web-antd/src/views/system/post/index.vue +++ b/apps/web-antd/src/views/system/post/index.vue @@ -1,54 +1,183 @@