1
YM
2024-07-24 c95e73d658521fc89e0d992072660e126c1ab3a2
src/api/index.js
@@ -1,222 +1,413 @@
import req from '@/utils/request/req1.js'
import req1 from '@/utils/request/req1.js'
import qs from 'querystring'
import req from "@/utils/request/req1.js";
import qs from "querystring";
import req1, { baseUrl } from "@/utils/request/req1";
// 注册登录
export const getaddLogin = (Obj) => {
   return req1({
      url: '/account/register',
      method: 'post',
      data: Obj
   })
}
  return req1({
    url: "/account/register",
    method: "post",
    data: Obj,
  });
};
// 验证码   /account/verifyCode
export const getverifyCode = (req) => {
   console.log(req, qs.encode(req), 'rrr');
   return req1({
      url: "/account/verifyCode",
      method: "post",
      data: req,
      headers: {
         'Content-Type': 'multipart/form-data'
      }
   })
}
  return req1({
    url: "/account/verifyCode",
    method: "post",
    data: req,
    headers: {
      "Content-Type": "multipart/form-data",
    },
  });
};
// login 登录
export const getLogin = (req) => {
   console.log(req, qs.encode(req), 'rrr');
   return req1({
      url: "/account/verification",
      method: "post",
      data: req,
   })
}
  return req1({
    url: "/account/verification",
    method: "post",
    data: req,
  });
};
// 获取用户信息
export const getUserInfo = () => {
   return req1({
      url: "/account/getUserInfo",
      method: "post",
   })
}
  return req1({
    url: "/account/getUserInfo",
    method: "post",
  });
};
// 重置密码
export const getRestPassword = (Obj) => {
   return req1({
      url: '/account/resetPassword',
      method: 'post',
      data: Obj
   })
}
  return req1({
    url: "/account/resetPassword",
    method: "post",
    data: Obj,
  });
};
// 退出登录
export const getlogout = () => {
   return req1({
      url: "/account/logout",
      method: "post",
   })
}
  return req1({
    url: "/account/logout",
    method: "post",
  });
};
// 修改密码
export const getchangePassword = (obj) => {
   return req1({
      url: "/account/changePassword",
      method: "post",
      data: obj
   })
}
  return req1({
    url: "/account/changePassword",
    method: "post",
    data: obj,
  });
};
//
//
// 人物相关接口的数据输出
export const getdataOutput = () => {
   return req1({
      url: "/person/dataOutput",
      method: "post",
   })
}
  return req1({
    url: "/person/dataOutput",
    method: "post",
  });
};
// 人物相关的 热门搜索
export const getHotSearch = () => {
   return req1({
      url: '/person/hotSearch',
      method: 'post'
   })
}
  return req1({
    url: "/person/hotSearch",
    method: "post",
  });
};
// 人物相关的 来源
export const getSource = (id) => {
   return req1({
      url: '/person/source',
      method: 'post',
      data: id
   })
}
// 人物相关的 个人时空地图
export const getSpaceTime = (id) => {
   return req1({
      url: '/person/spaceTime',
      method: 'post',
      data: id
   })
}
export const getSource = (data) => {
  return req1({
    url: "/person/source",
    method: "post",
    params: data,
  });
};
// 人物相关的 个人时空地图
export const getSpaceTime = (data) => {
  return req1({
    url: "/person/spaceTime",
    method: "post",
    params: data,
  });
};
// 医学人物知识库的相关图表
export const getImages = (id) => {
   return req1({
      url: '/person/images',
      method: 'post',
      data: id
   })
}
export const getPersonImages = (data) => {
  return req1({
    url: "/person/images",
    method: "post",
    params: data,
  });
};
// 医学人物知识库 个人事迹
export const getPersonBiog = (data) => {
  return req1({
    url: "/person/biog",
    method: "post",
    params: data,
  });
};
// 医学人物知识库 人物关系
export const getPersonRelationAtSchool = (data) => {
  return req1({
    url: "/person/personRelationAtSchool",
    method: "post",
    params: data,
  });
};
// 医学人物知识库 人物关系
export const getNodeCount = (data) => {
  return req1({
    url: "/inheritMedical/nodeCount",
    method: "post",
    data: data,
  });
};
// 医学人物知识库 著述
export const getWritings = (id) => {
   return req1({
      url: '/person/writings',
      method: 'post',
      data: id
   })
}
export const getPersonWritings = (data) => {
  return req1({
    url: "/person/writings",
    method: "post",
    params: data,
  });
};
// 医学人物知识库 人物详情
export const getPersonInfo = (Obj) => {
   return req1({
      url: '/person/getPersonInfo',
      method: 'post',
      data: Obj
   })
}
// 医学人物知识库 基础检索
export const getFuzzySearch = (Obj) => {
   console.log(Obj, 'sss');
   return req1({
      url: '/person/fuzzySearch?keyword=' + Obj,
      method: 'post',
      // data:Obj
   })
}
  return req1({
    url: "/person/getPersonInfo",
    method: "post",
    params: Obj,
  });
};
export const getWebBasic = (Obj) => {
  return req1({
    url: "/person/webBasic",
    method: "post",
    params: Obj,
  });
};
// 医学人物知识库 高级检索
// 医学人物知识库 基础检索
export const getFuzzySearch = (requestData) => {
  return req1({
    url: "/person/fuzzySearch",
    method: "post",
    params: {
      keyword: requestData?.keyword,
      personId: requestData?.personId,
    },
  });
};
// 医学人物知识库 高级检索
export const getAdvanceSearch = (Obj) => {
   return req1({
      url: '/person/advanceSearch',
      method: 'post',
      data: Obj
   })
}
  return req1({
    url: "/person/advanceSearch",
    method: "post",
    data: Obj,
  });
};
// 中国地域地谱检索人物
export const getRetrieval = (dynastyNumber, name) => {
   return req1({
      url: '/person/retrieval',
      method: 'post',
      data: {
         dynasty: dynastyNumber,
         keyword: name
      }
   })
}
export const getRetrieval = (requestData) => {
  return req1({
    url:
      "/person/retrieval?page=" +
      requestData?.page +
      "&pageSize=" +
      requestData?.pageSize +
      "&keyword=" +
      requestData?.keyword +
      "&dynasty=" +
      requestData?.dynasty,
    method: "post",
  });
};
// 中国地域地谱检索人物
export const getPreCount = (requestData) => {
  return req1({
    url:
      "/person/retrieval/preCount?keyword=" +
      requestData?.keyword +
      "&dynasty=" +
      requestData?.dynasty,
    method: "post",
  });
};
// 医学人物知识库
// 世医传承
export const inheritMedicalList = (requestData) => {
  return req1({
    url: "/inheritMedical/list",
    method: "post",
    data: requestData,
  });
};
export const inheritMedicalSataStatistics = (requestData) => {
  return req1({
    url: "/inheritMedical/dataStatistics",
    method: "post",
    data: requestData,
  });
};
export const inheritMedicalCultureList = (requestData) => {
  return req1({
    url: "/inheritMedical/cultureList",
    method: "post",
    data: requestData,
  });
};
export const inheritMedicalRelationList = (requestData) => {
  return req1({
    url: "/inheritMedical/relationList",
    method: "post",
    data: requestData,
  });
};
// 检索页
// 基础、高级检索 ------------------------------
export const getPList = (person) => {
   return req1({
      url: '/person/list',
      method: 'post',
      data: person
   })
}
export const getPersonList = (data) => {
  return req1({
    url: "/person/list",
    method: "post",
    data: data,
  });
};
// 检索数据到出
export const getPDownload = () => {
   return req1({
      url: '/person/download',
      method: 'post'
   })
}
  return req1({
    url: "/person/download",
    method: "post",
  });
};
// -------------------------P
// 时期
export const getDynastyAll = () => {
  return req1({
    url: "/dynasty/list",
    method: "post",
  });
};
export const getDynasty = () => {
  return req1({
    url: "/dynasty/listAll",
    method: "post",
  });
};
export const getDynastyData = () => {
  return req1({
    url: "/person/retrieval/dynasty",
    method: "post",
  });
};
// 学术流派
export const getDynastyStatistics = () => {
  return req1({
    url: "/school/dynasty/statistics",
    method: "get",
  });
};
export const getIntroduction = (id) => {
  return req1({
    url: "/school/introduction?id=" + id,
    method: "post",
  });
};
export const schoolAtlas = (id) => {
  return req1({
    url: "/person/schoolAtlas?schoolId=" + id,
    method: "post",
  });
};
// 查询人物6类数据
export const getPersonData = (id) => {
  return req1({
    url: "/person/chain/search/person?personId=" + id + "&maxStep=3",
    method: "post",
  });
};
// 查询人物学术流派
export const getSchoolInfo = (id) => {
  return req1({
    url: "/person/chain/search/school?schoolId=" + id + "&maxStep=3",
    method: "post",
  });
};
export const searchSchoolPerson = (data) => {
  return req1({
    url: "/person/searchSchoolPerson",
    method: "post",
    params: data,
  });
};
// 医事制度
// 数据统计
export const getDataStatistics = () => {
   return req1({
      url: '/medical/dataStatistics',
      method: 'post'
   })
}
  return req1({
    url: "/medical/dataStatistics",
    method: "post",
  });
};
// 查询
export const getMedicalList = (data) => {
   return req1({
      url: '/medical/list',
      method: 'post',
      data: data
   })
}
  return req1({
    url: "/medical/list",
    method: "post",
    data: data,
  });
};
// 详情
export const getMedicalDetails = (Obj) => {
   return req1({
      url: '/medical/details',
      method: 'post',
      data: Obj
   })
}
export const getMedicalDetails = (data) => {
  return req1({
    url: "/medical/details",
    method: "post",
    data: data,
  });
};
// 取值:RDF、NT、XML、JSON
export const getMedicalDataOutput = (Obj) => {
   return req1({
      url: '/medical/dataOutput',
      method: 'post',
      data: Obj
   })
}
  return req1({
    url: "/medical/dataOutput",
    method: "post",
    data: Obj,
  });
};
export const getPersonDataOutput = (Obj) => {
  return req1({
    url: "/person/dataOutput",
    method: "post",
    params: Obj,
  });
};
// -----------
// 中国医学人物知识库
// 中国历代医学人物知识库
// 数据统计
export const getPDataStatistics = () => {
   return req1({
      url: '/person/dataStatistics',
      method: 'post'
   })
}
// ----------------
  return req1({
    url: "/person/dataStatistics",
    method: "post",
  });
};
// ----------------
export const getImg = (path) => {
  return baseUrl + "/picture/getImageByFilePath?filePath=" + path;
};
export const getRelationTypeTreeList = () => {
  return req1({
    url: "/personRelationType/getRelationTypeTreeList",
    method: "post",
  });
};
export const getInstitutionList = () => {
  return req1({
    url: "/medical/institutionList",
    method: "post",
  });
};
export const academicSearch = (data) => {
  return req1({
    url: "/person/academic/search",
    method: "post",
    params: data,
  });
};
export const getPersonTag = () => {
  return req1({
    url: "/personTag/list",
    method: "post",
  });
};
export const getSocialDistinction = () => {
  return req1({
    url: "/socialDistinction/list",
    method: "post",
  });
};