Explorar el Código

对接页新版覆盖旧版链接

zhouna hace 4 años
padre
commit
5db1b41459
Se han modificado 6 ficheros con 677 adiciones y 1208 borrados
  1. 364 130
      src/css/informationOut.less
  2. 0 552
      src/css/staticInfoOut.less
  3. 28 16
      src/html/informationOut.html
  4. 280 33
      src/js/informationOut.js
  5. 0 472
      src/js/staticInfoOut.js
  6. 5 5
      webpack.config.js

+ 364 - 130
src/css/informationOut.less

@@ -1,19 +1,19 @@
-* {
-    margin: 0;
-    padding: 0;
-  }
-
+@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: '微软雅黑', '宋体';
@@ -24,18 +24,22 @@
   }
 
   h1 {
-    margin: 0 0px 5px 0px !important;
+    margin: 0 0px 15px 0px !important;
     font-size: 18px !important;
     /*line-height: 37px;*/
     padding: 0 0 0 40px;
   }
 
   .titleH2 {
-    font-size: 16px;
+    font-size: 18px;
     position: relative;
+    height: 18px;
+    line-height: 17px;
     background: #fff;
     padding-right: 6px;
-    /*line-height: 30px;*/
+    padding-left: 15px;
+    font-weight: bold;
+    border-left: 4px solid @staticMainColor;
   }
 
   .content {
@@ -43,9 +47,11 @@
     height: 550px;
   }
   .infoBox {
-    border-left: 1px solid #969C9F;
-    padding: 0 0 0 33px;
-    margin: 0 0 4px 0;
+    .contentWrapper{
+      pre{
+        margin: 0 0 6px;
+      }
+    }
   }
   .infoWrapper {
     padding: 0 0 0 40px;
@@ -72,13 +78,21 @@
   .infos {
     height: 100%;
     overflow-y: auto;
-    padding: 0 60px 0 0;
+    /*padding: 0 60px 0 0;*/
+    width: calc(100% - 195px);
   }
 
   .infos>div {
-    margin-right: 160px;
+    margin-right: 6.5%;
+    .contentWrapper img{
+      max-width: 100%;
+    }
   }
 
+.infoBox {
+  border-bottom: 1px #E6E6E6 solid;
+  margin-bottom: 10px;
+}
   .title {
     position: relative;
     line-height: 24px;
@@ -118,84 +132,102 @@
         }
     }
   }
-  .anchors {
-    width: 200px;
-    position: absolute;
-    right:15px;
-    top: 0;
-    margin-right: 14px;
-    overflow: auto;
-    height: 100%;
-  }
-
-  .anchors ul {
-    padding: 15px 0px 15px 20px;
-    border-radius: 4px;
-    border: 1px solid #F5F6F7;
-    background-color: #F5F6F7;
-    line-height: 19px;
-  }
-
-  .anchors li {
-    position: relative;
-    border-left: 2px solid #E0E2E3;
-  }
-
-  .anchors .anchor-line {
-    height: 20px;
-    width: 0;
-    border-left: 2px solid #E0E2E3;
-  }
+.anchors {
+  width: 155px;
+  position: absolute;
+  right:15px;
+  top: 0;
+  margin-right: 14px;
+  overflow-y: auto;
+  background-color: #EDFAFF;
+  padding: 20px 0;
+  height: calc(100% - 50px);
+  overflow-x: hidden;
+}
 
-  .anchors .anchor-line:last-child {
-    display: none;
-  }
+.anchors ul {
+  margin-left: 21px;
+  padding: 15px 0px 15px 10px;
+  border-radius: 4px;
+  border: 1px solid #EDFAFF;
+  /*background-color: #EDFAFF;*/
+  line-height: 19px;
+}
 
-  .anchors i {
-    position: absolute;
-    display: inline-block;
-    width: 8px;
-    height: 8px;
-    border-radius: 5px;
-    border: 1px solid #E0E2E3;
-    background-color: #E0E2E3;
-    left: -6px;
-    top: 5px;
-  }
+.anchors li {
+  position: relative;
+  border-left: 1px solid #8DD1EE;
+}
+.anchors li:first-child {
+  padding-top:20px
+}
 
-  .anchors a {
-    display: inline-block;
-    position: relative;
-    top: 0;
-    left: 0;
-    width: 132px;
-    padding: 0 0px 0 20px;
-    text-decoration: none;
-    font-size: 14px;
-    font-weight: 400;
-    color: #777;
-    word-wrap: break-word;
-  }
+.anchors .anchor-line {
+  height: 20px;
+  width: 0;
+  border-left: 1px solid #8DD1EE;
+}
 
-  .anchors .active a {
-    color: #3B9ED0 !important;
-    font-weight: 700 !important;
-  }
+.anchors .a-circle{
+  border:2px #8DD1EE solid;
+  width: 10px;
+  height: 10px;
+  background: #fff;
+  border-radius: 16px;
+  position: absolute;
+  top: 28px;
+  left: 25px;
+  z-index: 1;
+}
+.anchors .a-circle:last-child{
+  position: unset;
+  margin-left: 25px;
+  margin-top: -16px;
+}
+.anchors i {
+  position: absolute;
+  display: inline-block;
+  width: 10px;
+  height: 10px;
+  border-radius: 5px;
+  border: 1px solid @staticMainColor;
+  background-color: @staticMainColor;
+  left: -7px;
+  top: 8px;
+  z-index: 1;
+}
+.anchors li:first-child i{
+  top:29px;
+}
+.anchors a {
+  display: inline-block;
+  position: relative;
+  top: 4px;
+  left: 0;
+  width: 90px;
+  padding: 0 0px 0 20px;
+  text-decoration: none;
+  font-size: 14px;
+  font-weight: 400;
+  word-wrap: break-word;
+}
 
-  .anchors .active i {
-    width: 16px;
-    height: 16px;
-    top: 1px;
-    left: -8px;
-    border-radius: 0;
-    border: none;
-    background-color: #F5F6F7;
-    background: url('../images/icon_current.png') center center no-repeat;
-  }
+.anchors .active a {
+  /*color: #3B9ED0 !important;
+  font-weight: 700 !important;*/
+}
 
-  a:visited {
-    color: #777;
-  }
+.anchors .active i {
+  width: 18px;
+  height: 9px;
+  top: 6px;
+  left: -10px;
+  border-radius: 0;
+  border: none;
+  background-color: #F5F6F7;
+  background: url('../images/icon_current.svg') center center no-repeat;
+  background-size: cover;
+}
   .disCopy {
     -webkit-touch-callout: none;
     -webkit-user-select: none;
@@ -207,43 +239,31 @@
   .tabBox{
     position: relative;
     background: #fff;
-    height: 38px;
-    border-bottom: 1px solid #E6E6E6;
-    padding: 0 40px;
+    padding: 0 40px 0;
   }
   .showWhich {
-    width: 94px;
+    width: 187px;
     text-align: center;
-    padding-top: 16px;
-    position: absolute;
-    z-index: 20;
-    bottom: -6px;
-    img {
-      width: 8px;
-      position: absolute;
-      top: 29px;
-      left: 76px;
-    }
+    padding: 20px 0 10px;
+    position: relative;
     .showWhichSelect {
-      border-radius: 4px 4px 0px 0px;;
-      background: #E2F1F8;
-      height: 30px;
-      line-height: 30px;
       display: inline-block;
+      color: @staticMainColor;
+      background: url("../images/d1.png") 200px 9px #EAFCFF no-repeat;
+      font-size: 16px;
+      padding:1px 24px 2px 10px;
       width: 100%;
-      padding-right: 20px;
-      padding-left: 10px;
-      box-sizing: border-box;
       cursor: pointer;
+      text-align: left;
     }
     ul {
       display: none;
       position: absolute;
-      left: -9px;
-      top: 48px;
+      left: 0;
+      top: 52px;
       z-index: 10;
       background-color: #fff;
-      width: 110px;
+      width: 220px;
       box-shadow: 0px 6px 16px 0px rgba(0, 0, 0, 0.18);
       border-radius: 4px;
       border: 1px solid #E6E6E6;
@@ -261,25 +281,35 @@
       }
     }
   }
-  .tabList{
-    position: absolute;
-    bottom: 0;
-    left: 186px;
-  }
-  .tab{
-    display: inline-block;
-    padding: 4px 18px 5px;
-    margin-right: 5px;
-    background: #EEEEEE;
-    border-radius:6px 6px 0px 0px;
-    cursor: pointer;
-    font-size: 14px;
-    color: #333;
-  }
-  .activeTab{
-    background: #3B9ED0;
-    color: #fff;
+  .titleCont{
+    background: #fff;
+    padding-left: 35px;
+    /*padding-bottom: 20px;*/
   }
+.titleCont .title{
+  font-size: 20px;
+  font-weight: bold;
+  margin-right: 33px;
+}
+.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;
   }
@@ -294,7 +324,7 @@
 }
 .empty{
   text-align: center;
-  margin-top: 32vh;
+  padding-top: 32vh;
   img{
     width: 140px;
     height: 75px;
@@ -307,12 +337,216 @@
 }
 .open-win{
   position: absolute;
-  right: 15px;
-  bottom: 8px;
+  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;
+    align-items: center;
+    justify-content: center;
+    padding: 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{
+  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;
+}
+.scale{
+  .infos-box{
+    border: 1px solid #E6E6E6;
+    margin: 0 71px 20px 38px;
+    .infoWrapper {
+      padding: 0 75px;
+    }
+    .scalebot{
+      padding-right: 75px;
+    }
+  }
 }

+ 0 - 552
src/css/staticInfoOut.less

@@ -1,552 +0,0 @@
-@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;
-    height: 18px;
-    line-height: 17px;
-    background: #fff;
-    padding-right: 6px;
-    padding-left: 15px;
-    font-weight: bold;
-    border-left: 4px solid @staticMainColor;
-  }
-
-  .content {
-    position: relative;
-    height: 550px;
-  }
-  .infoBox {
-    .contentWrapper{
-      pre{
-        margin: 0 0 6px;
-      }
-    }
-  }
-  .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% - 195px);
-  }
-
-  .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: 155px;
-  position: absolute;
-  right:15px;
-  top: 0;
-  margin-right: 14px;
-  overflow-y: auto;
-  background-color: #EDFAFF;
-  padding: 20px 0;
-  height: calc(100% - 50px);
-  overflow-x: hidden;
-}
-
-.anchors ul {
-  margin-left: 21px;
-  padding: 15px 0px 15px 10px;
-  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:20px
-}
-
-.anchors .anchor-line {
-  height: 20px;
-  width: 0;
-  border-left: 1px solid #8DD1EE;
-}
-
-.anchors .a-circle{
-  border:2px #8DD1EE solid;
-  width: 10px;
-  height: 10px;
-  background: #fff;
-  border-radius: 16px;
-  position: absolute;
-  top: 28px;
-  left: 25px;
-  z-index: 1;
-}
-.anchors .a-circle:last-child{
-  position: unset;
-  margin-left: 25px;
-  margin-top: -16px;
-}
-.anchors i {
-  position: absolute;
-  display: inline-block;
-  width: 10px;
-  height: 10px;
-  border-radius: 5px;
-  border: 1px solid @staticMainColor;
-  background-color: @staticMainColor;
-  left: -7px;
-  top: 8px;
-  z-index: 1;
-}
-.anchors li:first-child i{
-  top:29px;
-}
-.anchors a {
-  display: inline-block;
-  position: relative;
-  top: 4px;
-  left: 0;
-  width: 90px;
-  padding: 0 0px 0 20px;
-  text-decoration: none;
-  font-size: 14px;
-  font-weight: 400;
-  word-wrap: break-word;
-}
-
-.anchors .active a {
-  /*color: #3B9ED0 !important;
-  font-weight: 700 !important;*/
-}
-
-.anchors .active i {
-  width: 18px;
-  height: 9px;
-  top: 6px;
-  left: -10px;
-  border-radius: 0;
-  border: none;
-  background-color: #F5F6F7;
-  background: url('../images/icon_current.svg') center center no-repeat;
-  background-size: cover;
-}
-  .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: 20px 0 10px;
-    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 10px;
-      width: 100%;
-      cursor: pointer;
-      text-align: left;
-    }
-    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: 35px;
-    /*padding-bottom: 20px;*/
-  }
-.titleCont .title{
-  font-size: 20px;
-  font-weight: bold;
-  margin-right: 33px;
-}
-.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;
-    align-items: center;
-    justify-content: center;
-    padding: 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{
-  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;
-}
-.scale{
-  .infos-box{
-    border: 1px solid #E6E6E6;
-    margin: 0 71px 20px 38px;
-    .infoWrapper {
-      padding: 0 75px;
-    }
-    .scalebot{
-      padding-right: 75px;
-    }
-  }
-}

+ 28 - 16
src/html/informationOut.html

@@ -18,49 +18,61 @@
   <div class="tabBox">
     <div class="showWhich">
       <span class="showWhichSelect ellipsis" title=""></span>
-      <img src="../images/d.png" alt="">
-      <ul>
-        
-      </ul>
-    </div>
-    <div class="tabList">
-     
+      <!--<img src="../images/d1.png" alt="">-->
+      <ul></ul>
     </div>
     <a id="openWin" class="open-win">网页查看</a>
   </div>
-  
+  <div class="titleCont">
+      <span class="title"></span>
+      <div class="tabList"></div>
+  </div>
   <div class=" container disCopy staticKnowledge">
-    <h1></h1>
     <div class="content">
         <div class="infos"></div>
         <div class="anchors">
+          <div class="a-circle"></div>
           <ul></ul>
+          <div class="a-circle"></div>
         </div>
-        
     </div>
   </div>
   <div class=" container disCopy clinicalPathway">
-    <h1></h1>
     <div class="content">
         <div class="infos"></div>
         <div class="anchors">
+            <div class="a-circle"></div>
           <ul></ul>
+            <div class="a-circle"></div>
         </div>
-
-      
     </div>
   </div>
   <div class=" container disCopy notice">
-    <h1></h1>
     <div class="content">
         <div class="infos"></div>
         <div class="anchors">
+            <div class="a-circle"></div>
           <ul></ul>
+            <div class="a-circle"></div>
         </div>
-
-      
     </div>
   </div>
+  <div class=" container disCopy scale">
+    <div class="content">
+      <div class="infos" id="Print">
+        <div class="infos-box"></div>
+      </div>
+      <div class="anchors">
+        <div class="a-circle"></div>
+        <ul></ul>
+        <div class="a-circle"></div>
+      </div>
+    </div>
+  </div>
+<div class="footer">
+    <p>免责声明:本知识库提供的医学静态知识仅供医生学习参考。</p>
+    <p>版权所有:杭州朗通信息技术有限公司      浙ICP备:16000400号-2</p>
+</div>
 </body>
 
 </html>

+ 280 - 33
src/js/informationOut.js

@@ -16,8 +16,18 @@ const {
   openNewWin
 } = require('./promise.js');
 const $ = require("jquery");
-let showName,noticeName,clinicalPathwayName,showLis=[]
+require("./jquery-migrate");
+const jqprint = require("../js/jquery.PrintArea")
+let printing = require('./../images/printing.png');
+let printing2 = require('./../images/printing2.png');
+let showName,noticeName,clinicalPathwayName,showLis=[],selectedDrop=0,selectedTab=0
 
+//如果是子窗口,隐藏网页查看按钮
+if(window.opener){
+    selectedDrop=getUrlArgObject("d")||0;
+    selectedTab=getUrlArgObject("t")||0;
+    $("#openWin,.footer").hide();
+}
 let icond = require('./../images/d.png').replace(/^undefined/g, '')
 function getInfomation() {
   // var param = {
@@ -33,8 +43,7 @@ function getInfomation() {
     "hisDetailName": getUrlArgObject('hisDetailName'),
     "contentTypes":[1,2,3]
   };
-  const uname = getUrlArgObject('uname')
-  // showName = param.name
+  //showName = param.hisName;
   // if (param.type == 5 || param.type == 51) {
   //   param.type = 12;
   //   param.name = uname;
@@ -45,6 +54,7 @@ function getInfomation() {
       const data = res.data.data
       var str = '';
       var anchors = '';
+      let sName ='';
       if (!data||data.length===0) {
         showEmpty();
         return;
@@ -52,14 +62,15 @@ function getInfomation() {
       showLis=data
       for(let i = 0;i < showLis.length;i++){
         let tmp = showLis[i]
-        str+=`<li data-idx="${i}" title="${tmp.name}">${tmp.name}</li>`
+        str+=`<li data-idx="${i}" title="${tmp.name}(${tmp.hisName})">${tmp.name}(${tmp.hisName})</li>`
       }
-      $(".showWhich ul").html(str)
-      $(".showWhichSelect").html(showLis[0].name).attr("title",showLis[0].name)
-      showName = data[0].name
-      document.title = showName
+      $(".showWhich ul").html(str);
+        sName=showLis[selectedDrop].name+"("+showLis[selectedDrop].hisName+")";
+      $(".showWhichSelect").html(sName).attr("title",sName)
+      showName = data[selectedDrop].name+"("+data[selectedDrop].hisName+")";
       showInfoSelect()
-      showInfo(data[0])
+      showInfo(data[selectedDrop])
+        renderTitleShow();
       $('.content img').bind('contextmenu', function(){
         return false
       })
@@ -72,31 +83,38 @@ getInfomation();
 function showEmpty(){
   const str=`<div class="empty"><img src="../images/empty3.png" alt=""><p>暂无静态知识</p></div>`;
   $(".tabBox").html(str).css("border-bottom","none");
+  $("body").css('background','#fff');
 }
 function showInfo(data){
   var detailList = data.details
+  var scale = data.scale
   var staticKnowList = detailList['静态知识']
   var noticeInfo = detailList['注意事项']
   var clinicalPathwayInfo = detailList['临床路径']
+  var name = data.name
   noticeName = data.noticeName || "注意事项"
   clinicalPathwayName = data.clinicalPathwayName || "临床路径"
+  var scaleInfo = data.scale ? data.scale.scaleDetails : ''
   // $("h1").css({
   //   "color": "#267FD7",
   //   "borderBottom": "4px solid  #E9E9E9",
   //   "padding": "0px 60px 50px 0px"
   // });
-  renderTab(detailList)
+  renderTab(detailList, scale)
   staticKnowList&&renderContent(staticKnowList,'staticKnowledge')
   noticeInfo&&renderContent(noticeInfo,'notice')
   clinicalPathwayInfo&&renderContent(clinicalPathwayInfo,'clinicalPathway')
+  scaleInfo && renderContentscale(scaleInfo, 'scale', name)
 }
 function showInfoSelect(){
   $('.showWhich li').click(function(){
     let idx = $(this).attr('data-idx')
     let name = $(this).html(),str=''
-    showName = showLis[idx].name
-    document.title = showName
+    selectedDrop=idx;
+    selectedTab=0;
+    showName = showLis[idx].name+"("+showLis[idx].hisName+")";
     showInfo(showLis[idx])
+    renderTitleShow();
     $('.content .infos').scrollTop(0)
     $(".showWhich ul").css("display","none")
     $(".showWhichSelect").html(name).attr("title",name)
@@ -109,6 +127,10 @@ function showInfoSelect(){
     $(".showWhich ul").css("display","none")
   })
 }
+function renderTitleShow(){
+    document.title = showName;
+    $(".titleCont .title").html($(".tabList .tab:eq("+selectedTab+")").attr("data-title"));
+}
 function renderContent(list, contentWrapClassName){
   $(`.${contentWrapClassName} .infos`).html('');
   $(`.${contentWrapClassName} .anchors ul`).html('');
@@ -117,7 +139,7 @@ function renderContent(list, contentWrapClassName){
         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"> <div class= "circleBox"><span class="circle"> </span></div> <h2 class="titleH2" id="' + contentWrapClassName+i +
+        str = '<div class="infoBox"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName+i +
           '">'
         if (getUrlArgObject('type') == 8) {
           str += '【' + item.title + '】'
@@ -150,7 +172,229 @@ function renderContent(list, contentWrapClassName){
     adjustWidth()
 }
 
+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 .infos-box`).append(str);
+  $(`.${contentWrapClassName} .anchors ul`).append(anchors);
+  for (var i = 0; i < list[0].detailList.length; i++) {
+    var item = list[0].detailList[i];
+    console.log(item)
+    if (item.textType == 11) {
+      item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
+      str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
+        '">'
+      str += item.content
+      str += '</h2></div>'
+      str = `<div class="infoWrapper">${str}</div>`
+      $(`.${contentWrapClassName} .infos .infos-box`).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" data-id="' + it.parentId + '"><div class="item-list">';
+          if (it.selectType == 1) {
+            str += '<p class="item-title">' + it.content + '</p>'
+          } else if (it.selectType == 2) {
+            str += '<p class="item-titles">' + it.content + '</p>'
+          }
+
+          str += '<div class="item-content" data-id="' + it.id + '">'
+          str += '</div></div></div>'
+          $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").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 + '">';
+            if (it.selectType == 1 && item.resultType == 1) {
+              str += '<label><input class="radio_type" type="checkbox" name="scale' + its.parentId + '" value="' + its.score + '"/>'
+            } else if (it.selectType == 2 && item.resultType == 1) {
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.score + '" />'
+            } else if (it.selectType == 1 && item.resultType == 2) {
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + its.result + '"/>'
+            } else if (it.selectType == 2 && item.resultType == 2) {
+              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + its.result + '"/>'
+            }
+            str += its.content
+            if (item.resultType == 1) {
+              str += '<span class="num">' + '(' + its.score + ')' + '</span>'
+            }
+            str += '</label>'
+            str += `${item.match ? `<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);
+          }
+        }
+      }
+
+    }
+    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)
+      }
+    }
+  }
+  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 .infos-box`).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 .infos-box`).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 .infos-box`).scroll(throttle(addScrollEvent, 200));
+  addLinkClickEvent(contentWrapClassName);
+  adjustHeight();
+  adjustWidth()
+  getcheck()
+  getResult(pushInfo)
+  copy()
+  getprinting()
+}
+
+function getprinting() {
+  $('.printing').click(function () {
+    $('.foot').hide()
+    $('.hel').hide()
+    $('#Print').css({
+      'height': 'auto', //高度自动
+    }).jqprint();
+    $('.foot').show()
+    $('.hel').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;
+    if (texts == '') {
+      return
+    }
+    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
+    let result
+    let key = false
+    $(".contentList").each(function (i) {
+      if ($(this).find('input[type="radio"]:checked').val() == undefined) {
+        $(this).find(".item-titles").addClass('chColor');
+      } else {
+        $(this).find(".item-titles").removeClass('chColor');
+      }
+      if ($(this).find('input[type="checkbox"]:checked').val() == undefined) {
+        $(this).find(".item-title").addClass('chColor');
+      } else {
+        $(this).find(".item-title").removeClass('chColor');
+      }
+    });
+    if (!$(".contentList").find(".item-title").hasClass('chColor')) {
+      $('input[type="radio"]:checked').each(function () {
+        if (Number($(this).val())) {
+          num += parseFloat($(this).val())
+        } else {
+          arr.push($(this).attr("data_obj"))
+        }
+      });
+      $('input[type="checkbox"]:checkbox:checked').each(function () {
+        if (Number($(this).val())) {
+          num += parseFloat($(this).val())
+        } else {
+          arr.push($(this).attr("data_obj"))
+        }
+      });
+      tmp = arr.join(",");
+      if (pushInfo.length > 0) {
+        for (var i = 0; i < pushInfo.length; i++) {
+          if (pushInfo[i].content.max >= num >= pushInfo[i].content.min) {
+            if (tmp) {
+              result = pushInfo[i].result + ';' + tmp
+            } else {
+              result = pushInfo[i].result
+            }
+          }
+        }
+      } else {
+        result = tmp
+      }
+
+      $(".result_title").attr({
+        "title": result
+      });
+      $(".hel").attr({
+        "title": result
+      });
+      $(".result_title").html(result);
+      $(".score").html('总分:' + num + '分');
+      $(".score").css('display', 'block')
+      $(".result").css('display', 'block')
+      $(".foot").css('display', 'block')
+    } else {
+      Toast('温馨提示:必填选项不能为空~', 500)
+    }
+  })
+
+  $(".printing").hover(
+    function () {
+      $(".slideImg").attr("src", printing2);
+    }, function () {
+      $(".slideImg").attr("src", printing);
+
+    });
+
+}
 
 function addLinkClickEvent(contentWrapClassName) {
   $(`.${contentWrapClassName} .anchors li:first`).addClass("active");
@@ -165,61 +409,64 @@ function addLinkClickEvent(contentWrapClassName) {
   });
 }
 
-function renderTab(detailList){
+function renderTab(detailList, scale){
   $(".tabList").html('')
   if(detailList['静态知识']){
-    $(".tabList").append(`<span class="tab" data-module="staticKnowledge">静态知识</span>`)
-    $(".staticKnowledge h1").html(showName);
+    $(".tabList").append(`<span class="tab" data-module="staticKnowledge" data-title="`+showName+`">静态知识</span>`)
+    //$(".titleCont .title").html(showName);
   }
   if(detailList['临床路径']){
-    $(".tabList").append(`<span class="tab" data-module="clinicalPathway">临床路径</span>`)
-    $(".clinicalPathway h1").html(clinicalPathwayName);
+    $(".tabList").append(`<span class="tab" data-module="clinicalPathway" data-title="`+clinicalPathwayName+`">临床路径</span>`)
+    //$(".titleCont .title").html(clinicalPathwayName);
   }
   if(detailList['注意事项']){
-    $(".tabList").append(`<span class="tab" data-module="notice">注意事项</span>`)
-    $(".notice h1").html(noticeName);
+    $(".tabList").append(`<span class="tab" data-module="notice" data-title="`+noticeName+`">注意事项</span>`)
+    //$(".titleCont .title").html(noticeName);
+  }
+  if (scale) {
+    $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
+    //$(".tabBox .title").html(noticeName);
   }
-  $(".tabList .tab").eq(0).addClass("activeTab")
-  let defaultModuleName = $(".tabList .tab").eq(0).attr("data-module")
+  $(".tabList .tab").eq(selectedTab).addClass("activeTab")
+  let defaultModuleName = $(".tabList .tab").eq(selectedTab).attr("data-module")
   $(`.${defaultModuleName}`).css("display","block")
   bindTabClick()
 }
 function bindTabClick(){
   $(".tabList .tab").on("click", function(){
     const moduleName = $(this).attr("data-module")
-    const display = $(`.${moduleName}`).css("display")
-    if(display == "none"){
+    //const display = $(`.${moduleName}`).css("display")
+      selectedTab=$('.tabList .tab').index(this);
+      $(".titleCont .title").html($(this).attr('data-title'));
+    //if(display == "none"){
       $(".activeTab").removeClass("activeTab")
       $(this).addClass("activeTab")
       $(".container").css("display","none")
-  
       $(`.${moduleName}`).css("display","block")
       $(`.${moduleName} .infos`).scrollTop(0)
-    }
+    //}
   })
   $("#openWin").on("click",function(){
     const type= getUrlArgObject('type');
     const hospitalId= getUrlArgObject('hospitalId');
     const hisName= getUrlArgObject('hisName');
     const hisDetailName= getUrlArgObject('hisDetailName');
-    openNewWin("informationOut.html?hospitalId="+encodeURIComponent(hospitalId)+"&hisName="+encodeURIComponent(hisName)+"&hisDetailName="+encodeURIComponent(hisDetailName)+"&type="+encodeURIComponent(type));
+    openNewWin("informationOut.html?hospitalId="+encodeURIComponent(hospitalId)+"&hisName="+encodeURIComponent(hisName)+"&hisDetailName="+encodeURIComponent(hisDetailName||'')+"&type="+encodeURIComponent(type)+"&d="+selectedDrop+"&t="+selectedTab);
   })
 }
 function adjustHeight() {
+  const extHt = window.opener?60:0;
   var ht = window.innerHeight || document.documentElement.clientHeight;
-  $(".content").height(ht - 90 + "px");
+    $(".content,.content .infos").height(ht - 158 + extHt + "px");
+  /*$(".anchors").height(ht - 258 + "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 - 200 + 'px')
+    //$("pre").width(wt- 0.2*wt - 200 + 'px')
 }
 $(window).on('resize', function(){
   adjustHeight()
   adjustWidth()
 })
-//如果是子窗口,隐藏网页查看按钮
-if(window.opener){
-  $("#openWin").hide();
-}
 

+ 0 - 472
src/js/staticInfoOut.js

@@ -1,472 +0,0 @@
-if(!Promise){
-  var Promise = require("bluebird");
-// Configure
-  Promise.config({
-    longStackTraces: true,
-    warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
-  })
-}
-require('../css/staticInfoOut.less')
-const {
-  post,
-  throttle,
-  imageUrlPrefix,
-  config,
-  getUrlArgObject,
-  openNewWin
-} = require('./promise.js');
-const $ = require("jquery");
-require("./jquery-migrate");
-const jqprint = require("../js/jquery.PrintArea")
-let printing = require('./../images/printing.png');
-let printing2 = require('./../images/printing2.png');
-let showName,noticeName,clinicalPathwayName,showLis=[],selectedDrop=0,selectedTab=0
-
-//如果是子窗口,隐藏网页查看按钮
-if(window.opener){
-    selectedDrop=getUrlArgObject("d")||0;
-    selectedTab=getUrlArgObject("t")||0;
-    $("#openWin,.footer").hide();
-}
-let icond = require('./../images/d.png').replace(/^undefined/g, '')
-function getInfomation() {
-  // var param = {
-  //   "type": getUrlArgObject('type'),
-  //   "name": getUrlArgObject('name'),
-  //   "position": getUrlArgObject('position'),
-  //   "contentTypes":[1,2,3]
-  // };
-  var param = {
-    "type": getUrlArgObject('type'),
-    "hospitalId": getUrlArgObject('hospitalId'),
-    "hisName": getUrlArgObject('hisName'),
-    "hisDetailName": getUrlArgObject('hisDetailName'),
-    "contentTypes":[1,2,3]
-  };
-  //showName = param.hisName;
-  // if (param.type == 5 || param.type == 51) {
-  //   param.type = 12;
-  //   param.name = uname;
-  // }
-
-  post(config.getStaticKnowledgeForHIS, param).then((res) => {
-    if(res.data.code==='0'){
-      const data = res.data.data
-      var str = '';
-      var anchors = '';
-      let sName ='';
-      if (!data||data.length===0) {
-        showEmpty();
-        return;
-      }
-      showLis=data
-      for(let i = 0;i < showLis.length;i++){
-        let tmp = showLis[i]
-        str+=`<li data-idx="${i}" title="${tmp.name}(${tmp.hisName})">${tmp.name}(${tmp.hisName})</li>`
-      }
-      $(".showWhich ul").html(str);
-        sName=showLis[selectedDrop].name+"("+showLis[selectedDrop].hisName+")";
-      $(".showWhichSelect").html(sName).attr("title",sName)
-      showName = data[selectedDrop].name+"("+data[selectedDrop].hisName+")";
-      showInfoSelect()
-      showInfo(data[selectedDrop])
-        renderTitleShow();
-      $('.content img').bind('contextmenu', function(){
-        return false
-      })
-    }else{
-      showEmpty();
-    }
-  })
-}
-getInfomation();
-function showEmpty(){
-  const str=`<div class="empty"><img src="../images/empty3.png" alt=""><p>暂无静态知识</p></div>`;
-  $(".tabBox").html(str).css("border-bottom","none");
-  $("body").css('background','#fff');
-}
-function showInfo(data){
-  var detailList = data.details
-  var scale = data.scale
-  var staticKnowList = detailList['静态知识']
-  var noticeInfo = detailList['注意事项']
-  var clinicalPathwayInfo = detailList['临床路径']
-  var name = data.name
-  noticeName = data.noticeName || "注意事项"
-  clinicalPathwayName = data.clinicalPathwayName || "临床路径"
-  var scaleInfo = data.scale ? data.scale.scaleDetails : ''
-  // $("h1").css({
-  //   "color": "#267FD7",
-  //   "borderBottom": "4px solid  #E9E9E9",
-  //   "padding": "0px 60px 50px 0px"
-  // });
-  renderTab(detailList, scale)
-  staticKnowList&&renderContent(staticKnowList,'staticKnowledge')
-  noticeInfo&&renderContent(noticeInfo,'notice')
-  clinicalPathwayInfo&&renderContent(clinicalPathwayInfo,'clinicalPathway')
-  scaleInfo && renderContentscale(scaleInfo, 'scale', name)
-}
-function showInfoSelect(){
-  $('.showWhich li').click(function(){
-    let idx = $(this).attr('data-idx')
-    let name = $(this).html(),str=''
-    selectedDrop=idx;
-    selectedTab=0;
-    showName = showLis[idx].name+"("+showLis[idx].hisName+")";
-    showInfo(showLis[idx])
-    renderTitleShow();
-    $('.content .infos').scrollTop(0)
-    $(".showWhich ul").css("display","none")
-    $(".showWhichSelect").html(name).attr("title",name)
-  })
-  $(".showWhichSelect").click(function(e){
-    e.stopPropagation()
-    $(".showWhich ul").slideToggle()
-  })
-  $(document).click(function(){
-    $(".showWhich ul").css("display","none")
-  })
-}
-function renderTitleShow(){
-    document.title = showName;
-    $(".titleCont .title").html($(".tabList .tab:eq("+selectedTab+")").attr("data-title"));
-}
-function renderContent(list, contentWrapClassName){
-  $(`.${contentWrapClassName} .infos`).html('');
-  $(`.${contentWrapClassName} .anchors ul`).html('');
-    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++) {
-        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 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 .infos-box`).append(str);
-  $(`.${contentWrapClassName} .anchors ul`).append(anchors);
-  for (var i = 0; i < list[0].detailList.length; i++) {
-    var item = list[0].detailList[i];
-    console.log(item)
-    if (item.textType == 11) {
-      item.content = item.content && item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
-      str = '<div class="infoBox scaleBox" data-id="' + item.id + '"><div class="title"> <h2 class="titleH2" id="' + contentWrapClassName + i +
-        '">'
-      str += item.content
-      str += '</h2></div>'
-      str = `<div class="infoWrapper">${str}</div>`
-      $(`.${contentWrapClassName} .infos .infos-box`).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" data-id="' + it.parentId + '"><div class="item-list">';
-          if (it.selectType == 1) {
-            str += '<p class="item-title">' + it.content + '</p>'
-          } else if (it.selectType == 2) {
-            str += '<p class="item-titles">' + it.content + '</p>'
-          }
-
-          str += '<div class="item-content" data-id="' + it.id + '">'
-          str += '</div></div></div>'
-          $(".scale .infos .infos-box .infoWrapper .infoBox[data-id=" + it.parentId + "]").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 + '">';
-            if (it.selectType == 1 && item.resultType == 1) {
-              str += '<label><input class="radio_type" type="checkbox" name="scale' + its.parentId + '" value="' + its.score + '"/>'
-            } else if (it.selectType == 2 && item.resultType == 1) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.score + '" />'
-            } else if (it.selectType == 1 && item.resultType == 2) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="checkbox" value="' + its.result + '" data_obj="' + its.result + '"/>'
-            } else if (it.selectType == 2 && item.resultType == 2) {
-              str += '<label><input class="radio_type" name="scale' + its.parentId + '" type="radio" value="' + its.result + '" data_obj="' + its.result + '"/>'
-            }
-            str += its.content
-            if (item.resultType == 1) {
-              str += '<span class="num">' + '(' + its.score + ')' + '</span>'
-            }
-            str += '</label>'
-            str += `${item.match ? `<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);
-          }
-        }
-      }
-
-    }
-    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)
-      }
-    }
-  }
-  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 .infos-box`).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 .infos-box`).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 .infos-box`).scroll(throttle(addScrollEvent, 200));
-  addLinkClickEvent(contentWrapClassName);
-  adjustHeight();
-  adjustWidth()
-  getcheck()
-  getResult(pushInfo)
-  copy()
-  getprinting()
-}
-
-function getprinting() {
-  $('.printing').click(function () {
-    $('.foot').hide()
-    $('.hel').hide()
-    $('#Print').css({
-      'height': 'auto', //高度自动
-    }).jqprint();
-    $('.foot').show()
-    $('.hel').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;
-    if (texts == '') {
-      return
-    }
-    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
-    let result
-    let key = false
-    $(".contentList").each(function (i) {
-      if ($(this).find('input[type="radio"]:checked').val() == undefined) {
-        $(this).find(".item-titles").addClass('chColor');
-      } else {
-        $(this).find(".item-titles").removeClass('chColor');
-      }
-      if ($(this).find('input[type="checkbox"]:checked').val() == undefined) {
-        $(this).find(".item-title").addClass('chColor');
-      } else {
-        $(this).find(".item-title").removeClass('chColor');
-      }
-    });
-    if (!$(".contentList").find(".item-title").hasClass('chColor')) {
-      $('input[type="radio"]:checked').each(function () {
-        if (Number($(this).val())) {
-          num += parseFloat($(this).val())
-        } else {
-          arr.push($(this).attr("data_obj"))
-        }
-      });
-      $('input[type="checkbox"]:checkbox:checked').each(function () {
-        if (Number($(this).val())) {
-          num += parseFloat($(this).val())
-        } else {
-          arr.push($(this).attr("data_obj"))
-        }
-      });
-      tmp = arr.join(",");
-      if (pushInfo.length > 0) {
-        for (var i = 0; i < pushInfo.length; i++) {
-          if (pushInfo[i].content.max >= num >= pushInfo[i].content.min) {
-            if (tmp) {
-              result = pushInfo[i].result + ';' + tmp
-            } else {
-              result = pushInfo[i].result
-            }
-          }
-        }
-      } else {
-        result = tmp
-      }
-
-      $(".result_title").attr({
-        "title": result
-      });
-      $(".hel").attr({
-        "title": result
-      });
-      $(".result_title").html(result);
-      $(".score").html('总分:' + num + '分');
-      $(".score").css('display', 'block')
-      $(".result").css('display', 'block')
-      $(".foot").css('display', 'block')
-    } else {
-      Toast('温馨提示:必填选项不能为空~', 500)
-    }
-  })
-
-  $(".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(){
-      $(`.${contentWrapClassName} .anchors .active`).removeClass('active');
-      $(that).parent().addClass("active");
-    },20)
-
-  });
-}
-
-function renderTab(detailList, scale){
-  $(".tabList").html('')
-  if(detailList['静态知识']){
-    $(".tabList").append(`<span class="tab" data-module="staticKnowledge" data-title="`+showName+`">静态知识</span>`)
-    //$(".titleCont .title").html(showName);
-  }
-  if(detailList['临床路径']){
-    $(".tabList").append(`<span class="tab" data-module="clinicalPathway" data-title="`+clinicalPathwayName+`">临床路径</span>`)
-    //$(".titleCont .title").html(clinicalPathwayName);
-  }
-  if(detailList['注意事项']){
-    $(".tabList").append(`<span class="tab" data-module="notice" data-title="`+noticeName+`">注意事项</span>`)
-    //$(".titleCont .title").html(noticeName);
-  }
-  if (scale) {
-    $(".tabList").append(`<span class="tab" data-module="scale" data-title="` + showName + `">评估内容</span>`)
-    //$(".tabBox .title").html(noticeName);
-  }
-  $(".tabList .tab").eq(selectedTab).addClass("activeTab")
-  let defaultModuleName = $(".tabList .tab").eq(selectedTab).attr("data-module")
-  $(`.${defaultModuleName}`).css("display","block")
-  bindTabClick()
-}
-function bindTabClick(){
-  $(".tabList .tab").on("click", function(){
-    const moduleName = $(this).attr("data-module")
-    //const display = $(`.${moduleName}`).css("display")
-      selectedTab=$('.tabList .tab').index(this);
-      $(".titleCont .title").html($(this).attr('data-title'));
-    //if(display == "none"){
-      $(".activeTab").removeClass("activeTab")
-      $(this).addClass("activeTab")
-      $(".container").css("display","none")
-      $(`.${moduleName}`).css("display","block")
-      $(`.${moduleName} .infos`).scrollTop(0)
-    //}
-  })
-  $("#openWin").on("click",function(){
-    const type= getUrlArgObject('type');
-    const hospitalId= getUrlArgObject('hospitalId');
-    const hisName= getUrlArgObject('hisName');
-    const hisDetailName= getUrlArgObject('hisDetailName');
-    openNewWin("staticInfoOut.html?hospitalId="+encodeURIComponent(hospitalId)+"&hisName="+encodeURIComponent(hisName)+"&hisDetailName="+encodeURIComponent(hisDetailName||'')+"&type="+encodeURIComponent(type)+"&d="+selectedDrop+"&t="+selectedTab);
-  })
-}
-function adjustHeight() {
-  const extHt = window.opener?60:0;
-  var ht = window.innerHeight || document.documentElement.clientHeight;
-    $(".content,.content .infos").height(ht - 158 + extHt + "px");
-  /*$(".anchors").height(ht - 258 + "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 - 200 + 'px')
-}
-$(window).on('resize', function(){
-  adjustHeight()
-  adjustWidth()
-})
-

+ 5 - 5
webpack.config.js

@@ -31,7 +31,7 @@ module.exports = {
     homeStatic:path.resolve(__dirname, 'src/js', 'homeStatic.js'),
     searchStaticList:path.resolve(__dirname, 'src/js', 'searchStaticList.js'),
     staticInfo:path.resolve(__dirname, 'src/js', 'staticInfo.js'),
-    staticInfoOut:path.resolve(__dirname, 'src/js', 'staticInfoOut.js'),
+    //staticInfoOut:path.resolve(__dirname, 'src/js', 'informationOut.js'),
     vendor: 'lodash'// 多个页面所需的公共库文件,防止重复打包带入
   },
   output: {
@@ -70,10 +70,10 @@ module.exports = {
         collapseWhitespace: true //删除空白符与换行符
       }
     }),
-    new HtmlWebpackPlugin({
+    /*new HtmlWebpackPlugin({
       title: 'staticInfoOut',
-      template: path.resolve(__dirname, 'src/html', 'staticInfoOut.html'),
-      filename: 'staticInfoOut.html',
+      template: path.resolve(__dirname, 'src/html', 'informationOut.html'),
+      filename: 'informationOut.html',
       chunks: ['staticInfoOut', 'vendor', 'common'],
       inject: true,
       hash: true, //防止缓存
@@ -82,7 +82,7 @@ module.exports = {
         removeComments: true, //移除HTML中的注释
         collapseWhitespace: true //删除空白符与换行符
       }
-    }),
+    }),*/
     new HtmlWebpackPlugin({
       title: 'staticInfo',
       template: path.resolve(__dirname, 'src/html', 'staticInfo.html'),