import request from '@/utils/request'

export function getCMAList(query) {
  return request({
    url: '/ability/cma/',
    method: 'get',
    params: query
  })
}
export function getCMAGroup(query) {
  return request({
    url: '/ability/cma/group/',
    method: 'get',
    params: query
  })
}

export function getCNASGroup(query) {
  return request({
    url: '/ability/cnas/group/',
    method: 'get',
    params: query
  })
}

export function getCNASList(query) {
  return request({
    url: '/ability/cnas/',
    method: 'get',
    params: query
  })
}

export function createCMA(data) {
  return request({
    url: '/ability/cma/',
    method: 'post',
    data
  })
}
export function updateCMA(id, data) {
  return request({
    url: `/ability/cma/${id}/`,
    method: 'put',
    data
  })
}
export function deleteCMA(id) {
  return request({
    url: `/ability/cma/${id}/`,
    method: 'delete'
  })
}
export function deletes(data)
{
  return request({
    url: `/ability/cma/deletes/`,
    method: 'post',
    data
  })
}
export function importCMA(data) {
  return request({
    url: `/ability/cma/import/`,
    method: 'post',
    data
  })
}
export function importCMA2(data) {
  return request({
    url: `/ability/cma/import2/`,
    method: 'post',
    data
  })
}

export function importCNAS(data) {
  return request({
    url: `/ability/cnas/import/`,
    method: 'post',
    data
  })
}