From b641b0eb151a045e687f9f5a632883c6c1429d93 Mon Sep 17 00:00:00 2001 From: dap <15891557205@163.com> Date: Wed, 18 Dec 2024 08:16:03 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E8=B0=83=E6=95=B4=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E6=A0=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/workflow/category/index.ts | 15 +++++++++++- .../src/api/workflow/category/model.d.ts | 9 ++++++++ .../processDefinition/category-tree.vue | 18 +++++---------- .../workflow/processDefinition/index.vue | 4 ++-- .../process-definition-modal.vue | 23 ++++++------------- 5 files changed, 38 insertions(+), 31 deletions(-) diff --git a/apps/web-antd/src/api/workflow/category/index.ts b/apps/web-antd/src/api/workflow/category/index.ts index 3497c749..8126effd 100644 --- a/apps/web-antd/src/api/workflow/category/index.ts +++ b/apps/web-antd/src/api/workflow/category/index.ts @@ -1,9 +1,22 @@ -import type { CategoryForm, CategoryQuery, CategoryVO } from './model'; +import type { + CategoryForm, + CategoryQuery, + CategoryTree, + CategoryVO, +} from './model'; import type { ID, IDS } from '#/api/common'; import { requestClient } from '#/api/request'; +/** + * 获取流程分类树列表 + * @returns tree + */ +export function categoryTree() { + return requestClient.get('/workflow/category/categoryTree'); +} + /** * 查询流程分类列表 * @param params diff --git a/apps/web-antd/src/api/workflow/category/model.d.ts b/apps/web-antd/src/api/workflow/category/model.d.ts index 00ee6077..7d28c1a6 100644 --- a/apps/web-antd/src/api/workflow/category/model.d.ts +++ b/apps/web-antd/src/api/workflow/category/model.d.ts @@ -86,3 +86,12 @@ export interface CategoryQuery { */ params?: any; } + +export interface CategoryTree { + id: number; + parentId: number; + label: string; + weight: number; + children: CategoryTree[]; + key: string; +} diff --git a/apps/web-antd/src/views/workflow/processDefinition/category-tree.vue b/apps/web-antd/src/views/workflow/processDefinition/category-tree.vue index 2969c4da..6912c256 100644 --- a/apps/web-antd/src/views/workflow/processDefinition/category-tree.vue +++ b/apps/web-antd/src/views/workflow/processDefinition/category-tree.vue @@ -1,14 +1,12 @@