123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- const api = {
- getGraph: '/kg/getGraph',
- getNode: '/kg/getNode',
- getSchema: '/api/ltkg/kg/getSchema',
- getTree: '/kg/getTree',
- entity_predict: 'api/ltkg/nlp/getNlp',
- getMrInfo: '/api/ltkg/presetInfo/getMrInfo',
- getAnswer: '/api/ltkg/qa/charBot',
- getTerm: '/api/ltkg/term/getTerm',
- check: 'http://192.168.2.121:7010/test/testStandConvert',
- findEntity: "/entity/findEntity", //实体详情查询(根据id查询实体)
- deleteEntity: "/entity/deleteEntity", //批量删除实体
- mergeEntity: "/entity/mergeEntity",//实体合并
- createEntity: "/entity/createEntity",//批量新增实体
- updateEntityName: "/entity/updateEntityName",
- createRelationship: "/relationship/createRelationship",
- findRelationshipType: "/relationship/findRelationshipType", //根据名称模糊查询关系
- updateRelationshipType: "/relationship/updateRelationshipType",
- createEntityProperty: "/property/createEntityProperty", //批量新增实体属性
- deleteRelationship: "/relationship/deleteRelationship",//批量删除关系
- findEntityListByName: "/entity/findEntityListByName", //实体列表查询(根据标签和名字模糊查询实体)
- updateEntityProperty: "/property/updateEntityProperty", //更新实体属性
- deleteEntityProperty: "/property/deleteEntityProperty", //删除实体属性
- getCountList: "/kg/count/getCountList",
- getCountInfo: "/kg/count/getCountInfo"
- };
- $(".goto-homeStatic").on("click", function () {
- window.location.href = "http://192.168.2.121:5666" + $(this).attr("link");
- });
- const getUrlArgObject = function (name) {//
- var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
- var reg_rewrite = new RegExp("(^|/)" + name + "/([^/]*)(/|$)", "i");
- var r = window.location.search.slice(1).match(reg);
- var q = window.location.pathname.slice(1).match(reg_rewrite);
- if (r != null) {
- return decodeURIComponent(r[2]);
- } else if (q != null) {
- return decodeURIComponent(q[2]);
- } else {
- return null;
- }
- }
- //判断隐藏logo
- const ifHideLogo = function () {
- const hideLg = getUrlArgObject("hideLg");
- if (hideLg) {
- $(".ltLogo").hide();
- }
- }
- const post = function (url, data, pId) {
- const securityCode = getUrlArgObject("code");
- const appKeyId = getUrlArgObject("appI");
- const appKeySecret = getUrlArgObject("appS");
- const productId = getUrlArgObject("productId");
- return new Promise((resolve, reject) => {
- $.ajax({
- method: 'post',
- url: '/api' + url,
- data: JSON.stringify(data),
- contentType: "application/json; charset=UTF-8",
- beforeSend: function (xmlHttp) {
- xmlHttp.setRequestHeader("If-Modified-Since", "0");
- xmlHttp.setRequestHeader("Cache-Control", "no-cache");
- xmlHttp.setRequestHeader("appKeyId", appKeyId);
- xmlHttp.setRequestHeader("appKeySecret", appKeySecret);
- xmlHttp.setRequestHeader("securityCode", securityCode);
- xmlHttp.setRequestHeader("productId", productId);
- },
- success: function (res) {
- resolve({ data: res });
- },
- error: function (error) {
- reject(error);
- },
- });
- });
- }
- const typeLis = {
- "临床表现": "symptom",
- "疾病名称": "disease",
- "手术名称": "operation",
- "药物名称": "drug",
- "药物过敏原": "drug",
- "实验室检查套餐": "lis",
- "实验室检查": "lis",
- "辅助检查": "pacs",
- "体征": "vital",
- }
- const typeLisName = {
- "临床表现": "症状",
- "疾病名称": "疾病",
- //"手术名称": "手术和操作",
- "药物名称": "药品",
- "药物过敏原": "药品",
- "实验室检查套餐": "实验室检查",
- "实验室检查": "实验室检查",
- "辅助检查": "辅助检查",
- "体征": "辅助检查",
- }
- module.exports = {
- post,
- api,
- typeLisName,
- typeLis,
- getUrlArgObject,
- ifHideLogo
- }
|