소스 검색

专业库详情-左侧树跳转bug修复

shilipojs 3 년 전
부모
커밋
b5d82033dd
2개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 3
      src/views/career/plan/new-profess-detail.vue
  2. 1 1
      src/views/career/plan/new-profess-lib.vue

+ 3 - 3
src/views/career/plan/new-profess-detail.vue

@@ -346,6 +346,7 @@ export default {
       immediate: true,
       handler(val) {
         this.code = val.query.code
+        this.type =  val.query.type || '本科'
         if (val.query.code) {
           this.getOverView()
         }
@@ -355,11 +356,10 @@ export default {
   },
   methods: {
     handleNodeClick(data,node) {
-      if(!node.isLeaf) return
+      if(!node.isLeaf || this.code == node.data.code) return
       console.log('跳转')
-      console.log(node.data.code)
       // 跳转
-      this.$router.replace({path:'/career/plan/ProfessLibDetail',query:{code:node.data.code}})
+      this.$router.replace({path:'/career/plan/ProfessLibDetail',query:{type:this.type,code:node.data.code}})
     },
     isLeaf(data,node) {
       return node.childCount == 0

+ 1 - 1
src/views/career/plan/new-profess-lib.vue

@@ -84,7 +84,7 @@ export default {
   },
   methods:{
     goDetail(code){
-      this.$router.push({path:'/career/plan/ProfessLibDetail',query:{code:code}})
+      this.$router.push({path:'/career/plan/ProfessLibDetail',query:{type:this.type,code:code}})
     },
     getAllMajor() {
       allMajor({