From b0eb7bf7adcce7dac0e3dfb558bef2f9b3b57032 Mon Sep 17 00:00:00 2001 From: zhangyu Date: Tue, 19 Jan 2021 11:34:26 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9project=20=E5=88=87?= =?UTF-8?q?=E6=8F=9Bmodule=E6=97=B6=20=E7=82=B9=E5=87=BB=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E6=96=B0=E7=9A=84=E7=82=B9=E7=9A=84bug=20?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E5=88=87=E6=8D=A2module=E5=90=8E=20=E8=BF=9E?= =?UTF-8?q?=E7=BA=BF=E6=B6=88=E5=A4=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/project/topology.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nezha-fronted/src/components/common/project/topology.vue b/nezha-fronted/src/components/common/project/topology.vue index 7ed48fab9..1d8fb9e09 100644 --- a/nezha-fronted/src/components/common/project/topology.vue +++ b/nezha-fronted/src/components/common/project/topology.vue @@ -492,6 +492,10 @@ this_.arrayDiff(); this_.popDataShowUpdate(); }) + }else{ + this.$nextTick(()=>{ + this.modelTopUpdate(); + }) } }, addModel(model){ // 添加model @@ -504,6 +508,14 @@ }else{ model={...model,...this.network.DOMtoCanvas({x:80,y:100})}; } + this.edgesArray.forEach(item=>{ + if(item.from===this.selNodeId){ + item.from=model.id; + } + if(item.to===this.selNodeId){ + item.to=model.id; + } + }) this.$get('/module/stat',{id:model.id}).then(res=>{ model.state=res.data; nodesArray.push(model);