性能测试-全部测试-排序
This commit is contained in:
parent
12c6acef77
commit
8abae1024d
|
@ -27,7 +27,12 @@
|
|||
AND load_test.id = #{request.id}
|
||||
</if>
|
||||
</where>
|
||||
order by load_test.update_time desc
|
||||
<if test="request.orders != null and request.orders.size() > 0">
|
||||
order by
|
||||
<foreach collection="request.orders" separator="," item="order">
|
||||
test_plan_test_case.${order.name} ${order.type}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
<select id="countByProjectId" resultType="java.lang.Long">
|
||||
select count(id) from load_test
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
package io.metersphere.track.request.testplan;
|
||||
|
||||
import io.metersphere.controller.request.OrderRequest;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class QueryTestPlanRequest extends TestPlanRequest {
|
||||
private String workspaceId;
|
||||
private List<OrderRequest> orders;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
<el-table :data="tableData" class="test-content">
|
||||
<el-table :data="tableData" class="test-content"
|
||||
@sort-change="sort"
|
||||
:default-sort="{prop: 'createTime', order: 'descending'}"
|
||||
>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
|
@ -36,6 +39,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column
|
||||
width="250"
|
||||
sortable
|
||||
prop="createTime"
|
||||
:label="$t('commons.create_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.createTime | timestampFormatDate }}</span>
|
||||
|
@ -43,6 +48,8 @@
|
|||
</el-table-column>
|
||||
<el-table-column
|
||||
width="250"
|
||||
sortable
|
||||
prop="updateTime"
|
||||
:label="$t('commons.update_time')">
|
||||
<template v-slot:default="scope">
|
||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||
|
@ -77,6 +84,7 @@
|
|||
import MsMainContainer from "../../common/components/MsMainContainer";
|
||||
import MsPerformanceTestStatus from "./PerformanceTestStatus";
|
||||
import MsTableOperators from "../../common/components/MsTableOperators";
|
||||
import {_sort} from "../../../../common/js/utils";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
@ -181,6 +189,10 @@
|
|||
this.initTableData();
|
||||
});
|
||||
},
|
||||
sort(column) {
|
||||
_sort(column, this.condition);
|
||||
this.initTableData();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue