/*
 * @Author: your name
 * @Date: 2021-07-26 08:54:08
 * @LastEditTime: 2021-07-29 23:13:28
 * @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/costAccount/hosptail/list', {
      method: 'GET',
      params:{...params},
      ...(options || {}),
    });
}

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

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

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

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

