提交 | 用户 | 时间
|
cb6cd2
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface AppMenuVO { |
|
4 |
id: number |
|
5 |
name: string |
|
6 |
permission: string |
|
7 |
type: number |
|
8 |
sort: number |
|
9 |
parentId: number |
|
10 |
path: string |
|
11 |
icon: string |
|
12 |
component: string |
|
13 |
componentName?: string |
|
14 |
status: number |
|
15 |
visible: boolean |
|
16 |
keepAlive: boolean |
|
17 |
alwaysShow?: boolean |
|
18 |
createTime: Date |
|
19 |
} |
|
20 |
|
|
21 |
// 查询菜单(精简)列表 |
|
22 |
export const getSimpleMenusList = () => { |
|
23 |
return request.get({ url: '/system/app-menu/simple-list' }) |
|
24 |
} |
|
25 |
|
|
26 |
// 查询菜单列表 |
|
27 |
export const getMenuList = (params) => { |
|
28 |
return request.get({ url: '/system/app-menu/list', params }) |
|
29 |
} |
|
30 |
|
|
31 |
// 获取菜单详情 |
|
32 |
export const getMenu = (id: number) => { |
|
33 |
return request.get({ url: '/system/app-menu/get?id=' + id }) |
|
34 |
} |
|
35 |
|
|
36 |
// 新增菜单 |
|
37 |
export const createMenu = (data: AppMenuVO) => { |
|
38 |
return request.post({ url: '/system/app-menu/create', data }) |
|
39 |
} |
|
40 |
|
|
41 |
// 修改菜单 |
|
42 |
export const updateMenu = (data: AppMenuVO) => { |
|
43 |
return request.put({ url: '/system/app-menu/update', data }) |
|
44 |
} |
|
45 |
|
|
46 |
// 删除菜单 |
|
47 |
export const deleteMenu = (id: number) => { |
|
48 |
return request.delete({ url: '/system/app-menu/delete?id=' + id }) |
|
49 |
} |