import request from '@/utils/request'
// 设备列表（分页）
export function getList(data) {
  return request({
    url: '/api/v1/hh/culture/device/page',
    method: 'post',
    data
  })
}

// 设备配置-添加-编辑
export function add(data) {
  return request({
    url: '/api/v1/hh/culture/device/add',
    method: 'post',
    data
  })
}

// 设备删除
export function deleteById(deviceId) {
  return request({
    url: `/api/v1/hh/culture/device/del/${deviceId}`,
    method: 'post'
  })
}

// 设备授权
export function autoById(deviceId) {
  return request({
    url: `/api/v1/hh/culture/device/enable`,
    method: 'get',
    params: { deviceId }
  })
}

// 设备取消授权
export function autoCancelById(deviceId) {
  return request({
    url: `/api/v1/hh/culture/device/disable`,
    method: 'get',
    params: { deviceId }
  })
}
// 设备模版-新增-编辑
export function templateEdit(data) {
  return request({
    url: '/api/v1/hh/culture/device/template/edit',
    method: 'post',
    data
  })
}
// 设备模版列表
export function templateList(data) {
  return request({
    url: '/api/v1/hh/culture/device/template/list',
    method: 'get',
    params: {}
  })
}
// 设备模版列表(分页)
export function templatePage(data) {
  return request({
    url: '/api/v1/hh/culture/device/template/page',
    method: 'post',
    data
  })
}
// 设备模版-删除
export function templateDel(deviceTemplateId) {
  return request({
    url: `/api/v1/hh/culture/device/template/${deviceTemplateId}`,
    method: 'get'
  })
}
// 模版-模版详情
export function templateDetail(deviceTemplateId) {
  return request({
    url: '/api/v1/hh/culture/device/template/detail',
    method: 'get',
    params: { deviceTemplateId }
  })
}

// 获取身份证阅读器
export function getIdCardReaderBrand() {
  return request({
    url: '/api/v1/tenant/sn/getIdCardReaderBrand',
    method: 'get',
    params: {}
  })
}

// 获取二维码读头品牌
export function getQrCodeReaderBrandEnum() {
  return request({
    url: '/api/v1/tenant/sn/getQrCodeReaderBrandEnum',
    method: 'get',
    params: {}
  })
}

// 获取手动输入内容项
export function getManualInParamsEnum() {
  return request({
    url: '/api/v1/hh/culture/device/getManualInParamsEnum',
    method: 'get',
    params: {}
  })
}

// 获取设备编号(sn)列表
export function getDeviceSNList() {
  return request({
    url: '/api/v1/hh/culture/device/sn/list',
    method: 'get',
    params: {}
  })
}
