From aea3a28ada670ae3f38233eff9cf9f9badfcfddc Mon Sep 17 00:00:00 2001 From: gssong <1742057357@qq.com> Date: Wed, 28 Jun 2023 22:26:13 +0800 Subject: [PATCH] =?UTF-8?q?add=20=E6=B7=BB=E5=8A=A0=E6=B5=81=E7=A8=8B?= =?UTF-8?q?=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 | 63 ++++++ src/api/workflow/category/types.ts | 68 +++++++ src/views/workflow/category/index.vue | 274 ++++++++++++++++++++++++++ 3 files changed, 405 insertions(+) create mode 100644 src/api/workflow/category/index.ts create mode 100644 src/api/workflow/category/types.ts create mode 100644 src/views/workflow/category/index.vue diff --git a/src/api/workflow/category/index.ts b/src/api/workflow/category/index.ts new file mode 100644 index 0000000..e9723b0 --- /dev/null +++ b/src/api/workflow/category/index.ts @@ -0,0 +1,63 @@ +import request from '@/utils/request'; +import { AxiosPromise } from 'axios'; +import { CategoryVO, CategoryForm, CategoryQuery } from '@/api/workflow/category/types'; + +/** + * 查询流程分类列表 + * @param query + * @returns {*} + */ + +export const listCategory = (query?: CategoryQuery): AxiosPromise => { + return request({ + url: '/workflow/category/list', + method: 'get', + params: query + }); +}; + +/** + * 查询流程分类详细 + * @param id + */ +export const getCategory = (id: string | number): AxiosPromise => { + return request({ + url: '/workflow/category/' + id, + method: 'get' + }); +}; + +/** + * 新增流程分类 + * @param data + */ +export const addCategory = (data: CategoryForm) => { + return request({ + url: '/workflow/category', + method: 'post', + data: data + }); +}; + +/** + * 修改流程分类 + * @param data + */ +export const updateCategory = (data: CategoryForm) => { + return request({ + url: '/workflow/category', + method: 'put', + data: data + }); +}; + +/** + * 删除流程分类 + * @param id + */ +export const delCategory = (id: string | number | Array) => { + return request({ + url: '/workflow/category/' + id, + method: 'delete' + }); +}; diff --git a/src/api/workflow/category/types.ts b/src/api/workflow/category/types.ts new file mode 100644 index 0000000..dc3c538 --- /dev/null +++ b/src/api/workflow/category/types.ts @@ -0,0 +1,68 @@ +export interface CategoryVO { + /** + * 主键 + */ + id: string | number; + + /** + * 分类名称 + */ + categoryName: string; + + /** + * 分类编码 + */ + categoryCode: string; + + /** + * 父级id + */ + parentId: string | number; + + /** + * 排序 + */ + sortNum: number; + +} + +export interface CategoryForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 分类名称 + */ + categoryName?: string; + + /** + * 分类编码 + */ + categoryCode?: string; + + /** + * 父级id + */ + parentId?: string | number; + + /** + * 排序 + */ + sortNum?: number; + +} + +export interface CategoryQuery extends PageQuery { + /** + * 分类名称 + */ + categoryName?: string; + + /** + * 分类编码 + */ + categoryCode?: string; + +} diff --git a/src/views/workflow/category/index.vue b/src/views/workflow/category/index.vue new file mode 100644 index 0000000..971e1e5 --- /dev/null +++ b/src/views/workflow/category/index.vue @@ -0,0 +1,274 @@ + + +