import request from '@/utils/request'
// const baseURL = process.env.VUE_APP_BASE_API
const baseURL = ''

// 获取数据集列表-分页
export function getTableData(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/list`,
    method: 'post',
    data
  })
}

// 新建设备实例
export function addDeviceInstance(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/add`,
    method: 'post',
    data
  })
}

// 编辑设备实例
export function updateDeviceInstance(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/edit`,
    method: 'post',
    data
  })
}

// 编辑设备实例
export function deleteDeviceInstance(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/delete`,
    method: 'post',
    data
  })
}

// 获取设备实例详情
export function getDeviceInstanceDetail(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/detail`,
    method: 'post',
    data
  })
}

// 获取属性信息
export function getPropertyDetail(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/data/getDataByModel`,
    method: 'post',
    data
  })
}

// 获取设备接入信息
export function getAccessInfo(data) {
  return request({
    url: `${baseURL}/iot/deviceModel/instance/accessInfo/get`,
    method: 'post',
    data
  })
}
