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 @@