Browse Source

Merge branch 'cdss_hainan' into test

zhangxc 5 năm trước cách đây
mục cha
commit
19437cf050

+ 2 - 1
src/css/indexHorizontal.less

@@ -230,7 +230,8 @@
 }
 }
 .push .conditTips {
 .push .conditTips {
     height: 100%;
     height: 100%;
-    max-height: 40px;
+    max-height: 50px;
+    overflow-y: hidden;
 }
 }
 .diagName {
 .diagName {
     color: #040428;
     color: #040428;

+ 82 - 7
src/css/information.less

@@ -7,7 +7,10 @@
   li {
   li {
     list-style: none;
     list-style: none;
   }
   }
-
+  p{
+    display: block;
+    width: 100%;
+  }
   table {
   table {
     border-collapse: collapse;
     border-collapse: collapse;
     border-spacing: 0;
     border-spacing: 0;
@@ -27,7 +30,7 @@
     margin: 0 0px 30px 0px !important;
     margin: 0 0px 30px 0px !important;
     font-size: 28px !important;
     font-size: 28px !important;
     line-height: 37px;
     line-height: 37px;
-    padding: 0 0 0 20px;
+    padding: 43px 0 0 70px;
   }
   }
 
 
   .titleH2 {
   .titleH2 {
@@ -42,6 +45,15 @@
   .content {
   .content {
     position: relative;
     position: relative;
     height: 550px;
     height: 550px;
+    padding: 0px 0 0px 70px;
+    ul li{
+      list-style: disc;
+      list-style-position:inside;
+    }
+    ol li{
+      list-style: decimal;
+      list-style-position:inside;
+    }
   }
   }
   .infoBox {
   .infoBox {
     border-left: 1px solid #969C9F;
     border-left: 1px solid #969C9F;
@@ -90,13 +102,28 @@
   }
   }
 
 
   .container {
   .container {
-    width: 80%;
+    width: 100%;
     overflow: hidden;
     overflow: hidden;
     background: #fff;
     background: #fff;
     margin: 0 auto;
     margin: 0 auto;
-    padding: 43px 0 30px 20px;
+  
  
  
   }
   }
+  .borderTop,.borderBottom{
+    height: 2px;
+    background:#e6e6e6;
+    position: absolute;
+    width: 100%;
+    left: 0;
+    z-index: 2;
+}
+.borderTop{
+    top: 0;
+}
+.borderBottom{
+    height: 5px;
+    bottom: 0;
+}
   pre {
   pre {
     white-space: pre-wrap;
     white-space: pre-wrap;
     word-wrap: break-word;
     word-wrap: break-word;
@@ -109,7 +136,7 @@
     top: 0;
     top: 0;
     margin-right: 14px;
     margin-right: 14px;
     overflow: auto;
     overflow: auto;
-    height: 100%;
+    max-height: 100%;
   }
   }
 
 
   .anchors ul {
   .anchors ul {
@@ -118,11 +145,15 @@
     border: 1px solid #F5F6F7;
     border: 1px solid #F5F6F7;
     background-color: #F5F6F7;
     background-color: #F5F6F7;
     line-height: 19px;
     line-height: 19px;
+    li{
+      list-style: none;
+    }
   }
   }
 
 
   .anchors li {
   .anchors li {
     position: relative;
     position: relative;
     border-left: 2px solid #E0E2E3;
     border-left: 2px solid #E0E2E3;
+    list-style: none;
   }
   }
 
 
   .anchors .anchor-line {
   .anchors .anchor-line {
@@ -174,9 +205,47 @@
     border-radius: 0;
     border-radius: 0;
     border: none;
     border: none;
     background-color: #F5F6F7;
     background-color: #F5F6F7;
-    background: url('../images/icon_current.png') center center no-repeat;
+    // background: url('../images/icon_current.png') center center no-repeat;
+  }
+  .infos>.downBox{
+    margin-right: 0;
+  }
+  .downImg{
+    width: 29px;
+    margin-right: 10px;
+    position: relative;
+  }
+  .BtnBox,.txtBox{
+    margin-top: 20px;
+    text-align: center;
+  }
+  .BtnBox{
+    margin-top: 50px;
+  }
+  .txtBox{
+    line-height: 50px;
+    font-size: 14px;
+    font-weight: bold;
+    color: #333;
+    position: relative;
+  }
+  .sizeBox{
+    margin-top: 10px;
+    line-height:16px;
+    text-align: center;
+    color: #777777;
+  }
+  .download{
+    cursor: pointer;
+    display: inline-block;
+    width:80px;
+    height:34px;
+    line-height: 34px;
+    text-align: center;
+    background:rgba(59,158,208,1);
+    border-radius:4px;
+    color: #fff;
   }
   }
-
   a:visited {
   a:visited {
     color: #777;
     color: #777;
   }
   }
@@ -187,4 +256,10 @@
     -moz-user-select: none;
     -moz-user-select: none;
     -ms-user-select: none;
     -ms-user-select: none;
     user-select: none;
     user-select: none;
+  }
+  .ql-align-center{
+    text-align: center;
+  }
+  .ql-align-right{
+    text-align: right;
   }
   }

+ 34 - 6
src/css/staticSearch.css

@@ -1,15 +1,18 @@
+body{
+    background: #fff;
+}
 .container {
 .container {
-    width: 80%;
+    width: 100%;
     background: #fff;
     background: #fff;
     margin: 0 auto;
     margin: 0 auto;
-    padding: 0 30px;
+   
     position: absolute;
     position: absolute;
+    left: 0;
     /* width: 80%; */
     /* width: 80%; */
-    left: 30px;
-    right: 30px;
     height: 100%;
     height: 100%;
     overflow: hidden;
     overflow: hidden;
     /* box-sizing: border-box; */
     /* box-sizing: border-box; */
+  
 }
 }
 .staticSearchT {
 .staticSearchT {
     position: relative;
     position: relative;
@@ -26,12 +29,30 @@
     box-sizing: border-box;
     box-sizing: border-box;
     border: 1px #CECECE solid;
     border: 1px #CECECE solid;
 }
 }
+.borderTop{
+    height: 2px;
+    background:#e6e6e6;
+    position: fixed;
+    width: 100%;
+    left: 0;
+}
+.borderTop{
+    top: 0;
+}
+
 .container .ipt input {
 .container .ipt input {
     width: 100%;
     width: 100%;
     position: relative;
     position: relative;
     top: 1px;
     top: 1px;
+    font-family: '微软雅黑';
+}
+.placeholder{
+    color: #b2b2b2;
+    color: #777;
+    position: absolute;
+    left: 5px;
+    display: none;
 }
 }
-
 .container .staticSearchT button {
 .container .staticSearchT button {
     position: absolute;
     position: absolute;
     right: 0;
     right: 0;
@@ -43,6 +64,7 @@
     background: #2A9BD5;
     background: #2A9BD5;
     text-align: center;
     text-align: center;
     border: none;
     border: none;
+    font-family: '微软雅黑';
 }
 }
 .container .staticSearchT i {
 .container .staticSearchT i {
     position: absolute;
     position: absolute;
@@ -56,6 +78,9 @@
     background-size:15px 15px;
     background-size:15px 15px;
     z-index: 100;
     z-index: 100;
 }
 }
+.searchKnowledge{
+    padding: 0 80px;
+}
 .staticSearchB .tip,.container .staticSearchT i,.staticSearchB .empty {
 .staticSearchB .tip,.container .staticSearchT i,.staticSearchB .empty {
     display: none;
     display: none;
 }
 }
@@ -66,7 +91,7 @@
     margin-top: 10px;
     margin-top: 10px;
 }
 }
 .staticSearchB ul {
 .staticSearchB ul {
-    position: absolute;
+    /* position: absolute; */
     height: 480px;
     height: 480px;
     /* width: 100%; */
     /* width: 100%; */
     right: 30px;
     right: 30px;
@@ -108,4 +133,7 @@
 .medicalTypeItem img {
 .medicalTypeItem img {
     vertical-align: text-bottom;
     vertical-align: text-bottom;
     margin: 0  3px 2px 0;
     margin: 0  3px 2px 0;
+}
+pre{
+    width: 100%;
 }
 }

+ 10 - 1
src/css/treatPlan.less

@@ -1,5 +1,14 @@
+.borderTop{
+    height: 2px;
+    background:#e6e6e6;
+    position: fixed;
+    width: 100%;
+    left: 0;
+    z-index: 2;
+    top: 0;
+}
 .conditionHintZhiliao {
 .conditionHintZhiliao {
-    padding: 10px 20px 0;
+    padding: 10px 50px 0;
     overflow-y: auto;
     overflow-y: auto;
     h4 {
     h4 {
         font-size: 18px;
         font-size: 18px;

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 22 - 2
src/html/disclaimer.html


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 12 - 0
src/html/illness.html


+ 1 - 1
src/html/index.html

@@ -20,7 +20,7 @@
         <p class="responsibility"></p>
         <p class="responsibility"></p>
       </div>
       </div>
       <div class="disclaimer clearfix">
       <div class="disclaimer clearfix">
-        <span class="logo">&copy 朗通医疗</span>
+        <span class="logo">&copy; 朗通医疗</span>
         <span class="version-tip">版本说明</span>
         <span class="version-tip">版本说明</span>
         <span class="disclaimerInfo">免责声明</span>
         <span class="disclaimerInfo">免责声明</span>
       </div>
       </div>

+ 1 - 0
src/html/information.html

@@ -16,6 +16,7 @@
 
 
 <body>
 <body>
   <div class="container disCopy">
   <div class="container disCopy">
+    <div class="borderTop"></div>
     <h1></h1>
     <h1></h1>
     <div class="content">
     <div class="content">
         <div class="infos"></div>
         <div class="infos"></div>

+ 13 - 3
src/html/scale.html

@@ -39,12 +39,21 @@
     }
     }
 
 
     .container {
     .container {
-      width: 80%;
+      /* width: 80%; */
       overflow: hidden;
       overflow: hidden;
       background: #fff;
       background: #fff;
       margin: 0 auto;
       margin: 0 auto;
-      padding: 30px 30px 30px 30px;
-    }
+      padding: 30px 50px 30px 50px;
+    }
+    .borderTop{
+    height: 2px;
+    background:#e6e6e6;
+    position: fixed;
+    width: 100%;
+    left: 0;
+    z-index: 2;
+    top: 0;
+}
 
 
     h1 {
     h1 {
       text-align: center;
       text-align: center;
@@ -202,6 +211,7 @@
 
 
 <body>
 <body>
   <div class="containBox">
   <div class="containBox">
+      <div class="borderTop"></div>
       <div class="container">
       <div class="container">
           <h1></h1>
           <h1></h1>
           <div class="content disCopy"></div>
           <div class="content disCopy"></div>

+ 5 - 2
src/html/staticSearch.html

@@ -38,10 +38,13 @@
 
 
 <body>
 <body>
     <div class="container">
     <div class="container">
+        <div class="borderTop"></div>
+        <div class="borderBottom"></div>
         <div class="searchKnowledge">
         <div class="searchKnowledge">
             <div class="staticSearchT">
             <div class="staticSearchT">
                 <div class="ipt">
                 <div class="ipt">
-                    <input type="text" value="" placeholder="医学知识搜索">
+                    <input type="text" id="searchInp" value="" autocomplete="off" placeholder="医学知识搜索">
+                    <span class="placeholder">医学知识搜索</span>
                 </div>
                 </div>
                 <i id="clearKnowledge"></i>
                 <i id="clearKnowledge"></i>
                 <button >搜索</button>
                 <button >搜索</button>
@@ -49,7 +52,7 @@
             <div class="searchTypeBox"></div>
             <div class="searchTypeBox"></div>
 
 
             <div class="staticSearchB">
             <div class="staticSearchB">
-                <p class="tip">查询内容</p>
+                <p class="tip">搜索结果</p>
                 <p class="empty">暂无搜索结果!</p>
                 <p class="empty">暂无搜索结果!</p>
                 <ul>
                 <ul>
                     
                     

+ 1 - 0
src/html/treatplan.html

@@ -15,6 +15,7 @@
 
 
 <body>
 <body>
 <div class="bodyWrap treatBox">
 <div class="bodyWrap treatBox">
+    <div class="borderTop"></div>
     <div class="iframeWrap treatWrap">
     <div class="iframeWrap treatWrap">
         <ul>
         <ul>
             <li class="conditionHintPub conditionHintZhiliao disCopy">
             <li class="conditionHintPub conditionHintZhiliao disCopy">

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 25 - 5
src/html/version.html


BIN
src/images/txtIcon.png


BIN
src/images/vedioIcon.png


+ 9 - 2
src/js/disclaimer.js

@@ -4,9 +4,16 @@ const $ = require("jquery");
 $(function(){
 $(function(){
   function getDisclaimer() {
   function getDisclaimer() {
     post(config.disclaimer, '').then((res) => {
     post(config.disclaimer, '').then((res) => {
-      const data = res.data.data.find(item => item.disclaimerCode == '3');
+      const data = res.data.data
+      let item = {}
+      for(let i = 0; i < data.length; i++){
+        if(data[i]&&data[i].disclaimerCode == '3'){
+          item = data[i]
+        }
+      }
       $("h1").html('免责声明');
       $("h1").html('免责声明');
-      $(".content").html(data.description);
+      $(".content").html(item.description);
+     
     })
     })
   }
   }
   getDisclaimer();
   getDisclaimer();

+ 219 - 23
src/js/information.js

@@ -4,10 +4,24 @@ const {
   throttle,
   throttle,
   imageUrlPrefix,
   imageUrlPrefix,
   config,
   config,
-  getUrlArgObject
+  getUrlArgObject,
+  isIe8
 } = require('./promise.js');
 } = require('./promise.js');
 const $ = require("jquery");
 const $ = require("jquery");
+let TxtICon = require('./../images/txtIcon.png')
+let VedioIcon = require('./../images/vedioIcon.png')
+let currentIcon = require('./../images/icon_current.png')
 
 
+
+
+if(isIe8()) {
+  let reg = /undefined/g
+  TxtICon = TxtICon.replace(reg, '')
+  VedioIcon = VedioIcon.replace(reg, '')
+  currentIcon = currentIcon.replace(reg, '')
+}
+
+const isLocal = window.location.hostname.indexOf('localhost') !=-1;
 function getInfomation() {
 function getInfomation() {
   var param = {
   var param = {
     "type": getUrlArgObject('type'),
     "type": getUrlArgObject('type'),
@@ -20,6 +34,12 @@ function getInfomation() {
     param.type = 12;
     param.type = 12;
     param.name = uname;
     param.name = uname;
   }
   }
+  if (param.type == 82) {
+    param.position = "8";
+  }
+  if (param.type == 83) {
+    param.position = "9";
+  }
 
 
   post(config.information, param).then((res) => {
   post(config.information, param).then((res) => {
     const data = res.data.data
     const data = res.data.data
@@ -29,36 +49,69 @@ function getInfomation() {
     var item = '';
     var item = '';
     if (!data) {
     if (!data) {
       $("h1").html("暂时没有数据");
       $("h1").html("暂时没有数据");
+      adjustHeight()
       $(".anchors").css("display", "none");
       $(".anchors").css("display", "none");
       return;
       return;
     }
     }
     var list = data.details;
     var list = data.details;
-    $("h1").html(showName);
+    
     // $("h1").css({
     // $("h1").css({
     //   "color": "#267FD7",
     //   "color": "#267FD7",
     //   "borderBottom": "4px solid  #E9E9E9",
     //   "borderBottom": "4px solid  #E9E9E9",
     //   "padding": "0px 60px 50px 0px"
     //   "padding": "0px 60px 50px 0px"
     // });
     // });
-    for (var i = 0; i < list.length; i++) {
-      item = list[i];
-      item.content = item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
-      anchors = '<li><i></i><a href="#' + item.title +
-        '">' + 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="' + item.title +
-        '">'
-      if (getUrlArgObject('type') == 8) {
-        str += '【' + item.title + '】'
-      } else {
-        str += item.title
+    if(param.type == 82 || param.type == 83){
+      for (var i = 0; i < list.length; i++) {
+        item = list[i];
+        let contentObj = JSON.parse(item.content)
+        // anchors = '<li><i></i><a href="#' + item.title +
+        //   '">' + 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="' + item.title +
+        //   '">'
+        // if (getUrlArgObject('type') == 8) {
+        //   str += '【' + item.title + '】'
+        // } else {
+        //   str += item.title
+        // }
+        // str += '</h2></div>' +
+        //   '<div><pre>' + item.content + '</pre><div></div>';
+        //   str = `<div class="infoWrapper">${str}</div>`
+        // $(".infos").append(str);
+        $(".anchors").css("display","none");
+        // $(".anchors ul").append(anchors);
+        str = `<div class="downBox">
+          <p class="txtBox"><img style="top:${param.type == '82' ? '11px':'7px'}" class="downImg" src="${param.type == '82' ? TxtICon:VedioIcon}">${item.title}</p>
+         <p class="sizeBox">文件大小${contentObj.size}</p>
+          <div class="BtnBox"><span class="download" data-url="${contentObj.url}" data-title="${contentObj.name}">下载</span></div>
+        </div>`
       }
       }
-      str += '</h2></div>' +
-        '<div><pre>' + item.content + '</pre><div></div>';
-        str = `<div class="infoWrapper">${str}</div>`
       $(".infos").append(str);
       $(".infos").append(str);
-      $(".anchors ul").append(anchors);
+      downLoadFile()
+    }else{
+      $("h1").html(showName);
+      for (var i = 0; i < list.length; i++) {
+        item = list[i];
+        item.content = item.content.replace(/{imageUrlPrefix}/g, imageUrlPrefix);
+        anchors = '<li><i></i><a href="#'+item.title.trim()+'">' + 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="' + item.title.trim() +
+          '">'
+        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>`
+        $(".infos").append(str);
+        $(".anchors ul").append(anchors);
+        
+      }
     }
     }
+    
     addLinkClickEvent();
     addLinkClickEvent();
     adjustHeight();
     adjustHeight();
+    adjustWidth()
     $('.content img').bind('contextmenu', function(){
     $('.content img').bind('contextmenu', function(){
       return false
       return false
     })
     })
@@ -66,10 +119,11 @@ function getInfomation() {
       var scrollTop = $('.infos').scrollTop()
       var scrollTop = $('.infos').scrollTop()
       var divHeight = 0;
       var divHeight = 0;
       for (var i = 0; i < list.length; i++) {
       for (var i = 0; i < list.length; i++) {
-        divHeight = divHeight + parseInt($('#' + list[i].title).css('height')) + parseInt($('#' + list[i].title).parent().next().css('height')) + 40
+        divHeight = divHeight + parseInt($('#' + list[i].title.trim()).css('height')) + parseInt($('#' + list[i].title.trim()).parent().next().css('height')) + 30
         if (divHeight > scrollTop) {
         if (divHeight > scrollTop) {
-          var anchor = 2 * i;
+          var anchor = 2 * (i);
           $('.anchors ul').children().eq(anchor).addClass('active').siblings().removeClass('active');
           $('.anchors ul').children().eq(anchor).addClass('active').siblings().removeClass('active');
+          setBackground()
           return;
           return;
         }
         }
       }
       }
@@ -80,17 +134,159 @@ function getInfomation() {
 getInfomation();
 getInfomation();
 
 
 function addLinkClickEvent() {
 function addLinkClickEvent() {
-  $("li:first").addClass("active");
-  $("li>a").on("click", function () {
+  $(".anchors ul li:first").addClass("active");
+  setBackground()
+  $(".anchors ul li>a").on("click", function () {
     $(".active").removeClass('active');
     $(".active").removeClass('active');
     $(this).parent().addClass("active");
     $(this).parent().addClass("active");
+    setBackground()
   });
   });
 }
 }
+
+function setBackground(){
+  $(".anchors  i").css({
+    background:"#E0E2E3"
+  })
+  $(".anchors .active i").css({
+    background:`url(${currentIcon})   center center no-repeat`
+  })
+}
+
+function downLoadFile() {
+  $(".download").on("click", function(){
+    const downUrl = $(this).attr('data-url')
+    const url = isLocal ?'http://192.168.2.236:82'+downUrl + '?download=1' : 'http://'+window.location.hostname+':82'+downUrl + '?download=1'
+    const downTitle = $(this).attr('data-title')
+    // download(url, downTitle)
+    downLoadFileIe(url, downTitle)
+  })
+
+  // var $form = $('<form method="GET"></form>');
+  // $form.attr('action', url);
+  // $form.appendTo($('body'));
+  // $form.submit();
+
+//     const ele = document.createElement('a');
+//     ele.setAttribute('download' , 'download');//用于设置下载文件的文件名
+
+//     ele.setAttribute('href',url); //设置下载文件的url地址
+
+
+//     ele.click();
+
+
+}
+// function getBlob(url,cb) {
+//   var xhr = new XMLHttpRequest();
+//   xhr.open('GET', url, true);
+//   xhr.responseType = 'blob';
+//   xhr.onload = function() {
+//           if (xhr.status === 200) {
+//               cb(xhr.response);
+//           }
+//   };
+//   xhr.send();
+// }
+// function saveAs(blob, filename) {
+//   if (window.navigator.msSaveOrOpenBlob) {
+//       navigator.msSaveBlob(blob, filename);
+//   } else {
+//       var link = document.createElement('a');
+//       var body = document.querySelector('body');
+
+//       link.href = window.URL.createObjectURL(blob);
+//       link.download = filename;
+
+//       // fix Firefox
+//       link.style.display = 'none';
+//       body.appendChild(link);
+      
+//       link.click();
+//       body.removeChild(link);
+
+//       window.URL.revokeObjectURL(link.href);
+//   };
+// }
+// function download(url, filename){
+//   getBlob(url, function(blob) {
+//       saveAs(blob, filename);
+//   });
+// }
+function adjustWidth() {
+  var wt = window.innerWidth || document.documentElement.clientWidth;
+  $(".titleH2").width(wt- 0.2*wt -33 - 200 - 17 - 20 + 'px')
+  $(".contentWrapper").width(wt- 0.2*wt -33 - 200 - 17  -15 + 'px')
+}
+
 function adjustHeight() {
 function adjustHeight() {
-  var ht = window.innerHeight;
-  $(".content").height(ht - 145 + "px");
+  var ht = window.innerHeight || document.documentElement.clientHeight;
+  $(".content").height(ht - 145+32 + "px");
+  if(getUrlArgObject('type') == 82 || getUrlArgObject('type') == 83){
+    $(".content").height(ht - 105+32 + "px");
+  }
+
 }
 }
 $(window).on('resize', function(){
 $(window).on('resize', function(){
   adjustHeight()
   adjustHeight()
+  adjustWidth()
 })
 })
 
 
+$('img').on("mouuseenter",function(){
+  return false
+})
+function downLoadFileIe (url, name) {
+  if (!!window.ActiveXObject || "ActiveXObject" in window) {
+    //ie
+    var oPow = window.open(url, "", "width = 1, height = 1, top = 5000, left = 5000 ");
+    var isOpen = true; //判断window.open是否被禁用
+    try {
+      if (oPow == null) {
+        isOpen = false
+      }
+    } catch (err) {
+      isOpen = false
+    }
+    if (isOpen) {
+      //没禁用window.open采用window.open下载
+      // while (oPow.document.readyState !== "complete") {
+      //   if (oPow.document.readyState === "complete") break;
+      // }
+      oPow.document.execCommand("SaveAs", true, name);
+      oPow.close();
+    } else {
+      //禁用了window.open采用iframe下载
+      var oIrame = document.createElement('iframe');
+      oIrame.style.width = "0px";
+      oIrame.style.height = "0px";
+      oIrame.style.opacity = 1;
+      document.body.appendChild(oIrame)
+      oIrame.src = url;
+      var IfDoc = oIrame.contentDocument || oIrame.document;
+      oIrame.onreadystatechange = function () { // IE下的节点都有onreadystatechange这个事件  
+        if (oIrame.readyState == "complete") {
+          // oIrame.execCommand("SaveAs", true, name)
+          document.body.removeChild(oIrame)
+        }
+      };
+
+    }
+
+  } else {
+    if (typeof url == 'object' && url instanceof Blob) {
+      url = URL.createObjectURL(url); // 创建blob地址
+    }
+    var aLink = document.createElement('a');
+    aLink.href = url;
+    aLink.download = name || ''; // HTML5新增的属性,指定保存文件名,可以不要后缀,注意,file:///模式下不会生效
+    var event;
+    if (window.MouseEvent) {
+      event = new MouseEvent('click');
+    } else {
+      if (document.createEvent) {
+        event = document.createEvent('MouseEvents');
+        event.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+      }
+    }
+    aLink.dispatchEvent(event);
+  }
+}

+ 4 - 2
src/js/promise.js

@@ -41,6 +41,7 @@ const config = {
   getMr: '/api/data/mr/getMr',
   getMr: '/api/data/mr/getMr',
   getVersion: '/api/data/versionInfo/getVersionInfoAlls',
   getVersion: '/api/data/versionInfo/getVersionInfoAlls',
   getStaticKnowledge: '/api/data/search/getStaticKnowledge',
   getStaticKnowledge: '/api/data/search/getStaticKnowledge',
+  getStaticKnowledgeHaiNan:'/api/data/search/getStaticKnowledgeHaiNan',
   getStaticScale: '/api/data/search/getScale',
   getStaticScale: '/api/data/search/getScale',
   dictionaryInfo: '/api/data/dictionaryInfo/getList', //字典信息
   dictionaryInfo: '/api/data/dictionaryInfo/getList', //字典信息
   ruleTypeMap:{     //大数据推送参数featureType对应
   ruleTypeMap:{     //大数据推送参数featureType对应
@@ -49,7 +50,8 @@ const config = {
     '8':'4,5'
     '8':'4,5'
   }
   }
 }
 }
-const imageUrlPrefix = 'http://192.168.2.241:82';
+const isLocal = window.location.hostname.indexOf('localhost') !=-1;
+const imageUrlPrefix = isLocal ?'http://192.168.2.242:82':'http://'+window.location.hostname+':82';
 // const getUrlArgObject = function(parm) {  
 // const getUrlArgObject = function(parm) {  
 //   var query = decodeURI(window.location.search);
 //   var query = decodeURI(window.location.search);
 //   var args = qs.parse(qs.parse(query.substr(1)));
 //   var args = qs.parse(qs.parse(query.substr(1)));
@@ -98,7 +100,7 @@ const newinConf = {
   openMode: "_blank"  //每次都是新窗口打开为_blank,打开同一窗口填写任意字符串
   openMode: "_blank"  //每次都是新窗口打开为_blank,打开同一窗口填写任意字符串
 }
 }
 
 
-const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top} scrollbars=yes`
+const newWindowLocation = `width=${newinConf.width}, height=${newinConf.height}, left=${newinConf.left}, top=${newinConf.top}, scrollbars=yes, resizable=yes, status=yes`
 const openNewWin = function (url) {
 const openNewWin = function (url) {
   window.open(url, newinConf.openMode, newWindowLocation)
   window.open(url, newinConf.openMode, newWindowLocation)
 }
 }

+ 40 - 5
src/js/staticSearch.js

@@ -11,8 +11,8 @@ let first = true
 const is8Ie = isIe8() //判断是否为IE8
 const is8Ie = isIe8() //判断是否为IE8
 if(is8Ie) {
 if(is8Ie) {
   let reg = /undefined/g
   let reg = /undefined/g
-  checkOffImg = showImg.replace(reg, '')
-  checkOnImg = collapseImg.replace(reg, '')
+  checkOffImg = checkOffImg.replace(reg, '')
+  checkOnImg = checkOnImg.replace(reg, '')
 }
 }
 
 
 $(".staticSearchT input").keyup(function(e) {
 $(".staticSearchT input").keyup(function(e) {
@@ -32,6 +32,9 @@ $(".searchKnowledge").css({display:'block'})
 $(".searchKnowledge .staticSearchT").on('click','button',function() {
 $(".searchKnowledge .staticSearchT").on('click','button',function() {
     var val = $(this).parents(".staticSearchT").find("input").val()
     var val = $(this).parents(".staticSearchT").find("input").val()
     val!=''&&getKnowledgeData(val)
     val!=''&&getKnowledgeData(val)
+    if(is8Ie&&val){
+        $(".placeholder").css("display","none")
+    }
 })
 })
 
 
 
 
@@ -39,7 +42,7 @@ function getMedicalTypes() {
     post(config.dictionaryInfo,{}).then((res) =>{
     post(config.dictionaryInfo,{}).then((res) =>{
         const data = res.data
         const data = res.data
         if(data.code == 0) {
         if(data.code == 0) {
-            medicalTypesList = res.data.data[7]
+            medicalTypesList = res.data.data[8]
             medicalTypesList[0].checked = true
             medicalTypesList[0].checked = true
             renderMedicalType(medicalTypesList)
             renderMedicalType(medicalTypesList)
         } else {
         } else {
@@ -91,7 +94,7 @@ function getKnowledgeData(value) {
             }
             }
         }
         }
     }
     }
-    post(config.getStaticKnowledge,{
+    post(config.getStaticKnowledgeHaiNan,{
         inputStr: value.replace(/\\/g,'\\\\').replace(/%/g,'\\%').replace(/\_/g,'\\_'),
         inputStr: value.replace(/\\/g,'\\\\').replace(/%/g,'\\%').replace(/\_/g,'\\_'),
         types:medicalTypes
         types:medicalTypes
         }).then((res) => {
         }).then((res) => {
@@ -122,8 +125,9 @@ function getKnowledgeData(value) {
     })
     })
 }
 }
 
 
+
 function adjustHeight() {
 function adjustHeight() {
-    var ht = window.innerHeight;
+    var ht = window.innerHeight  || document.documentElement.clientHeight;
     var ht2 = $(".searchTypeBox").outerHeight(true)
     var ht2 = $(".searchTypeBox").outerHeight(true)
     $(".staticSearchB ul").height(ht - 120 - ht2 + "px");
     $(".staticSearchB ul").height(ht - 120 - ht2 + "px");
 }
 }
@@ -156,4 +160,35 @@ $(".staticSearchT").on('click','#clearKnowledge',function() {
     $(".searchKnowledge .staticSearchB .empty").css({display:'none'})
     $(".searchKnowledge .staticSearchB .empty").css({display:'none'})
     $(this).prev('.ipt').find('input').focus()
     $(this).prev('.ipt').find('input').focus()
     $(this).css({display:"none"})
     $(this).css({display:"none"})
+    if(is8Ie){
+        $(".placeholder").css("display","inline-block");
+    }
 })
 })
+if(is8Ie){
+    setTimeout(function(){
+        $(".ipt input").attr("value","")
+        $(".ipt input").val("")
+        $(".placeholder").css("display","inline-block")
+        $(".ipt input").blur()
+    },100)
+   
+    
+    setTimeout(function(){
+        $(".placeholder").css("display","inline-block")
+    },110)
+    $(".ipt input").on("focus", function(){
+        $(".placeholder").css("display","none")
+    }).on("blur",function(){
+        let val = $(".ipt input").val()
+        if(!val){
+            $(".placeholder").css("display","inline-block")
+        }else{
+            $(".placeholder").css("display","none")
+        }
+    })
+    $(".placeholder").on("click",function(){
+        $(".placeholder").css("display","none")
+        $(".ipt input").focus()
+    })
+}
+

+ 5 - 5
webpack.config.js

@@ -4,7 +4,7 @@ const CleanWebpackPlugin = require('clean-webpack-plugin') // 清空打包目录
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const MiniCssExtractPlugin = require('mini-css-extract-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
 const webpack = require('webpack');
 const webpack = require('webpack');
-const proxyHost = "http://192.168.2.236:5050";
+const proxyHost = "http://192.168.2.241:5050";
 module.exports = {
 module.exports = {
   entry: {
   entry: {
     index: path.resolve(__dirname, 'src/js', 'index.js'),
     index: path.resolve(__dirname, 'src/js', 'index.js'),
@@ -82,7 +82,7 @@ module.exports = {
       }
       }
     }),
     }),
     new HtmlWebpackPlugin({
     new HtmlWebpackPlugin({
-      title: 'information',
+      title: '静态知识',
       template: path.resolve(__dirname, 'src/html', 'information.html'),
       template: path.resolve(__dirname, 'src/html', 'information.html'),
       filename: 'information.html',
       filename: 'information.html',
       chunks: ['information', 'vendor', 'common'],
       chunks: ['information', 'vendor', 'common'],
@@ -95,7 +95,7 @@ module.exports = {
       }
       }
     }),
     }),
     new HtmlWebpackPlugin({
     new HtmlWebpackPlugin({
-      title: 'drugInfo',
+      title: '药品信息',
       template: path.resolve(__dirname, 'src/html', 'drugInfo.html'),
       template: path.resolve(__dirname, 'src/html', 'drugInfo.html'),
       filename: 'drugInfo.html',
       filename: 'drugInfo.html',
       chunks: ['information', 'vendor', 'common'],
       chunks: ['information', 'vendor', 'common'],
@@ -108,7 +108,7 @@ module.exports = {
       }
       }
     }),
     }),
     new HtmlWebpackPlugin({
     new HtmlWebpackPlugin({
-      title: 'disclaimer',
+      title: '免责声明',
       template: path.resolve(__dirname, 'src/html', 'disclaimer.html'),
       template: path.resolve(__dirname, 'src/html', 'disclaimer.html'),
       filename: 'disclaimer.html',
       filename: 'disclaimer.html',
       chunks: ['vendor', 'common', 'disclaimer'],
       chunks: ['vendor', 'common', 'disclaimer'],
@@ -134,7 +134,7 @@ module.exports = {
       }
       }
     }),
     }),
     new HtmlWebpackPlugin({
     new HtmlWebpackPlugin({
-      title: 'scale',
+      title: '量表明细',
       template: path.resolve(__dirname, 'src/html', 'scale.html'),
       template: path.resolve(__dirname, 'src/html', 'scale.html'),
       filename: 'scale.html',
       filename: 'scale.html',
       chunks: ['vendor', 'common', 'scale'],
       chunks: ['vendor', 'common', 'scale'],