import request from '@/utils/request'

// 查询设备总列表
export function listMain(query) {
  return request({
    url: '/sems/main/list',
    method: 'get',
    params: query
  })
}

// 查询设备总详细
export function getMain(id) {
  return request({
    url: '/sems/main/' + id,
    method: 'get'
  })
}

// 新增设备总
export function addMain(data) {
  return request({
    url: '/sems/main',
    method: 'post',
    data: data
  })
}

export function syncAllDev() {
  return request({
    url: '/sems/main/syncAllDev',
    method: 'post'
  })
}

// 修改设备总
export function updateMain(data) {
  return request({
    url: '/sems/main',
    method: 'put',
    data: data
  })
}

// 删除设备总
export function delMain(id) {
  return request({
    url: '/sems/main/' + id,
    method: 'delete'
  })
}

// 导出设备总
export function exportMain(query) {
  return request({
    url: '/sems/main/export',
    method: 'get',
    params: query
  })
}
