import request from '@/utils/request'

// 查询科室病区列表
export function listDept(query) {
  return request({
    url: '/medical/dept/list',
    method: 'get',
    params: query
  })
}

// 查询科室病区详细
export function getDept(id) {
  return request({
    url: '/medical/dept/' + id,
    method: 'get'
  })
}

// 新增科室病区
export function addDept(data) {
  return request({
    url: '/medical/dept',
    method: 'post',
    data: data
  })
}

// 修改科室病区
export function updateDept(data) {
  return request({
    url: '/medical/dept',
    method: 'put',
    data: data
  })
}

// 删除科室病区
export function delDept(id) {
  return request({
    url: '/medical/dept/' + id,
    method: 'delete'
  })
}

// 导出科室病区
export function exportDept(query) {
  return request({
    url: '/medical/dept/export',
    method: 'get',
    params: query
  })
}