From e82ddeb9159f5a8b5445cd9c705004b814dfac9c Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Fri, 11 Apr 2025 13:38:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B5=81=E7=A8=8B=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/bpm/category/data.ts | 18 +++++++++++++++--- apps/web-antd/src/views/bpm/category/index.vue | 7 +++++-- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/apps/web-antd/src/views/bpm/category/data.ts b/apps/web-antd/src/views/bpm/category/data.ts index 46f2c5e4d..0e2ca35ab 100644 --- a/apps/web-antd/src/views/bpm/category/data.ts +++ b/apps/web-antd/src/views/bpm/category/data.ts @@ -2,10 +2,13 @@ import type { VbenFormSchema } from '#/adapter/form'; import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; import type { CategoryApi } from '#/api/bpm/category/index'; +import { useAccess } from '@vben/access'; + import { z } from '#/adapter/form'; import { CommonStatusEnum } from '#/utils/constants'; import { DICT_TYPE, getDictOptions } from '#/utils/dict'; +const { hasAccessByCodes } = useAccess(); /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ @@ -80,7 +83,15 @@ export function useGridFormSchema(): VbenFormSchema[] { allowClear: true, }, }, - // TODO 分类标志 + { + fieldName: 'code', + label: '分类标志', + component: 'Input', + componentProps: { + placeholder: '请输入分类标志', + allowClear: true, + }, + }, { fieldName: 'status', label: '分类状态', @@ -91,6 +102,7 @@ export function useGridFormSchema(): VbenFormSchema[] { allowClear: true, }, }, + // TODO 创建时间 等通用方法完善后加 ]; } @@ -150,11 +162,11 @@ export function useGridColumns( options: [ { code: 'edit', - // show: hasAccessByCodes(['bpm:category:update']), TODO 权限 + show: hasAccessByCodes(['bpm:category:update']), }, { code: 'delete', - // show: hasAccessByCodes(['bpm:category:delete']), + show: hasAccessByCodes(['bpm:category:delete']), }, ], }, diff --git a/apps/web-antd/src/views/bpm/category/index.vue b/apps/web-antd/src/views/bpm/category/index.vue index ca3062728..80e0ab099 100644 --- a/apps/web-antd/src/views/bpm/category/index.vue +++ b/apps/web-antd/src/views/bpm/category/index.vue @@ -6,7 +6,6 @@ import type { import type { CategoryApi } from '#/api/bpm/category/index'; import { Page, useVbenModal } from '@vben/common-ui'; -import { Plus } from '@vben/icons'; import { Button, message } from 'ant-design-vue'; @@ -107,7 +106,11 @@ async function onDelete(row: CategoryApi.CategoryVO) {