import request from '@/utils/request'

// 查询任务提醒规则列表
export function listRule(query) {
  return request({
    url: '/yiqing/rule/list',
    method: 'get',
    params: query
  })
}

// 查询任务提醒规则详细
export function getRule(ruleId) {
  return request({
    url: '/yiqing/rule/' + ruleId,
    method: 'get'
  })
}

// 新增任务提醒规则
export function addRule(data) {
  return request({
    url: '/yiqing/rule',
    method: 'post',
    data: data
  })
}

// 修改任务提醒规则
export function updateRule(data) {
  return request({
    url: '/yiqing/rule',
    method: 'put',
    data: data
  })
}

// 删除任务提醒规则
export function delRule(ruleId) {
  return request({
    url: '/yiqing/rule/' + ruleId,
    method: 'delete'
  })
}

// 导出任务提醒规则
export function exportRule(query) {
  return request({
    url: '/yiqing/rule/export',
    method: 'get',
    params: query
  })
}