import service from '@/utils/request'

// 查询所有节点
export const getAllNode = () => {
  return service({
    url: '/node/queryAllNode',
    method: 'GET'
  })
}
// 按审批人查询节点
export const getApproverNode = (params) => {
  return service({
    url: '/node/QueryNodeByApproverId',
    method: 'GET',
    params
  })
}

// 查询节点列表
export const getNodeList = (data) => {
  return service({
    url: '/node/queryNodeList',
    method: 'POST',
    data
  })
}
// 新增节点
export const postNode = (data) => {
  return service({
    url: '/node/createNode',
    method: 'POST',
    data
  })
}

// 修改节点
export const putNode = (data) => {
  return service({
    url: '/node/updateNode',
    method: 'PUT',
    data
  })
}

// 删除节点
export const delNode = (data) => {
  return service({
    url: '/node/deleteNode',
    method: 'DELETE',
    data
  })
}
