Prechádzať zdrojové kódy

Merge branch 'version1.2.1' into test

luolei 5 rokov pred
rodič
commit
0a18301ce2
4 zmenil súbory, kde vykonal 50 pridanie a 11 odobranie
  1. 19 4
      src/css/qcScore.less
  2. 1 1
      src/html/console.html
  3. 17 5
      src/js/index.js
  4. 13 1
      src/js/qcScore.js

+ 19 - 4
src/css/qcScore.less

@@ -43,36 +43,51 @@
     z-index: 1;
   }
   &>ul>li{
-    color: @themeFontClr;
+    color: #E9EBEF;
     &.menu-0{
       background: url("../images/total.png") 20px 9px no-repeat;
       &.active{
         background: url("../images/total_a.png") 20px 9px no-repeat;
       }
+      &.slide-up{
+        background-color: @activeBg;
+      }
     }
     &.menu-6{
        background: url("../images/index.png") 20px 11px no-repeat;
       &.active{
         background: url("../images/index_a.png") 20px 11px no-repeat;
       }
+      &.slide-up{
+        background-color: @activeBg;
+      }
      }
     &.menu-1{
       background: url("../images/inhis.png") 19px 11px no-repeat;
       &.active{
         background: url("../images/inhis_a.png") 19px 11px no-repeat;
       }
+      &.slide-up{
+        background-color: @activeBg;
+      }
     }
     &.menu-37{
       background: url("../images/prod.png") 20px 10px no-repeat;
       &.active{
         background: url("../images/prod_a.png") 20px 10px no-repeat;
       }
+      &.slide-up{
+        background-color: @activeBg;
+      }
     }
     &.menu-5{
       background: url("../images/out.png") 20px 11px no-repeat;
       &.active{
         background: url("../images/out_a.png") 20px 11px no-repeat;
       }
+      &.slide-up{
+        background-color: @activeBg;
+      }
     }
   }
   .active{
@@ -86,7 +101,7 @@
   .list-1{
     position: relative;
     p {
-      color: @themeFontClr;
+      color: #E9EBEF;
       &:hover {
         color: @activeColor;
       }
@@ -109,7 +124,7 @@
       display: none;
       li.page{
         text-indent: 55px;
-        color: @themeFontClr;
+        color: #E9EBEF;
         &.active{
           color: @activeColor;
         }
@@ -124,7 +139,7 @@
   .copy-right{
     position: fixed;
     bottom: 0px;
-    width: @menuWt;
+    width: @menuWt+15;
     text-align: center;
     background: @themeColor;
     padding: 10px 0 20px;

+ 1 - 1
src/html/console.html

@@ -33,7 +33,7 @@
             </li>
             <li class="li02">
               <p class="numShow newborn"></p>
-              <p class="explainNum">新生儿人数</p>
+              <p class="explainNum">新生儿患者</p>
             </li>
             <li class="li03">
               <p class="numShow patientNum"></p>

+ 17 - 5
src/js/index.js

@@ -4,7 +4,7 @@ require('jquery-templates');
 const md5 = require('js-md5');
 require("./modal.js")
 const {api} = require('./api.js')
-const {post,pageMap,delCookie,setCookie,getCookie} = require('./utils.js');
+const {post,pageMap,delCookie,setCookie,getCookie,focusMenuItem} = require('./utils.js');
 let userInfo={};
 $(function(){
   getMenu();
@@ -28,10 +28,16 @@ $(function(){
   $("#changeWord").css("opacity",hasData('FUNC000002')?'1':'0.5').hover(function(){
     $(this).css("color","#777777")
   })
-  $("#contentIframe").attr("src",hasData('YH-KZT')?'console.html':hasData('YH-KZTKS')?'deptConsole.html':'console.html');
+  // $("#contentIframe").attr("src",hasData('YH-KZT')?'console.html':hasData('YH-KZTKS')?'deptConsole.html':'console.html');
 });
 //判断有无某一权限
-function hasData(data){
+function hasData(data,list){
+  if(list&&list.length>0){
+    if(list.indexOf(data)>-1){//有权限
+      return true
+    }
+    return false;
+  }
   let lis = JSON.parse(getCookie("codeLis"))||[]
   if(lis.indexOf(data)>-1){//有权限
       return true
@@ -120,7 +126,7 @@ function getOwnDept(){
               let result = data.data
               setCookie("deptList",JSON.stringify(result))
           }
-      })
+        })
   // }
 }
 function getMenu(){
@@ -133,7 +139,7 @@ function getMenu(){
       setCookie("hospitalid",data.basHospitalInfoDTO.id)
       getAllCode(data.menuWrappers);
     }
-  });
+  })
 };
 function getAllCode(data){
   let lis = [],personCodeLis=[],deptCodeLis=[],trdObj={}
@@ -159,6 +165,12 @@ function getAllCode(data){
       }
     }
   }
+  // $("#contentIframe").attr("src",hasData('YH-KZT')?'console.html':hasData('YH-KZTKS')?'deptConsole.html':'console.html');
+  if(hasData('YH-KZT',lis)){
+    focusMenuItem("YH-KZT");
+  }else if(hasData('YH-KZTKS',lis)){
+    focusMenuItem("YH-KZTKS");
+  }
   setCookie("codeLis",JSON.stringify(lis))
   setCookie("trdObj",JSON.stringify(trdObj))
 }

+ 13 - 1
src/js/qcScore.js

@@ -127,7 +127,19 @@ function initContent(data){
       if(global_modules[moduleId]){
         hml=initModuleData(moduleId,obj[k]);
         $.tmpl(hml,info).appendTo("#contentInfo");
-      };
+      }else{
+        const icon=require("../images/empty1.png");
+        const sid=moduleId?"("+moduleId+")":"";
+        const emptyStr=`<div class="empty">
+            <img src="${icon}" alt="空"/>
+            <p>暂无信息~</p>
+        </div>`;
+        if(!$(".content-item[code="+k+"] .empty").length){  //显示一条空提示即可
+          hml='<div class="content-item" code="'+k+'">' +
+            '<h2 class="title">'+k+sid+'</h2>'+emptyStr+'</div>';
+          $.tmpl(hml,{}).appendTo("#contentInfo");
+        }
+      }
     }
   }
   $(".content-item[code="+global_activeTab+"]").show();