提交 | 用户 | 时间
|
314507
|
1 |
import request from '@/config/axios' |
H |
2 |
|
8e4ab7
|
3 |
import { config } from '@/config/axios/config' |
H |
4 |
|
|
5 |
const { plat_url} = config |
|
6 |
|
314507
|
7 |
export interface MenuVO { |
H |
8 |
id: number |
|
9 |
name: string |
|
10 |
permission: string |
|
11 |
type: number |
|
12 |
sort: number |
|
13 |
parentId: number |
|
14 |
path: string |
|
15 |
icon: string |
|
16 |
component: string |
|
17 |
componentName?: string |
|
18 |
status: number |
|
19 |
visible: boolean |
|
20 |
keepAlive: boolean |
|
21 |
alwaysShow?: boolean |
|
22 |
createTime: Date |
|
23 |
} |
|
24 |
|
|
25 |
// 查询菜单(精简)列表 |
|
26 |
export const getSimpleMenusList = () => { |
8e4ab7
|
27 |
return request.get({ url: plat_url + '/system/menu/simple-list' }) |
314507
|
28 |
} |
H |
29 |
|
|
30 |
// 查询应用菜单(精简)列表 |
|
31 |
export const getSimpleAppMenusList = () => { |
8e4ab7
|
32 |
return request.get({ url: plat_url + '/system/menu/simple-app-menus' }) |
314507
|
33 |
} |
H |
34 |
|
|
35 |
// 查询菜单列表 |
|
36 |
export const getMenuList = (params) => { |
8e4ab7
|
37 |
return request.get({ url: plat_url + '/system/menu/list', params }) |
314507
|
38 |
} |
H |
39 |
|
|
40 |
// 查询应用菜单列表 |
|
41 |
export const getAppMenuList = (params) => { |
8e4ab7
|
42 |
return request.get({ url: plat_url + '/system/menu/app-menu-list', params }) |
314507
|
43 |
} |
H |
44 |
|
|
45 |
// 获取菜单详情 |
|
46 |
export const getMenu = (id: number) => { |
8e4ab7
|
47 |
return request.get({ url: plat_url + '/system/menu/get?id=' + id }) |
314507
|
48 |
} |
H |
49 |
|
|
50 |
// 获取应用菜单详情 |
|
51 |
export const getAppMenu = (id: number) => { |
8e4ab7
|
52 |
return request.get({ url: plat_url + '/system/menu/getAppMenu?id=' + id }) |
314507
|
53 |
} |
H |
54 |
|
|
55 |
// 新增菜单 |
|
56 |
export const createMenu = (data: MenuVO) => { |
8e4ab7
|
57 |
return request.post({ url: plat_url + '/system/menu/create', data }) |
314507
|
58 |
} |
H |
59 |
|
|
60 |
// 新增应用菜单 |
|
61 |
export const createAppMenu = (data: MenuVO) => { |
8e4ab7
|
62 |
return request.post({ url: plat_url + '/system/menu/createAppMenu', data }) |
314507
|
63 |
} |
H |
64 |
|
|
65 |
// 修改菜单 |
|
66 |
export const updateMenu = (data: MenuVO) => { |
8e4ab7
|
67 |
return request.put({ url: plat_url + '/system/menu/update', data }) |
314507
|
68 |
} |
H |
69 |
|
|
70 |
// 修改应用菜单 |
|
71 |
export const updateAppMenu = (data: MenuVO) => { |
8e4ab7
|
72 |
return request.put({ url: plat_url + '/system/menu/updateAppMenu', data }) |
314507
|
73 |
} |
H |
74 |
|
|
75 |
// 删除菜单 |
|
76 |
export const deleteMenu = (id: number) => { |
8e4ab7
|
77 |
return request.delete({ url: plat_url + '/system/menu/delete?id=' + id }) |
314507
|
78 |
} |
H |
79 |
|
|
80 |
// 删除应用菜单 |
|
81 |
export const deleteAppMenu = (id: number) => { |
8e4ab7
|
82 |
return request.delete({ url: plat_url + '/system/menu/deleteAppMenu?id=' + id }) |
314507
|
83 |
} |