Преглед на файлове

Merge branch 'master' into 'hjw1'

IT工作台标题权限

See merge request spfm/spfm-market-front!86
胡俊炜 преди 3 години
родител
ревизия
c96c11df51
променени са 2 файла, в които са добавени 52 реда и са изтрити 37 реда
  1. 3 1
      public/index.html
  2. 49 36
      src/components/p-header.vue

+ 3 - 1
public/index.html

@@ -29,7 +29,9 @@
     // window.staticHost = 'http://10.149.85.90:8000/spfm'; // 测试
     // window.staticHost = 'http://192.168.0.103:9600/';
     // window.staticHost = 'http://192.168.2.142:9600/';
+    
+    // document.title = "hello";
   </script>
 </body>
 
-</html>
+</html>

+ 49 - 36
src/components/p-header.vue

@@ -74,28 +74,43 @@ export default {
     //   this.$store.commit("setCollapse");
     // }
     //this.menuClose();
+    this.$http({
+      url: "/sysmgr/csysdept/queryGroupListByLoginNo",
+      method: "post",
+      headers: {
+        "Content-Type": "application/json",
+      },
+      data: {},
+    }).then((res) => {
+      if (res.data[0].parentorgid === "00440063000000000000") {
+        document.title = "IT工作台";
+      }
+    });
   },
   methods: {
-      handleGoToCalendar(){
-          this.$http({
-              url: "/sysmgr/csysdept/queryGroupListByLoginNo",
-              method: "post",
-              headers: {
-                  "Content-Type": "application/json",
-              },
-              data: {},
-          }).then((res) => {
-              console.log("header"+res.data[0].parentorgid)
-              if(res.data[0].parentorgid==='00440063000000000000'){
-                  this.$router.push('calendarnet');
-              }else{
-                  this.$router.push('calendar');
-              }
-          });
-
-      },
+    handleGoToCalendar() {
+      this.$http({
+        url: "/sysmgr/csysdept/queryGroupListByLoginNo",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        console.log("header" + res.data[0].parentorgid);
+        if (res.data[0].parentorgid === "00440063000000000000") {
+          this.$router.push("calendarnet");
+        } else {
+          this.$router.push("calendar");
+        }
+      });
+    },
     handleCall() {
-      this.$switchTab(this, { rountPath: "/knowledgetop", name: "知识库" },'knowledgetop');
+      this.$switchTab(
+        this,
+        { rountPath: "/knowledgetop", name: "知识库" },
+        "knowledgetop"
+      );
     },
     change(index, item) {
       this.currentIndex = index;
@@ -121,21 +136,21 @@ export default {
       })
         .then((res) => {
           if (res === "confirm") {
-              this.$store.commit("setUserInfo", undefined);
-              this.$store.commit("setToken", undefined);
-              this.$store.commit("setMenus", undefined);
-              this.$store.commit("setTabList", []);
-              this.$cookie.delete("userInfo");
-              this.$cookie.delete("menus");
-              this.$cookie.delete("token");
-              window.sessionStorage.agileauthtoken = undefined;
-              window.sessionStorage.menus = undefined;
-              window.sessionStorage.userInfo = undefined;
-              window.sessionStorage.childrenMenus = undefined;
-              window.opener=null;
-              window.open(' ','_self');
-              window.close();
-              // window.parent.close();
+            this.$store.commit("setUserInfo", undefined);
+            this.$store.commit("setToken", undefined);
+            this.$store.commit("setMenus", undefined);
+            this.$store.commit("setTabList", []);
+            this.$cookie.delete("userInfo");
+            this.$cookie.delete("menus");
+            this.$cookie.delete("token");
+            window.sessionStorage.agileauthtoken = undefined;
+            window.sessionStorage.menus = undefined;
+            window.sessionStorage.userInfo = undefined;
+            window.sessionStorage.childrenMenus = undefined;
+            window.opener = null;
+            window.open(" ", "_self");
+            window.close();
+            // window.parent.close();
             //返回到登录页面
             // this.$router.push("/login");
             //   this.$http({
@@ -160,8 +175,6 @@ export default {
             //
             //       window.location.href = " http://cas.hl.cmcc/cas/login?service=http%3A%2F%2F10.230.26.15%3A8000%2Fspfm%2Fsysmgr%2FssLogin%3FsysFlag%3D0";
             //   });
-
-
           }
         })
         .catch((err) => {