From 089c6c2efab97eebceaef8cb803a2b1de7c8d0af Mon Sep 17 00:00:00 2001 From: AprilWind <2100166581@qq.com> Date: Tue, 17 Dec 2024 16:26:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workflow/category/index.ts | 12 +- src/api/workflow/category/types.ts | 55 +++----- src/views/workflow/category/index.vue | 179 +++++++++++++------------- 3 files changed, 115 insertions(+), 131 deletions(-) diff --git a/src/api/workflow/category/index.ts b/src/api/workflow/category/index.ts index e9723b05..385d1497 100644 --- a/src/api/workflow/category/index.ts +++ b/src/api/workflow/category/index.ts @@ -18,11 +18,11 @@ export const listCategory = (query?: CategoryQuery): AxiosPromise /** * 查询流程分类详细 - * @param id + * @param categoryId */ -export const getCategory = (id: string | number): AxiosPromise => { +export const getCategory = (categoryId: string | number): AxiosPromise => { return request({ - url: '/workflow/category/' + id, + url: '/workflow/category/' + categoryId, method: 'get' }); }; @@ -53,11 +53,11 @@ export const updateCategory = (data: CategoryForm) => { /** * 删除流程分类 - * @param id + * @param categoryId */ -export const delCategory = (id: string | number | Array) => { +export const delCategory = (categoryId: string | number | Array) => { return request({ - url: '/workflow/category/' + id, + url: '/workflow/category/' + categoryId, method: 'delete' }); }; diff --git a/src/api/workflow/category/types.ts b/src/api/workflow/category/types.ts index 047002e5..a4757940 100644 --- a/src/api/workflow/category/types.ts +++ b/src/api/workflow/category/types.ts @@ -1,14 +1,7 @@ -export interface CategoryTreeVO { - id: number | string; - label: string; - parentId: number | string; - weight: number; - children: CategoryTreeVO[]; -} - export interface CategoryVO { + /** - * 主键 + * 流程分类ID */ categoryId: string | number; @@ -18,17 +11,7 @@ export interface CategoryVO { parentId: string | number; /** - * 父类别名称 - */ - parentName: string; - - /** - * 祖级列表 - */ - ancestors: string; - - /** - * 分类名称 + * 流程分类名称 */ categoryName: string; @@ -38,45 +21,45 @@ export interface CategoryVO { orderNum: number; /** - * 流程分类状态(0正常 1停用) + * 创建时间 */ - status: number; + createTime: string; + /** + * 子对象 + */ children: CategoryVO[]; - } export interface CategoryForm extends BaseEntity { - /** - * 主键 - */ - categoryId?: string | number; /** - * 父级id + * 流程分类ID */ - parentId: string | number; + categoryId?: string | number; /** - * 分类名称 + * 流程分类名称 */ categoryName?: string; /** - * 排序 + * 父流程分类id */ - orderNum?: number; + parentId?: string | number; /** - * 流程分类状态(0正常 1停用) + * 显示顺序 */ - status: number; + orderNum?: number; } -export interface CategoryQuery extends PageQuery { +export interface CategoryQuery { + /** - * 分类名称 + * 流程分类名称 */ categoryName?: string; + } diff --git a/src/views/workflow/category/index.vue b/src/views/workflow/category/index.vue index 007329c5..d3e87ea3 100644 --- a/src/views/workflow/category/index.vue +++ b/src/views/workflow/category/index.vue @@ -18,12 +18,12 @@ - - - + + + + - - - - + + + - - - - - - + + + + + + + + + + + + -