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

const BASE = 'planning_production/produce/traceability/'

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

export function getBatteryCurveRecords (data) {
  return request({
    url: BASE + 'batterytraceability',
    method: 'get',
    params: apiParams('planning_production_produce_traceability_batterytraceability', data)
  })
}

export function getBatteryCurveData (data) {
  return request({
    url: BASE + 'curveread',
    method: 'get',
    params: apiParams('planning_production_produce_traceability_batterycurveread', data)
  })
}

export function exportBatteryCurveData (data) {
  return request({
    url: BASE + 'export',
    method: 'get',
    params: apiParams('planning_production_produce_traceability_export', data)
  })
}
