import request from '@/utils/request'

// 查询规章制度列表
export function listRules(query) {
  return request({
    url: '/sch/rules/list',
    method: 'get',
    params: query
  })
}

// 查询规章制度详细
export function getRules(ruleId) {
  return request({
    url: '/sch/rules/' + ruleId,
    method: 'get'
  })
}

// 新增规章制度
export function addRules(data) {
  return request({
    url: '/sch/rules',
    method: 'post',
    data: data
  })
}

// 修改规章制度
export function updateRules(data) {
  return request({
    url: '/sch/rules',
    method: 'put',
    data: data
  })
}

// 删除规章制度
export function delRules(ruleId) {
  return request({
    url: '/sch/rules/' + ruleId,
    method: 'delete'
  })
}
