From a77886a6755420e868b02b152c7c5b047e4ec789 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Sat, 5 Oct 2024 14:36:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/system/config/data.ts | 44 +++- .../src/views/system/config/index.vue | 242 +++++++++++------- 2 files changed, 186 insertions(+), 100 deletions(-) diff --git a/apps/web-antd/src/views/system/config/data.ts b/apps/web-antd/src/views/system/config/data.ts index bcf8b8c8..01009d85 100644 --- a/apps/web-antd/src/views/system/config/data.ts +++ b/apps/web-antd/src/views/system/config/data.ts @@ -1,9 +1,10 @@ -import type { FormSchemaGetter } from '#/adapter'; +import type { FormSchemaGetter, VxeGridProps } from '#/adapter'; import { DictEnum } from '@vben/constants'; import { getPopupContainer } from '@vben/utils'; import { getDictOptions } from '#/utils/dict'; +import { renderDict } from '#/utils/render'; export const querySchema: FormSchemaGetter = () => [ { @@ -32,6 +33,47 @@ export const querySchema: FormSchemaGetter = () => [ }, ]; +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '参数名称', + field: 'configName', + }, + { + title: '参数KEY', + field: 'configKey', + }, + { + title: '参数Value', + field: 'configValue', + }, + { + title: '系统内置', + field: 'configType', + width: 120, + slots: { + default: ({ row }) => { + return renderDict(row.configType, DictEnum.SYS_YES_NO); + }, + }, + }, + { + title: '备注', + field: 'remark', + }, + { + title: '创建时间', + field: 'createTime', + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + export const modalSchema: FormSchemaGetter = () => [ { component: 'Input', diff --git a/apps/web-antd/src/views/system/config/index.vue b/apps/web-antd/src/views/system/config/index.vue index c9dedb99..d523599a 100644 --- a/apps/web-antd/src/views/system/config/index.vue +++ b/apps/web-antd/src/views/system/config/index.vue @@ -1,24 +1,77 @@