import { request } from '@/api/_service'

const BASE = 'data_middleground/basic_traceability/positive_direction_traceability/'

function apiParams (method, data = {}) {
  return {
    method,
    platform: 'background',
    ...data
  }
}

export function getForwardTraceabilityList (data) {
  return request({
    url: BASE + 'list',
    method: 'get',
    params: apiParams('data_middleground_basic_traceability_positive_direction_traceability_list', data)
  })
}

export function createForwardTraceabilityExportTask (data) {
  return request({
    url: BASE + 'export_task',
    method: 'post',
    data: apiParams('data_middleground_basic_traceability_positive_direction_traceability_export_task', data)
  })
}
