fix(测试计划): 场景用例显示标签、ID,修改搜索提示
This commit is contained in:
parent
87d9a046ae
commit
012b5d64a7
|
@ -19,7 +19,7 @@
|
||||||
select
|
select
|
||||||
t.id, t.environment_id, t.create_time, t.update_time, t.last_result, t.pass_rate, t.report_id,
|
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.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
|
p.name as project_name, p.id as project_id, u.name as user_name
|
||||||
from
|
from
|
||||||
test_plan_api_scenario t
|
test_plan_api_scenario t
|
||||||
|
@ -44,7 +44,9 @@
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
<if test="request.name != null and request.name!=''">
|
<if test="request.name != null and request.name!=''">
|
||||||
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},'%'))
|
||||||
</if>
|
</if>
|
||||||
<if test="request.status != null and request.status!=''">
|
<if test="request.status != null and request.status!=''">
|
||||||
and t.last_result like CONCAT('%', #{request.status},'%')
|
and t.last_result like CONCAT('%', #{request.status},'%')
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
<show-more-btn :is-show="isSelect(row)" :buttons="buttons" :size="selectRows.length"/>
|
<show-more-btn :is-show="isSelect(row)" :buttons="buttons" :size="selectRows.length"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="num" label="ID"/>
|
||||||
<el-table-column prop="name" :label="$t('api_test.automation.scenario_name')"
|
<el-table-column prop="name" :label="$t('api_test.automation.scenario_name')"
|
||||||
show-overflow-tooltip/>
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="level" :label="$t('api_test.automation.case_level')"
|
<el-table-column prop="level" :label="$t('api_test.automation.case_level')"
|
||||||
|
@ -29,7 +30,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="tagNames" :label="$t('api_test.automation.tag')" width="200px">
|
<el-table-column prop="tagNames" :label="$t('api_test.automation.tag')" width="200px">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div v-for="itemName in scope.row.tagNames" :key="itemName">
|
<div v-for="(itemName,index) in scope.row.tags" :key="index">
|
||||||
<ms-tag type="success" effect="plain" :content="itemName"/>
|
<ms-tag type="success" effect="plain" :content="itemName"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -159,6 +160,11 @@
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
this.tableData = data.listObject;
|
this.tableData = data.listObject;
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.tags && item.tags.length > 0) {
|
||||||
|
item.tags = JSON.parse(item.tags);
|
||||||
|
}
|
||||||
|
});
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
:condition="condition"
|
:condition="condition"
|
||||||
@search="$emit('refresh')"
|
@search="$emit('refresh')"
|
||||||
:show-create="false"
|
:show-create="false"
|
||||||
:tip="$t('commons.search_by_name_or_id')">
|
:tip="$t('commons.search_by_id_name_tag')">
|
||||||
<template v-slot:title>
|
<template v-slot:title>
|
||||||
场景用例
|
场景用例
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue