zhangxc 4 роки тому
батько
коміт
02a07e2c9f

+ 22 - 2
src/css/cdssHorizontal.less

@@ -3,6 +3,7 @@
     padding: 0 0 0 73px;
     position: relative;
     min-height: 244px;
+    border: 1px solid #E6E6E6;
 }
 .versionWrapper{
     display: inline-block;
@@ -102,8 +103,10 @@
 }
 .rightWrapper{
     width: 40%;
+    padding: 0 20px;
+    display: none;
 }
-.leftBox{
+.leftBox,.rightBox{
     position: relative;
 }
 .moduleWrapper{
@@ -129,6 +132,11 @@
     position: relative;
     top: 4px;
 }
+.treatIcon{
+    width: 20px;
+    position: relative;
+    top: 6px
+}
 .infoImg{
     width: 15px;
 }
@@ -140,14 +148,19 @@
 .diag .moduleTitle{
     color: #FF656B;
 }
+.warning .moduleTitle{
+    color: #fff;
+    background: #FF7836;
+}
 .pushItemBox{
     padding-right: 18px;
     position: relative;
+    display: inline-block;
 }
 .infoImg{
     width: 15px;
     position: absolute;
-    top: 2px;
+    top: 7px;
     cursor: pointer;
     display: none;
     right: 2px;
@@ -232,4 +245,11 @@
     border-radius: 2px;
     top: 6px;
     padding: 0 4px;
+}
+.rightBoxTitle{
+    height: 36px;
+    line-height: 36px;
+    color: #2FC6C7;
+    border-bottom: 1px solid #E6E6E6;
+    font-weight: 600;
 }

+ 5 - 1
src/html/cdssHorizontal.html

@@ -35,7 +35,11 @@
             <div class="leftBox"></div>
           </div>
           <div class="rightWrapper">
-            <div class="rightBox"></div>
+            <div class="rightBox">
+              <p class="rightBoxTitle">
+                 
+              </p>
+            </div>
           </div>
         </div>
         <div class="qcWrap moduleWrapper">

+ 18 - 9
src/js/cdssHorizontal.js

@@ -206,11 +206,21 @@ function isNeedPush(list){
       let medicinesNum = $(".moduleItem.medicine").attr("data-num") || 5
       let operationsNum = $(".moduleItem.operation").attr("data-num") || 5
 
-      renderLis(lisPush,1,3,true)
+      renderLis(lisPush,lisNum,3,true)
       renderPacs(pacsPush,pacsNum,5,true)
       renderCheckup(checkupPush,checkupNum,null,true)
       renderSymptomPush(symptomPush,symptomNum,null,true)
       renderDiag(diagPush)
+      if(medicinesPush.length > 0 || operationsPush.length > 0){
+        let str = `<img class="treatIcon" src = ${titleConfigH["treat"].icon} /><span>${titleConfigH["treat"].name}</span>`
+        $(".rightBoxTitle").append(str)
+        $(".rightWrapper").css("display","inline-block")
+      }else{
+        $(".leftWrapper").css({
+          borderRight: "0px",
+          width: "100%"
+        })
+      }
       renderMedicinesPush(medicinesPush,medicinesNum,2,true)
       renderOperationPush(operationsPush,operationsNum,6,true)
       // if(hasCompleteTnterface === allInterface){
@@ -218,7 +228,7 @@ function isNeedPush(list){
       //   if(moduleNum === 0){ 
       //     empty()
       //   }
-      // }
+      // }icon
       bindOpenInfo()
       bindSlide()
     }
@@ -229,7 +239,6 @@ function renderLis(list,showNum,type,hasInfo){
   if(list.length > 0 &&  $(".moduleItem.lis").length > 0){
     moduleNum++
     $('.moduleItem.lis .moduleItemTitBox').append(titleStr("lisPush"))
-    console.log("")
     let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
     $('.moduleItem.lis').append(shortStr)
     $('.moduleItem.lis').append(renderLongStr(titleConfigH["lisPush"].name,longStr))
@@ -296,18 +305,18 @@ function renderDiag(diagPush){
   let possibleDiagPush = diagPush["可能诊断"] || []
   let firstDiagPush = diagPush["初步诊断"] || []
   let identifyDiagPush = diagPush["鉴别诊断"] || []
-  // let warningDiagPush = diagPush["警惕"] || []
+  let warningDiagPush = diagPush["警惕"] || []
   let number =  $('.moduleItem.diag').attr("data-num") || 5
   let warnNumber =  $('.moduleItem.warning').attr("data-num") || 5
   
   $('.moduleItem.diag .moduleItemTitBox').append(titleStr("diagPush"))
-  let warningDiagPush = [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
+  // let warningDiagPush = [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
   // let firstDiagPush =  [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
   // let identifyDiagPush = diagPush["鉴别诊断"] ||  [{name:"血常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null},{name:"尿常规",hisNameList:null}]
   renderDiagItem(possibleDiagPush,"可能诊断",number)
   renderDiagItem(firstDiagPush,"初步诊断",number)
   renderDiagItem(identifyDiagPush,"鉴别诊断",number)
-  // renderWarningDiag(warningDiagPush,"警惕",warnNumber)
+  renderWarningDiag(warningDiagPush,"警惕",1000)
   moreInfo()
 }
 function renderDiagItem(list,name,number){
@@ -315,7 +324,7 @@ function renderDiagItem(list,name,number){
     return
   }
   let titleStr = `<span class="moduleBoxName">${name}</span>`
-  let {shortStr, longStr} = renderItemWrapper(list,1,1,true)
+  let {shortStr, longStr} = renderItemWrapper(list,number,1,true)
   let boxStr = `<div class="moduleBox">
         ${titleStr}
         ${shortStr}
@@ -324,12 +333,12 @@ function renderDiagItem(list,name,number){
   $(".diag").append(renderLongStr(name,longStr))
   $('.moduleItem.diag').css("display","block")
 }
-function renderWarningDiag(list,showNum,type,hasInfo){
+function renderWarningDiag(list,name,showNum){
   if(list.length > 0 &&  $(".moduleItem.warning").length > 0){
     moduleNum++
     $('.moduleItem.warning .moduleItemTitBox').append(titleStr("vigilancePush"))
     console.log("")
-    let {shortStr, longStr} = renderItemWrapper(list,showNum,type,hasInfo)
+    let {shortStr, longStr} = renderItemWrapper(list,showNum,1,true)
     $('.moduleItem.warning').append(shortStr)
     $('.moduleItem.warning').append(renderLongStr(titleConfigH["lisPush"].name,longStr))
     $('.moduleItem.warning').css("display","block")

+ 6 - 2
src/js/promise.js

@@ -12,8 +12,7 @@ let iconDrugPush = require('./../images/icon_drug_push.png').replace(/^undefined
 let iconDiagPush = require('./../images/icon_diag_push.png').replace(/^undefined/g, '')
 let iconCommonTreatPush = require('./../images/icon_drug_push.png').replace(/^undefined/g, '')
 let iconCheckupPush = require('./../images/icon_checkup_push.png').replace(/^undefined/g, '')
-
-
+let iconTreat = require('./../images/zhiliao.png').replace(/^undefined/g, '')
 //重写assign方法imgR
 if (typeof Object.assign != 'function') {
   Object.assign = function (target) {
@@ -259,6 +258,11 @@ const titleConfigH = {
     background: "#FFE8DD",
     icon: iconWarning,
     name:"警惕"
+  },
+  treat:{
+    background: "#FFE8DD",
+    icon: iconTreat,
+    name:"治疗方案"
   }
 }
 module.exports = {