From d0d6979586804ba78de0686d7b9501704b76cad2 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 20 七月 2023 18:51:30 +0800
Subject: [PATCH] 路由key

---
 Source/UBCS-WEB/src/page/index/index.vue |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/Source/UBCS-WEB/src/page/index/index.vue b/Source/UBCS-WEB/src/page/index/index.vue
index f802b58..b3c7996 100644
--- a/Source/UBCS-WEB/src/page/index/index.vue
+++ b/Source/UBCS-WEB/src/page/index/index.vue
@@ -18,9 +18,9 @@
         <!-- 涓讳綋瑙嗗浘灞� -->
         <div style="height:100%;overflow-y:auto;overflow-x:hidden;" id="avue-view" v-show="!isSearch">
           <keep-alive>
-            <router-view class="avue-view" v-if="$route.meta.keepAlive"/>
+            <router-view class="avue-view" v-if="$route.meta.keepAlive" :key="$route.id"></router-view>
           </keep-alive>
-          <router-view class="avue-view" v-if="!$route.meta.keepAlive"/>
+          <router-view class="avue-view"  v-if="!$route.meta.keepAlive" :key="$route.id" ></router-view>
         </div>
       </div>
     </div>
@@ -38,7 +38,7 @@
   import {validatenull} from "@/util/validate";
   import {calcDate} from "@/util/date.js";
   import {getStore} from "@/util/store.js";
-
+  import {getRoutes} from "@/api/system/menu"
   export default {
     components: {
       top,
@@ -67,7 +67,7 @@
     created() {
       //瀹炴椂妫�娴嬪埛鏂皌oken
       this.refreshToken();
-
+      this.getRoute()
     },
     mounted() {
       this.init();
@@ -79,6 +79,15 @@
     computed: mapGetters(["isMenu", "isLock", "isCollapse", "website", "menu"]),
     props: [],
     methods: {
+      getRoute(topMenuId){
+        getRoutes(topMenuId).then(res=>{
+          console.log('route',res)
+
+        })
+      },
+      getIds(){
+
+      },
       showCollapse() {
         this.$store.commit("SET_COLLAPSE");
       },

--
Gitblit v1.9.3