Просмотр исходного кода

页面推送模式横板数量配置

zhangxc 5 лет назад
Родитель
Сommit
f5442e61a7
3 измененных файлов с 27 добавлено и 15 удалено
  1. 21 10
      src/css/indexHorizontal.less
  2. 4 3
      src/js/indexHorizontalDom.js
  3. 2 2
      src/js/util.js

+ 21 - 10
src/css/indexHorizontal.less

@@ -1,21 +1,33 @@
 @import './common.less';
  .push .recommendInfoWrapper {
-    line-height: 20px;
-    margin-top: 10px;
+    line-height: 25px;
     h4 {
         float: left;
     }
+    .showTopTitle {
+        float: none;
+    }
 }
 
 .recommendInfoBox  {
     margin-left: 100px;
     position: relative;
 }
+.showTopInfo{
+    margin-left: 100px;
+}
+.topSmallTitle {
+    position: absolute;
+    left: -60px;
+}
 .recommendWrap {
     height: 250px;
 }
 .labAndPacsWrapper{
-    line-height: 20px;
+    line-height: 25px;
+}
+.labAndPacsItemBox {
+    float: left;
 }
 .push {
     margin-top: 10px;
@@ -114,7 +126,7 @@
     img {
         display: inline-block;
         position: relative;
-        top: 2px;
+        top: 0px;
     }
 }
 
@@ -130,7 +142,7 @@
     img {
         display: inline-block;
         position: relative;
-        top: 2px;
+        top: 0px;
     }
 }
 .itemAllBox{
@@ -143,7 +155,6 @@
     z-index: 2;
     left: 0;
     top: 0;
-    margin: 10px 0;
 }
 .ellipse{
     overflow: hidden;
@@ -151,11 +162,11 @@
     text-overflow: ellipsis;
 }
 .conditTipsbox .conditionMain {
-    height: 20px;
+    height: 25px;
     .mayIllness{
         float: left;
         position: relative;
-        top: -5px;
+        top: -2px;
     }
 }
 .recommendInfoItem,.diagNameBox {
@@ -208,7 +219,7 @@
     right: 0px;
     color: #267FD7;
     height: 20px;
-    line-height: 20px;
+    line-height: 24px;
     box-shadow: -2px 0px 15px 0px #fff;
     cursor: pointer;
 }
@@ -281,7 +292,7 @@
     border-radius: 4px;
 }
 .pacsRecommendwrapper {
-    margin-top: 10px;
+    // margin-top: 10px;
 }
 .labAndPacsItem {
     display: inline-block;

+ 4 - 3
src/js/indexHorizontalDom.js

@@ -83,9 +83,10 @@ function renderRecommendInfo(showNum, icon, className,title,data, hasInfo, type,
 
 //化验和辅检等多种类型
 function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasInfo, type, position) {
+    console.log(labsAndPacMode)
     const str = `<div class="recommendInfoWrapper ${className} clearfix">
-                    <h4><img src=${icon} title="${title}" class="icon">${title}:</h4>
-                    <div class="recommendInfoBox ${className + 'box'}"></div>
+                    <h4 class ="${+labsAndPacMode === 1 ? 'showTopTitle':'showRightTitle'}"><img src=${icon} title="${title}" class="icon">${title}:</h4>
+                    <div class="recommendInfoBox ${className + 'box'} ${+labsAndPacMode === 1 ? 'showTopInfo':'showRightInfo'}"></div>
                 </div>`
     $('.push').append(str)
     
@@ -96,7 +97,7 @@ function renderMultRecommendInfo(labsAndPacMode,icon, className,title,data, hasI
                 <div class="labAndPacsBox ${data[i].className+'box'} clearfix"> 
                 </div>
             </div>`
-        let childrenNodeStr =  `<span class="labAndPacsTitle">${data[i].title}<i></i></span>`
+        let childrenNodeStr =  `<span class="labAndPacsTitle ${+labsAndPacMode === 1 ? 'topSmallTitle':'rightSmallTitle'}"">${data[i].title}<i></i></span>`
         let childrenNodeItemStrAll =  '' //更多展开框中的字符串
         let dataShort
         if(showNum&& dataLen > showNum) {

+ 2 - 2
src/js/util.js

@@ -37,8 +37,8 @@ const transConf = function(arr) {
         return a.orderNo - b.orderNo
     })
     let showLabsNum, showPacsNum, labsAndPacMode
-    showLabsNum = arr.filter(item => item.code === 'healthlis_num')[0].value
-    showPacsNum = arr.filter(item => item.code === 'healthpacs_num')[0].value
+    showLabsNum = arr.filter(item => item.code === 'inspeclis_num')[0].value
+    showPacsNum = arr.filter(item => item.code === 'inspecpacs_num')[0].value
     labsAndPacMode = arr.filter(item => item.code === 'lispacs_place')[0].value
     return {
         confArr: newArr,