From e596dfbcce387072e19fcb95760eedb9bb136ecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=8A=B2=E6=9D=BE?= Date: Mon, 27 Apr 2020 20:10:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dadd-endpoint=E6=97=B6p?= =?UTF-8?q?roject=E6=88=96module=E4=B8=8D=E9=80=89=E4=B8=AD=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/rightBox/addEndpointBox.vue | 8 +++----- nezha-fronted/src/components/page/project/project.vue | 5 ++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue index 065b0e6b7..d02bf010b 100644 --- a/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue +++ b/nezha-fronted/src/components/common/rightBox/addEndpointBox.vue @@ -404,11 +404,8 @@ this.$get('project', {pageSize: -1, pageNo: 1}).then(response => { if (response.code === 200) { this.projectList = response.data.list; - if (this.moduleList.length == 0) { - this.getModuleList(this.currentProject.id); - } + this.getModuleList(this.currentProject.id); } - }); }, @@ -520,6 +517,7 @@ } } this.moduleList = response.data.list; + console.info(this.moduleList) } }); }, @@ -626,7 +624,7 @@ }, currentProject(n, o) { this.endpointForm.projectId = n.id; - if(this.rightBox.show){ + if(n.id != o.id){ this.getModuleList(n.id); } }, diff --git a/nezha-fronted/src/components/page/project/project.vue b/nezha-fronted/src/components/page/project/project.vue index c8aae31e1..ad5071c27 100644 --- a/nezha-fronted/src/components/page/project/project.vue +++ b/nezha-fronted/src/components/page/project/project.vue @@ -457,7 +457,6 @@ // } }, detailProjectInfo:function(event,project){ - console.log(event) if(event){ this.pageType='project' if(project){ @@ -468,6 +467,7 @@ // this.$refs.projectLeft.setActiveNames([]); }else{ + console.info(this.currentProject) this.currentProjectTitle=this.currentProject.name+"-"+this.currentProject.id } }, @@ -497,7 +497,6 @@ //左侧module列表选中切换 changeModule(module) { this.currentModule = module; - this.currentProject={}; this.endpointSearchLabel = {moduleId: ''}; this.$refs.projectSearch.clearSearch(); this.showSubList = false; @@ -748,7 +747,7 @@ if (pageSize) { this.endpointPageObj.pageSize = pageSize } - this.detailProjectInfo(); + //this.detailProjectInfo(); // setTimeout(()=>{ // this.getEndpointTableData(); // }, 200);