import request from '@/utils/request'
// 分发管理列表及查询
export function getList(data) {
  return request({
    url: '/servicesysDistribution/distribution/list',
    method: 'post',
    data
  })
}
// 分发管理查看详情
export function getDetail(id) {
  return request({
    url: '/servicesysDistribution/distribution/' + id,
    method: 'get'
  })
}

// 目标系统
export function getTargetName(data) {
  return request({
    url: '/servicesysManager/manager/list',
    method: 'post',
    data
  })
}
// 模型选择
export function getModelTree(query) {
  return request({
    url: '/servicesysDistribution/distribution/getTree',
    method: 'get',
    params: query
  })
}
// 属性列表
export function getModellist(data) {
  return request({
    url: '/project/attrManaInfo/listByModelId',
    method: 'post',
    data
  })
}

// 新增
export function addFile(data) {
  return request({
    url: '/servicesysDistribution/distribution',
    method: 'post',
    data: data
  })
}
// 修改
export function updateFile(data) {
  return request({
    url: '/servicesysDistribution/distribution',
    method: 'put',
    data: data
  })
}
// 删除
export function delFile(id) {
  return request({
    url: '/servicesysDistribution/distribution/' + id,
    method: 'delete'
  })
}

// 批量更改状态
export function updateStatus(query) {
  return request({
    url: '/servicesysDistribution/distribution/updateStatus',
    method: 'put',
    params: query
  })
}
