测试计划关联用例页增加按用例名称搜索

This commit is contained in:
shiziyuan9527 2020-07-09 15:09:05 +08:00
parent 0228043184
commit e71e866827
3 changed files with 12 additions and 2 deletions

View File

@ -6,6 +6,9 @@
select test_case.id, test_case.name, test_case.priority, test_case.type
from test_case
<where>
<if test="request.name != null">
and test_case.name like CONCAT('%', #{request.name},'%')
</if>
<if test="request.projectId != null">
AND test_case.project_id = #{request.projectId}
</if>
@ -14,7 +17,6 @@
<foreach collection="request.nodeIds" open="(" close=")" separator="," item="nodeId">
#{nodeId}
</foreach>
</if>
<if test="request.filters != null and request.filters.size() > 0">
<foreach collection="request.filters.entrySet()" index="key" item="values">

View File

@ -12,6 +12,8 @@ import java.util.Map;
@Setter
public class QueryTestCaseRequest extends TestCase {
private String name;
private List<String> nodeIds;
private List<OrderRequest> orders;

View File

@ -19,6 +19,11 @@
<el-container>
<el-main class="case-content" v-loading="result.loading">
<el-row>
<el-col :offset="16" :span="8">
<ms-table-search-bar :condition.sync="condition" @change="initData"/>
</el-col>
</el-row>
<el-table
:data="testCases"
@filter-change="filter"
@ -80,10 +85,11 @@
import PriorityTableItem from "../../../common/tableItems/planview/PriorityTableItem";
import TypeTableItem from "../../../common/tableItems/planview/TypeTableItem";
import {_filter} from "../../../../../../common/js/utils";
import MsTableSearchBar from "../../../../common/components/MsTableSearchBar";
export default {
name: "TestCaseRelevance",
components: {NodeTree, MsDialogFooter, PriorityTableItem, TypeTableItem},
components: {NodeTree, MsDialogFooter, PriorityTableItem, TypeTableItem, MsTableSearchBar},
data() {
return {
result: {},