import request from '@/utils/request'

// 创建溯源模板-环节
export function createTraceLink(data) {
  return request({
    url: '/configure/trace-link/create',
    method: 'post',
    data: data
  })
}

// 更新溯源模板-环节
export function updateTraceLink(data) {
  return request({
    url: '/configure/trace-link/update',
    method: 'put',
    data: data
  })
}

// 删除溯源模板-环节
export function deleteTraceLink(id) {
  return request({
    url: '/configure/trace-link/delete?id=' + id,
    method: 'delete'
  })
}

// 获得溯源模板-环节
export function getTraceLink(id) {
  return request({
    url: '/configure/trace-link/get?id=' + id,
    method: 'get'
  })
}

// 获得溯源模板-环节分页
export function getTraceLinkPage(query) {
  return request({
    url: '/configure/trace-link/page',
    method: 'get',
    params: query
  })
}

// 导出溯源模板-环节 Excel
export function exportTraceLinkExcel(query) {
  return request({
    url: '/configure/trace-link/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
