/*
 * @Author: code4eat awesomedema@gmail.com
 * @Date: 2023-03-03 16:31:27
 * @LastEditors: code4eat awesomedema@gmail.com
 * @LastEditTime: 2024-12-16 17:03:48
 * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/service.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */



import { request } from 'umi';

//获取table列表数据

export const getTableDataReq = (params?:any) => {
  return request<any>('/medical/qualification/getQualificationList', {
    method: 'GET',
    params:{...params}
  });
};

//获取资质列表数据
export const getDrawerTableDataReq = (params?:any) => {
  return request<any>('/medical/qualificationApply/getQualificationList', {
    method: 'GET',
    params:{...params}
  });
};

//获取医嘱项目列表数据

export const getHisItemDicListReq = (params?:any) => {
  return request<any>('/medical/qualification/getHisItemDicList', {
    method: 'GET',
    params:{...params}
  });
};

//获取已关联医嘱项目列表数据

export const getHasConnectedHisItemDicListReq = ({...params}:{[key:string]:any,qualificationId:number}) => {
  return request<any>('/medical/qualification/getQualificationHisItemMap', {
    method: 'GET',
    params:{...params}
  });
};


//新增报表
export type AddTableDataType = {

}

export const addData = (data:AddTableDataType) => {
  return request('/medical/qualification/addQualification', {
    method: 'POST',
    data
  });
};






//编辑表格数据

export type EditTableDataType = {
 
}

export const editData = (data:EditTableDataType) => {
  return request('/medical/qualification/editQualification', {
    method: 'POST',
    data
  });
};

//保存关联数据

export type saveConnectTableDataType = {
  qualificationId:number,
  qualificationHisItemMap:any[]
}

export const saveConnectTableDataReq = (data:saveConnectTableDataType) => {
  return request('/medical/qualification/saveQualificationHisItemMap', {
    method: 'POST',
    data
  });
};


//删除表格操作
export const delData = (id:string) => {
  return request('/medical/qualification/deleteQualification', {
    method: 'POST',
    params:{id}
  });
};













