import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/blade-manager/trial/summary/page',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const getDetail = (id) => {
  return request({
    url: '/api/blade-manager/trial/summary/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const remove = (id) => {
  return request({
    url: '/api/blade-manager/trial/summary/remove',
    method: 'get',
    params: {
      id,
    }
  })
}

export const add = (row) => {
  return request({
    url: '/api/blade-manager/trial/summary/submit',
    method: 'post',
    data: row
  })
}

export const update = (row) => {
  return request({
    url: '/api/blade-manager/trial/summary/submit',
    method: 'post',
    data: row
  })
}

export const getMetadataDetail = (current, size, params) => {
  return request({
    url: '/api/blade-business/metadata/classification/detail',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}

export const metadataSubmit = (row) => {
  return request({
    url: '/api/blade-business/metadata/classification/submit',
    method: 'post',
    data: row
  })
}

export const metadataUpdate = (row) => {
  return request({
    url: '/api/blade-business/metadata/classification/submit',
    method: 'post',
    data: row
  })
}

export const metadataRemove = (id) => {
  return request({
    url: '/api/blade-business/metadata/remove',
    method: 'post',
    params: {
      ids:id,
    }
  })
}

export const getAllocationDetail = (current, size, params) => {
  return request({
    url: '/api/blade-business/metadata/allocation/detail',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}
//设置分类
export const allocation = (row) => {
  return request({
    url: '/api/blade-business/metadata/allocation',
    method: 'post',
    params: row
  })
}
//取消捕获
export const cancelAllocation = (row) => {
  return request({
    url: '/api/blade-business/metadata/cancelAllocation',
    method: 'post',
    params: row
  })
}