// 读写器或扫码枪相关接口
import axios from 'axios'
import request from './index'
const readerType: { [key: string]: string } = {
  readerWriter: 'http://127.0.0.1:8083/business/readWriter/gunAndTId/readList', // 有线扫码枪和大读写器
  // readerWriter: '/proxy/business/readWriter/tId/readList', // 读写器
}
// 获取大读写器读写内容
export function getReadList(type: string) {
  return axios.get(readerType[type])
}

// 获取读写器识别的样品列表(1：设备收发场景，2：委托单场景，3：我的检测场景，4：部门检测场景)
export function getReaderSampleList(data: Object) {
  return request({
    url: '/business/readWriter/sample/label/readList',
    method: 'post',
    data,
  })
}

// 标签绑定（设备收发）
export function tagBinding(data: Object) {
  return request({
    url: '/device/dispatch/label/bind',
    method: 'post',
    data,
  })
}

// 测量设备标签绑定
export function tagBindingEquipment(data: object) {
  return request({
    url: '/meter/assets/label/bind',
    method: 'post',
    data,
  })
}

// 测量设备标签识别设备列表
export function getReaderEquipmentList(data: Object) {
  return request({
    url: '/business/readWriter/equipment/label/readList',
    method: 'post',
    data,
  })
}
