From 5e440a7dc434c43eb828fa62cf9c12b0078b8565 Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期一, 20 一月 2025 11:36:18 +0800
Subject: [PATCH] !173 发布 5.3.0-BETA 公测版本 Merge pull request !173 from 疯狂的狮子Li/dev

---
 src/api/workflow/category/index.ts |   27 ++++++++++++++++++++-------
 1 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/api/workflow/category/index.ts b/src/api/workflow/category/index.ts
index e9723b0..b6a83ea 100644
--- a/src/api/workflow/category/index.ts
+++ b/src/api/workflow/category/index.ts
@@ -1,6 +1,6 @@
 import request from '@/utils/request';
 import { AxiosPromise } from 'axios';
-import { CategoryVO, CategoryForm, CategoryQuery } from '@/api/workflow/category/types';
+import { CategoryVO, CategoryForm, CategoryQuery, CategoryTreeVO } from '@/api/workflow/category/types';
 
 /**
  * 鏌ヨ娴佺▼鍒嗙被鍒楄〃
@@ -18,11 +18,11 @@
 
 /**
  * 鏌ヨ娴佺▼鍒嗙被璇︾粏
- * @param id
+ * @param categoryId
  */
-export const getCategory = (id: string | number): AxiosPromise<CategoryVO> => {
+export const getCategory = (categoryId: string | number): AxiosPromise<CategoryVO> => {
   return request({
-    url: '/workflow/category/' + id,
+    url: '/workflow/category/' + categoryId,
     method: 'get'
   });
 };
@@ -53,11 +53,24 @@
 
 /**
  * 鍒犻櫎娴佺▼鍒嗙被
- * @param id
+ * @param categoryId
  */
-export const delCategory = (id: string | number | Array<string | number>) => {
+export const delCategory = (categoryId: string | number | Array<string | number>) => {
   return request({
-    url: '/workflow/category/' + id,
+    url: '/workflow/category/' + categoryId,
     method: 'delete'
   });
 };
+
+/**
+ * 鑾峰彇娴佺▼鍒嗙被鏍戝垪琛�
+ * @param query 娴佺▼瀹炰緥id
+ * @returns
+ */
+export const categoryTree = (query?: CategoryForm): AxiosPromise<CategoryTreeVO[]> => {
+  return request({
+    url: `/workflow/category/categoryTree`,
+    method: 'get',
+    params: query
+  });
+};

--
Gitblit v1.9.3