/***
 * 请求的接口的方法
 */
//请求的axios
// import axios from "axios";
import request from "@/utils/request";

export function getYinhuanList(data) {
  return request({
    url: "/app/trouble/new/listData",
    method: "get",
    params: data,
  });
}

export function getYinhuanType(data) {
  return request({
    url: "/app/trouble/new/type",
    method: "post",
    data: data,
  });
}

// export function getYinhuanDetail(id) {
//   return request({
//     url: "/app/trouble/new/toDoForm?id=" + id,
//     method: "get",
//   });
// }
export function getYinhuanDetail(id) {
  return request({
    url: "app/trouble/new/v/" + id,
    method: "get",
  });
}

export function getYinhuanNew(data) {
  return request({
    url: "app/trouble/new/getForm",
    method: "post",
    data: data,
  });
}

export function getFlowInfo(id) {
  return request({
    url: "/app/flow/progress?id=" + id,
    method: "get",
  });
}

export function saveYinhuan(data) {
  return request({
    url: "/app/trouble/new/toDoSubmit",
    method: "post",
    data: data,
  });
}

export function delYinhuan(data) {
  return request({
    url: "/app/trouble/new/d",
    method: "post",
    data: data,
  });
}
export function getReturnNodeId(data) {
  return request({
    url: "/app/trouble/new/backlist",
    method: "get",
    params: data,
  });
}
