Преглед на файлове

数据服务横向样式修改

zhangxc преди 6 години
родител
ревизия
22fef1c83f
променени са 2 файла, в които са добавени 39 реда и са изтрити 23 реда
  1. 18 9
      src/css/indexHorizontal.less
  2. 21 14
      src/js/indexHorizontalDom.js

+ 18 - 9
src/css/indexHorizontal.less

@@ -15,26 +15,35 @@
     margin-left: 100px;
     position: relative;
 }
+.recommendWrap {
+    height: 250px;
+}
 .labAndPacsWrapper{
     height: 20px;
     line-height: 20px;
     overflow: hidden;
 }
 .push {
-    width: 55%;
+    width: 53%;
     float: left;
     position: relative;
+    padding-right: 2%;
+    border-right: 1px solid #f0efef;
+    box-sizing: border-box;
 }
 .treat {
-    width: 40%;
+    width: 38%;
     float: left;
     position: relative;
+    margin-left: 2%;
 }
 .disclaimer {
     width: 5%;
     float: left;
     color: #d7d7d7;
     text-align: center;
+    border-right: 1px solid #f4f3f3;
+    box-sizing: border-box;
 }
 
 .warning, .diagRecommend {
@@ -112,7 +121,7 @@
 }
 .itemAllBox{
     position: absolute;
-    width: 100%;
+    width: 97%;
     height: auto;
     max-height: 100%;
     display: none;
@@ -197,17 +206,17 @@
 .treat .recommendInfoBox {
     margin-left: 0px;
 }
-.treat .commonTreatmentInfo {
+.treat .treatTextBox {
     margin-left: 80px;
     line-height: 30px;
     height: 90px;
     overflow:hidden;
-    text-overflow:ellipsis; 
-    display: -webkit-box;
-    -webkit-box-orient: vertical;
-    -webkit-line-clamp: 3;
+    // text-overflow:ellipsis; 
+    // display: -webkit-box;
+    // -webkit-box-orient: vertical;
+    // -webkit-line-clamp: 3;
 }
-.treat .drugTreatmentInfo {
+.treat .treatDrugBox {
     margin-left: 80px;
     line-height: 30px;
     height: 90px;

+ 21 - 14
src/js/indexHorizontalDom.js

@@ -101,7 +101,9 @@ function renderTreatText(className,title,data, parentNode) {
     const childrenNodeBoxStr = `
         <div class = "treatItemBox ${className + 'box'}">
             <p class="treatItemTitle">${title}:</p>
-            <p class="${className + 'Info'} clearfix"></p>
+            <div class="treatTextBox">
+                <p class="${className + 'Info'} clearfix"></p>
+            </div>
         </div>
     `
     $('.' + parentNode).append(childrenNodeBoxStr)
@@ -110,23 +112,21 @@ function renderTreatText(className,title,data, parentNode) {
     }
     $('.' + className+'Info').html(data)
     var commonTreatHeight = $(".commonTreatmentInfo").height()
-    // if(commonTreatHeight > 75){
-    //     $(".commonTreatmentInfo").addClass('commonTreatmentInfoLimit').append('<span class="slideDown">更多 <i></i></span>')
-    // }
-    // $(".treatItemBox").on('click',".slideDown",function(){
-    //     $(this).parents(".commonTreatmentInfo").removeClass("commonTreatmentInfoLimit").append('<span class="slideup">收起 <i></i></span>')
-    //     $(this).remove()
-    // })
-    // $(".treatItemBox").on('click',".slideup",function(){
-    //     $(this).parents(".commonTreatmentInfo").addClass("commonTreatmentInfoLimit").append('<span class="slideDown">更多 <i></i></span>')
-    //     $(this).remove()
-    // })
+    if(commonTreatHeight > 75){
+        $(".treatTextBox").append('<span class="more">更多</span>')
+    }
+    $(".treat .treatTextBox").on('click',".more",function(){
+        openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
+      })
+    
 }
 function renderTreatDrug(className,title,data, parentNode) {
     const childrenNodeBoxStr = `
         <div class = "treatItemBox ${className + 'box'}">
             <p class="treatItemTitle">${title}:</p>
-            <p class="${className + 'Info'}"></p>
+            <div class="treatDrugBox">
+                <p class="${className + 'Info'}"></p>
+            </div>
         </div>
     `
     $('.' + parentNode).append(childrenNodeBoxStr)
@@ -158,8 +158,15 @@ function renderTreatDrug(className,title,data, parentNode) {
         const infoMsgName = $(this).attr('data-name')
         openNewWin(`information.html?type=8&position=5&name=${infoMsgName}`)
     })
+    
     $('.drugTreatmentbox').append('<span class="more">更多</span>')
-    $(".treat").on('click',".more",function(){
+    var drugTreatmentHeight = $(".drugTreatmentInfo").height()
+    if(drugTreatmentHeight > 75){
+        $(".treatDrugBox").append('<span class="more">更多</span>')
+    } else if(drugTreatmentHeight > 0) {
+        $(".drugTreatmentInfo").append('<span class="more">更多</span>')
+    }
+    $(".treat .drugTreatmentbox").on('click',".more",function(){
         openNewWin(`treatplan.html?age=${msg.age}&sex=${msg.sex}&symptomJson=${msg.symptom}&vitalJson=${msg.vital}&lisJson=${msg.lis}&pacsJson=${msg.pacs}&diagJson=${msg.diag}&otherJson=${msg.other}&hospitalCode=${msg.hosCode}`)
       })
     var treatList = $(".drugTreatmentInfo").find(".drugTreatmentInfoItemBox")