xiezhiming 11 mēneši atpakaļ
vecāks
revīzija
2995624c4a
4 mainītis faili ar 192 papildinājumiem un 114 dzēšanām
  1. 11 0
      src/html/staticInfo.html
  2. 44 2
      src/js/cdss.js
  3. 125 111
      src/js/promise.js
  4. 12 1
      src/js/staticInfo.js

+ 11 - 0
src/html/staticInfo.html

@@ -68,6 +68,17 @@
       </div>
     </div>
   </div>
+  <div class=" container disCopy classicCase">
+    <div class="content">
+
+      <div class="infos"></div>
+      <div class="anchors">
+        <div class="a-circle"></div>
+        <ul></ul>
+        <div class="a-circle a-circle-2"></div>
+      </div>
+    </div>
+  </div>
   <div class=" container disCopy scale">
     <div class="content">
 

+ 44 - 2
src/js/cdss.js

@@ -25,10 +25,13 @@ require('./../images/t2.png')
 require('./../images/t3.png')
 require('./../images/go.png')
 require('./../images/g1.png')
+<<<<<<< HEAD
 require('./../images/xhg1.png')
 require('./../images/xhg2.png')
 require('./../images/xhg3.png')
 require('./../images/xhg4.png')
+=======
+>>>>>>> 27c9bd60 (修改)
 // require('./popupEdit.js');
 
 let infoImg = require('./../images/icon_info.png')
@@ -38,10 +41,14 @@ let iconArrowDown = require('./../images/icon_arrow_down.png')
 let iconMark = require('./../images/icon_mark.png')
 let warnImg = require('./../images/icon_warning.png')
 let warnImgWhite = require('./../images/icon_waring_white.png')
+<<<<<<< HEAD
 let xhg1img = require('./../images/xhg1.png')
 let xhg2img = require('./../images/xhg2.png')
 let xhg3img = require('./../images/xhg3.png')
 let xhg4img = require('./../images/xhg4.png')
+=======
+
+>>>>>>> 27c9bd60 (修改)
 
 const $ = require("jquery");
 const { post, config, getUrlArgObject, openNewWin, titleConfig } = require('./promise.js');
@@ -274,6 +281,7 @@ function renderPage(pageSet) {
     return;
   }
   if (hasAuxiliary) {
+    console.log(hasAuxiliary);
     $('.empty-box').hide();
     $(".loading").show();
     renderModuleWrapper(planDetail)
@@ -307,8 +315,14 @@ function renderPushData() {
       let pacsPush = result.pacs || []
       let symptomPush = result.symptom || []
       let checkupPush = result.vital || []
+<<<<<<< HEAD
       let medicinesPush = result.medicine || []
       console.log(medicinesPush);
+=======
+      let medicinesPush = result.medicines || []
+      //let casesPush = result.cases || [] //经典病历
+      let casesPush = ['111', '222', '333']
+>>>>>>> 27c9bd60 (修改)
       let operationsPush = result.operations || []
       let treatPush = result.treat && result.treat[0] || {}
       let nursePush = result.nurse || []
@@ -320,8 +334,13 @@ function renderPushData() {
       let checkupNum = $(".moduleItem.vital").attr("data-num") || 5
       let symptomNum = $(".moduleItem.symptom").attr("data-num") || 5
       let medicinesNum = $(".moduleItem.medicine").attr("data-num") || 5
+      let casesNum = $(".moduleItem.classiccase").attr("data-num") || 5
       let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
       let nurseNum = $(".moduleItem.nurse").attr("data-num") || 5
+<<<<<<< HEAD
+=======
+
+>>>>>>> 27c9bd60 (修改)
       renderLis(lisPush, lisNum)
       renderScale(scalePush, scaleNum)
       renderPacs(pacsPush, pacsNum)
@@ -329,6 +348,7 @@ function renderPushData() {
       renderSymptomPush(symptomPush, symptomNum)
       renderDiag(diagPush)
       renderMedicinesPush(medicinesPush, medicinesNum)
+      renderCasesPush(casesPush, casesNum)//经典病历
       renderOperationPush(operationsPush, operationsNum)
       rendergeneraTreatPush(generaTreatPush)
       renderNurse(nursePush, nurseNum)
@@ -347,7 +367,7 @@ function adjustHei() {
 //这段代码通过遍历给定的 list 数组,并根据预定义的 pushCode 数组以及项目的 status 属性,判断是否存在需要推送的项目。它返回一个布尔值,用于表示是否需要执行推送操作
 function isNeedPush(list) {
   let pass = false;
-  let pushCode = ['critical', "diag", "lis", "pacs", "symptom", "vital", "treat", "medicines", 'evaluation', 'general', 'medicine', 'operation', 'nurse']
+  let pushCode = ['critical', "diag", "lis", "pacs", "symptom", "vital", "treat", "medicines", 'evaluation', 'general', 'medicine', 'operation', 'nurse', 'classiccase']//修改
   for (let i = 0; i < list.length; i++) {
     if (pushCode.indexOf(list[i].code) > -1) {
       if (list[i].status == "1") {
@@ -355,6 +375,7 @@ function isNeedPush(list) {
       }
     }
   }
+  console.log(pass);
   return pass;
 }
 function isNeedwriteStandardPush(list) {
@@ -605,11 +626,17 @@ function rendergeneraTreatPush(list) {
 }
 function renderMedicinesPush(obj, showNum) {
   $(".moduleItem.medicine").append(titleStr('drugPush'))
+<<<<<<< HEAD
   let showNum1 = showNum || 5
   let keys = Object.keys(obj);
   let str1 ="";
   let cateNames = Array.from(keys);
   if (cateNames.length > 0 && $(".moduleItem.medicine").length > 0) {
+=======
+  console.log($(".moduleItem.medicine").length);
+
+  if (list.length > 0 && $(".moduleItem.medicine").length > 0) {
+>>>>>>> 27c9bd60 (修改)
     moduleNum++
     for(let i=0;i<cateNames.length;i++){
       let drugs = obj[cateNames[i]]
@@ -628,9 +655,22 @@ function renderMedicinesPush(obj, showNum) {
   }
 }
 
+<<<<<<< HEAD
+=======
+function renderCasesPush(list, showNum) {
+  $(".moduleItem.classiccase").append(titleStr('classicPush'))
+  console.log($(".moduleItem.classiccase").length);
+  if (list.length > 0 && $(".moduleItem.classiccase").length > 0) {
+    moduleNum++
+    let { shortStr, longStr } = renderItemWrapper(list, showNum)
+    $(".moduleItem.classiccase").append(shortStr).append(longStr)
+    $(".moduleItem.classiccase").css("display", "block")
+  }
+
+}
+>>>>>>> 27c9bd60 (修改)
 function renderOperationPush(list, showNum) {
   $(".moduleItem.operation").append(titleStr('operationPush'))
-
   if (list.length > 0 && $(".moduleItem.operation").length > 0) {
     moduleNum++
     let { shortStr, longStr } = renderItemWrapper(list, showNum)
@@ -650,6 +690,8 @@ function renderItemWrapper(list, showNum,name) {
     }
     longStr += renderPushItem(list[i],name,i,list.length)
   }
+  console.log(shortStr);
+
   if (showNum1 >= list.length) {
     return {
       shortStr: `<div class="shortBox">${shortStr}</div>`,

+ 125 - 111
src/js/promise.js

@@ -52,12 +52,13 @@ window.console = window.console || (function () {
 
 const config = {
   pushInner: '/sys/push/push',
-  indicationPush:'/sys/push/indicationPush',
-    indicationPushCache: '/sys/mr/getIndicationMr',
+  indicationPush: '/sys/push/indicationPush',
+  indicationPushCache: '/sys/mr/getIndicationMr',
   calculate: '/api/data/calc/calculate',
   disclaimer: '/sys/disclaimerInfo/getDisclaimerInfo',
   information: '/kl/conceptInfo/getStaticKnowledge',
-  getStaticKnowledgeForHIS:'/kl/conceptInfo/getStaticKnowledgeForHIS', //对接一对多
+  caseInformation: '/kl/conceptInfo/getClassicCaseInfo',//经典病历信息
+  getStaticKnowledgeForHIS: '/kl/conceptInfo/getStaticKnowledgeForHIS', //对接一对多
   informationMore: '/api/data/conceptDetail/getConceptDetails',
   pushScale: '/api/data/push/pushScale',
   getSysSetInfoDatas: '/sys/plan/getSysPlanInfoDatas',
@@ -67,20 +68,20 @@ const config = {
   getStaticKnowledge: '/kl/conceptInfo/staticKnowledgeIndex',//静态知识检索
   getStaticScale: '/api/data/search/getScale',
   dictionaryInfo: '/sys/dictionaryInfo/getList', //字典信息
-  getPushSet:'/sys/plan/getSysPlanInfoDatas', //获取推送配置
-  analyse:'/api/data/mrqc/analyse',
-  getHosptDeptUsal:'/api/data/concept/getHosptDeptUsal', //获取科室常用标签
-  caseWritingPrompt:'/sys/mrqc/caseWritingPrompt',//病历书写规范提示
-  followUp:'/sys/push/pushPlan', //随访计划
-  ruleTypeMap:{     //大数据推送参数featureType对应
-    '22':'1,2',
-    '11':'3',
-    '8':'4,5'
+  getPushSet: '/sys/plan/getSysPlanInfoDatas', //获取推送配置
+  analyse: '/api/data/mrqc/analyse',
+  getHosptDeptUsal: '/api/data/concept/getHosptDeptUsal', //获取科室常用标签
+  caseWritingPrompt: '/sys/mrqc/caseWritingPrompt',//病历书写规范提示
+  followUp: '/sys/push/pushPlan', //随访计划
+  ruleTypeMap: {     //大数据推送参数featureType对应
+    '22': '1,2',
+    '11': '3',
+    '8': '4,5'
   },
-  staticSearch:'/kl/conceptInfo/staticIndexPage', //检索静态知识
+  staticSearch: '/kl/conceptInfo/staticIndexPage', //检索静态知识
 }
-const isLocal = window.location.hostname.indexOf('localhost') !=-1;
-const imageUrlPrefix = isLocal ?'http://172.17.14.242:82':'http://223.93.170.82:12282';
+const isLocal = window.location.hostname.indexOf('localhost') != -1;
+const imageUrlPrefix = isLocal ? 'http://172.17.14.242:82' : 'http://223.93.170.82:12282';
 // const getUrlArgObject = function(parm) {  
 //   var query = decodeURI(window.location.search);
 //   var args = qs.parse(qs.parse(query.substr(1)));
@@ -102,24 +103,24 @@ const getUrlArgObject = function getQueryString(name) {
 }
 
 const get = function (url, data) {
-    return new Promise((resolve, reject) => {
-        $.ajax({
-            method: 'get',
-            url: url,
-            //data: data,
-            contentType: "application/json; charset=UTF-8",
-            beforeSend: function (xmlHttp) {
-                xmlHttp.setRequestHeader("If-Modified-Since", "0");
-                xmlHttp.setRequestHeader("Cache-Control", "no-cache");
-            },
-            success: function (res) {
-                resolve({data: res});
-            },
-            error: function (error) {
-                reject(error);
-            },
-        });
+  return new Promise((resolve, reject) => {
+    $.ajax({
+      method: 'get',
+      url: url,
+      //data: data,
+      contentType: "application/json; charset=UTF-8",
+      beforeSend: function (xmlHttp) {
+        xmlHttp.setRequestHeader("If-Modified-Since", "0");
+        xmlHttp.setRequestHeader("Cache-Control", "no-cache");
+      },
+      success: function (res) {
+        resolve({ data: res });
+      },
+      error: function (error) {
+        reject(error);
+      },
     });
+  });
 }
 const post = function (url, data) {
   return new Promise((resolve, reject) => {
@@ -133,9 +134,11 @@ const post = function (url, data) {
         xmlHttp.setRequestHeader("Cache-Control", "no-cache");
       },
       success: function (res) {
+        console.log('success');
         resolve({ data: res });
       },
       error: function (error) {
+        console.log(error.status);
         reject(error);
       },
     });
@@ -189,171 +192,182 @@ const throttle = function (fn, threshhold) {
     }
   }
 }
-const colorMap={
-  warnColor:'#FFE8DD', //智能警示等tab颜色
-  suggerColor:'#E3F0FF', //推荐提示tab颜色
-  treatColor:'#E3FEFE',  //治疗等tab颜色
+const colorMap = {
+  warnColor: '#FFE8DD', //智能警示等tab颜色
+  suggerColor: '#E3F0FF', //推荐提示tab颜色
+  treatColor: '#E3FEFE',  //治疗等tab颜色
 }
 const titleConfig = {
-  warning:{
+  warning: {
     background: colorMap.warnColor,
     icon: iconWarning1,
-    name:"智能警示"
+    name: "智能警示"
   },
-  symptomPush:{
+  symptomPush: {
     background: colorMap.suggerColor,
     icon: iconSymptomPush,
-    name:"推荐症状"
+    name: "推荐症状"
   },
-  diagPush:{
+  diagPush: {
     background: colorMap.suggerColor,
     icon: iconDiagPush2,
-    name:"智能诊断"
+    name: "智能诊断"
   },
-  checkupPush:{
+  checkupPush: {
     background: colorMap.suggerColor,
     icon: iconCheckupPush,
-    name:"推荐体格检查"
+    name: "推荐体格检查"
   },
-  scalePush:{
+  scalePush: {
     background: colorMap.suggerColor,
     icon: iconScalePush,
-    name:"推荐量表"
+    name: "推荐量表"
   },
-  lisPush:{
+  lisPush: {
     background: colorMap.suggerColor,
     icon: iconLisPush,
-    name:"推荐检验"
+    name: "推荐检验"
   },
-  pacsPush:{
+  pacsPush: {
     background: colorMap.suggerColor,
     icon: iconPacsPush,
-    name:"推荐检查"
+    name: "推荐检查"
   },
-  drugPush:{
+  drugPush: {
     background: colorMap.treatColor,
     icon: iconDrugPush,
-    name:"推荐用药"
+    name: "推荐用药"
+  },
+  classicPush: {
+    background: colorMap.treatColor,
+    icon: iconOperationPush,
+    name: "经典病历"
   },
   nursePush: {
     background: colorMap.treatColor,
     icon: iconNursePush,
     name: "推荐护理"
   },
-  operationPush:{
+  operationPush: {
     background: colorMap.treatColor,
     icon: iconOperationPush,
-    name:"推荐手术及操作"
+    name: "推荐手术及操作"
   },
-  generaTreatPush:{
+  generaTreatPush: {
     background: colorMap.treatColor,
     icon: iconTreat,
-    name:"一般治疗"
+    name: "一般治疗"
   },
-  casewritingPush:{
+  casewritingPush: {
     background: colorMap.warnColor,
     icon: iconCaseWrite,
-    name:"病历书写规范提示"
+    name: "病历书写规范提示"
   }
 }
 const titleConfigH = {
-  warning:{
+  warning: {
     background: "#FFE8DD",
     icon: iconWarning1,
-    name:"智能警示",
-    location:"left"
+    name: "智能警示",
+    location: "left"
   },
-  symptomPush:{
+  symptomPush: {
     background: "#EEF5FD",
     icon: iconSymptomPush,
-    name:"推荐症状",
-    location:"left"
+    name: "推荐症状",
+    location: "left"
   },
-  diagPush:{
+  diagPush: {
     background: "#FAECED",
     icon: intelligentDiagnosis,
-    name:"智能诊断",
-    location:"left"
+    name: "智能诊断",
+    location: "left"
   },
-  checkupPush:{
+  checkupPush: {
     background: "#EEF5FD",
     icon: iconCheckupPush,
-    name:"体格检查",
-    location:"left"
+    name: "体格检查",
+    location: "left"
   },
-  scalePush:{
+  scalePush: {
     background: "#EEF5FD",
     icon: iconScalePush,
-    name:"推荐量表",
-    location:"left"
+    name: "推荐量表",
+    location: "left"
   },
-  lisPush:{
+  lisPush: {
     background: "#ECF4FC",
     icon: iconLisPush,
-    name:"推荐检验",
-    location:"left"
+    name: "推荐检验",
+    location: "left"
   },
-  pacsPush:{
+  pacsPush: {
     background: "#ECF4FC",
     icon: iconPacsPush,
-    name:"推荐检查",
-    location:"left"
+    name: "推荐检查",
+    location: "left"
   },
-  generaTreatPush:{
+  generaTreatPush: {
     background: "#E3FEFE",
     icon: iconTreat,
-    name:"一般治疗",
-    location:"right"
+    name: "一般治疗",
+    location: "right"
   },
-  drugPush:{
+  drugPush: {
     background: "#E3FEFE",
     icon: iconDrugPush,
-    name:"推荐用药",
-    location:"right"
+    name: "推荐用药",
+    location: "right"
+  },
+  classicPush: {
+    background: "#E3FEFE",
+    icon: iconOperationPush,
+    name: "经典病历",
+    location: "right"
   },
-  operationPush:{
+  operationPush: {
     background: "#E3FEFE",
     icon: iconOperationPush,
-    name:"手术/操作",
-    location:"right"
+    name: "手术/操作",
+    location: "right"
   },
-    nursePush: {
-        background: "#E3FEFE",
-        icon: iconNursePush,
-        name: "推荐护理",
-        location: "right"
-    },
-  vigilancePush:{
+  nursePush: {
+    background: "#E3FEFE",
+    icon: iconNursePush,
+    name: "推荐护理",
+    location: "right"
+  },
+  vigilancePush: {
     background: "#FFE8DD",
     icon: iconWarning,
-    name:"警惕",
-    location:"left"
+    name: "警惕",
+    location: "left"
   },
-  treat:{
+  treat: {
     background: "#FFE8DD",
     icon: therapeuticSchedule,
-    name:"治疗方案"
+    name: "治疗方案"
   },
-  casewritingPush:{
+  casewritingPush: {
     background: "#FFE8DD",
     icon: writingNorms,
-    name:"病历书写规范提示",
-    location:"left"
+    name: "病历书写规范提示",
+    location: "left"
   }
 }
-const Toast = function (msg, duration,type) {
+const Toast = function (msg, duration, type) {
   duration = isNaN(duration) ? 3000 : duration;
   var m = document.createElement('div');
-  if(type == 'warn'){
-    m.innerHTML = '<div style="margin:auto"><img class="warn" style="margin-right:14px;float:left" src="./../images/icon-warning.png" /><span>'+msg+'</span></div>'
+  if (type == 'warn') {
+    m.innerHTML = '<div style="margin:auto"><img class="warn" style="margin-right:14px;float:left" src="./../images/icon-warning.png" /><span>' + msg + '</span></div>'
     m.style.cssText = "margin:auto;width:250px;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: absolute;top: 0;left: 0;right:0;bottom:0;z-index: 999999;background: #333;font-size: 16px;";
-  }else if(type == 'success'){
-    m.innerHTML = '<div style="margin:auto;width:120px"><img class="warn" style="width:32px;margin-right:14px;float:left" src="./../images/icon-success.png" /><span>' + msg +'</span></div>'
+  } else if (type == 'success') {
+    m.innerHTML = '<div style="margin:auto;width:120px"><img class="warn" style="width:32px;margin-right:14px;float:left" src="./../images/icon-success.png" /><span>' + msg + '</span></div>'
     m.style.cssText = "margin:auto;width:120px;vertical-align:middle;padding:25px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 8px;position: absolute;top: 0;left: 0;right:0;bottom:0;z-index: 999999;background: #333;font-size: 16px;";
   }
-  
-  
-  $('.warn').css('margin-top','10px')
+
+
+  $('.warn').css('margin-top', '10px')
   document.body.appendChild(m);
   setTimeout(function () {
     var d = 0.5;
@@ -364,7 +378,7 @@ const Toast = function (msg, duration,type) {
 }
 module.exports = {
   config,
-    get,
+  get,
   post,
   getUrlArgObject,
   imageUrlPrefix,

+ 12 - 1
src/js/staticInfo.js

@@ -24,7 +24,7 @@ let printing2 = require('./../images/printing2.png');
 let recommend = require('./../images/recommend.png');
 let hel = require('./../images/icon-hel.png');
 
-let showName, noticeName, clinicalPathwayName, clinicalGuidelineName, isclick, top = 0
+let showName, noticeName, clinicalPathwayName, clinicalGuidelineName, classicCaseName, isclick, top = 0
 function myBrowser() {
   var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
   var isOpera = userAgent.indexOf("Opera") > -1;
@@ -42,8 +42,12 @@ function getInfomation() {
     "mrId": getUrlArgObject('mrId')
   };
   showName = param.name
+  console.log(showName);
   $(".tabBox .title").html(showName);
 
+  baseType = param.type
+  console.log(baseType);
+
   post(config.information, param).then((res) => {
     const data = res.data.data
     // const data = dataaaa.data
@@ -64,12 +68,14 @@ function getInfomation() {
     var noticeInfo = detailList['注意事项']
     var clinicalPathwayInfo = detailList['临床路径']
     var clinicalGuidelineInfo = detailList['诊疗指南']
+    var classicCaseInfo = detailList['经典病历']
 
     var scaleInfo = data.scale ? data.scale.scaleDetails : ''
     var name = data.name
     noticeName = data.noticeName || "注意事项"
     clinicalPathwayName = data.clinicalPathwayName || "临床路径"
     clinicalGuidelineName = data.clinicalGuidelineName || "诊疗指南"
+    classicCaseName = data.classicCaseName || "经典病历"
 
     renderTab(detailList, scale)
 
@@ -77,6 +83,7 @@ function getInfomation() {
     noticeInfo && renderContent(noticeInfo, 'notice')
     clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
     clinicalGuidelineInfo && renderContent(clinicalGuidelineInfo, 'clinicalGuideline')
+    classicCaseInfo && renderContent(classicCaseInfo, 'classicCase')
 
     scaleInfo && renderContentscale(scaleInfo, 'scale', name)
     $('.content img').bind('contextmenu', function () {
@@ -88,6 +95,7 @@ function getInfomation() {
 getInfomation();
 
 
+
 function renderContent(list, contentWrapClassName) {
   for (var i = 0; i < list.length; i++) {
     var item = list[i];
@@ -517,6 +525,9 @@ function renderTab(detailList, scale) {
     $(".tabList").append(`<span class="tab" data-module="clinicalGuideline" data-title="` + clinicalGuidelineName + `">诊疗指南</span>`)
     //$(".tabBox .title").html(noticeName);
   }
+  if (detailList['经典病历']) {
+    $(".tabList").append(`<span class="tab" data-module="classicCase" data-title="` + classicCaseName + `">经典病历</span>`)
+  }
   if (!!scale && getUrlArgObject('type') == 8) {
     $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
     //$(".tabBox .title").html(noticeName);