import request from '@/utils/request'

// 查询科室列表
export function listDepartment(query) {
  return request({
    url: '/his/department/list',
    method: 'get',
    params: query
  })
}

// 查询科室详细
export function getDepartment(deptId) {
  return request({
    url: '/his/department/' + deptId,
    method: 'get'
  })
}

// 新增科室
export function addDepartment(data) {
  return request({
    url: '/his/department',
    method: 'post',
    data: data
  })
}

// 修改科室
export function updateDepartment(data) {
  return request({
    url: '/his/department',
    method: 'put',
    data: data
  })
}

// 删除科室
export function delDepartment(deptId) {
  return request({
    url: '/his/department/' + deptId,
    method: 'delete'
  })
}

// 导出科室
export function exportDepartment(query) {
  return request({
    url: '/his/department/export',
    method: 'get',
    params: query
  })
}