import request from '@/utils/request'

// 定时排风列表接口
export function exhaustList(query) {
  return request({
    url: '/laboratory/timed/exhaust/list',
    method: 'get',
    params: query
  })
}

// 定时排风任务开关
export function operateExhaust(data) {
  return request({
    url: '/laboratory/timed/exhaust/operateExhaust',
    method: 'put',
    data: data
  })
}

// 新增排风任务
export function exhaust(data) {
  return request({
    url: '/laboratory/timed/exhaust',
    method: 'post',
    data: data
  })
}

// 编辑排风任务
export function putExhaust(data) {
  return request({
    url: '/laboratory/timed/exhaust',
    method: 'put',
    data: data
  })
}

//获取任务详情
export function getExhaustInfo(id) {
  return request({
    url: 'laboratory/timed/exhaust/'+id,
    method: 'get',
  })
}

//删除排风任务
export function delExhaust(id) {
  return request({
    url: '/laboratory/timed/exhaust/' + id,
    method: 'delete'
  })
}

//获取节假日数据接口
export function getHoliday(query) {
  return request({
    url: 'laboratory/timed/exhaust/getHoliday',
    method: 'get',
    params: query
  })
}

//左侧关联实验室相关实验室查询
export function getLabExhaustNoJoinSub(query) {
  return request({
    url: 'laboratory/timed/exhaust/getLabExhaustNoJoinSub',
    method: 'get',
    params: query
  })
}

//右侧关联实验室相关实验室查询
export function getLabExhaustJoinSub(query) {
  return request({
    url: 'laboratory/timed/exhaust/getLabExhaustJoinSub',
    method: 'get',
    params: query
  })
}

//关联实验室提交

export function joinsub(data) {
  return request({
    url: '/laboratory/timed/joinsub',
    method: 'post',
    data: data
  })
}
