import request from '@/utils/request'

// 创建码头信息
export function createDock(data) {
  return request({
    url: '/ecw/dock/create',
    method: 'post',
    data: data
  })
}

// 更新码头信息
export function updateDock(data) {
  return request({
    url: '/ecw/dock/update',
    method: 'put',
    data: data
  })
}

// 删除码头信息
export function deleteDock(id) {
  return request({
    url: '/ecw/dock/delete?id=' + id,
    method: 'delete'
  })
}

// 获得码头信息
export function getDock(id) {
  return request({
    url: '/ecw/dock/get?id=' + id,
    method: 'get'
  })
}

// 获得码头信息分页
export function getDockPage(query) {
  return request({
    url: '/ecw/dock/page',
    method: 'get',
    params: query
  })
}

// 导出码头信息 Excel
export function exportDockExcel(query) {
  return request({
    url: '/ecw/dock/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
