import request from '@/utils/request'

// 查询设备定时任务列表
export function listTiming(query) {
  return request({
    url: '/control/timing/list',
    method: 'get',
    params: query
  })
}

// 查询设备定时任务详细
export function getTiming(timingId) {
  return request({
    url: '/control/timing/' + timingId,
    method: 'get'
  })
}

// 新增设备定时任务
export function addTiming(data) {
  return request({
    url: '/control/timing',
    method: 'post',
    data: data
  })
}

// 修改设备定时任务
export function updateTiming(data) {
  return request({
    url: '/control/timing',
    method: 'put',
    data: data
  })
}

// 删除设备定时任务
export function delTiming(timingId) {
  return request({
    url: '/control/timing/' + timingId,
    method: 'delete'
  })
}

// 导出设备定时任务
export function exportTiming(query) {
  return request({
    url: '/control/timing/export',
    method: 'get',
    params: query
  })
}