import request from '@/utils/request'

// 查询图纸列表
export function listDrawing(query) {
  return request({
    url: '/track/drawing/list',
    method: 'get',
    params: query
  })
}

// 查询图纸详细
export function getDrawing(id) {
  return request({
    url: '/track/drawing/' + id,
    method: 'get'
  })
}

// 新增图纸
export function addDrawing(data) {
  return request({
    url: '/track/drawing',
    method: 'post',
    data: data
  })
}

// 修改图纸
export function updateDrawing(data) {
  return request({
    url: '/track/drawing',
    method: 'put',
    data: data
  })
}

// 删除图纸
export function delDrawing(id) {
  return request({
    url: '/track/drawing/' + id,
    method: 'delete'
  })
}

// 导出图纸
export function exportDrawing(query) {
  return request({
    url: '/track/drawing/export',
    method: 'get',
    params: query
  })
}

// 查询图纸全部信息
export function drawInfoList(query) {
  return request({
    url: '/track/drawing/drawInfoList',
    method: 'get',
    params: query
  })
}
