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