/*
 * @Author: your name
 * @Date: 2021-07-26 08:54:08
 * @LastEditTime: 2021-09-28 09:51:26
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: /TracerMethodology_PC/src/pages/DepartmentMana/service.js
 */

import { request } from 'umi';


// 获取所有医院列表
export async function getDistrictList(params, options) {
    return request('/api/pfm/hosptail/list', {
      method: 'GET',
      params:{...params},
      ...(options || {}),
    });
}

// 获取主医院列表
export async function getMainDistrictList(params, options) {
  return request('/api/pfm/hosptail/getAll', {
    method: 'GET',
    params:{...params},
    ...(options || {}),
  });
}

// 编辑医院
export async function editDistrictList(body, options) {
  return request('/api/pfm/hosptail/update', {
    method: 'POST',
    data:{...body},
    ...(options || {}),
  });
}

// 新增医院
export async function addDistrict(body, options) {
  return request('/api/pfm/hosptail/save', {
    method: 'POST',
    data:{...body},
    ...(options || {}),
  });
}

// 删除医院
export async function delDistrict(params, options) {
  const {id} = params;
  const ids = [id];
  return request(`/api/pfm/hosptail/delete`, {
    method: 'POST',
    data:ids,
    ...(options || {}),
  });
}

