diff --git a/src/views/content/index.vue b/src/views/content/index.vue index 79bc43f..3e11c92 100644 --- a/src/views/content/index.vue +++ b/src/views/content/index.vue @@ -17,7 +17,6 @@
-
@@ -202,6 +201,7 @@ export default { }, watch: { $route(to, from) { + console.log("我被触发了") let arcId = this.$route.params && this.$route.query.id this.navId = this.$route.params && this.$route.params.navId; let id = this.$route.params && this.$route.params.secondId @@ -220,6 +220,12 @@ export default { this.getContent(info.second) } return + }else { + console.log(this.navId,"this.navId") + if (undefined == this.navId ){ + this.showIndex = 0 + this.getNodes() + } } this.showSecond = true if (arcId != undefined) { @@ -324,6 +330,7 @@ export default { if (arcId != undefined) { this.getContext(arcId) } else { + console.log("测试,我被触发了!") if (this.navId == undefined) { this.getContent(this.navList[0]) } else { @@ -359,6 +366,12 @@ export default { getNode(data).then(res => { console.log(res, "res值") console.log(this.type); + if (null == res.data){ + this.contextData = null + console.log("将值设为null",this.contextData) + this.type = 0 + return + } if (this.type === 2 || this.type === 4) { this.contextData = { data: res.rows, @@ -374,6 +387,7 @@ export default { if (res.additional == ""){ this.organizationType = "1" }else { + console.log(this.organizationType,"this.organizationType") this.organizationType = res.additional } this.contextData = handleTree(res.data, "id", "pid", null, null) diff --git a/src/views/header/index.vue b/src/views/header/index.vue index a2f0ee5..f462322 100644 --- a/src/views/header/index.vue +++ b/src/views/header/index.vue @@ -58,31 +58,42 @@
- - -