import request from '@/utils/request'

// 创建科室类别
export function createKsType(data) {
  return request({
    url: '/system/ks-type/create',
    method: 'post',
    data: data
  })
}

// 更新科室类别
export function updateKsType(data) {
  return request({
    url: '/system/ks-type/update',
    method: 'put',
    data: data
  })
}

// 删除科室类别
export function deleteKsType(id) {
  return request({
    url: '/system/ks-type/delete?id=' + id,
    method: 'delete'
  })
}

// 获得科室类别
export function getKsType(id) {
  return request({
    url: '/system/ks-type/get?id=' + id,
    method: 'get'
  })
}

// 获得科室类别分页
export function getKsTypePage(query) {
  return request({
    url: '/system/ks-type/page',
    method: 'get',
    params: query
  })
}

// 导出科室类别 Excel
export function exportKsTypeExcel(query) {
  return request({
    url: '/system/ks-type/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
