From 7302dadaba783c1346b47b40f533280d6c3e4fa2 Mon Sep 17 00:00:00 2001
From: liupengpeng <276665548@qq.com>
Date: 星期五, 10 二月 2023 15:34:31 +0800
Subject: [PATCH] 页面刷新还在本页面

---
 src/views/maintenance/mochaitmo.vue |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/src/views/maintenance/mochaitmo.vue b/src/views/maintenance/mochaitmo.vue
index d312f21..8d26554 100644
--- a/src/views/maintenance/mochaitmo.vue
+++ b/src/views/maintenance/mochaitmo.vue
@@ -203,6 +203,13 @@
           });
           this.menuList = this.treeData(menuList);
           this.getCookies();
+          const hanleselectmochaitmo = sessionStorage.getItem('hanleselectmochaitmo')
+          if (hanleselectmochaitmo) {
+            this.$nextTick(function (){
+              this.handleselecttwo(JSON.parse(hanleselectmochaitmo).url, JSON.parse(hanleselectmochaitmo))
+              this.setViewController(JSON.parse(hanleselectmochaitmo))     
+            })
+          }
           //
         } else {
           alert('鏆傛棤鑿滃崟鏍忔暟鎹�');
@@ -244,6 +251,10 @@
 
     handleselect(index, indexPath, e) {
       this.getTimeCookies();
+      
+      const a = JSON.stringify(e.$attrs.perms)
+      sessionStorage.setItem('hanleselectmochaitmo', a)
+
       var data = e.$attrs.perms;
       this.$store.state.currentPerms = data.perms;
       var index = data.url;
@@ -256,6 +267,24 @@
       this.setMenuFlag = index;
 
     },
+    handleselecttwo(index, e) {
+      this.getTimeCookies();
+
+      const a = JSON.stringify(e)
+      sessionStorage.setItem('hanleselectmochaitmo', a)
+
+      var data = e;
+      this.$store.state.currentPerms = data.perms;
+      var index = data.url;
+      if (index != null) {
+        if (index.indexOf('http') != -1) {
+          this.$store.commit('getIframe', data.url);
+          index = 'dataIfream';
+        }
+      }
+      this.setMenuFlag = index;
+
+    },
   },
 };
 </script>

--
Gitblit v1.9.3