import axios from 'axios';
import config from '@api/config.js';
const urls = config.urls;

export default {
  addTreeRelation(param) {
    return axios.post(urls.addTreeRelation, param);
  },
  getTreeSearchList(param) {
    return axios.post(urls.searchTreeItem, param);
  },
  getlistTree(param) {
    return axios.post(urls.getTree, param);
  },
  getBaseConceptInfoPage(param) {
    return axios.post(urls.getBaseConceptInfoPage, param);
  },
  disableConcept(param) {
    return axios.post(urls.disableConcept, param);
  },
  startConcept(param) {
    return axios.post(urls.startConcept, param);
  },
  baseTypeGetPage(param) {
    return axios.post(urls.baseTypeGetPage, param);
  },
  clearStandRuleDrug(param) {
    return axios.post(urls.clearStandRuleDrug, param);
  },
  saveBaseConceptInfo(param) {
    return axios.post(urls.saveBaseConceptInfo, param);
  },
  getBaseConceptAll(param) {
    return axios.post(urls.getBaseConceptAll, param);
  },
  baseRelationTypeGetPage(param) {
    return axios.post(urls.baseRelationTypeGetPage, param);
  },
  getDiseasePage(param) {
    return axios.post(urls.getDiseasePage, param);
  },
  staticBaseKnowledge(param) {
    return axios.post(urls.staticBaseKnowledge, param);
  },
  getListBack(param) {//字典信息
    return axios.post(urls.getListBack, param);
  },
  changeBaseStatus(param) {//字典信息
    return axios.post(urls.changeBaseStatus, param);
  },
  getBaseRecordById(param) {//获取静态知识详情
    return axios.post(urls.getBaseRecordById, param);
  },
  saveBaseOrUpdateRecord(param) {//保存静态知识
    return axios.post(urls.saveBaseOrUpdateRecord, param);
  },
  staticKnowledgeBaseInfo(param) {//搜索静态知识
    return axios.post(urls.staticKnowledgeBaseInfo, param);
  },
  diseaseDelete(param) {//删除诊断依据
    return axios.post(urls.diseaseDelete, param);
  },
  getBaseDetail(param) {//获取疾病详情
    return axios.post(urls.getBaseDetail, param);
  },
  searchConcept(param) {//查询疾病
    return axios.post(urls.searchConcept, param);
  },
  diseaseBaseSave(param) {//保存疾病
    return axios.post(urls.diseaseBaseSave, param);
  },
  clearConceptInfo(param) {//删除同义词
    return axios.post(urls.clearConceptInfo, param);
  },
  allRuleTest(param) {
    return axios.post(urls.allRuleTest, param);
  },
  autoExportExcel(param) {
      return axios({
          method:'post',
          url:urls.exportRuleExcel,
          data: param,
          contentType: "application/vnd.ms-excel" ,
          responseType: 'blob'//必须添加，否则会乱码
      })
  },
  autoGetCaseResultList(param) {
    return axios.post(urls.autoGetCaseResultList, param);
  },
  getDroplistData(param) {
    return axios.post(urls.getDroplistData, param);
  },
  getResultRulePage(param) {
    return axios.post(urls.getResultRulePage, param);
  },
  ruleExportExcel(param) {     
    return axios({
      method:'post',
      url:urls.ruleExportExcel,
      data: param,
      contentType: "application/vnd.ms-excel" ,
      responseType: 'blob'//必须添加，否则会乱码
  })
  },
  autoRuleTest(param) {
    return axios.post(urls.autoRuleTest, param);
  },
  getRecordHopitalList(param) {
    return axios.post(urls.getHospitalInfoCDSS, param);
  },
  getRunningStatusByHospitalId(param) {
    return axios.post(urls.getRunningStatusByHospitalId, param);
  },
  updateRunningStatus(param) {
    return axios.post(urls.updateRunningStatus, param);
  },
  getTypesList(param) {
    return axios.post(urls.zskTypeList, param);
  },
  zskgetDict(param) {
    return axios.post(urls.zskgetDict, param);
  },
  clearDrug(param) {//清除药品缓存
    return axios.post(urls.clearDrug, param);
  },
  findDisName(param) {
    return axios.post(urls.findDisName, param);
  },
};
