Browse Source

集成登录权限

natasha 8 months ago
parent
commit
f4ca5aeedd
1 changed files with 12 additions and 1 deletions
  1. 12 1
      src/components/inputModules/common/Header.vue

+ 12 - 1
src/components/inputModules/common/Header.vue

@@ -224,6 +224,7 @@ export default {
       Cookies.remove("session_id");
       Cookies.remove("user_code");
       Cookies.remove("user_type");
+      Cookies.remove("GCLSCode");
       sessionStorage.removeItem("useragent_root_close");
       this.userShow = false;
       this.userMessage = null;
@@ -257,7 +258,16 @@ export default {
         .then((res) => {
           if (res.child_sys_list && res.child_sys_list.length > 0) {
             let invok_module = this.$route.query.invok_module;
-            _this.projectList = res.child_sys_list;
+            if (Cookies.get("GCLSCode")) {
+              _this.projectList = [];
+              res.child_sys_list.forEach((item) => {
+                if (item.key === "GCLS-LC" || item.key === "GCLS-Personal") {
+                  _this.projectList.push(item);
+                }
+              });
+            } else {
+              _this.projectList = res.child_sys_list;
+            }
             for (let i = 0; i < _this.projectList.length; i++) {
               let item = _this.projectList[i];
               if (invok_module) {
@@ -299,6 +309,7 @@ export default {
     if (config) {
       _this.configInfor = JSON.parse(config);
     }
+
     _this.getChildSysList();
   },
   mounted() {