浏览代码

页面推送模式治疗方案推荐药物只显示一级标题

zhangxc 5 年之前
父节点
当前提交
16e8c37fc8
共有 4 个文件被更改,包括 30 次插入25 次删除
  1. 6 1
      src/css/common.less
  2. 10 12
      src/css/indexHorizontal.less
  3. 8 7
      src/js/indexHorizontalDom.js
  4. 6 5
      src/js/indexVertDom.js

+ 6 - 1
src/css/common.less

@@ -5,4 +5,9 @@
 @colorWaring:#FF545B; //警惕
 @bgcPlan:#E3FEFE; //治疗
 @bgcMay:#FAEBEC; //疑似,警惕,可能
-@bgcModal:#DFEAFE; //弹窗头 
+@bgcModal:#DFEAFE; //弹窗头 
+.ellipsis{
+    white-space: nowrap;/*强制在一行显示*/
+	text-overflow:ellipsis;/*设置超出内容显示...*/
+	overflow: hidden;/*一定不能少 超出的内容进行隐藏*/
+}

+ 10 - 12
src/css/indexHorizontal.less

@@ -240,8 +240,8 @@
     color: #000000;
     float: left;
     width: 60px;
-    height: 30px;
-    line-height: 30px;
+    height: 20px;
+    line-height: 20px;
     float: left;
 }
 .tipsTitle {
@@ -252,8 +252,8 @@
 }
 .infomationBox .treatTextBox {
     margin-left: 80px;
-    line-height: 30px;
-    height: 90px;
+    line-height: 20px;
+    height: 60px;
     overflow:hidden;
     // text-overflow:ellipsis; 
     // display: -webkit-box;
@@ -262,8 +262,8 @@
 }
 .infomationBox .treatDrugBox {
     margin-left: 80px;
-    line-height: 30px;
-    height: 90px;
+    line-height: 20px;
+    height: 120px;
     overflow: hidden;
 }
 .tipsInfoBox {
@@ -281,7 +281,7 @@
 }
 .drugTreatmentInfoItemBox {
     .ellipse;
-    height: 30px;
+    height: 20px;
 }
 .infomationBox .treatRecommend {
     margin-top: 10px;
@@ -302,13 +302,11 @@
     display: inline-block;
     padding-right: 15px;
 }
-.treatRecommendbox {
-    margin-top: 10px;
-}
+
 .treatItemBox .more{
     bottom: 0;
-    height: 30px;
-    line-height: 30px;
+    height: 20px;
+    line-height: 20px;
 }
 .itemAllBox h4{
     float: left;

+ 8 - 7
src/js/indexHorizontalDom.js

@@ -139,7 +139,7 @@ function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasI
 function renderTreat(icon, className,title, data) {
     $('.infoTabBox').append(`<span class="infoTab treatTab boldFont"  data-box="${className}">${title}</span>`)
     const str = `<div class="informationBox recommendInfoWrapper ${className} clearfix">
-                    <span class="diagName boldFont">${msg.diseaseName?msg.diseaseName:''}</span>
+                    <p class="diagName boldFont">${msg.diseaseName?msg.diseaseName:''}</p>
                     <div class="recommendInfoBox clearfix ${className + 'box'}"></div>
                 </div>`
     $('.infomationBox').append(str)
@@ -207,12 +207,13 @@ function renderTreatDrug(className,title,data, parentNode) {
     }
     for(let i = 0; i <  data.length; i++) {
         let childrenNodeStr =`<div class = "drugTreatmentInfoItemBox">
-            <p class="diagTitle"><i></i>${data[i].title}</p>`
-            for(let j = 0; j < data[i].meditionDetails.length; j++) {
-                if(data[i].meditionDetails[j].description) {
-                    childrenNodeStr += `<p class="diaDescription">${data[i].meditionDetails[j].description}</p>`
-                }
-            }
+            <p class="diagTitle ellipsis"><i></i>${data[i].title}</p>`
+            //二级标题暂时不放
+            // for(let j = 0; j < data[i].meditionDetails.length; j++) {
+            //     if(data[i].meditionDetails[j].description) {
+            //         childrenNodeStr += `<p class="diaDescription">${data[i].meditionDetails[j].description}</p>`
+            //     }
+            // }
             childrenNodeStr +=`</div>`
         $('.' + className+'Info').append(childrenNodeStr)
     }

+ 6 - 5
src/js/indexVertDom.js

@@ -213,11 +213,12 @@ function renderTreatDrug(className,title,data, parentNode) {
     for(let i = 0; i <  data.length; i++) {
         let childrenNodeStr =`<div class = "drugTreatmentInfoItemBox">
             <p class="diagTitle"><i></i>${data[i].title}</p>`
-            for(let j = 0; j < data[i].meditionDetails.length; j++) {
-                if(data[i].meditionDetails[j].description) {
-                    childrenNodeStr += `<p class="diagDescription">${data[i].meditionDetails[j].description}</p>`
-                }
-            }
+            //二级标题暂时不放
+            // for(let j = 0; j < data[i].meditionDetails.length; j++) {
+            //     if(data[i].meditionDetails[j].description) {
+            //         childrenNodeStr += `<p class="diagDescription">${data[i].meditionDetails[j].description}</p>`
+            //     }
+            // }
             childrenNodeStr +=`</div>`
         $('.' + className+'Info').append(childrenNodeStr)
     }