From 227117205cbb62e9febf96870d2fbb9ce056eb43 Mon Sep 17 00:00:00 2001 From: houzhongjian <houzhongyi@126.com> Date: 星期三, 06 十一月 2024 14:09:54 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/api/data/plan/category/index.ts | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 50 insertions(+), 0 deletions(-) diff --git a/src/api/data/plan/category/index.ts b/src/api/data/plan/category/index.ts new file mode 100644 index 0000000..f8faecd --- /dev/null +++ b/src/api/data/plan/category/index.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface IndItemCategoryVO { + id: string + label: string + pid: string + sort: number +} + +export interface ItemCategoryReqVO { + label?: string +} + +export const defaultProps = { + children: 'children', + label: 'label', + value: 'id', + isLeaf: 'leaf', + emitPath: false // 用于 cascader 组件:在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值 +} + +// 查询列表 +export const getCategoryList = (params) => { + return request.get({ url: '/data/plan/category/list', params}) +} + +// 查询列表 +export const getCategoryListAllSimple = () => { + return request.get({ url: '/data/plan/category/list-all-simple'}) +} + +// 查询详情 +export const getCategory = (id: number) => { + return request.get({ url: '/data/plan/category/get?id=' + id}) +} + +// 新增 +export const createCategory = (data: ScheduleModelVO) => { + return request.post({ url: '/data/plan/category/create', data }) +} + +// 修改 +export const updateCategory = (data: ScheduleModelVO) => { + return request.put({ url: '/data/plan/category/update', data }) +} + +// 删除 +export const deleteCategory = (id: number) => { + return request.delete({ url: '/data/plan/category/delete?id=' + id }) +} -- Gitblit v1.9.3