From 2c3dd668e3b82d0535ce5c4e672dd84ccb455159 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Fri, 6 Jun 2025 20:45:45 +0800 Subject: [PATCH] refactor: bpm --- apps/web-antd/src/views/bpm/category/data.ts | 33 +- .../web-antd/src/views/bpm/category/index.vue | 137 ++--- apps/web-antd/src/views/bpm/form/data.ts | 47 +- apps/web-antd/src/views/bpm/form/index.vue | 247 ++++----- .../src/views/bpm/form/modules/detail.vue | 50 ++ .../src/views/bpm/form/modules/form.vue | 2 +- apps/web-antd/src/views/bpm/group/data.ts | 38 +- apps/web-antd/src/views/bpm/group/index.vue | 170 ++++--- .../src/views/bpm/group/modules/form.vue | 3 +- .../src/views/bpm/model/form/index.vue | 184 ++++--- .../bpm/model/form/modules/basic-info.vue | 473 +++++++++--------- .../bpm/model/form/modules/extra-setting.vue | 30 +- .../bpm/model/form/modules/form-design.vue | 4 +- .../bpm/model/form/modules/process-design.vue | 8 +- .../form/modules/simple-model-design.vue | 8 +- apps/web-antd/src/views/bpm/model/index.vue | 133 ++--- .../modules/category-draggable-model.vue | 45 +- .../src/views/bpm/oa/leave/create.vue | 11 +- apps/web-antd/src/views/bpm/oa/leave/data.ts | 42 +- .../src/views/bpm/oa/leave/detail.vue | 4 +- .../web-antd/src/views/bpm/oa/leave/index.vue | 108 ++-- .../src/views/bpm/processExpression/data.ts | 34 +- .../src/views/bpm/processExpression/index.vue | 138 ++--- .../bpm/processExpression/modules/form.vue | 3 +- .../bpm/processInstance/create/index.vue | 36 +- .../processInstance/create/modules/form.vue | 32 +- .../src/views/bpm/processInstance/data.ts | 50 +- .../bpm/processInstance/detail/index.vue | 8 +- .../detail/modules/operation-button.vue | 124 ++--- .../detail/modules/signature.vue | 47 +- .../detail/modules/task-list.vue | 12 +- .../detail/modules/time-line.vue | 42 +- .../src/views/bpm/processInstance/index.vue | 133 ++--- .../views/bpm/processInstance/manager/data.ts | 57 +-- .../bpm/processInstance/manager/index.vue | 132 ++--- .../src/views/bpm/processListener/data.ts | 53 +- .../src/views/bpm/processListener/index.vue | 140 +++--- .../bpm/processListener/modules/form.vue | 50 +- apps/web-antd/src/views/bpm/task/copy/data.ts | 43 +- .../src/views/bpm/task/copy/index.vue | 85 ++-- apps/web-antd/src/views/bpm/task/done/data.ts | 51 +- .../src/views/bpm/task/done/index.vue | 79 +-- .../src/views/bpm/task/manager/data.ts | 32 +- .../src/views/bpm/task/manager/index.vue | 59 ++- apps/web-antd/src/views/bpm/task/todo/data.ts | 68 +-- .../src/views/bpm/task/todo/index.vue | 66 ++- .../src/views/system/tenantPackage/index.vue | 1 - 47 files changed, 1454 insertions(+), 1898 deletions(-) create mode 100644 apps/web-antd/src/views/bpm/form/modules/detail.vue diff --git a/apps/web-antd/src/views/bpm/category/data.ts b/apps/web-antd/src/views/bpm/category/data.ts index 1df6ba2de..4a4b86aa2 100644 --- a/apps/web-antd/src/views/bpm/category/data.ts +++ b/apps/web-antd/src/views/bpm/category/data.ts @@ -1,13 +1,9 @@ import type { VbenFormSchema } from '#/adapter/form'; -import type { OnActionClickFn, VxeTableGridOptions } from '#/adapter/vxe-table'; -import type { BpmCategoryApi } from '#/api/bpm/category'; - -import { useAccess } from '@vben/access'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { z } from '#/adapter/form'; import { CommonStatusEnum, DICT_TYPE, getDictOptions } from '#/utils'; -const { hasAccessByCodes } = useAccess(); /** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ @@ -106,9 +102,7 @@ export function useGridFormSchema(): VbenFormSchema[] { } /** 列表的字段 */ -export function useGridColumns( - onActionClick: OnActionClickFn, -): VxeTableGridOptions['columns'] { +export function useGridColumns(): VxeTableGridOptions['columns'] { return [ { field: 'id', @@ -146,29 +140,10 @@ export function useGridColumns( formatter: 'formatDateTime', }, { - field: 'operation', title: '操作', - minWidth: 180, - align: 'center', + width: 180, fixed: 'right', - cellRender: { - attrs: { - nameField: 'name', - nameTitle: '流程分类', - onClick: onActionClick, - }, - name: 'CellOperation', - options: [ - { - code: 'edit', - show: hasAccessByCodes(['bpm:category:update']), - }, - { - code: 'delete', - show: hasAccessByCodes(['bpm:category:delete']), - }, - ], - }, + slots: { default: 'actions' }, }, ]; } diff --git a/apps/web-antd/src/views/bpm/category/index.vue b/apps/web-antd/src/views/bpm/category/index.vue index 8dd26b7c3..a4abb556e 100644 --- a/apps/web-antd/src/views/bpm/category/index.vue +++ b/apps/web-antd/src/views/bpm/category/index.vue @@ -1,16 +1,12 @@