import request from "@/utils/request";
import { number } from "echarts";
export function getReplace(data: object) {
  return request({
    url: `/api/v1/processReplace/page`,
    method: "post",
    data,
  });
}

export function getOperations(workOrderCode: string) {
  return request({
    url: `/api/v1/plan/task/station/${workOrderCode}`,
    method: "get",
  });
}

export function getSeqList(workOrderCode: string, operationId: number) {
  return request({
    url: `/api/v1/processReplace/station/${workOrderCode}/${operationId}`,
    method: "get",
  });
}

export function addReplace(data: object) {
  return request({
    url: `/api/v1/processReplace/add`,
    method: "post",
    data,
  });
}

export function delReplace(data: object) {
  return request({
    url: `/api/v1/processReplace/del`,
    method: "post",
    data,
  });
}

export function getReplaceDetailById(id: string) {
  return request({
    url: `/api/v1/processReplace/get/${id}`,
    method: "get",
  });
}
