From e6dbe2a59937ec00463bd9f678f59e61b47b0414 Mon Sep 17 00:00:00 2001 From: wenyann Date: Mon, 24 May 2021 17:22:28 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E6=95=B0=E5=A2=9E=E5=8A=A0=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=20=E7=94=A8=E4=BE=8B=E7=8A=B6=E6=80=81=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=AD=9B=E9=80=89=20=E7=94=A8=E4=BE=8B=E9=80=9A=E8=BF=87?= =?UTF-8?q?=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/service/ApiDefinitionService.java | 10 ++++++++++ .../api/definition/components/list/ApiList.vue | 14 ++++++++++---- frontend/src/common/js/tableUtils.js | 3 +++ 3 files changed, 23 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java index e5c6c30ba4..303f711540 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionService.java @@ -113,6 +113,16 @@ public class ApiDefinitionService { request = this.initRequest(request, true, true); List resList = extApiDefinitionMapper.list(request); calculateResult(resList, request.getProjectId()); + ApiDefinitionRequest finalRequest = request; + if (finalRequest.getFilters().size() > 1) { + if (null != finalRequest.getFilters().get("case_status")) { + resList = resList.stream() + .filter((ApiDefinitionResult b) -> finalRequest.getFilters().get("case_status").contains(b.getCaseStatus())) + .collect(Collectors.toList()); + } + + } + return resList; } diff --git a/frontend/src/business/components/api/definition/components/list/ApiList.vue b/frontend/src/business/components/api/definition/components/list/ApiList.vue index c6357ea9e9..f8141596e5 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiList.vue @@ -24,12 +24,13 @@ show-overflow-tooltip min-width="80px" sortable=true - :key="index"> + :key="index" + >