zhengnaiwen_citu 6 mesi fa
parent
commit
6bb9c55c6e

+ 6 - 2
src/views/humanResources/panorama/panoramaDetails.vue

@@ -30,13 +30,13 @@ import PanoramaDetailsMenu from './panoramaDetailsMenu.vue'
 import {
   findPath
 } from '@/utils/panorama'
-
+import qs from 'qs'
 export default {
   name: 'panorama-details',
   components: { PanoramaDetailsMenu },
   data () {
     return {
-      activeIndex: 'humanResources/roster',
+      activeIndex: '',
       breadcrumbs: [],
       componentsPath: null
     }
@@ -60,6 +60,7 @@ export default {
     }
   },
   created () {
+    this.activeIndex = this.$route.query.path || 'humanResources/roster'
     this.getDept()
     this.runPanorama()
   },
@@ -91,6 +92,9 @@ export default {
     },
     onSelect (v) {
       this.activeIndex = v
+      const query = { ...this.$route.query }
+      query.path = v
+      this.$router.push(`${this.$route.path}?${qs.stringify(query)}`)
       this.runPanorama()
     },
     onRun (path) {

+ 3 - 0
src/views/humanResources/panorama/panoramaDetailsMenu.vue

@@ -42,6 +42,9 @@ export default {
   height: 40px;
   display: flex;
   align-content: center;
+  &.is-active {
+    background-color: rgb(236, 245, 255)
+  }
   &:hover {
     background-color: #f5f7fa;
   }