zhangxc преди 4 години
родител
ревизия
40f2621824
променени са 7 файла, в които са добавени 197 реда и са изтрити 18 реда
  1. 20 13
      src/css/cdss.less
  2. 41 1
      src/css/cdssHorizontal.less
  3. 1 1
      src/html/cdss.html
  4. 5 2
      src/html/cdssHorizontal.html
  5. BIN
      src/images/icon_info.png
  6. BIN
      src/images/icon_info_on.png
  7. 130 1
      src/js/cdssHorizontal.js

+ 20 - 13
src/css/cdss.less

@@ -51,13 +51,19 @@ body{
             background-size: 27px;
         }
     }
+    .version-txt,.disclaimerInfoTxt{
+        font-size: 12px;
+        color: #777;
+    }
     .version-txt:hover{
         border-bottom: 1px solid #000;
+        font-size: 12px;
     }
     .logo {
         // float: left;
         font-size: 12px;
         margin-left: 15px;
+        color:#333;
     }
     .disclaimerInfo {
         float: right;
@@ -70,9 +76,11 @@ body{
 
 .disclaimerInfo {
     cursor: pointer;
+    font-size: 12px;
 }
 .disclaimerInfoTxt:hover{
     border-bottom: 1px solid #000;
+    font-size: 12px;
 }
 .moreInfo {
     display: inline-block;
@@ -215,7 +223,7 @@ body{
     margin: 0 0 10px 0;
 }
 .longBox,.shortBox{
-    padding: 5px 15px;
+    padding: 4px 15px;
 }
 .longBox{
     display: none;
@@ -223,8 +231,7 @@ body{
 .pushItemBox{
     position: relative;
     display: inline-block;
-    margin-right: 15px;
-    padding-top: 5px;
+    padding-right: 18px;
 }
 .pushItemName{
     position: relative;
@@ -232,13 +239,12 @@ body{
    
 }
 .infoImg{
-    width: 16px;
+    width: 15px;
     position: absolute;
-    top: -7px;
-    left: 50%;
-    margin: 0 0 0 -9px;
+    top: 2px;
     cursor: pointer;
     display: none;
+    right: 2px;
 }
 .pushItemBox:hover{
     .infoImg{
@@ -253,14 +259,14 @@ body{
     color: #3B9ED0;
 }
 .moduleTitle{
-    height: 35px;
-    line-height: 35px;
+    height: 30px;
+    line-height: 30px;
     font-size: 14px;
     font-weight: 600;
     .titleIcon{
-        width: 24px;
+        width: 20px;
         position: relative;
-        top: 6px;
+        top: 5px;
         margin: 0 8px;
     }
 }
@@ -272,7 +278,7 @@ body{
 }
 .moduleBoxTitle{
     padding: 0 15px;
-    line-height: 31px;
+    line-height: 27px;
     font-weight: 500;
 }
 .iconMark{
@@ -302,7 +308,7 @@ body{
     box-sizing: border-box;
 }
 .tab{
-    font-size:18px;
+    font-size:14px;
     color: #777777;
     position: relative;
     cursor: pointer;
@@ -310,6 +316,7 @@ body{
 .activeTab{
     color:#3B9ED0;
     font-weight: 600;
+    font-size:16px;
     .activeLine{
         display: inline-block;
         width: 34%;

+ 41 - 1
src/css/cdssHorizontal.less

@@ -12,7 +12,19 @@
     background:#E6E6E6;
     color:#9C9C9C;
     font-size: 12px;
-    // left: 0;
+    left: 0px;
+}
+.versionTop{
+    position: absolute;
+    width: 100%;
+    height: 160px;
+}
+.versionBottom{
+    position: absolute;
+    width: 100%;
+    height: 70px;
+    bottom: 0;
+    font-size: 12px;
 }
 .pushDisclaimer{
     display: inline-block;
@@ -20,8 +32,36 @@
     position: absolute;
     top: 10px;
     left: 7px;
+    font-size: 12px;
 }
 .logoTxt{
     display: inline-block;
     width: 10px;
+    position: absolute;
+    left: 25px;
+    top: 10px;
+    font-size: 12px;
+}
+.versionTxt{
+    display: inline-block;
+    width: 10px;
+    position: absolute;
+    font-size: 12px;
+    left: 10px;
+}
+.tabList{
+    position: absolute;
+    width: 30px;
+    height: 100%;
+    left: 43px;
+    border: 1px solid #3B9ED0;
+    color: #3B9ED0;
+    box-sizing: border-box;
+}
+.tab {
+    display: inline-block;
+}
+.activeTab{
+    background: #3B9ED0;
+    color:#fff;
 }

+ 1 - 1
src/html/cdss.html

@@ -33,7 +33,7 @@
           <div class="recommendWrap moduleWrapper">
             <div class="empty">
               <img class="emptyImg" src="./images/empty2.png" alt="空">
-              <p class="emptyTxt">内容暂无推送信息~</p>
+              <p class="emptyTxt">等待更多内容输入中</p>
             </div>
             <div class="loading">
               <div class="loadingMask"></div>

+ 5 - 2
src/html/cdssHorizontal.html

@@ -21,7 +21,7 @@
           <span class="logoTxt"> &copy;朗通医疗</span>
         </span>
         <span class="versionBottom">
-          <span><span>版本说明</span></span>
+          <span class="versionTxt">版本说明</span>
           <span></span>
         </span>
        
@@ -30,7 +30,10 @@
 
       </div>
       <div class="contentBox">
-
+        <div class="recommendWrap">
+          <div class="leftWrapper"></div>
+          <div class="rightWrapper"></div>
+        </div>
       </div>
   </div>
 </body>

BIN
src/images/icon_info.png


BIN
src/images/icon_info_on.png


+ 130 - 1
src/js/cdssHorizontal.js

@@ -6,10 +6,139 @@ if(!Promise){
       warnings: true // note, run node with --trace-warnings to see full stack traces for warnings
     })
   }
+const $ = require("jquery");
 require('./../css/reset.css');
 require('./../css/cdssHorizontal.less');
 require('./../css/popup.css');
 require('./../css/staticSearch.css')
 require('./../js/staticSearch.js')
 require('./../images/empty2.png').replace(/^undefined/g, '')
-require('./../images/loading.gif').replace(/^undefined/g, '')
+require('./../images/loading.gif').replace(/^undefined/g, '')
+const { post,config,getUrlArgObject,openNewWin,titleConfig } = require('./promise.js');
+
+let moduleConfig={
+  auxiliary:"recommendWrap",
+  qc:"qcWrap",
+  medical:"medicalKonwledgeWrap"
+}
+let allInterface = 0
+let hasCompleteTnterface = 0
+let moduleNum = 0
+let mrId = getUrlArgObject('mrId') 
+const tipsMode = getUrlArgObject('tipsMode') || 1
+let planCode = getUrlArgObject('planCode') || 'all'
+let hospitalIdUrl = getUrlArgObject('hospitalId') || ''
+let msg;
+
+function getMRInfo() {
+  return post(config.getMr2,{mrId:mrId})
+}
+function getConf() {
+  var msg = window.msg 
+  return post(config.getPushSet,{hospitalId:hospitalIdUrl||msg.hospitalId||1,planCode: planCode})
+ }
+
+if(mrId){
+  getMRInfo().then(res =>{
+    if(res.data.code == '0'){
+        msg = res.data.data ||{}
+        window.msg = msg
+      
+    }
+  }).catch(function (err) {
+      console.log(err);
+  })
+}
+getConf().then(res =>{
+  if(res.data.code == '0'){
+    // const configArr = res.data.data.pushSetList || []
+    // getPageInfo(configArr)
+    const data = res.data.data&&res.data.data[0]
+    renderPage(data)
+  }
+})
+function renderPage(pageSet){
+  renderTab(pageSet.sysSetInfo)
+  const iframeHei = $(".bodyWrap").height()
+  const tabHei = $(".tabList").height()
+  $(".contentWrapper").css("height",iframeHei-tabHei-10-20-30+'px')
+  const hasAuxiliary = hasTab("辅助信息",pageSet.sysSetInfo)
+  const hasMedical = hasTab("医学知识",pageSet.sysSetInfo)
+ 
+  // if(hasAuxiliary){
+  //   renderModuleWrapper(hasAuxiliary.planDetails)
+  //   let needPush = isNeedPush(hasAuxiliary.planDetails)
+  //   let needPushWarning = isNeedPushWarning(hasAuxiliary.planDetails)
+  //   if(needPush || needPushWarning){
+  //     renderPushData()
+  //     allInterface++
+  //   }
+  //   if(needPushWarning){
+  //     renderPushWarning()
+  //     allInterface++
+  //   }
+  // }
+ }
+ function renderTab(tabList){
+  let tabStr = ''
+  let TabNum = 0
+  for(let i = 0; i < tabList.length; i++){
+    if(tabList[i].status == '1'){
+      TabNum++
+      tabStr += `<span class="tab" data-name="${tabList[i].code}" >${tabList[i].name}<span class="activeLine"></span></span>`
+    }
+    
+  }
+  
+  $(".tabList").append(tabStr)
+  $(".tabList .tab").eq(0).addClass("activeTab")
+  $(".tabList .tab").css("height", 1/TabNum + '%')
+  let showModuleName =  $(".tabList .tab").eq(0).attr("data-name")
+  // getModuleShow(moduleConfig[showModuleName])
+  // bindTabClick()
+}
+function hasTab(tabName,tabList){
+  for(let i = 0; i < tabList.length; i++){
+    if(tabList[i].name == tabName){
+      return tabList[i]
+    }
+  }
+  return false
+}
+
+function renderModuleWrapper(moduleList){
+  let moduleStr = ''
+  for(let i = 0; i < moduleList.length; i++){
+    if(moduleList[i].status !='0'){
+      if(moduleList[i].code == 'treat'){
+        moduleStr += `<div class="moduleItem medicine"  data-num="${moduleList[i].number}" style="display:none"></div>`
+        moduleStr += `<div class="moduleItem operation"  data-num="${moduleList[i].number}" style="display:none"></div>`
+      }else if(moduleList[i].code == 'tips'){
+        moduleStr += `<div class="moduleItem warning"  data-num="${moduleList[i].number}" style="display:none"></div>`
+        moduleStr += `<div class="moduleItem tips"  data-num="${moduleList[i].number}" style="display:none"></div>`
+      }else{
+        moduleStr += `<div class="moduleItem ${moduleList[i].code }"  data-num="${moduleList[i].number}" style="display:none"></div>`
+      }
+    }
+   
+  }
+  $(".recommendWrap").append(moduleStr)
+}
+function isNeedPush(list){
+  let pushCode = ["diag","lis","pacs","symptom","vital"]
+  for(let i = 0; i < list.length; i++){
+    if(pushCode.indexOf(list[i].code)>-1){
+      return true
+    }
+  }
+  return false
+ }
+ function isNeedPushWarning(list){
+  let pushCode = ["tips"]
+  for(let i = 0; i < list.length; i++){
+    if(pushCode.indexOf(list[i].code)>-1){
+      return true
+    }
+  }
+  return false
+ }