import request from '@/utils/request'

// 查询商机角色权限列表
export function listAuthority(query) {
  return request({
    url: '/mk/bo/authority/list',
    method: 'get',
    params: query
  })
}

// 查询商机角色权限详细
export function getAuthority(id) {
  return request({
    url: '/mk/bo/authority/' + id,
    method: 'get'
  })
}

// 新增商机角色权限
export function addAuthority(data) {
  return request({
    url: '/mk/bo/authority',
    method: 'post',
    data: data
  })
}

// 修改商机角色权限
export function updateAuthority(data) {
  return request({
    url: '/mk/bo/authority',
    method: 'put',
    data: data
  })
}

// 删除商机角色权限
export function delAuthority(id) {
  return request({
    url: '/mk/bo/authority/' + id,
    method: 'delete'
  })
}

// 查询任务详细
export function getPsnPost(boId) {
  return request({
    url: '/mk/bo/authority/psnpost/' + boId,
    method: 'get'
  })
}