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

import { request } from 'umi';


//获取科室列表
export async function getResponsibilityCenterList(params, options) {
    return request('/api/costAccount/responsibility/list', {
      method: 'GET',
      params:{...params},
      ...(options || {}),
    });
}

//编辑科室
export async function editResponsibilityCenterList(body, options) {
  return request('/api/costAccount/responsibility/edit', {
    method: 'POST',
    data:{...body},
    ...(options || {}),
  });
}

//新增科室
export async function addResponsibilityCenter(body, options) {
  return request('/api/costAccount/responsibility/save', {
    method: 'POST',
    data:{...body},
    ...(options || {}),
  });
}

//删除科室
export async function delResponsibilityCenter(params, options) {
  const {id} = params;
  return request(`/api/costAccount/responsibility/delete?id=${id}`, {
    method: 'POST',
    ...(options || {}),
  });
}

