fix: 用例脑图和列表顺序保持一致

This commit is contained in:
chenjianxing 2021-09-02 16:50:40 +08:00 committed by jianxing
parent 528eb6b244
commit 17856ece01
3 changed files with 15 additions and 3 deletions

View File

@ -1486,6 +1486,13 @@ public class TestCaseService {
}
public List<TestCaseWithBLOBs> listTestCaseForMinder(QueryTestCaseRequest request) {
List<OrderRequest> orderList = ServiceUtils.getDefaultOrder(request.getOrders());
OrderRequest order = new OrderRequest();
// 对模板导入的测试用例排序
order.setName("sort");
order.setType("desc");
orderList.add(order);
request.setOrders(orderList);
request.setOrders(ServiceUtils.getDefaultOrder(request.getOrders()));
return extTestCaseMapper.listForMinder(request);
}

View File

@ -1,5 +1,5 @@
<template>
<div>
<div v-if="tableActive">
<el-table
border
:data="data"
@ -115,6 +115,7 @@ export default {
selectDataCounts: 0,
selectRows: new Set(),
selectIds: [],
tableActive: true,
hasBatchTipShow: false
};
},
@ -349,13 +350,16 @@ export default {
},
resetHeader() {
this.$emit('update:fields', getCustomTableHeader(this.fieldKey, this.customFields));
this.doLayout();
this.reloadTable();
},
toggleRowSelection() {
this.$refs.table.toggleRowSelection();
},
reloadTable() {
this.doLayout();
this.tableActive = false;
this.$nextTick(() => {
this.tableActive = true;
});
}
}
};

View File

@ -95,6 +95,7 @@ name: "TestCaseMinder",
return {
request: {
projectId: this.projectId,
orders: this.condition.orders
},
result: this.result,
isDisable: false