Selaa lähdekoodia

推荐用药药品分类

xtf 11 kuukautta sitten
vanhempi
commit
aac8e00928
8 muutettua tiedostoa jossa 38 lisäystä ja 11 poistoa
  1. 1 0
      icssDService
  2. 2 1
      package.json
  3. 0 1
      src/css/reset.css
  4. 11 0
      src/html/staticInfo.html
  5. BIN
      src/images/xhg5.png
  6. 4 4
      src/js/cdss.js
  7. 19 4
      src/js/staticInfo.js
  8. 1 1
      webpack.config.js

+ 1 - 0
icssDService

@@ -0,0 +1 @@
+Subproject commit e990b8ec0795f931c415e6a668d66ddedcdd94c3

+ 2 - 1
package.json

@@ -18,6 +18,7 @@
     "css-loader": "^2.1.1",
     "express": "^4.16.4",
     "file-loader": "^3.0.1",
+    "html-webpack-inline-svg-plugin": "^2.3.0",
     "html-webpack-plugin": "^3.2.0",
     "less": "^3.9.0",
     "less-loader": "^5.0.0",
@@ -37,7 +38,7 @@
   },
   "repository": {
     "type": "git",
-    "url": "http://192.168.2.236:10080/zhouna/icssDService.git"
+    "url": "http://173.18.12.192:10080/zhouna/icssDService.git"
   },
   "author": "zn",
   "license": "ISC"

+ 0 - 1
src/css/reset.css

@@ -30,7 +30,6 @@ input {
   font-size: 14px;
   font-style: normal;
 }
-
 html,
 body {
   font-family: 'Microsoft YaHei', arial, tahoma, sans-serif;

+ 11 - 0
src/html/staticInfo.html

@@ -57,6 +57,17 @@
       </div>
     </div>
   </div>
+  <div class=" container disCopy clinicalGuideline">
+    <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">
 

BIN
src/images/xhg5.png


+ 4 - 4
src/js/cdss.js

@@ -43,7 +43,6 @@ let xhg2img = require('./../images/xhg2.png')
 let xhg3img = require('./../images/xhg3.png')
 let xhg4img = require('./../images/xhg4.png')
 
-
 const $ = require("jquery");
 const { post, config, getUrlArgObject, openNewWin, titleConfig } = require('./promise.js');
 const { renderFollowUp, followEmpty } = require('./followUp.js');
@@ -345,6 +344,7 @@ function adjustHei() {
   $(".contentWrapper").css("height", iframeHei - 20 - 30 - 60 + 3 + 19 + 'px')
   $(".tabList").css("height", iframeHei + 'px')
 }
+//这段代码通过遍历给定的 list 数组,并根据预定义的 pushCode 数组以及项目的 status 属性,判断是否存在需要推送的项目。它返回一个布尔值,用于表示是否需要执行推送操作
 function isNeedPush(list) {
   let pass = false;
   let pushCode = ['critical', "diag", "lis", "pacs", "symptom", "vital", "treat", "medicines", 'evaluation', 'general', 'medicine', 'operation', 'nurse']
@@ -516,7 +516,7 @@ function renderDiagItem(list, name, number) {
   $('.moduleItem.diag').css("display", "block")
  
 }
-function renderWarningDiag(list, name, number) {
+function renderWarningDiag(list, name,number) {
   if (list.length > 0 && $(".moduleItem.warning").length > 0) {
     moduleNum++
     $('.moduleItem.warning').append()
@@ -624,6 +624,7 @@ function renderMedicinesPush(obj, showNum) {
     }
     $(".moduleItem.medicine").append(str1);
     $(".moduleItem.medicine").css("display", "block")
+    console.log(shortStr);
   }
 }
 
@@ -685,9 +686,8 @@ function renderPushItem(item,name,index,totalItems) {
   str = `<span class="pushItemBox" data-name="${item.name}" data-type="${item.type}">`
   str += `<span class="pushItemName ${item.hasScale == "1" ? 'evaluationtitle' : ''} ${item.hasInfo == "1" ? '' : 'noInfo'}">${item.type == 8 ? ('【' + item.name + '】') : item.name} ${signalStr}${infoIcon}<i class="hidden-i"></i></span>`
   str += `</span>`;
-  return str
+  return str;
 }
-
 function bindOpenInfo() {
   $(".infoImg").on("mouseenter", function () {
     $(this).attr("src", infoImgOn)

+ 19 - 4
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, isclick,top = 0
+let showName, noticeName, clinicalPathwayName, clinicalGuidelineName, isclick, top = 0
 function myBrowser() {
   var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
   var isOpera = userAgent.indexOf("Opera") > -1;
@@ -38,7 +38,7 @@ function getInfomation() {
     "type": getUrlArgObject('type'),
     "name": getUrlArgObject('name'),
     "position": getUrlArgObject('position'),
-    "contentTypes": [1, 2, 3],
+    "contentTypes": [1, 2, 3, 4, 5],
     "mrId": getUrlArgObject('mrId')
   };
   showName = param.name
@@ -56,18 +56,28 @@ function getInfomation() {
       return;
     }
     var detailList = data.details
+    console.log(data.details);
+
     var scale = data.scale
+
     var staticKnowList = detailList['静态知识']
     var noticeInfo = detailList['注意事项']
     var clinicalPathwayInfo = detailList['临床路径']
+    var clinicalGuidelineInfo = detailList['诊疗指南']
+
     var scaleInfo = data.scale ? data.scale.scaleDetails : ''
     var name = data.name
     noticeName = data.noticeName || "注意事项"
     clinicalPathwayName = data.clinicalPathwayName || "临床路径"
+    clinicalGuidelineName = data.clinicalGuidelineName || "诊疗指南"
+
     renderTab(detailList, scale)
+
     staticKnowList && renderContent(staticKnowList, 'staticKnowledge')
     noticeInfo && renderContent(noticeInfo, 'notice')
     clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
+    clinicalGuidelineInfo && renderContent(clinicalGuidelineInfo, 'clinicalGuideline')
+
     scaleInfo && renderContentscale(scaleInfo, 'scale', name)
     $('.content img').bind('contextmenu', function () {
       return false
@@ -79,7 +89,6 @@ getInfomation();
 
 
 function renderContent(list, contentWrapClassName) {
-
   for (var i = 0; i < list.length; i++) {
     var item = list[i];
     item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
@@ -392,7 +401,7 @@ function getResult(pushInfo, textType, constant) {
       }
     }
     if (v) {
-      $(`.scale .infos`).scrollTop(v.top + top-160)
+      $(`.scale .infos`).scrollTop(v.top + top - 160)
     }
     if (!$(".contentList").find(".item-title").hasClass('chColor') && !$(".contentList").find(".item-titles").hasClass('chColor')) {
       $('input[type="radio"]:checked').each(function () {
@@ -492,6 +501,7 @@ function addLinkClickEvent(contentWrapClassName) {
 }
 
 function renderTab(detailList, scale) {
+
   if (detailList['静态知识']) {
     $(".tabList").append(`<span class="tab" data-module="staticKnowledge" data-title="` + showName + `">静态知识</span>`)
   }
@@ -503,6 +513,10 @@ function renderTab(detailList, scale) {
     $(".tabList").append(`<span class="tab" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
     //$(".tabBox .title").html(noticeName);
   }
+  if (detailList['诊疗指南']) {
+    $(".tabList").append(`<span class="tab" data-module="clinicalGuideline" data-title="` + clinicalGuidelineName + `">诊疗指南</span>`)
+    //$(".tabBox .title").html(noticeName);
+  }
   if (!!scale && getUrlArgObject('type') == 8) {
     $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
     //$(".tabBox .title").html(noticeName);
@@ -515,6 +529,7 @@ function renderTab(detailList, scale) {
     $(".tabList .tab").eq(0).addClass("activeTab")
     defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
   }
+
   $(`.${defaultModuleName}`).css("display", "block")
   bindTabClick()
 }

+ 1 - 1
webpack.config.js

@@ -4,7 +4,7 @@ const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const webpack = require('webpack');
-const proxyHost = "http://172.16.8.64:6060";
+const proxyHost = "http://173.18.12.192:6060";
 module.exports = {
   entry: {
     //index: path.resolve(__dirname, 'src/js', 'index.js'),