zhangxc 4 years ago
parent
commit
9891cfdb98
4 changed files with 48 additions and 13 deletions
  1. 4 1
      src/css/cdss.less
  2. 12 9
      src/html/cdss.html
  3. 32 2
      src/js/cdss.js
  4. 0 1
      src/js/cdssHorizontal.js

+ 4 - 1
src/css/cdss.less

@@ -17,7 +17,8 @@ body{
 }
 .contentWrapper{
     position: relative;
-    overflow-y: auto;
+    overflow-y: hidden;
+    // overflow-y: auto;
 }
 .responsibility {
     text-align: center;
@@ -343,6 +344,8 @@ body{
     position: absolute;
     box-sizing: border-box;
     width: 100%;
+    height: 100%;
+    overflow-y: auto;
     padding: 0 15px 50px 15px;
 }
 .staticSearchB ul{

+ 12 - 9
src/html/cdss.html

@@ -31,16 +31,19 @@
         </div>
         <div class="contentWrapper">
           <div class="recommendWrap moduleWrapper">
-            <div class="empty">
-              <img class="emptyImg" src="./images/empty2.png" alt="空">
-              <p class="emptyTxt">等待更多内容输入中</p>
-            </div>
-            <div class="loading">
-              <div class="loadingMask"></div>
-              <img class="loadingImg" src="./images/loading.gif" alt="loading">
-              <!-- <p class="loadingTxt">loading~</p> -->
+            <div class="recommendBox">
+              <div class="empty">
+                <img class="emptyImg" src="./images/empty2.png" alt="空">
+                <p class="emptyTxt">等待更多内容输入中</p>
+              </div>
+              <div class="loading">
+                <div class="loadingMask"></div>
+                <img class="loadingImg" src="./images/loading.gif" alt="loading">
+                <!-- <p class="loadingTxt">loading~</p> -->
+              </div>
+              <p class="responsibility"></p>
             </div>
-            <p class="responsibility"></p>
+            
             
           </div>
           <div class="qcWrap moduleWrapper">

+ 32 - 2
src/js/cdss.js

@@ -35,7 +35,13 @@ const { transConf } = require('./util.js');
 
 //静态知识类型: 1:诊断 2.药品 3.化验套餐 4.化验明细 5.辅检 6.手术和操作
 
-
+ 
+// console.log('aaaaaaaaaaa')
+// $(".bodyWrap").on("mousewheel DOMMouseScroll",function(e){
+//   // console.log('aaaaaaaaaaa')
+//   e.stopPropagation()
+//   // e.preventDefault();
+// })
 let moduleConfig={
   auxiliary:"recommendWrap",
   qc:"qcWrap",
@@ -653,7 +659,7 @@ function bindTabClick(){
       $(".staticSearchT .ipt").find("input").focus()
       $(".contentWrapper").css("overflowY","hidden")
     }else{
-      $(".contentWrapper").css("overflowY","auto")
+      // $(".contentWrapper").css("overflowY","auto")
     }
   })
 }
@@ -711,4 +717,28 @@ $(function(){
     localStorage.setItem('versionTime',ver.replace("=new",""));
     openNewWin("version.html");
   });
+  $.fn.extend({  
+    "preventScroll":function(){  
+        $(this).each(function(){  
+            var _this = this;  
+            if(navigator.userAgent.indexOf('Firefox') >= 0){   //firefox  
+                _this.addEventListener('DOMMouseScroll',function(e){  
+                    _this.scrollTop += e.detail > 0 ? 60 : -60;     
+                    e.preventDefault();  
+                },false);   
+            }else{  
+                _this.onmousewheel = function(e){   
+                    e = e || window.event;    
+                    console.log( _this.scrollTop,e.wheelDelta)
+                    _this.scrollTop += e.wheelDelta > 0 ? -60 : 60;     
+                    return false;  
+                };  
+            }  
+        })    
+    }  
+  });  
+  // $(".iframeWrap").preventScroll();  
+  $(".iframeWrap").preventScroll();  
+  $(".recommendWrap").preventScroll();  
+  $(".medicalKonwledgeWrap .staticSearchB ul").preventScroll();  
 });

+ 0 - 1
src/js/cdssHorizontal.js

@@ -25,7 +25,6 @@ let collapseImg = require('./../images/collapse2.png').replace(/^undefined/g, ''
 let treatDisName
 let generalTreatInfo
 
-
 setWidth()
 let moduleConfig={
   auxiliary:"recommendWrap",