import request from '@/utils/request'

// 创建科室信息
export function createKsInfo(data) {
  return request({
    url: '/system/ks-info/create',
    method: 'post',
    data: data
  })
}

// 更新科室信息
export function updateKsInfo(data) {
  return request({
    url: '/system/ks-info/update',
    method: 'put',
    data: data
  })
}

// 删除科室信息
export function deleteKsInfo(id) {
  return request({
    url: '/system/ks-info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得科室信息
export function getKsInfo(id) {
  return request({
    url: '/system/ks-info/get?id=' + id,
    method: 'get'
  })
}

// 获得科室信息分页
export function getKsInfoPage(query) {
  return request({
    url: '/system/ks-info/page',
    method: 'get',
    params: query
  })
}

export function getKsInfoDz(query) {
  return request({
    url: '/system/ks-info/dzinfo',
    method: 'get',
    params: query
  })
}

// 导出科室信息 Excel
export function exportKsInfoExcel(query) {
  return request({
    url: '/system/ks-info/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
