浏览代码

Merge remote-tracking branch 'origin/testNew' into testNew

zhouna 4 年之前
父节点
当前提交
38202a0746
共有 8 个文件被更改,包括 674 次插入134 次删除
  1. 3 0
      src/css/staticInfo.less
  2. 544 0
      src/css/staticInfoOut.less
  3. 二进制
      src/images/icon-success.png
  4. 二进制
      src/images/icon-warning.png
  5. 1 0
      src/js/cdss.js
  6. 1 0
      src/js/cdssHorizontal.js
  7. 117 118
      src/js/promise.js
  8. 8 16
      src/js/staticInfo.js

+ 3 - 0
src/css/staticInfo.less

@@ -486,6 +486,9 @@
 #inputs{
   position: absolute;top: 0;left: 0;opacity: 0;z-index: -10;
 }
+#Print{
+  overflow-x: hidden;
+}
 .scale{
   .infos-box{
     border: 1px solid #E6E6E6;

+ 544 - 0
src/css/staticInfoOut.less

@@ -0,0 +1,544 @@
+@import './common.less';
+  ul,
+  li {
+    list-style: none;
+  }
+
+div,li,span,i,p,h1,h2,h3,h4,h5,pre{
+  font-family: '微软雅黑', '宋体';
+}
+  table {
+    border-collapse: collapse;
+    border-spacing: 0;
+  }
+
+  body {
+    /*min-width: 650px;*/
+    font-size: 14px;
+    overflow-y: hidden;
+    font-family: '微软雅黑', '宋体';
+    background: #dde2ea;
+    height: 100%;
+    color: #1E1E1E;
+    line-height: 21px;
+  }
+
+  h1 {
+    margin: 0 0px 15px 0px !important;
+    font-size: 18px !important;
+    /*line-height: 37px;*/
+    padding: 0 0 0 40px;
+  }
+
+  .titleH2 {
+    font-size: 18px;
+    position: relative;
+    background: #fff;
+    padding-right: 6px;
+    padding-left: 15px;
+    font-weight: bold;
+    border-left: 4px solid @staticMainColor;
+  }
+
+  .content {
+    position: relative;
+    height: 550px;
+  }
+  .infoBox {
+  }
+  .infoWrapper {
+    padding: 0 0 0 40px;
+  }
+  .circleBox {
+    position: absolute;
+    z-index: 10;
+    background: #fff;
+    left: -38px;
+    height: 32px;
+    top: -1px;
+  }
+  .circle {
+    display: inline-block;
+    *display:inline;
+    *zoom:1;
+    width: 10px;
+    height: 10px;
+    border-radius: 50%;
+    background: #3B9ED0;
+    position: relative;
+    top: 2px;
+  }
+  .infos {
+    height: 100%;
+    overflow-y: auto;
+    /*padding: 0 60px 0 0;*/
+    width: calc(100% - 250px);
+  }
+
+  .infos>div {
+    margin-right: 6.5%;
+    .contentWrapper img{
+      max-width: 100%;
+    }
+  }
+
+.infoBox {
+  border-bottom: 1px #E6E6E6 solid;
+  margin-bottom: 10px;
+}
+  .title {
+    position: relative;
+    line-height: 24px;
+    
+    margin: 0 0 4px;
+  }
+
+  .line {
+    border-bottom: 1px dashed #ccc;
+  }
+
+  .container {
+    width:100%;
+    overflow: hidden;
+    background: #fff;
+    margin: 0 auto;
+    padding: 8px 0 0px 0px;
+    display: none;
+    position: relative;
+    left: 0;
+    right: 0;
+  }
+
+  pre {
+    white-space: pre-wrap;
+    word-wrap: break-word;
+    color: #1E1E1E;
+    ol li {
+        list-style: decimal;
+        list-style-position:inside;
+    }
+    ul {
+        padding-left: 20px;
+        li {
+            list-style-position:inside;
+            list-style: inside;
+        }
+    }
+  }
+.anchors {
+  width: 210px;
+  position: absolute;
+  right:15px;
+  top: 0;
+  margin-right: 14px;
+  overflow-y: auto;
+  background-color: #EDFAFF;
+  padding: 25px 0;
+  height: calc(100% - 50px);
+  overflow-x: hidden;
+}
+
+.anchors ul {
+  margin-left: 30px;
+  padding: 15px 0px 15px 20px;
+  border-radius: 4px;
+  border: 1px solid #EDFAFF;
+  /*background-color: #EDFAFF;*/
+  line-height: 19px;
+}
+
+.anchors li {
+  position: relative;
+  border-left: 1px solid #8DD1EE;
+}
+.anchors li:first-child {
+  padding-top:30px
+}
+
+.anchors .anchor-line {
+  height: 30px;
+  width: 0;
+  border-left: 1px solid #8DD1EE;
+}
+
+.anchors .a-circle{
+  border:2px #8DD1EE solid;
+  width: 16px;
+  height: 16px;
+  background: #fff;
+  border-radius: 16px;
+  position: absolute;
+  left: 41px;
+  z-index: 1;
+}
+.anchors .a-circle:last-child{
+  position: unset;
+  margin-left: 41px;
+  margin-top: -16px;
+}
+.anchors i {
+  position: absolute;
+  display: inline-block;
+  width: 16px;
+  height: 16px;
+  border-radius: 8px;
+  border: 1px solid @staticMainColor;
+  background-color: @staticMainColor;
+  left: -10px;
+  top: 5px;
+  z-index: 1;
+}
+.anchors li:first-child i{
+  top:35px;
+}
+.anchors a {
+  display: inline-block;
+  position: relative;
+  top: 4px;
+  left: 0;
+  width: 126px;
+  padding: 0 0px 0 20px;
+  text-decoration: none;
+  font-size: 16px;
+  font-weight: 400;
+  word-wrap: break-word;
+}
+
+.anchors .active a {
+  /*color: #3B9ED0 !important;
+  font-weight: 700 !important;*/
+}
+
+.anchors .active i {
+  width: 26px;
+  height: 16px;
+  top: 6px;
+  left: -14px;
+  border-radius: 0;
+  border: none;
+  background-color: #F5F6F7;
+  background: url('../images/icon_current.svg') center center no-repeat;
+}
+  .disCopy {
+    -webkit-touch-callout: none;
+    -webkit-user-select: none;
+    -khtml-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+  }
+  .tabBox{
+    position: relative;
+    background: #fff;
+    padding: 0 40px 0;
+  }
+  .showWhich {
+    width: 187px;
+    text-align: center;
+    padding: 30px 0 20px;
+    position: relative;
+    .showWhichSelect {
+      display: inline-block;
+      color: @staticMainColor;
+      background: url("../images/d1.png") 200px 9px #EAFCFF no-repeat;
+      font-size: 16px;
+      padding:1px 24px 2px 9px;
+      width: 100%;
+      cursor: pointer;
+    }
+    ul {
+      display: none;
+      position: absolute;
+      left: 0;
+      top: 52px;
+      z-index: 10;
+      background-color: #fff;
+      width: 220px;
+      box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.18);
+      border-radius: 4px;
+      border: 1px solid #E6E6E6;
+      li {
+        height: 35px;
+        line-height: 35px;
+        white-space: nowrap;/*强制在一行显示*/
+        text-overflow:ellipsis;/*设置超出内容显示...*/
+        overflow: hidden;/*一定不能少 超出的内容进行隐藏*/
+        padding:0 20px;
+        cursor: pointer;
+        &:hover {
+          background-color: #E2F1F8;
+        }
+      }
+    }
+  }
+  .titleCont{
+    background: #fff;
+    padding-left: 39px;
+    padding-bottom: 20px;
+  }
+.titleCont .title{
+  font-size: 20px;
+  font-weight: bold;
+  margin-right: 23px;
+}
+.tabList{
+  display: inline-block;
+}
+.tab{
+  display: inline-block;
+  padding: 0 5px;
+  margin-right: 20px;
+  background: #fff;
+  border-radius:2px;
+  cursor: pointer;
+  font-size: 11px;
+  color: #2A9BD5;
+  border:1px #2A9BD5 solid;
+  vertical-align: text-bottom;
+}
+.activeTab{
+  background: #2A9BD5;
+  color: #fff;
+}
+  .ql-align-right{
+    text-align: right;
+  }
+  .ql-align-center{
+    text-align: center;
+  }
+  
+.ellipsis{
+  white-space: nowrap;/*强制在一行显示*/
+  text-overflow:ellipsis;/*设置超出内容显示...*/
+  overflow: hidden;/*一定不能少 超出的内容进行隐藏*/
+}
+.empty{
+  text-align: center;
+  padding-top: 32vh;
+  img{
+    width: 140px;
+    height: 75px;
+  }
+  p{
+    margin-top: 10px;
+    font-size: 15px;
+    color: #aaa;
+  }
+}
+.open-win{
+  position: absolute;
+  right: 38px;
+  bottom: 28px;
+  cursor: pointer;
+  color: #3B9ED0;
+  font-size: 14px;
+  padding-left: 30px;
+  background: url("../images/link.png") 0 -2px no-repeat;
+  background-size: 25px 25px;
+}
+.footer{
+  width: 100%;
+  height: 52px;
+  background: #172238;
+  padding-top: 8px;
+  position: absolute;
+  bottom: 0;
+  z-index: 1;
+  p{
+    color:#fff;
+    text-align: center;
+    font-size: 12px;
+    white-space: nowrap;
+  }
+}
+
+.infos::-webkit-scrollbar, .anchors::-webkit-scrollbar {
+  /*滚动条整体样式*/
+  width: 6px;
+  height: 100px;
+  /*高宽分别对应横竖滚动条的尺寸*/
+  background: #ebeef5;
+  -webkit-box-shadow: inset 1px 0 1px rgba(0, 0, 0, 0.2);
+}
+
+.infos::-webkit-scrollbar-thumb, .anchors::-webkit-scrollbar-thumb {
+  /*滚动条里面小方块*/
+  width: 6px;
+  border-radius: 5px;
+  background: @staticMainColor;
+  height: 100px;
+}
+
+.infos::-webkit-scrollbar-track, .anchors::-webkit-scrollbar-track {
+  /*滚动条里面轨道*/
+  border-radius: 2px;
+  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{
+  background: #EDFAFF;
+  border-radius: 10px;
+  font-size: 14px;
+  font-weight: 500;
+  color: #333333;
+  display: none;
+  margin: 0 6.5%;
+  .result_box{
+    display: flex;
+    justify-content: center;
+    padding: 25px 56px;
+    .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{
+  max-width: 85%;
+}
+.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;
+}
+#Print{
+  overflow-x: hidden;
+}
+.scale{
+  .infos-box{
+    border: 1px solid #E6E6E6;
+    margin: 0 71px 20px 38px;
+    .infoWrapper {
+      padding: 0 75px;
+    }
+    .scalebot{
+      padding-right: 75px;
+    }
+  }
+}

二进制
src/images/icon-success.png


二进制
src/images/icon-warning.png


+ 1 - 0
src/js/cdss.js

@@ -506,6 +506,7 @@ function renderScale(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")
+    $('.moduleItem.evaluation').children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
   }
 }
 

+ 1 - 0
src/js/cdssHorizontal.js

@@ -348,6 +348,7 @@ function renderScale(list, showNum, type, hasInfo) {
     $('.moduleItem.evaluation').append(renderLongStr(titleConfigH["scalePush"].name, longStr, titleConfigH["scalePush"].location))
     $('.moduleItem.evaluation').css("display", "block")
     $('.moduleItem.evaluation').children(".shortBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
+    $('.moduleItem.evaluation').children(".longStrBox").children(".longBox").children(".pushItemBox").children(".pushItemName").addClass("evaluationtitle")
   }
 }
 

+ 117 - 118
src/js/promise.js

@@ -2,7 +2,8 @@ const qs = require('qs');
 const $ = require("jquery");
 // var Promise = require('./rePromise');
 var Promise = require("bluebird");
-let warn = require('./../images/icon-warns.png').replace(/^undefined/g, '')
+let warn = require('./../images/icon-warning.png').replace(/^undefined/g, '')
+let success = require('./../images/icon-success.png').replace(/^undefined/g, '')
 let iconWarning = require('./../images/icon_waring_white.png').replace(/^undefined/g, '')
 let iconWarning1 = require('./../images/icon_warning.png').replace(/^undefined/g, '')
 let iconSymptomPush = require('./../images/icon_symptom_push.png').replace(/^undefined/g, '')
@@ -53,12 +54,12 @@ 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', //对接一对多
+  getStaticKnowledgeForHIS:'/kl/conceptInfo/getStaticKnowledgeForHIS', //对接一对多
   informationMore: '/api/data/conceptDetail/getConceptDetails',
   pushScale: '/api/data/push/pushScale',
   getSysSetInfoDatas: '/sys/plan/getSysPlanInfoDatas',
@@ -68,20 +69,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://192.168.2.241:82' : 'http://' + window.location.hostname + ':82';
+const isLocal = window.location.hostname.indexOf('localhost') !=-1;
+const imageUrlPrefix = isLocal ?'http://192.168.2.241:82':'http://'+window.location.hostname+':82';
 // const getUrlArgObject = function(parm) {  
 //   var query = decodeURI(window.location.search);
 //   var args = qs.parse(qs.parse(query.substr(1)));
@@ -103,24 +104,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) => {
@@ -152,7 +153,7 @@ const newinConf = {
 const newWindowLocationTcm = `width=800, height=600, left=${newinConf.left}, top=${newinConf.top},resizable=yes, scrollbars=yes`
 const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top},resizable=yes, scrollbars=yes`
 const openNewWin = function (url, isTcm) {
-  window.open(url, newinConf.openMode, isTcm ? newWindowLocationTcm : newWindowLocation)
+    window.open(url, newinConf.openMode, isTcm ? newWindowLocationTcm : newWindowLocation)
 }
 
 //判断浏览器是否为Ie8
@@ -192,157 +193,164 @@ const throttle = function (fn, threshhold) {
 }
 
 const titleConfig = {
-  warning: {
+  warning:{
     background: "#FFE8DD",
     icon: iconWarning1,
-    name: "智能警示"
+    name:"智能警示"
   },
-  symptomPush: {
+  symptomPush:{
     background: "#EEF5FD",
     icon: iconSymptomPush,
-    name: "推荐症状"
+    name:"推荐症状"
   },
-  diagPush: {
+  diagPush:{
     background: "#EEF5FD",
     icon: iconDiagPush2,
-    name: "智能诊断"
+    name:"智能诊断"
   },
-  checkupPush: {
+  checkupPush:{
     background: "#EEF5FD",
     icon: iconCheckupPush,
-    name: "推荐体格检查"
+    name:"推荐体格检查"
   },
-  scalePush: {
+  scalePush:{
     background: "#EEF5FD",
     icon: iconScalePush,
-    name: "推荐量表"
+    name:"推荐量表"
   },
-  lisPush: {
+  lisPush:{
     background: "#ECF4FC",
     icon: iconLisPush,
-    name: "推荐检验"
+    name:"推荐检验"
   },
-  pacsPush: {
+  pacsPush:{
     background: "#ECF4FC",
     icon: iconPacsPush,
-    name: "推荐检查"
+    name:"推荐检查"
   },
-  drugPush: {
+  drugPush:{
     background: "#E3FEFE",
     icon: iconDrugPush,
-    name: "推荐用药"
+    name:"推荐用药"
   },
-  nursePush: {
-    background: "#E3FEFE",
-    icon: iconNursePush,
-    name: "推荐护理"
-  },
-  operationPush: {
+    nursePush: {
+        background: "#E3FEFE",
+        icon: iconNursePush,
+        name: "推荐护理"
+    },
+  operationPush:{
     background: "#E3FEFE",
     icon: iconOperationPush,
-    name: "推荐手术及操作"
+    name:"推荐手术及操作"
   },
-  generaTreatPush: {
+  generaTreatPush:{
     background: "#E3FEFE",
     icon: iconTreat,
-    name: "一般治疗"
+    name:"一般治疗"
   },
-  casewritingPush: {
+  casewritingPush:{
     background: "#FFE8DD",
     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: iconDiagPush,
-    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"
   },
-  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: iconTreat,
-    name: "治疗方案"
+    name:"治疗方案"
   },
-  casewritingPush: {
+  casewritingPush:{
     background: "#E3FEFE",
     icon: iconTreat,
-    name: "病历书写规范提示",
-    location: "left"
+    name:"病历书写规范提示",
+    location:"left"
   }
 }
-const Toast = function (msg, duration) {
+const Toast = function (msg, duration,type) {
   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: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 4px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: #333;font-size: 16px;";
+  console.log(type)
+  if(type == 'warn'){
+    m.innerHTML = `<img class="warn" style="margin-right:14px" src=${warn} />` + msg;
+  }else if(type == 'success'){
+    m.innerHTML = `<img class="warn" style="margin-right:14px" src=${success} />` + msg;
+  }
+  
+  m.style.cssText = "display:flex;align-items:center;max-width:60%;min-width: 150px;padding:10px 14px;height: 30px;color: #fff;line-height: 30px;text-align: center;border-radius: 4px;position: fixed;top: 50%;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: #333;font-size: 16px;";
+  $('.warn').css('margin-top','10px')
   document.body.appendChild(m);
   setTimeout(function () {
     var d = 0.5;
@@ -351,18 +359,9 @@ const Toast = function (msg, duration) {
     setTimeout(function () { document.body.removeChild(m) }, d * 1000);
   }, duration);
 }
-function toast(mess) {
-  var str = '<div class="mess"><span></span></div>';
-  $("body").append(str);
-  $(".mess").fadeIn().find("span").html(mess);
-  setTimeout(function () {
-    $(".mess").fadeOut();
-  }, 2000)
-}
-
 module.exports = {
   config,
-  get,
+    get,
   post,
   getUrlArgObject,
   imageUrlPrefix,

+ 8 - 16
src/js/staticInfo.js

@@ -24,7 +24,7 @@ let printing = require('./../images/printing.png');
 let printing2 = require('./../images/printing2.png');
 let recommend = require('./../images/recommend.png');
 let hel = require('./../images/icon-hel.png');
-let warn = require('./../images/icon-warns.png')
+
 let showName, noticeName, clinicalPathwayName, isclick
 function getInfomation() {
   var param = {
@@ -117,8 +117,6 @@ function renderContentscale(list, contentWrapClassName, name) {
   var textType = []
   for (var i = 0; i < list[0].detailList.length; i++) {
     var item = list[0].detailList[i];
-    console.log(item.resultType)
-    textType.push(item.textType)
     if (item.textType == 11) {
       anchors = '<li><i></i><a href="#' + contentWrapClassName + i +
         '">' + item.content + '</a></li><li class="anchor-line"></li>';
@@ -133,8 +131,10 @@ function renderContentscale(list, contentWrapClassName, name) {
       $(`.${contentWrapClassName} .anchors ul`).append(anchors);
       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" data-id="' + it.parentId + '-' + it.groupNum + '"><div class="item-list">';
           if (it.selectType == 21) {
@@ -160,8 +160,9 @@ function renderContentscale(list, contentWrapClassName, name) {
             }
             str += its.content
             if (item.resultType == 1) {
-              str += '<span class="num">' + '(' + its.score + ')' + '</span>'
+              str += '<span class="num">' + '(' + parseFloat(((its.score * it.factor + it.constant) * item.factor + item.constant)) + ')' + '</span>'
             }
+            
             str += '</label>'
             str += `${its.match == 1 ? `<img class="recommend" src=${recommend} />` : ``}</div>`
             $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "] .contentList .item-content[data-id=" + its.parentId + "]").append(str);
@@ -287,7 +288,7 @@ function copy(name) {
   $(".copy").click(function () {
     var texts = document.getElementById("result_title").innerText;
     if (texts == '') {
-      Toast('结果为空,无法复制', 500)
+      Toast('结果为空,无法复制', 500, 'warn')
       return
     }
     var inputs = document.getElementById("inputs");
@@ -295,7 +296,7 @@ function copy(name) {
     console.log(inputs.value)
     inputs.select(); // 选中文本
     document.execCommand("copy"); // 执行浏览器复制命令
-    Toast('复制成功', 500)
+    Toast('复制成功', 500, 'success')
     setTimeout(() => {
       window.close()
     }, 500)
@@ -317,16 +318,7 @@ function getchecks() {
     }
   });
 }
-function Toasts(mess) {
-  var str = `<div id="mess"><img class="warn" style="margin-right:14px" src=${warn}/><span></span></div>`;
-  $("body").append(str);
-  $("#mess").fadeIn().find("span").html(mess);
-  document.getElementById("mess").style.cssText = "display:flex;align-items:center;max-width:60%;min-width: 150px;padding:0 14px;height: 30px;color: #FFB609;line-height: 30px;text-align: center;border-radius: 4px;position: fixed;top: 75px;left: 50%;transform: translate(-50%, -50%);z-index: 999999;background: #FDF6EA;font-size: 16px;";
-  setTimeout(function () {
-    $("#mess").fadeOut();
-  }, 1000)
 
-}
 function getResult(pushInfo, textType) {
   $(".but").click(function () {
     let arr = [];
@@ -414,7 +406,7 @@ function getResult(pushInfo, textType) {
         $(".foot").css('display', 'block')
       }
     } else {
-      Toasts('温馨提示:必填选项不能为空~')
+      Toast('温馨提示:必填选项不能为空~',500,'warn')
     }
   })
   $(".printing").hover(