import request from '@/router/axios';
//获取树模板列表
export const queryBusinessUserOpinionList = (params) => {
    return request({
        url: '/api/blade-meter/tree/template/list',
        method: 'get',
        params
    })
}
export const getListPage = (current, size, params) => {
    return request({
      url: '/api/blade-meter/tree/template/page',
      method: 'post',
      data: {
        ...params,
        current,
        size
      }
    })
  }
  export const update = (row) => {
    return request({
      url: '/api/blade-meter/tree/template/submit',
      method: 'post',
      data: row
    })
  }

export const remove = (ids) => {
    return request({
      url: '/api/blade-meter/tree/template/remove',
      method: 'get',
      params: {
        ids,
      }
    })
}
//系统树节点懒加载
export const getLazyTree = (params) => {
    return request({
        url: '/api/blade-meter/tree/system/lazy',
        method: 'get',
        params
    })
}
//新增节点
export const add = (row) => {
  return request({
      url: '/api/blade-meter/tree/system/save',
      method: 'post',
      data: row
  })
}
//修改节点
export const updateNode = (row) => {
  return request({
      url: '/api/blade-meter/tree/system/update',
      method: 'post',
      data: row
  })
}
//删除节点
export const removeNode = (id) => {
  return request({
    url: '/api/blade-meter/tree/system/remove',
    method: 'get',
    params: {
      id,
    }
  })
}
export const getDetail = (id) => {
  return request({
      url: '/api/blade-meter/tree/system/detail',
      method: 'get',
      params: {
          id
      }
  })
}
//系统树节点下级节点列表
export const getChildList = (params) => {
  return request({
      url: '/api/blade-meter/tree/system/child-list',
      method: 'get',
      params
  })
}
//系统树节点同级列表
export const getSameList = (params) => {
  return request({
      url: '/api/blade-meter/tree/system/same-list',
      method: 'get',
      params
  })
}
//系统树节点同级排序/
export const sortNode = (row) => {
  return request({
      url: '/api/blade-meter/tree/system/sort',
      method: 'post',
      params: row
  })
}
//系统树节点新增获取工程类型名称
export const getEngineeringTypeName = (params) => {
  return request({
      url: '/api/blade-meter/tree/system/getEngineeringTypeName',
      method: 'get',
      params
  })
}
//系统、项目、合同段获取节点类型列表接口
export const getNodeTypeList = (params) => {
  return request({
      url: '/api/blade-meter/tree/getNodeTypeList',
      method: 'get',
      params
  })
}