import request from '@/config/axios'
|
|
export interface MenuVO {
|
id: number
|
name: string
|
permission: string
|
type: number
|
sort: number
|
parentId: number
|
path: string
|
icon: string
|
component: string
|
componentName?: string
|
status: number
|
visible: boolean
|
keepAlive: boolean
|
alwaysShow?: boolean
|
createTime: Date
|
}
|
|
// 查询菜单(精简)列表
|
export const getSimpleMenusList = () => {
|
return request.get({ url: '/system/menu/simple-list' })
|
}
|
|
// 查询应用菜单(精简)列表
|
export const getSimpleAppMenusList = () => {
|
return request.get({ url: '/system/menu/simple-app-menus' })
|
}
|
|
// 查询菜单列表
|
export const getMenuList = (params) => {
|
return request.get({ url: '/system/menu/list', params })
|
}
|
|
// 查询应用菜单列表
|
export const getAppMenuList = (params) => {
|
return request.get({ url: '/system/menu/app-menu-list', params })
|
}
|
|
// 获取菜单详情
|
export const getMenu = (id: number) => {
|
return request.get({ url: '/system/menu/get?id=' + id })
|
}
|
|
// 获取应用菜单详情
|
export const getAppMenu = (id: number) => {
|
return request.get({ url: '/system/menu/getAppMenu?id=' + id })
|
}
|
|
// 新增菜单
|
export const createMenu = (data: MenuVO) => {
|
return request.post({ url: '/system/menu/create', data })
|
}
|
|
// 新增应用菜单
|
export const createAppMenu = (data: MenuVO) => {
|
return request.post({ url: '/system/menu/createAppMenu', data })
|
}
|
|
// 修改菜单
|
export const updateMenu = (data: MenuVO) => {
|
return request.put({ url: '/system/menu/update', data })
|
}
|
|
// 修改应用菜单
|
export const updateAppMenu = (data: MenuVO) => {
|
return request.put({ url: '/system/menu/updateAppMenu', data })
|
}
|
|
// 删除菜单
|
export const deleteMenu = (id: number) => {
|
return request.delete({ url: '/system/menu/delete?id=' + id })
|
}
|
|
// 删除应用菜单
|
export const deleteAppMenu = (id: number) => {
|
return request.delete({ url: '/system/menu/deleteAppMenu?id=' + id })
|
}
|