From 2dbc79eadd70560e3e6ca3f59e90a78293d21fcf Mon Sep 17 00:00:00 2001 From: wenyann <64353056+wenyann@users.noreply.github.com> Date: Mon, 1 Jun 2020 19:53:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E7=AD=9B=E9=80=89=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/report/ApiReportList.vue | 23 +++++++++++++++---- .../components/api/test/ApiTestList.vue | 16 ++++++++++++- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/frontend/src/business/components/api/report/ApiReportList.vue b/frontend/src/business/components/api/report/ApiReportList.vue index 05941386ff..b20419462a 100644 --- a/frontend/src/business/components/api/report/ApiReportList.vue +++ b/frontend/src/business/components/api/report/ApiReportList.vue @@ -20,15 +20,19 @@ {{ scope.row.createTime | timestampFormatDate }} - + @@ -57,7 +61,15 @@ currentPage: 1, pageSize: 5, total: 0, - loading: false + loading: false, + statusFilters: [ + {text: 'Saved', value: 'Saved'}, + {text: 'Starting', value: 'Starting'}, + {text: 'Running', value: 'Running'}, + {text: 'Reporting', value: 'Reporting'}, + {text: 'Completed', value: 'Completed'}, + {text: 'Error', value: 'Error'} + ] } }, @@ -106,6 +118,9 @@ init() { this.testId = this.$route.params.testId; this.search(); + }, + filter(value, row) { + return row.status === value; } }, diff --git a/frontend/src/business/components/api/test/ApiTestList.vue b/frontend/src/business/components/api/test/ApiTestList.vue index a549faa9f4..3a52b396fb 100644 --- a/frontend/src/business/components/api/test/ApiTestList.vue +++ b/frontend/src/business/components/api/test/ApiTestList.vue @@ -25,7 +25,9 @@ {{ scope.row.updateTime | timestampFormatDate }} - + @@ -79,6 +81,14 @@ tip: this.$t('commons.delete'), icon: "el-icon-delete", type: "danger", exec: this.handleDelete } + ], + statusFilters: [ + {text: 'Saved', value: 'Saved'}, + {text: 'Starting', value: 'Starting'}, + {text: 'Running', value: 'Running'}, + {text: 'Reporting', value: 'Reporting'}, + {text: 'Completed', value: 'Completed'}, + {text: 'Error', value: 'Error'} ] } }, @@ -137,11 +147,15 @@ init() { this.projectId = this.$route.params.projectId; this.search(); + }, + filter(value, row) { + return row.status === value; } }, created() { this.init(); } + }