import axios from 'axios';
import config from '@api/config.js';
const urls = config.urls;
function request(config) {
  const instance = axios.create({
    baseURL: "http://192.168.2.121:7010",
    timeout: 500000,
    headers: {
      'Content-Type': "application/json;charset=utf-8"
    }
  })
  return instance(config)
}

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);
  },
};
