Просмотр исходного кода

Merge branch 'dynamicScale0609' into testNew

wyq 4 лет назад
Родитель
Сommit
979214bd64

+ 4 - 0
src/css/cdss.less

@@ -573,4 +573,8 @@ body{
       text-decoration: none;
     }
   }
+}
+.evaluationtitle:hover{
+    text-decoration: underline;
+    color: #0000FF;
 }

+ 4 - 0
src/css/cdssHorizontal.less

@@ -614,4 +614,8 @@
     margin-top: 8px;
     margin-right: 10px;
     text-align: center;
+}
+.evaluationtitle:hover{
+    text-decoration: underline;
+    color: #0000FF;
 }

+ 173 - 14
src/css/staticInfo.less

@@ -49,7 +49,7 @@
     background: #fff;
     padding-right: 6px;
     padding-left: 15px;
-    font-weight: bold;
+    font-weight: 600;
     border-left: 4px solid @staticMainColor;
     /*line-height: 30px;*/
   }
@@ -106,7 +106,7 @@
     position: relative;
     line-height: 24px;
     
-    margin: 0 0 4px;
+    margin: 18px 0 4px;
   }
 
   .line {
@@ -246,31 +246,31 @@
   .tabBox{
     position: relative;
     background: #fff;
-    height: 58px;
     padding: 0 38px;
     margin: 60px 20px 0;
+    border-bottom: 1px solid #E6E6E6;
+    overflow: hidden;
   }
 .tabBox .title{
+  display: block;
   font-size: 20px;
-  color: #333;
-  font-weight: bold;
-  line-height: 58px;
-  margin-right: 23px;
+  font-weight: 500;
+  color: rgba(0, 0, 0, 0.85);
+  line-height: 28px;
+  margin: 26px 0 14px 0;
 }
   .tabList{
     display: inline-block;
   }
   .tab{
     display: inline-block;
-    padding: 0 5px;
+    padding: 5px 14px;
     margin-right: 20px;
-    background: #fff;
-    border-radius:2px;
+    background: #EEEEEE;
     cursor: pointer;
-    font-size: 11px;
-    color: @staticMainColor;
-    border:1px @staticMainColor solid;
-    vertical-align: text-bottom;
+    font-size: 16px;
+    color: #333333;
+    border-radius: 6px 6px 0px 0px;
   }
   .activeTab{
     background: @staticMainColor;
@@ -332,3 +332,162 @@
   background: #f0f2f5;
   opacity: .2;
 }
+.scaletitle{
+  font-size: 20px;
+  font-weight: 500;
+  color: #333333;
+  line-height: 28px;
+  margin: 30px 0 8px 0;
+  text-align: center;
+}
+.scaleBox{
+  border-bottom: none;
+}
+.contentList{
+  max-width: 100%;
+  border-bottom: 1PX solid #F3F3F3;
+  margin-bottom: 6px;
+  .item-list{
+    padding: 0 21px;
+    .item-title{
+      font-size: 14px;
+      font-weight: 400;
+      color: #333333;
+      line-height: 20px;
+      margin-top: 14px;
+    }
+    .item-content{
+      margin: 10px 0;
+      display: flex;
+      flex-flow: wrap;
+      .radio {
+        display: flex;
+        margin: 5px;
+        margin-right: 25px;
+        label{
+          display: flex;
+          align-items: center;
+          font-weight: 400;
+          color: #666666;
+          line-height: 20px;
+          & input{
+            margin-right: 6px;
+          }
+          .num{
+            margin-left: 10px;
+          }
+        }
+        .recommend{
+          width: 18px;
+          height: 18px;
+        }
+      } 
+    }
+  }
+}
+.scalebot{
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+  margin-bottom: 44px;
+  .but{
+    width: 94px;
+    height: 34px;
+    background: #FFFFFF;
+    border-radius: 8px;
+    border: 1px solid #2A9BD5;
+    font-size: 16px;
+    font-weight: 400;
+    color: #2A9BD5;
+  }
+  .score{
+    font-size: 16px;
+    font-weight: 400;
+    color: #333333;
+    margin-right: 30px;
+    display: none;
+  }
+}
+.result{
+  height: 72px;
+  background: #EDFAFF;
+  border-radius: 10px;
+  font-size: 14px;
+  font-weight: 500;
+  color: #333333;
+  line-height: 72px;
+  margin-bottom: 40px;
+  text-align: center;
+  display: none;
+  margin: 0 6.5%;
+  .result_box{
+    height: 72px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    padding:  0 20px;
+    .hel{
+      width: 21px;
+      height: 21px;
+      background: #2C96E5;
+      border-radius: 50%;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      color: #fff;
+      margin-right: 9px;
+      font-size: 12px;
+    }
+  }
+  
+}
+.result_title{
+  overflow: hidden;
+  text-overflow:ellipsis;
+  white-space: nowrap;
+}
+.foot{
+  margin-bottom: 20px;
+  margin-top: 40px;
+  display: none;
+  .foot_box{
+    display: flex;
+    justify-content: center;
+    .printing{
+      display: flex;
+      align-items: center;
+      justify-content: space-around;
+      width: 94px;
+      height: 32px;
+      background: #FFFFFF;
+      border-radius: 4px;
+      border: 1px solid #333333;
+      cursor: pointer;
+    }
+    .printing:hover{
+      background: #2C96E5;
+      color: #fff;
+      border:1px solid #2C96E5;
+    }
+    .copy{
+      width: 132px;
+      height: 32px;
+      background: #FFFFFF;
+      border-radius: 4px;
+      border: 1px solid #333333;
+      text-align: center;
+      line-height: 32px;
+      margin-left: 38px;
+      cursor: pointer;
+    }
+    .copy:hover{
+      background: #2C96E5;
+      color: #fff;
+      border:1px solid #2C96E5;
+    }
+  }
+  
+}
+#inputs{
+  position: absolute;top: 0;left: 0;opacity: 0;z-index: -10;
+}

Разница между файлами не показана из-за своего большого размера
+ 41 - 28
src/html/staticInfo.html


BIN
src/images/printing.png


BIN
src/images/printing2.png


BIN
src/images/recommend.png


+ 8 - 0
src/js/cdss.js

@@ -181,6 +181,13 @@ function moreInfo() {
     const type = $(this).parent().attr('data-type')
     openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}`)
   })
+  $('.pushItemName').off("click").click(function () {
+    console.log(11)
+    const name = $(this).parent().attr('data-name')
+    const type = $(this).parent().attr('data-type')
+    console.log(name)
+    openNewWin(`staticInfo.html?type=${encodeURIComponent(type)}&position=0&name=${encodeURIComponent(name)}&page=1`)
+  })
 }
 
 function getVersion() {
@@ -500,6 +507,7 @@ function renderScale(list,showNum,type,hasInfo){
     let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
     $('.moduleItem.evaluation').append(shortStr).append(longStr)
     $('.moduleItem.evaluation').css("display","block")
+    $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
   }
 }
 

Разница между файлами не показана из-за своего большого размера
+ 324 - 307
src/js/cdssHorizontal.js


Разница между файлами не показана из-за своего большого размера
+ 5 - 0
src/js/jquery-migrate.js


+ 71 - 0
src/js/jquery.PrintArea.js

@@ -0,0 +1,71 @@
+// -----------------------------------------------------------------------
+// Eros Fratini - eros@recoding.it
+// jqprint 0.3
+//
+// - 19/06/2009 - some new implementations, added Opera support
+// - 11/05/2009 - first sketch
+//
+// Printing plug-in for jQuery, evolution of jPrintArea: http://plugins.jquery.com/project/jPrintArea
+// requires jQuery 1.3.x
+//
+// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
+//------------------------------------------------------------------------
+const $ = require("jquery");
+(function ($) {
+  var opt;
+
+  $.fn.jqprint = function (options) {
+    opt = $.extend({}, $.fn.jqprint.defaults, options);
+
+    var $element = (this instanceof $) ? this : $(this);
+
+    if (opt.operaSupport && $.browser.opera) {
+      var tab = window.open("", "jqPrint-preview");
+
+      tab.document.open();
+
+      var doc = tab.document;
+    }
+    else {
+      var $iframe = $("<iframe  />");
+
+      if (!opt.debug) { $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); }
+
+      $iframe.appendTo("body");
+      var doc = $iframe[0].contentWindow.document;
+    }
+
+    if (opt.importCSS) {
+      if ($("link[media=print]").length > 0) {
+        $("link[media=print]").each(function () {
+          doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' media='print' />");
+        });
+      }
+      else {
+        $("link").each(function () {
+          doc.write("<link type='text/css' rel='stylesheet' href='" + $(this).attr("href") + "' />");
+        });
+      }
+    }
+
+    if (opt.printContainer) { doc.write($element.outer()); }
+    else { $element.each(function () { doc.write($(this).html()); }); }
+
+    doc.close();
+
+    (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).focus();
+    setTimeout(function () { (opt.operaSupport && $.browser.opera ? tab : $iframe[0].contentWindow).print(); if (tab) { tab.close(); } }, 1000);
+  }
+
+  $.fn.jqprint.defaults = {
+    debug: false,
+    importCSS: true,
+    printContainer: true,
+    operaSupport: true
+  };
+
+  // Thanks to 9__, found at http://users.livejournal.com/9__/380664.html
+  $.fn.outer = function () {
+    return $($('<div></div>').html(this.clone())).html();
+  }
+})($);

+ 15 - 1
src/js/promise.js

@@ -337,6 +337,19 @@ const titleConfigH = {
     location:"left"
   }
 }
+const Toast = function (msg, duration) {
+  duration = isNaN(duration) ? 3000 : duration;
+  var m = document.createElement('div');
+  m.innerHTML = msg;
+  m.style.cssText = "max-width:60%;min-width: 150px;padding:0 14px;height: 40px;color: rgb(255, 255, 255);line-height: 40px;text-align: center;border-radius: 4px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: rgba(0, 0, 0,.7);font-size: 16px;";
+  document.body.appendChild(m);
+  setTimeout(function () {
+    var d = 0.5;
+    m.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
+    m.style.opacity = '0';
+    setTimeout(function () { document.body.removeChild(m) }, d * 1000);
+  }, duration);
+}
 module.exports = {
   config,
     get,
@@ -347,5 +360,6 @@ module.exports = {
   openNewWin,
   isIe8,
   titleConfig,
-  titleConfigH
+  titleConfigH,
+  Toast
 }

+ 262 - 73
src/js/staticInfo.js

@@ -1,173 +1,362 @@
-if(!Promise){
+if (!Promise) {
   var Promise = require("bluebird");
-// Configure
+  // Configure
   Promise.config({
     longStackTraces: true,
     warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
   })
 }
 require('../css/staticInfo.less')
+
 const {
   post,
   throttle,
   imageUrlPrefix,
   config,
   getUrlArgObject,
-  openNewWin
+  openNewWin,
+  Toast
 } = require('./promise.js');
 const $ = require("jquery");
-let showName,noticeName,clinicalPathwayName
+require("./jquery-migrate");
+const jqprint = require("../js/jquery.PrintArea")
+let printing = require('./../images/printing.png');
+let printing2 = require('./../images/printing2.png');
+let recommend = require('./../images/recommend.png');
 
+let showName, noticeName, clinicalPathwayName
 function getInfomation() {
   var param = {
     "type": getUrlArgObject('type'),
     "name": getUrlArgObject('name'),
     "position": getUrlArgObject('position'),
-    "contentTypes":[1,2,3]
+    "contentTypes": [1, 2, 3]
   };
   showName = param.name
   $(".tabBox .title").html(showName);
 
   post(config.information, param).then((res) => {
     const data = res.data.data
+    // const data = dataaaa.data
     document.title = showName
     var str = '';
     var anchors = '';
-  
+
     if (!data) {
       $(".title").html("暂时没有数据");
       $(".anchors").css("display", "none");
       return;
     }
     var detailList = data.details
+    var scale = data.scale
     var staticKnowList = detailList['静态知识']
     var noticeInfo = detailList['注意事项']
     var clinicalPathwayInfo = detailList['临床路径']
+    var scaleInfo = data.scale ? data.scale.scaleDetails : ''
+    var name = data.name
     noticeName = data.noticeName || "注意事项"
     clinicalPathwayName = data.clinicalPathwayName || "临床路径"
-
-    renderTab(detailList)
-    staticKnowList&&renderContent(staticKnowList,'staticKnowledge')
-    noticeInfo&&renderContent(noticeInfo,'notice')
-    clinicalPathwayInfo&&renderContent(clinicalPathwayInfo,'clinicalPathway')
-
-    $('.content img').bind('contextmenu', function(){
+    renderTab(detailList, scale)
+    staticKnowList && renderContent(staticKnowList, 'staticKnowledge')
+    noticeInfo && renderContent(noticeInfo, 'notice')
+    clinicalPathwayInfo && renderContent(clinicalPathwayInfo, 'clinicalPathway')
+    scaleInfo && renderContentscale(scaleInfo, 'scale', name)
+    $('.content img').bind('contextmenu', function () {
       return false
     })
-   
+
   })
 }
 getInfomation();
 
 
-function renderContent(list, contentWrapClassName){
+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);
+    anchors = '<li><i></i><a href="#' + contentWrapClassName + i +
+      '">' + item.title + '</a></li><li class="anchor-line"></li>';
+    str = '<div class="infoBox"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
+      '">'
+    /*if (getUrlArgObject('type') == 8) {
+      str += '【' + item.title + '】'
+    } else {*/
+    str += item.title
+    /*}*/
+    str += '</h2></div>' +
+      '<div class="contentWrapper"><pre>' + item.content + '</pre><div></div>';
+    str = `<div class="infoWrapper">${str}</div>`
+    $(`.${contentWrapClassName} .infos`).append(str);
+    $(`.${contentWrapClassName} .anchors ul`).append(anchors);
+  }
+
+  function addScrollEvent() {
+    var scrollTop = $(`.${contentWrapClassName} .infos`).scrollTop()
+
+    var divHeight = 0;
     for (var i = 0; i < list.length; i++) {
-        var item = list[i];
-        item.content = item.content&&item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
-        anchors = '<li><i></i><a href="#' + contentWrapClassName+i +
-          '">' + item.title + '</a></li><li class="anchor-line"></li>';
-        str = '<div class="infoBox"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName+i +
-          '">'
-        /*if (getUrlArgObject('type') == 8) {
-          str += '【' + item.title + '】'
-        } else {*/
-          str += item.title
-        /*}*/
-        str += '</h2></div>' +
-          '<div class="contentWrapper"><pre>' + item.content + '</pre><div></div>';
-          str = `<div class="infoWrapper">${str}</div>`
-        $(`.${contentWrapClassName} .infos`).append(str);
-        $(`.${contentWrapClassName} .anchors ul`).append(anchors);
+      divHeight = divHeight + parseInt($('#' + contentWrapClassName + i).css('height')) + parseInt($('#' + contentWrapClassName + i).parent().next().css('height')) + 20
+      if (divHeight > scrollTop) {
+        var anchor = 2 * i;
+        $(`.${contentWrapClassName} .anchors ul`).children().eq(anchor).addClass('active').siblings().removeClass('active');
+        return;
+      }
     }
+  }
+  $(`.${contentWrapClassName} .infos`).scroll(throttle(addScrollEvent, 200));
+  addLinkClickEvent(contentWrapClassName);
+  adjustHeight();
+  adjustWidth()
+}
 
-    function addScrollEvent() {
-      var scrollTop = $(`.${contentWrapClassName} .infos`).scrollTop()
-
-      var divHeight = 0;
-      for (var i = 0; i < list.length; i++) {
-        divHeight = divHeight + parseInt($('#'+contentWrapClassName+i).css('height')) + parseInt($('#'+contentWrapClassName+i).parent().next().css('height')) + 20
-        if (divHeight > scrollTop) {
-          var anchor = 2 * i;
-          $(`.${contentWrapClassName} .anchors ul`).children().eq(anchor).addClass('active').siblings().removeClass('active');
-          return;
+function renderContentscale(list, contentWrapClassName, name) {
+  var pushInfo=[]
+  anchors = '<li><i></i><a href="#' + contentWrapClassName +
+    '">' + name + '</a></li><li class="anchor-line"></li>';
+  str = '<p class="scaletitle">' + name + '</p>'
+  $(`.${contentWrapClassName} .infos`).append(str);
+  $(`.${contentWrapClassName} .anchors ul`).append(anchors);
+  for (var i = 0; i < list[0].detailList.length; i++) {
+    var item = list[0].detailList[i];
+    if (item.textType == 11) {
+      item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
+      str = '<div class="infoBox scaleBox"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
+        '">'
+      str += item.content
+      str += '</h2></div>'
+      str = `<div class="infoWrapper">${str}</div>`
+      $(`.${contentWrapClassName} .infos`).append(str);
+      for (var j = 0; j < item.subList.length; j++) {
+        var items = item.subList[j];
+        for (var k = 0; k < items.detailList.length; k++) {
+          var it = items.detailList[k];
+          it.content = it.content && it.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
+          str = '<div class="contentList"><div class="item-list">';
+          str += '<p class="item-title">' + it.content + '</p>'
+          str += '<div class="item-content" data-id="' + it.id + '">'
+          str += '</div></div></div>'
+          $(`.${contentWrapClassName} .infos .infoWrapper .infoBox`).append(str);
+          for (var l = 0; l < it.subList[0].detailList.length; l++) {
+            var its = it.subList[0].detailList[l];
+            its.content = its.content && its.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
+            str = '<div class="radio" name="scale' + its.parentId + '" value="' + its.score + '">';
+            str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.score + '" />'
+            str += its.content
+            str += '<span class="num">' + '(' + its.score + ')' + '</span>'
+            str += '</label>'
+            str += `${item.match ? `<img class="recommend" src=${recommend} />` : `` }</div>`
+            $(".scale .infos .infoWrapper .infoBox .contentList .item-content[data-id=" + its.parentId + "]").append(str);
+          }
+        }
+      }
+      
+    }
+    if (item.textType == 13){
+      for (var m = 0; m < item.subList[0].detailList[0].subList[0].detailList.length; m++ ){
+        var itl = item.subList[0].detailList[0].subList[0].detailList[m]
+        let arr = {
+          content: JSON.parse(itl.content),
+          result: itl.result,
+          pushInfo: itl.pushInfo
         }
+        pushInfo.push(arr)
       }
     }
-    $(`.${contentWrapClassName} .infos`).scroll(throttle(addScrollEvent, 200));
-    addLinkClickEvent(contentWrapClassName);
-    adjustHeight();
-    adjustWidth()
+  }
+  str = '<div class="scalebot">'
+  str += '<p class="score"></p>'
+  str += '<button class="but">结果</button></div>'
+  str += '<div class="result"><div class="result_box"><p class="hel">?</p><span>结果:</span><p id="result_title" class="result_title"></p><textarea id="inputs"></textarea></div></div>'
+  str += `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
+  $(`.${contentWrapClassName} .infos `).append(str);
+  // str = `<div class="foot"><div class="foot_box"><div class="printing"><img src=${printing} class="slideImg"/>打印</div><div class="copy">确认并复制结果</div></div></div>`
+  // $(`.${contentWrapClassName} .infos`).after(str);
+  function addScrollEvent() {
+    var scrollTop = $(`.${contentWrapClassName} .infos`).scrollTop()
+
+    var divHeight = 0;
+    for (var i = 0; i < list.length; i++) {
+      divHeight = divHeight + parseInt($('#' + contentWrapClassName + i).css('height')) + parseInt($('#' + contentWrapClassName + i).parent().next().css('height')) + 20
+      if (divHeight > scrollTop) {
+        var anchor = 2 * i;
+        $(`.${contentWrapClassName} .anchors ul`).children().eq(anchor).addClass('active').siblings().removeClass('active');
+        return;
+      }
+    }
+  }
+  $(`.${contentWrapClassName} .infos`).scroll(throttle(addScrollEvent, 200));
+  addLinkClickEvent(contentWrapClassName);
+  adjustHeight();
+  adjustWidth()
+  getcheck()
+  getResult(pushInfo)
+  copy()
+  getprinting()
 }
 
+function getprinting() {
+  $('.printing').click(function () {
+    $('.foot').hide()
+    $('#Print').css({
+      'height': 'auto', //高度自动
+    }).jqprint();
+    $('.foot').show()
+  })
 
+}
+
+function getcheck() {
+  $('input:radio').click(function () {
+    var domName = $(this).attr('name');
+    var $radio = $(this);
+    if ($radio.data('waschecked') == true) {
+      $radio.prop('checked', false);
+      $("input:radio[name='" + domName + "']").data('waschecked', false);
+    } else {
+      $radio.prop('checked', true);
+      $("input:radio[name='" + domName + "']").data('waschecked', false);
+      $radio.data('waschecked', true);
+    }
+    console.log("选中状态:", $(this).prop("checked"));
+    console.log($("input:radio[name='" + domName + "']:checked").val());
+  });
+}
+
+function copy() {
+  $(".copy").click(function () {
+    var texts = document.getElementById("result_title").innerText;
+    var inputs = document.getElementById("inputs");
+    inputs.value = texts; // 修改文本框的内容(赋值内容)
+    inputs.select(); // 选中文本
+    document.execCommand("copy"); // 执行浏览器复制命令
+    Toast('复制成功', 500)
+    setTimeout(()=>{
+      window.close()
+    },500)
+    
+  })
+  
+}
+
+function getResult(pushInfo) {
+
+  $(".but").click(function () {
+    let arr = [];
+    let num = 0
+    $(".contentList").each(function (i) {
+      if (Number(parseFloat($(this).find('input[type="radio"]:checked').val()))) {
+        num += parseFloat($(this).find('input[type="radio"]:checked').val())
+      }
+    })
+    for (var i = 0; i < pushInfo.length; i++) {
+      console.log(pushInfo[i])
+      if (pushInfo[i].content.max >= num >= pushInfo[i].content.min) {
+        $(".result_title").attr({
+          "title": pushInfo[i].result
+        });
+        $(".hel").attr({
+          "title": pushInfo[i].pushInfo
+        });
+        
+        $(".result_title").html(pushInfo[i].result);
+      }
+    }
+    $(".score").html('总分:' + num + '分');
+    $(".score").css('display', 'block')
+    $(".result").css('display', 'block')
+    $(".foot").css('display', 'block')
+
+  })
+
+  $(".printing").hover(
+    function () {
+      $(".slideImg").attr("src", printing2);
+    }, function () {
+      $(".slideImg").attr("src", printing);
+
+    });
+
+}
 
 function addLinkClickEvent(contentWrapClassName) {
   $(`.${contentWrapClassName} .anchors li:first`).addClass("active");
   $(`.${contentWrapClassName}  .anchors li>a`).on("click", function () {
 
     const that = this
-    setTimeout(function(){
+    setTimeout(function () {
       $(`.${contentWrapClassName} .anchors .active`).removeClass('active');
       $(that).parent().addClass("active");
-    },20)
+    }, 20)
 
   });
 }
 
-function renderTab(detailList){
-  if(detailList['静态知识']){
-    $(".tabList").append(`<span class="tab" data-module="staticKnowledge" data-title="`+showName+`">静态知识</span>`)
+function renderTab(detailList, scale) {
+  if (detailList['静态知识']) {
+    $(".tabList").append(`<span class="tab" data-module="staticKnowledge" data-title="` + showName + `">静态知识</span>`)
   }
-  if(detailList['临床路径']){
-    $(".tabList").append(`<span class="tab" data-module="clinicalPathway" data-title="`+clinicalPathwayName+`">临床路径</span>`)
+  if (detailList['临床路径']) {
+    $(".tabList").append(`<span class="tab" data-module="clinicalPathway" data-title="` + clinicalPathwayName + `">临床路径</span>`)
     //$(".tabBox .title").html(clinicalPathwayName);
   }
-  if(detailList['注意事项']){
-    $(".tabList").append(`<span class="tab" data-module="notice" data-title="`+noticeName+`">注意事项</span>`)
+  if (detailList['注意事项']) {
+    $(".tabList").append(`<span class="tab" data-module="notice" data-title="` + noticeName + `">注意事项</span>`)
     //$(".tabBox .title").html(noticeName);
   }
-  $(".tabList .tab").eq(0).addClass("activeTab")
-  let defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
-  $(`.${defaultModuleName}`).css("display","block")
+  if (scale) {
+    $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
+    //$(".tabBox .title").html(noticeName);
+  }
+  let defaultModuleName
+  if (getUrlArgObject('page') && getUrlArgObject('page') == 1){
+    $(".tabList .tab").eq(1).addClass("activeTab")
+    defaultModuleName = $(".tabList .tab").eq(1).attr("data-module")
+  }else{
+    $(".tabList .tab").eq(0).addClass("activeTab")
+    defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
+  }
+  
+  $(`.${defaultModuleName}`).css("display", "block")
   bindTabClick()
 }
 
-function bindTabClick(){
-  $(".tabList .tab").on("click", function(){
+function bindTabClick() {
+  $(".tabList .tab").on("click", function () {
     const moduleName = $(this).attr("data-module")
     const display = $(`.${moduleName}`).css("display")
     $(".tabBox .title").html($(this).attr('data-title'));
-    if(display == "none"){
+    if (display == "none") {
       $(".activeTab").removeClass("activeTab")
       $(this).addClass("activeTab")
-      $(".container").css("display","none")
-  
-      $(`.${moduleName}`).css("display","block")
+      $(".container").css("display", "none")
+
+      $(`.${moduleName}`).css("display", "block")
       $(`.${moduleName} .infos`).scrollTop(0)
     }
   })
-  $("#openWin").on("click",function(){
-    const type= getUrlArgObject('type');
-    const name= getUrlArgObject('name');
-    const position= getUrlArgObject('position');
-    openNewWin("staticInfo.html?name="+encodeURIComponent(name)+"&position="+encodeURIComponent(position)+"&type="+encodeURIComponent(type));
+  $("#openWin").on("click", function () {
+    const type = getUrlArgObject('type');
+    const name = getUrlArgObject('name');
+    const position = getUrlArgObject('position');
+    openNewWin("staticInfo.html?name=" + encodeURIComponent(name) + "&position=" + encodeURIComponent(position) + "&type=" + encodeURIComponent(type));
   })
 }
 function adjustHeight() {
   var ht = window.innerHeight || document.documentElement.clientHeight;
-  $(".content,.content .infos").height(ht - 132 + "px");
+  $(".content,.content .infos").height(ht - 162 + "px");
 }
 function adjustWidth() {
   var wt = window.innerWidth || document.documentElement.clientWidth;
-  $(".titleH2").width(wt- 0.2*wt -33 - 200 - 17 - 40 -15 + 'px')
-    //$("pre").width(wt- 0.2*wt - 240 + 'px')
+  $(".titleH2").width(wt - 0.2 * wt - 33 - 200 - 17 - 40 - 15 + 'px')
+  //$("pre").width(wt- 0.2*wt - 240 + 'px')
 }
-$(window).on('resize', function(){
+$(window).on('resize', function () {
   adjustHeight()
   adjustWidth()
 })
 
 //如果是子窗口,隐藏网页查看按钮
-if(window.opener){
+if (window.opener) {
   $("#openWin").hide();
 }

Разница между файлами не показана из-за своего большого размера
+ 1608 - 0
src/response_1624414026017.json


+ 0 - 2
webpack.config.js

@@ -32,7 +32,6 @@ module.exports = {
     searchStaticList:path.resolve(__dirname, 'src/js', 'searchStaticList.js'),
     staticInfo:path.resolve(__dirname, 'src/js', 'staticInfo.js'),
     staticInfoOut:path.resolve(__dirname, 'src/js', 'staticInfoOut.js'),
-      tcmiss: path.resolve(__dirname, 'src/js', 'tcmiss.js'),
     vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -475,7 +474,6 @@ module.exports = {
   devServer: {
     contentBase: "./dist", //静态文件根目录
     proxy: {
-        '/lantone': 'http://114.55.109.16:81',
       '*': proxyHost
     },
     hot: true,