/*
 * @Author: guanxiaoyan guanxiaoyan@pb-station.com
 * @Deion:
 * @Date: 2023-12-06 18:22:03
 * @LastEditors: guanxiaoyan guanxiaoyan@pb-station.com
 * @LastEditTime: 2023-12-25 10:45:56
 * @FilePath: /followUp-admin/src/api/admin/dictManage/dept.js
 */
import request from "@/utils/request";

const BASE_URL = "/internal/hospDept";
// 科室管理-分页列表
export function deptPageList(query) {
  return request({
    url: `${BASE_URL}/list`,
    method: "get",
    params: query,
  });
}

// 科室管理-科室子科室
export function deptChildren(id) {
  return request({
    url: `${BASE_URL}/children/${id}`,
    method: "get",
  });
}

// 科室管理-新增科室
export function addDept(data) {
  return request({
    url: `${BASE_URL}/save`,
    method: "post",
    data,
  });
}

// 科室管理-新增科室
export function updateDept(data) {
  return request({
    url: `${BASE_URL}/save`,
    method: "patch",
    data,
  });
}

// 科室管理- 删除科室
export function deleteDept(id) {
  return request({
    url: `${BASE_URL}/del/${id}`,
    method: "post",
  });
}

// 科室管理-所有一级科室
export function getAllFirstDept(query) {
  return request({
    url: `${BASE_URL}/all`,
    method: "get",
    params: query,
  });
}
