Sfoglia il codice sorgente

没有核查权限提示

zhouna 4 anni fa
parent
commit
25d8516bf5
2 ha cambiato i file con 15 aggiunte e 12 eliminazioni
  1. 7 8
      src/js/allotCheckTask.js
  2. 8 4
      src/js/creatCheckTask.js

+ 7 - 8
src/js/allotCheckTask.js

@@ -27,13 +27,17 @@ let isPlacefile = getCookie('isPlacefile')||1
 
 $(function() {
     const checkAuth = getCookie('checkAuth');
-    if(!checkAuth){
+    /*if(!checkAuth){
         $(".tabs").hide();
         toast("没有质控核查权限!");
         return
-    }
+    }*/
     const tabs = checkAuth.replace(/[^456]/g,'');
-    if(tabs.length<2){
+    if(tabs.length===0){
+        $(".tabs").hide();
+        toast("没有质控核查权限!");
+        return;
+    }else if(tabs.length<2){
         //只有一个权限,隐藏tab切换
         $(".tabs").hide();
     }else{//隐藏没有权限的tab
@@ -204,11 +208,6 @@ function setBoxHeight() {
     $('.overAuto').height(ht - 174 + 'px');
 }
 
-//显示tab权限判断
-function showWhichTab(){
-
-}
-
 //病人列表获取筛选值
 function getFilterData(){
     const obj = {};

+ 8 - 4
src/js/creatCheckTask.js

@@ -24,20 +24,24 @@ let isPlacefile = getCookie('isPlacefile')||1
 
 $(function() {
     const checkAuth = getCookie('checkAuth');
-    if(!checkAuth){
+    /*if(!checkAuth){
         $(".tabs").hide();
         toast("没有质控核查权限!");
         return
-    }
+    }*/
     const tabs = checkAuth.replace(/[^456]/g,'');
-    if(tabs.length<2){
+    if(tabs.length===0){
+        $(".tabs").hide();
+        toast("没有质控核查权限!");
+        return;
+    }else if(tabs.length<2){
         //只有一个权限,隐藏tab切换
         $(".tabs").hide();
     }else{//隐藏没有权限的tab
         const last = "456".replace(tabs,'');
         $(".tabs [data-code="+(last-4)+"]").parent().hide();
     }
-    global_activeTabCode=tabs.substr(0,1)-4;console.log(global_activeTabCode)
+    global_activeTabCode=tabs.substr(0,1)-4;
     //获取科室列表
     if(global_activeTabCode=="0"){
         getSubDeptList();