import request from '@/utils/request'

// 查询菜单权限列表
export function listCompanyMenu(query) {
  return request({
    url: '/company/companyMenu/list',
    method: 'get',
    params: query
  })
}

// 查询菜单权限详细
export function getCompanyMenu(menuId) {
  return request({
    url: '/company/companyMenu/' + menuId,
    method: 'get'
  })
}

// 新增菜单权限
export function addCompanyMenu(data) {
  return request({
    url: '/company/companyMenu',
    method: 'post',
    data: data
  })
}

// 修改菜单权限
export function updateCompanyMenu(data) {
  return request({
    url: '/company/companyMenu',
    method: 'put',
    data: data
  })
}

// 删除菜单权限
export function delCompanyMenu(menuId) {
  return request({
    url: '/company/companyMenu/' + menuId,
    method: 'delete'
  })
}

// 导出菜单权限
export function exportCompanyMenu(query) {
  return request({
    url: '/company/companyMenu/export',
    method: 'get',
    params: query
  })
}



// 查询菜单下拉树结构
export function treeselect() {
  return request({
    url: '/company/companyMenu/treeselect',
    method: 'get'
  })
}
