From f80f6c74d1158a94470745f951526b9e735bd6dd Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Wed, 24 Mar 2021 22:21:51 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=E6=97=A0=E9=A1=B9=E7=9B=AE=E6=97=B6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/homepage/components/FailureTestCaseList.vue | 9 +++++---- .../api/homepage/components/RunningTaskList.vue | 9 +++++---- .../src/business/components/track/home/TrackHome.vue | 4 +++- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/frontend/src/business/components/api/homepage/components/FailureTestCaseList.vue b/frontend/src/business/components/api/homepage/components/FailureTestCaseList.vue index 69b2797d52..dbf6413c13 100644 --- a/frontend/src/business/components/api/homepage/components/FailureTestCaseList.vue +++ b/frontend/src/business/components/api/homepage/components/FailureTestCaseList.vue @@ -64,10 +64,11 @@ export default { }, methods: { search() { - let projectID = this.projectId; - this.result = this.$get("/api/faliureCaseAboutTestPlan/"+projectID+"/10", response => { - this.tableData = response.data; - }); + if (this.projectId) { + this.result = this.$get("/api/faliureCaseAboutTestPlan/"+ this.projectId +"/10", response => { + this.tableData = response.data; + }); + } }, redirect(pageType,param){ switch (pageType){ diff --git a/frontend/src/business/components/api/homepage/components/RunningTaskList.vue b/frontend/src/business/components/api/homepage/components/RunningTaskList.vue index 91ad2ea5bf..2c98024605 100644 --- a/frontend/src/business/components/api/homepage/components/RunningTaskList.vue +++ b/frontend/src/business/components/api/homepage/components/RunningTaskList.vue @@ -88,10 +88,11 @@ export default { methods: { search() { - let projectID = this.projectId; - this.result = this.$get("/api/runningTask/"+projectID+"/"+this.callFrom, response => { - this.tableData = response.data; - }); + if (this.projectId) { + this.result = this.$get("/api/runningTask/"+ this.projectId +"/"+this.callFrom, response => { + this.tableData = response.data; + }); + } }, closeTaskConfirm(row){ diff --git a/frontend/src/business/components/track/home/TrackHome.vue b/frontend/src/business/components/track/home/TrackHome.vue index 2093c7a762..39c2a35143 100644 --- a/frontend/src/business/components/track/home/TrackHome.vue +++ b/frontend/src/business/components/track/home/TrackHome.vue @@ -120,7 +120,9 @@ export default { }, init() { let selectProjectId = this.projectId; - + if (!selectProjectId) { + return; + } this.$get("/track/count/" + selectProjectId, response => { this.trackCountData = response.data; });