From 012b5d64a7614cbf374f90d5c7a74ab89eaa9096 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 28 Jan 2021 10:46:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E7=94=A8=E4=BE=8B=E6=98=BE=E7=A4=BA=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E3=80=81ID=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml | 6 ++++-- .../plan/view/comonents/api/TestPlanApiScenarioList.vue | 8 +++++++- .../view/comonents/api/TestPlanScenarioListHeader.vue | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml index 508197b62d..4800d42428 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanScenarioCaseMapper.xml @@ -19,7 +19,7 @@ select t.id, t.environment_id, t.create_time, t.update_time, t.last_result, t.pass_rate, t.report_id, c.id as case_id, c.project_id, c.user_id,c.api_scenario_module_id, c.module_path, c.name, c.level, - c.status, c.principal, c.step_total, c.follow_people, c.schedule, c.description, + c.status, c.principal, c.step_total, c.follow_people, c.schedule, c.description, c.tags, c.num, p.name as project_name, p.id as project_id, u.name as user_name from test_plan_api_scenario t @@ -44,7 +44,9 @@ - and c.name like CONCAT('%', #{request.name},'%') + and (c.name like CONCAT('%', #{request.name},'%') + or c.num like CONCAT('%', #{request.name},'%') + or c.tags like CONCAT('%', #{request.name},'%')) and t.last_result like CONCAT('%', #{request.status},'%') diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue index bd2789f4b1..fd3fbac396 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanApiScenarioList.vue @@ -15,6 +15,7 @@ + @@ -159,6 +160,11 @@ let data = response.data; this.total = data.itemCount; this.tableData = data.listObject; + this.tableData.forEach(item => { + if (item.tags && item.tags.length > 0) { + item.tags = JSON.parse(item.tags); + } + }); this.loading = false; }); }, diff --git a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanScenarioListHeader.vue b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanScenarioListHeader.vue index e0433b30cf..a1d6b87f53 100644 --- a/frontend/src/business/components/track/plan/view/comonents/api/TestPlanScenarioListHeader.vue +++ b/frontend/src/business/components/track/plan/view/comonents/api/TestPlanScenarioListHeader.vue @@ -3,7 +3,7 @@ :condition="condition" @search="$emit('refresh')" :show-create="false" - :tip="$t('commons.search_by_name_or_id')"> + :tip="$t('commons.search_by_id_name_tag')">