From 910474f015ee424ac5d61ae0eaba5aa88277783d Mon Sep 17 00:00:00 2001 From: wangwenrui Date: Mon, 16 Mar 2020 18:33:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:endpoint-query=20=E6=9F=A5=E8=AF=A2bug?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/page/project/project.vue | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/nezha-fronted/src/components/page/project/project.vue b/nezha-fronted/src/components/page/project/project.vue index 4fe7a08a5..795ca36a3 100644 --- a/nezha-fronted/src/components/page/project/project.vue +++ b/nezha-fronted/src/components/page/project/project.vue @@ -1146,10 +1146,19 @@ colorSimpleTemp+=`${key}='${result.metric[key]}',`; } } - temp=temp.substr(0,temp.length-1); - simpleTemp=simpleTemp.substr(0,simpleTemp.length-1); - colorTemp=colorTemp.substr(0,colorTemp.length-1); - colorSimpleTemp=colorSimpleTemp.substr(0,colorSimpleTemp.length-1); + if(temp.indexOf(',') != -1){ + temp=temp.substr(0,temp.length-1); + } + if(simpleTemp.indexOf(',') != -1){ + simpleTemp=simpleTemp.substr(0,simpleTemp.length-1); + } + if(colorTemp.indexOf(',') != -1){ + colorTemp=colorTemp.substr(0,colorTemp.length-1); + } + if(colorSimpleTemp.indexOf(',') != -1){ + colorSimpleTemp=colorSimpleTemp.substr(0,colorSimpleTemp.length-1); + } + temp+="}"; simpleTemp+="}"; @@ -1630,7 +1639,7 @@ let temp=this; setTimeout(function(){ temp.tableFilter(); - },100) + },500) }, }, destroyed() {