fix: 切换测试计划用例页面显示不全

--bug=1013576 --user=陈建星 【测试跟踪】选中第一个测试计划的 某个模块,回到列表页打开第二个测试计划,功能列表用例 数据没有全部展示 https://www.tapd.cn/55049933/s/1165851
This commit is contained in:
chenjianxing 2022-05-26 21:38:31 +08:00 committed by jianxing
parent 2379312ef3
commit c08c3c04b8
2 changed files with 9 additions and 5 deletions

View File

@ -555,13 +555,13 @@ export default {
}
this.status = 'all';
}
this.condition.nodeIds = [];
if (this.selectNodeIds && this.selectNodeIds.length > 0) {
// param.nodeIds = this.selectNodeIds;
this.condition.nodeIds = this.selectNodeIds;
}
this.condition.projectId = getCurrentProjectID();
if (this.planId) {
getTestPlanTestCase(this.currentPage, this.pageSize, this.condition, (data) => {
this.result = getTestPlanTestCase(this.currentPage, this.pageSize, this.condition, (data) => {
this.total = data.itemCount;
this.tableData = data.listObject;
for (let i = 0; i < this.tableData.length; i++) {

View File

@ -101,7 +101,6 @@ export default {
'planStatus'
],
mounted() {
this.$store.commit('setTestPlanViewSelectNode', {});
this.initData();
},
computed: {
@ -110,6 +109,7 @@ export default {
},
},
activated() {
this.clearSelectNode();
this.initData();
this.openTestCaseEdit(this.$route.path);
},
@ -118,16 +118,20 @@ export default {
this.openTestCaseEdit(to.path);
},
planId() {
this.clearSelectNode();
this.initData();
}
},
methods: {
refresh() {
this.selectNodeIds = [];
this.$store.commit('setTestPlanViewSelectNode', {});
this.clearSelectNode();
this.$refs.testCaseRelevance.search();
this.getNodeTreeByPlanId();
},
clearSelectNode() {
this.selectNodeIds = [];
this.$store.commit('setTestPlanViewSelectNode', {});
},
initData() {
this.getNodeTreeByPlanId();
},