/**
 * 边代设备接入申请页面 API
 */
import request from '@/utils/request'

/** 边代设备列表查询 */
export const queryEdgeDeviceListApi = (data) => {
  return request.get('/base/tbBdRecord/list', {
    params: data
  })
}

/** 左侧菜单查询 */
export const queryLefSelApi = (data) => {
  return request.get('/base/tbProDepart/getDataList', {
    params: data
  })
}

/** 项目部名称查询 */
export const queryProjDeptNameApi = (data) => {
  return request.get('/base/tbProDepart/getList', {
    params: data
  })
}

/** 项目部类型查询 */
export const queryProjDeptTypeApi = (data) => {
  return request.get('/base/tbProDepart/getDataList', {
    params: data
  })
}

/** 各省份查询 */
export const queryProvincesApi = (data) => {
  return request.get('/base/tbProDepart/getAreaList', {
    params: data
  })
}

/** 新增边代设备 */
export const addEdgeDeviceApi = (data) => {
  return request.post('/base/tbBdRecord', data)
}

/** 修改边代设备 */
export const editEdgeDeviceApi = (data) => {
  return request.put('/base/tbBdRecord', data)
}

/** 根据id查询边代设备 */
export const queryEdgeDeviceByIdApi = (id) => {
  return request.get(`/base/tbBdRecord/getInner/${id}`)
}

/** 删除边代设备 */
export const deleteEdgeDeviceApi = (id) => {
  return request.delete(`/base/tbBdRecord/${id}`)
}

/** 同意审核 */
export const approveEdgeDeviceApi = (data) => {
  return request.post('/base/tbBdRecord/approve', data)
}