Browse Source

fix(获取参数)

liujing 8 months ago
parent
commit
25e630f285
2 changed files with 12 additions and 7 deletions
  1. 1 4
      src/layout/components/Navbar.vue
  2. 11 3
      src/views/index/index.vue

+ 1 - 4
src/layout/components/Navbar.vue

@@ -320,13 +320,10 @@ export default {
         this.getEventNums()
         const start_time = this.times.start_time
         const end_time = this.times.end_time
-        const live = this.times.live
-
         const obj = val
         obj.live = this.times.live
         obj.start_time = this.times.start_time
         obj.end_time = this.times.end_time
-
         storage.set('appsItem', obj)
         this.$router.push({
           path: '/business-analysis/topology/index',
@@ -337,7 +334,7 @@ export default {
             start_time,
             end_time,
             item: val,
-            live: live
+            live: val.live
           }
         })
       }

+ 11 - 3
src/views/index/index.vue

@@ -317,7 +317,6 @@ export default {
     this.getList()
     if (this.$route.query.openMonitor) {
       this.openMonitor = this.$route.query.openMonitor
-      console.log('this.openMonitor0000000---', this.openMonitor)
     }
   },
   mounted() {
@@ -399,10 +398,19 @@ export default {
         obj.live = this.times.live
         obj.start_time = this.times.start_time
         obj.end_time = this.times.end_time
-
+        console.log('obj-----',obj)
         storage.set('appsItem', obj)
         this.$router.push({
-          path: '/business-analysis/topology/index'
+          path: '/business-analysis/topology/index',
+          query: {
+            id: val.id,
+            app_alias: val.alias,
+            name: val.name,
+            start_time:this.times.start_time,
+            end_time: this.times.end_time,
+            item: val,
+            live: val.live
+          }
         }).catch(err => err)
       }
     },