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')">