import request from '@/router/axios';

export const getLazytree = (wbsId,parentId,tenantId,projectId,params) => {
  return request({
    url: '/api/blade-manager/wbsPrivate/lazy-tree',
    method: 'get',
    params: {
      ...params,
      wbsId,
      parentId,
      tenantId,
      projectId,
    }
  })
}

export const getDetail = (id,wbsId,projectId) => {
  return request({
    url: '/api/blade-manager/wbsPrivate/detail',
    method: 'get',
    params: {
      id,
      wbsId,
      projectId
    }
  })
}

export const update = (row) => {
  return request({
    url: '/api/blade-manager/wbsPrivate/submit',
    method: 'post',
    data: row
  })
}

export const findNodeTableByCondition = (parentId,projectId,wbsId, params) => {
  return request({
    url: '/api/blade-manager/wbsPrivate/findNodeTableByCondition',
    method: 'get',
    params: {
      ...params,
      parentId,
      projectId,
      wbsId,
    }
  })
}

export const removeTableByCondition = (id,projectId,wbsId, params) => {
  return request({
    url: '/api/blade-manager/wbsPrivate/removeTableByCondition',
    method: 'get',
    params: {
      ...params,
      id,
      projectId,
      wbsId,
    }
  })
}

