import request from '@/utils/request'

export function saveOrUpdateCase(data) {
  return request({
    url: '/business/case/saveOrUpdate',
    method: 'post',
    data: data
  })
}


export function getTableListCase(data) {
  return request({
    url: '/business/case/getTableList',
    method: 'get',
    params: data
  })
}

export function getRelatedCaseAll(data) {
  return request({
    url: '/business/case/getRelatedCaseAll',
    method: 'get',
    params: data
  })
}

export function getInfoCase(data) {
  return request({
    url: '/business/case/getInfoById/' + data,
    method: 'get',
  })
}


export function changeStatusCase(data) {
  return request({
    url: '/business/case/changeStatus',
    method: 'post',
    data: data
  })
}

export function getRelationByIdCase(data) {
  return request({
    url: '/business/case/initRelation',
    method: 'get',
    params: data
  })
}

export function batchChangeRelation(data) {
  return request({
    url: '/business/case/batchChangeRelation',
    method: 'post',
    data
  })
}

export function deleteCase(data) {
  return request({
    url: '/business/case/delete',
    method: 'delete',
    params: data
  })
}


export function getInfoByTpElevatorModelId(id,data) {
  return request({
    url: '/business/case/getInfoByTpElevatorModelId/' + id,
    method: 'get',
    params: data
  })
}
