提交 | 用户 | 时间
|
b1d33f
|
1 |
import request from '@/config/axios' |
潘 |
2 |
|
|
3 |
export interface IndItemCategoryVO { |
|
4 |
id: string |
|
5 |
label: string |
|
6 |
pid: string |
|
7 |
sort: number |
|
8 |
} |
|
9 |
|
2cb862
|
10 |
export interface ItemCategoryReqVO { |
b1d33f
|
11 |
label?: string |
潘 |
12 |
} |
|
13 |
|
2cb862
|
14 |
export const defaultProps = { |
潘 |
15 |
children: 'children', |
|
16 |
label: 'label', |
|
17 |
value: 'id', |
|
18 |
isLeaf: 'leaf', |
|
19 |
emitPath: false // 用于 cascader 组件:在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值 |
|
20 |
} |
|
21 |
|
b1d33f
|
22 |
// 查询列表 |
潘 |
23 |
export const getCategoryList = (params) => { |
|
24 |
return request.get({ url: '/data/plan/category/list', params}) |
|
25 |
} |
|
26 |
|
|
27 |
// 查询列表 |
|
28 |
export const getCategoryListAllSimple = () => { |
|
29 |
return request.get({ url: '/data/plan/category/list-all-simple'}) |
|
30 |
} |
|
31 |
|
|
32 |
// 查询详情 |
|
33 |
export const getCategory = (id: number) => { |
|
34 |
return request.get({ url: '/data/plan/category/get?id=' + id}) |
|
35 |
} |
|
36 |
|
|
37 |
// 新增 |
|
38 |
export const createCategory = (data: ScheduleModelVO) => { |
|
39 |
return request.post({ url: '/data/plan/category/create', data }) |
|
40 |
} |
|
41 |
|
|
42 |
// 修改 |
|
43 |
export const updateCategory = (data: ScheduleModelVO) => { |
|
44 |
return request.put({ url: '/data/plan/category/update', data }) |
|
45 |
} |
|
46 |
|
|
47 |
// 删除 |
|
48 |
export const deleteCategory = (id: number) => { |
|
49 |
return request.delete({ url: '/data/plan/category/delete?id=' + id }) |
|
50 |
} |