瀏覽代碼

专业库详情-左侧树跳转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({