提交 | 用户 | 时间
|
820397
|
1 |
import request from '@/config/axios' |
H |
2 |
|
|
3 |
export interface MenuVO { |
|
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 |
39248b
|
19 |
appId: number |
820397
|
20 |
} |
H |
21 |
|
|
22 |
// 查询菜单(精简)列表 |
|
23 |
export const getSimpleMenusList = () => { |
|
24 |
return request.get({ url: '/system/menu/simple-list' }) |
|
25 |
} |
|
26 |
|
39248b
|
27 |
// 查询应用菜单(精简)列表 |
H |
28 |
export const getSimpleAppMenusList = () => { |
|
29 |
return request.get({ url: '/system/menu/simple-app-menus' }) |
|
30 |
} |
|
31 |
|
820397
|
32 |
// 查询菜单列表 |
H |
33 |
export const getMenuList = (params) => { |
|
34 |
return request.get({ url: '/system/menu/list', params }) |
39248b
|
35 |
} |
H |
36 |
|
|
37 |
// 查询应用菜单列表 |
|
38 |
export const getAppMenuList = (params) => { |
|
39 |
return request.get({ url: '/system/menu/app-menu-list', params }) |
820397
|
40 |
} |
H |
41 |
|
|
42 |
// 获取菜单详情 |
|
43 |
export const getMenu = (id: number) => { |
|
44 |
return request.get({ url: '/system/menu/get?id=' + id }) |
|
45 |
} |
|
46 |
|
39248b
|
47 |
// 获取应用菜单详情 |
H |
48 |
export const getAppMenu = (id: number) => { |
|
49 |
return request.get({ url: '/system/menu/getAppMenu?id=' + id }) |
|
50 |
} |
|
51 |
|
820397
|
52 |
// 新增菜单 |
H |
53 |
export const createMenu = (data: MenuVO) => { |
|
54 |
return request.post({ url: '/system/menu/create', data }) |
39248b
|
55 |
} |
H |
56 |
|
|
57 |
// 新增应用菜单 |
|
58 |
export const createAppMenu = (data: MenuVO) => { |
|
59 |
return request.post({ url: '/system/menu/createAppMenu', data }) |
820397
|
60 |
} |
H |
61 |
|
|
62 |
// 修改菜单 |
|
63 |
export const updateMenu = (data: MenuVO) => { |
|
64 |
return request.put({ url: '/system/menu/update', data }) |
|
65 |
} |
|
66 |
|
39248b
|
67 |
// 修改应用菜单 |
H |
68 |
export const updateAppMenu = (data: MenuVO) => { |
|
69 |
return request.put({ url: '/system/menu/updateAppMenu', data }) |
|
70 |
} |
|
71 |
|
820397
|
72 |
// 删除菜单 |
H |
73 |
export const deleteMenu = (id: number) => { |
|
74 |
return request.delete({ url: '/system/menu/delete?id=' + id }) |
|
75 |
} |
39248b
|
76 |
|
H |
77 |
// 删除应用菜单 |
|
78 |
export const deleteAppMenu = (id: number) => { |
|
79 |
return request.delete({ url: '/system/menu/deleteAppMenu?id=' + id }) |
|
80 |
} |