Merge branch 'master' of github.com:fit2cloudrd/metersphere-server

This commit is contained in:
Captain.B 2020-08-10 14:59:54 +08:00
commit 585c85e86b
3 changed files with 15 additions and 3 deletions

View File

@ -154,7 +154,7 @@
</include>
</if>
<if test="request.name != null">
and test_case.name like CONCAT('%', #{request.name},'%')
and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%'))
</if>
<if test="request.nodeIds != null and request.nodeIds.size() > 0">
and test_case.node_id in

View File

@ -126,7 +126,7 @@
</include>
</if>
<if test="request.name != null">
and test_case.name like CONCAT('%', #{request.name},'%')
and (test_case.name like CONCAT('%', #{request.name},'%') or test_case.num like CONCAT('%', #{request.name},'%'))
</if>
<if test="request.id != null">
and test_case.id = #{request.id}
@ -185,7 +185,14 @@
<if test="request.orders != null and request.orders.size() > 0">
order by
<foreach collection="request.orders" separator="," item="order">
<choose>
<when test="order.name == 'num'">
test_case.num ${order.type}
</when>
<otherwise>
test_plan_test_case.${order.name} ${order.type}
</otherwise>
</choose>
</foreach>
</if>
</select>

View File

@ -55,6 +55,7 @@
</el-table-column>
<el-table-column
prop="num"
sortable="custom"
:label="$t('commons.id')"
show-overflow-tooltip>
</el-table-column>
@ -497,6 +498,10 @@
this.initTableData();
},
sort(column) {
//
if (this.condition.orders) {
this.condition.orders = [];
}
_sort(column, this.condition);
this.initTableData();
},