import request from '@/utils/request'

// 查询委托权限列表
export function listPermission(query) {
  return request({
    url: '/business/permission/list',
    method: 'get',
    params: query
  })
}

// 查询委托权限详细
export function getPermission(id) {
  return request({
    url: '/business/permission/' + id,
    method: 'get'
  })
}

// 新增委托权限
export function addPermission(data) {
  return request({
    url: '/business/permission',
    method: 'post',
    data: data
  })
}

// 修改委托权限
export function updatePermission(data) {
  return request({
    url: '/business/permission',
    method: 'put',
    data: data
  })
}

// 删除委托权限
export function delPermission(id) {
  return request({
    url: '/business/permission/' + id,
    method: 'delete'
  })
}
